Convert Word DOCX Document Containing Images to PDF File using C# .NET Code

The formatting of the Pdf is misaligned when the word document is having images in it, also a few times a blank page gets added in the Pdf format. Please find the attached zip code for the same.

TestFormat.docx is the word document converted to pdf, I have also attached the misaligned Pdf that is generated with the sample code. This issue is reproducible on Aspose console app and Convert Files Online - Word, PDF, HTML, JPG And Many More.

Please let us know, is there any solution for the same.

Any help would be greatly appreciated.

Thanks

@iticertis,

To ensure a timely and accurate response, please ZIP and attach the following resources here for testing:

  • Your simplified input Word document (TestFormat.docx)
  • Aspose.Words 20.3 generated PDF file showing the undesired behavior
  • Please also create a standalone simple Console Application (source code without compilation errors) that helps us to reproduce your current problem on our end and attach it here for testing. Please do not include Aspose.Words DLL/JAR files in it to reduce the file size.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

AsposeWordsDemo.zip (2.7 MB)

@awais.hafeez,
Uploaded zip has console app and it has a word document and pdf. Aspose version we are using is 20.1.
But this issue is reproducible on Convert Files Online - Word, PDF, HTML, JPG And Many More.

@iticertis,

We are working on your query and will get back to you soon.

@iticertis,

Thanks for being patient. 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-20163. 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.

The issues you have found earlier (filed as WORDSNET-20163) have been fixed in this Aspose.Words for .NET 20.5 update and this Aspose.Words for Java 20.5 update.