I’m using Aspose Words for Java version 14.7.0.
I’m converting a DOCX to a PDF and am finding that a footer table is formatting badly.
Test case attached where the footer table on page one is rendered badly.
When the DOCX is saved out of compatibility mode the test case converts correctly. Using doc.updateTableLayout() does not make any difference.
Thanks for your inquiry.
I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10694. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
Using Document.updateTableLayout method, I have not found this issue at my end. Please check the attached Pdf for your kind reference.
That’s strange - when I call updateTableLayout(), I still see the issue.
In the attached archive:
I can see that:
- ServicesAgreementDocx.docx is the original source file used to demonstrate the issue (footer table is OK in the source Word DOCX file)
- Out.pdf has been produced by Aspose 14.7.0 and does show the badly formed footer table
- MSWordOut.pdf has been produced by MS Word 2010 and shows the table correctly
Is it possible that you’ve attached the wrong file here as there’s no Aspose produced PDF here that does not show this issue? The only way I could get Aspose to produce the correct PDF was to save the DOCX out of compatibility mode in Word first.
Pleas accept my apologies for your inconvenience. Using
Document.updateTableLayout method, I have not found this issue at my
end. I have attached the Pdf file that shows the correct output.
Oh - I think I see why we are seeing different outputs here.
If you use:
the issue occurs.
However if you only use:
(ie remove the call to updateFields()) the issue does not occur.
I was using both update methods as the footer here contains a page number field.
Thanks for sharing this detail. Yes, when Document.UpdateFields and Document.UpdateTableLayout methods are called before saving the Pdf file, the same issue appears. I have logged this detail with WORDSNET-10694.
Please let us know if you have any more queries.