Convert Word DOCX Document with Charts to PDF using C# .NET | Prevent Extra/Missing Line / Text Cut Off in PDF

Hi,

When I converted a DOCX with some charts to PDF, I noticed with the newer version of Aspose.Words, some text was cut off and rendered lines also behaved incorrectly, which didn’t happen with an old Aspose.Words version 19.6.0.

Code:
var doc = new Document(@".\test.docx");
doc.Save(@".\out.pdf");

As it didn’t happen before, I believe it is a regression with recent versions. I’ve attached the test files and a screenshot for your reference. Could you please help us take a look?

test.zip (90.0 KB)
image.png (136.5 KB)

Thanks,

@ServerSide527,

We have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-21428. 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 have been fixed in this Aspose.Words for .NET 20.12 update and this Aspose.Words for Java 20.12 update.

Hi,

Thanks for your updates.

I could see the issue at the bottom of the chart is fixed, but the issue mentioned at the top (the extra line) still appears:

image.png (175.5 KB)

Could you help us check the remaining regression?

Thanks,

@ServerSide527,

To look into this problem further, we have now opened a new issue with ID WORDSNET-21547. The screenshot you shared shows three charts; but your previous “test.docx” contained only two charts. Can you please ZIP and attach your other Word document (containing three charts) here for further testing?

Hi @awais.hafeez

My previous test.docx already contained 3 charts, could you please double check the attachment in the initial comment which I haven’t modified it since November.

I also saw the new ticket (WORDSNET-21547) you created is closed but we haven’t seen the fix notification yet. Could you help me confirm which version will contain the fix to the remaining issue?

Thanks,

@ServerSide527,

Regarding WORDSNET-21547, we have completed the work on this issue and concluded to close this issue with “not a bug” status. Please upgrade to the latest 21.2 version of Aspose.Words for .NET and see the following analysis details:

That is the problem with Adobe Acrobat. With turned on “Enhance thin lines” option, thin Table borders on low zoom levels may be overridden by white pixels from chart due to pixel compression. The current behavior of Aspose.Words is similar to MS Word behavior.

Workarounds:

  • Dissable “Enhance thin lines” option in acrobat reader. (Edit > Preferences > Page Display > Rendering section)
  • Use different PDF viewer(Foxit Reader).
  • Use higher zoom level.
  • Increase table border width.

In case you have further inquiries or may need any help, please let us know.

Hi,

Thanks for your reply and explanation.

I have tried the Word behaviour and I still think there’s an issue with Aspose’s new versions because of the following reasons:

  1. Word PDF behaves properly at 100% zoom (and higher) in Acrobat without disabling any options.
  2. PDF created by the older version of Aspose behaves properly at 100% zoom (and higher) in Acrobat without disabling any options.

Therefore, our client would consider this as a bug because of point #1, and even worse consider it as a regression because of point #2.

I’ve again attached the PDF(including the Word PDF) and the docx for your reference. Could you please check further?

test.zip (152.2 KB)

Thanks,

@ServerSide527,

We have logged your concerns in our issue tracking system. Your new ticket number is WORDSNET-21767. We will keep you posted here on further updates.