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

Free Support Forum - aspose.com

Is it possible to make pdf converted looks exactly the same as it is in MS Word?

We are in a task to develop server-side software to convert docs to pdfs. And it is required that the formats and layouts in the converted pdfs should be exactly the same as how it looks like in MS Word. We tried Aspose.Word to convert files using the following code:
Document doc = new Document(inputFile);
com.aspose.words.PdfSaveOptions pdfOption = new com.aspose.words.PdfSaveOptions();
doc.save(pdfFile, pdfOption);
Most of the converted files look fine but some files have differences in spacing with the original docs in MS Word. I would like to ask if it is possible to improve the above code, or it is just beyond Aspose.Word’s current functionality, or there are more professional alternatives from the Aspose product families.
Thanks if you help with this.


Thanks for your inquiry. Yes, Aspose.Words mimics the same behavior as MS Word does. If you are facing problem, please ZIP and attach the following resources here for testing.

  • Input document(s).
  • Aspose.Words generated PDF file(s) showing undesired behavior.
  • Ms Word generated PDF file(s) showing the desired output.

We will then investigate the issue on our end and provide you more information.

P.S. If your file size is big then you may upload the ZIP file to Dropbox or any other file hosting service and share the download link here for testing.

Hi, thanks for replay. Unfortunately, currently we cannot offer the original files. However, we have reproduced the problem by putting text controls into a doc, as lines in the output pdf with text from text controls will be assigned significantly larger vertical spacing.
I hope that the above have given you enough information on this. But if you cannot reproduce it, I will attach a test document here.


It would be great if you please Zip and attach test input documents here for testing. We will then investigate the issue on our end and provide you more information.

Thanks for your cooperation.

test.zip (77.5 KB)
Attached is a test document and pdfs converted on my private computer.


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-17982 . We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.


It would be great if you please ZIP and attach the DejaVu Sans Font file you are using in the document here for testing.

I am sorry that I am not sure if it is a violation of license if I post the font here. However, I’ve found this font available on https://www.fontsquirrel.com/fonts/dejavu-sans.


Actually, we want the same font used in your document for testing. If the version of shared and used font in your document is same then we can use this font otherwise, please post your font file via private message. In order to send a private message with attachments, please click on my name and find “Message” button. (see the screenshot).

Thanks for your cooperation.

Hello, the font from the link is the same as the one used in the document.


Thanks for the additional information. We will keep you posted on any further updates and let you know via this thread as soon as this issue is resolved.