We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert Save As all Pages in DOC Word Document to PDF Java | Enable Disable Use Printer Metrics to Lay Out Document

Hello
I have the same problem as bvzequel

I convert a DOC to PDF with the ASPOSE Words Java version 19.11

The last page is missing in the converted file

Regards

Fabien

@fabien.levalois,

Have you also tried the latest version of Aspose.Words for Java i.e. 20.1 on your end? In case the problem still remains, please ZIP and upload your input Word document and Aspose.Words generated PDF file showing the undesired behavior here for testing. We will then investigate the issue on our end and provide you more information.

Hello awais.hafeez

I tried with the lastest version of aspose 20.1, and I have the same result
I attach the word doocument and the PDF converted
IdoxGroup_fabien_levalois_aspose_20.1.zip (157.1 KB)
i generate the PDF with the code java
Document doc = new Document(new FileInputStream(aFileIn), new LoadOptions());
// Save the document in PDF format.
SaveOutputParameters aOutSave = doc.save(new FileOutputStream(aFileOut), SaveFormat.PDF);

Best regards

Fabien

@fabien.levalois,

I am afraid, we can only see “PGFI0278_2.pdf” inside “IdoxGroup_fabien_levalois_aspose_20.1.zip” that you attached in your previous post. Please also ZIP and upload your input Word document here for testing. We will then investigate the issue on our end and provide you more information. Thanks for your cooperation.

Hello
try this one
IdoxGroup_fabien_levalois_aspose_20.1_B.zip (529.0 KB)

Best regards

Fabien

@fabien.levalois,

We have logged this problem in our issue tracking system. Your ticket number is WORDSNET-19982. We will further look into the details of this problem and will keep you updated on the status of the linked issue. We apologize for your inconvenience.

@fabien.levalois,

Regarding WORDSNET-19982, we have completed the work on your issue and concluded to close this issue with “Not a Bug” status. Please check below the analysis details:

The source document has the “Use printer metrics to lay out document” compatibility option enabled. This option affects how the text in the document is measured.

Aspose.Word by default respects this option and produces the PDF output identical to, for instance, MS Word 2013, MS Word 2019, however, it ignores this option completely even though it is still present in File -> Options -> Advanced -> Compatibility options for.

To make Aspose.Words produce the same PDF output as MS Word 2019 does, the printer metrics option can be disabled explicitly:

Document doc = new Document("E:\\Temp\\IdoxGroup_fabien_levalois_aspose_20.1_B\\PGFI0278_2.doc");
doc.getCompatibilityOptions().setUsePrinterMetrics(false);
doc.save("E:\\Temp\\IdoxGroup_fabien_levalois_aspose_20.1_B\\20.2.PrinterMetricsDisabled.pdf");

PDF output produced using above code on our end is attached here for your reference:

Hope, this helps.