Header formatting issues when converting from Word to PDF


I have a word document with a header that has address information left justified and a company logo tabbed to the right hand side of the page. When I convert this word document to a PDF file (see code below) the logo appears on the left hand column instead of the right hand column. My customer has Aspose.Words ( and Aspose.Pdf (

My question is, am I missing code to format this correctly or is this a bug in the version of Aspose.Words or .Pdf I am using?

Any help would be appreciated.


public bool GeneratePDFFromWord(string wordFile, string pdfFile)
// New a Doc object.
AspWords.Document doc = new AspWords.Document(wordFile);
string tempFileName = System.IO.Path.GetTempFileName();
// Save the doc in a xml fille that can be handled by Aspose.Pdf.
doc.Save(tempFileName, AspWords.SaveFormat.AsposePdf);
// New a pdf object.
AspPdf.Pdf pdf = new AspPdf.Pdf();
// Bind content from the named xml file.
pdf.BindXML(tempFileName, null);
//Instruct to delete temporary image files.
pdf.IsImagesInXmlDeleteNeeded = true;
// Set Font Map for better performance
pdf.IsTruetypeFontMapCached = true;
pdf.TruetypeFontMapPath = Path.GetTempPath();
// Save the result
catch (Exception e)
return false;
return true;

Hello Paul,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please use the latest versions of Aspose.Words which is v5.2.2.0 and Aspose.Pdf v3.7.0.0. Incase the issue is still there, please share the Word file with us, so that we can test the issue at our end.