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



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 : Headings in docx appear as Bookmarks on pdf - Free Support Forum - aspose.com



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