We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Text Overlap in pdf


I tried to convert docx file to pdf using Aspose. Following is the code I used to conversion. I experienced text overlapping in pdf file. Is there any mistake I have done with the code or is this a bug.

This is the code I used for conversion


Document doc = new Document(docxPath);
string xmlFile = “e:\Document.ConvertToPdf Out.xml”;
doc.Save(xmlFile, SaveFormat.AsposePdf);
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(xmlFile, null);

pdf.IsImagesInXmlDeleteNeeded = true;
pdf.IsBookmarked = true;

I have attached resulted pdf file and used docx file with this. The titles have overlapped with title numbers.


Hello Sameera,

Thanks for considering Aspose.

I have tested the scenario with conventional/Legacy method and I am able to notice the same problem. For the sake of correction, please try using the Direct-to-PDF save method of Aspose.Words. As per my observation, the output with Direct-to-PDF save method is correct. For your reference, I have also attached the resultant PDF document. Please take a look.

For more information on Direct-to-PDF save method of Aspose.Words, please visit the following link. How-to: Convert a Document to PDF

In case it does not resolve your problem or you have any further query, please feel free to contact.

We apologize for your inconvenience.


I used that method earlier for conversion. But I need to docx file table of content to be appeared as bookmarks of pdf file. Is that possible with that method? (I don’t know much about Aspose and all the methods I used are failed for my requirement). If it is possible please let me know.

Thnx for your reply



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

Thank you for additional information. In this case you can use PdfOptions.HeadingsOutlineLevels property:


Hope this helps.

Best regards.

Thank you for your reply.
I will try and let you know does it worked for me.



It worked for me for the table of contents.

But i have another requirement. when there is no specific table of contents page, I need the headings of docx file to be appeared as bookmarks on pdf. I created new thread with this problem. There are some attachments showing the problem faced by me.

If you can please give me a way to overcome the problem.
Link to new thread : http://www.aspose.com/community/forums/236334/headings-in-docx-appear-as-bookmarks-on-pdf/showthread.aspx#236334



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

Thanks for your request. I just answered your question here:

Best regards.