UPDATE I called the UpdateTableLayout() method of the Document object and it appears to format the table in the resulting PDF as expected, but Visual Studio 2022 is reporting that this method is deprecated and will be removed in a future version. This still seems to be an issue, but I have found a temporary workaround.
I believe I have the same type of issue with Aspose.Words 24.10.0.0. I have a DOC file that I am saving to PDF and the column widths do not seem to persist to the PDF.
I’m in the process of evaluating a few different PDF libraries for .NET, and this is the only one that doesn’t save the file properly.
Sample DOC FIle.7z (44.9 KB)
Any help or guidance would be great as the Aspose library seems to be our best option.
Thanks,
Jeff
@JeffNewbill UpdateTableLayout
method was the first attempt of table grid calculation algorithm implementation. Currently another implementation is used internally by Aspose.Words, so normally there is no need to call additional methods to calculate table layout.
As I can see the table in your document is rendered properly without calling this method. But the following fonts used in your document are not available on my side:
- ‘Gotham Medium’
- ‘Gotham Book’
The fonts are required to build document layout. If Aspose.Words cannot find the font used in the document, the font is substituted. This might lead into fonts mismatch and document layout differences due to the different fonts metrics. You can implement IWarningCallback to get notifications when font substitution is performed.
Please see our documentation to learn where Aspose.Words looks for fonts:
https://docs.aspose.com/words/net/specifying-truetype-fonts-location/
@alexey.noskov - Thank you for the response. I have the fonts installed on my machine… Attached is a copy of the PDFs that are created with and without calling the UpdateTableLayout() method. The files are named using the words “With” and “Without” at the end of the filename.
I have opened the PDF’s with Acrobat and verified that the fonts are correct in the PDF.
Thank you,
Jeff
SamplePDFs.7z (73.3 KB)
@JeffNewbill Thank you for additional information. Could you please also attach ‘Gotham Medium’ and ‘Gotham Book’ fonts? Also, it would be useful if you share PDF document produced by MS Word on your side. We will investigate the problem and provide you more information.
@alexey.noskov - Thank you again for the prompt response.
I’ve included in the zip file a copy of the two fonts, as well as a version of the PDF as created using Print to PDF, Save as PDF (from the file Save As menu) and the Save as Adobe PDF (because Acrobat is installed). Each file is named with the method it was saved as.
I have to say that I am not really impressed with Word’s print to PDF feature as it usually seems to convert everything to graphic images in the PDF.
Jeff
AdditionalFiles.7z (1.8 MB)
@JeffNewbill
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-27479
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.