Comments in docx cause blank space at top and bottom of PDFs

Hi,

When I am converting a document from docx to PDF and the docx has comments in it then blank space is added to the top and bottom of the PDFs.

This appears to only be an issue when the docx has comments in it. I have tried the same process with the same files but without the comments and the output files are as expected.

I have also run a find and replace operation on the documents but the output of the find and replace when saved to docx does not include the blank space.

Below is my input file and the output in docx and PDF formats.

Input.docx (68.2 KB)
PDF output.pdf (224.3 KB)
DOCX output.docx (69.8 KB)

@dan457,

We have converted your “Def Comp Match Plan 2.docx” file to PDF format by using the latest version of Aspose.Words for .NET and attached it here for your reference (see 21.5.pdf (210.0 KB)).

So, we suggest you to please upgrade to the latest (21.5) version of Aspose.Words for .NET and see how it goes on your end?

In case the problem still remains, then please ZIP and upload your Aspose.Words 21.5 generated PDF file showing the undesired behavior here for testing. Please also provide a comparison screenshot highlighting (encircle) the problematic area(s) in Aspose.Words generated output and attach it here for our reference. We will then investigate the issue further on our end and provide you more information.

Hi @awais.hafeez,

I have just downloaded the file you attached 21.5.pdf and it contains the blank spaces I am talking about.Capture.PNG (45.8 KB)

@dan457,

But, MS Word 2019 also produces a similar output when saving this “Def Comp Match Plan 2.docx” Word document to PDF format and in this case, Aspose.Words 21.5 tries to mimic the behavior of MS Word. Please check MS Word 2019 generated PDF file:

So, this seems to be an expected behavior of Aspose.Words. Please let me know if I can be of any further assistance.