We’ve build a reporting tool for our client with Aspose.Words which works fine.
Lately the asked is it posible to export as PDF also? So we updated from 4.4 to 6.5 (also needed to update the subscription) and all wend fine, except that some column widths are incorrect.
Thanks for your request. I cannot reproduce the problem on my side using the latest version of Aspose.Words (6.6.0). I attached PDF document produced on my side.
We did the test with the latest aspose.words which I thought was 6.5.0 but turned out to be 6.6.0. So the problem is still there. (re-checked this morning.)
Te result of the attached pdf is exact what we want to archief. Is it possible that saving as DOC (the first attachment) made some modifactions so conversion to PDF at your side works correct? Can we somehow export the internal memory of aspose.words (a memorydump) so you can load that at your side. Cause the exporter code is huge and has many DB connections, so I can’t provide an sample application I’am afraid.
Thanks for your inquiry. No, it’s impossible to serialize Document object. However, I think, you can try to save your output document as DOC file and then convert this document to PDF and see how it goes on your side.
Thanks for your request. No, there are no differences between doc.Save(stream, SaveFormat.Pdf) and doc.SaveToPdf. These methods are the same.
Best regards,
Just to be sure, I attached the export (as doc) saved direct from browser, without saving it with MS word. (Which I think my Collegea did, cause he sent me a docx). Can you convert this one without problems to PDF?
Sorry for using an old thread, but I am experiencing the same problem while evaluating the latest version of Aspose.Words (11.1.0). I have some templates that are rendered 100% when saving as doc and docx format. Note the documents are created with a mail merge.
When saving as PDF (or XPS) the column widths of tablles in the word document are lost. The width of the first column in the table is expanded to the width of the merge fields present in the word document (at least this seems to be the case).
I’ve tried re-loading the output doc/docx file, then saving this as PDF and XPS and the same problem exists. When opening the document in word, then using word to save as PDF or XPS the column widths are correct.
There must be some way to force the column width on export to PDF as this is a required feature.
I’ve found the solution to my issue. After looking at the document.xml for the document word had a very large column width for the column with an incorrect size. Even though the word formatting would leave the column width at the original size, exporting to PDF would use the size mentioned in the xml. After adjusting these widths to the correct result the document renders with correct widths.
There are other issues with PDF (lines not rendering the same etc.) but I can live with these. It would be great if the PDF export could match the capabilities of using the in-built save as pdf inside Word (or printing to a pdf writer) as these methods render the best results.