Convert Word to PDF: document split into two parts/pages

A customer has a one-page Word document. This has a letterhead from a template. When exported to PDF, this becomes two separate pages.
Is there a way to prevent the two pages or is it a bug in the Apose library?

Simple code:

PdfSaveOptions options = new PdfSaveOptions();
options.setUpdateFields(false);
doc.save( target.getAbsolutePath(), options );

A sample word file is attached.
single-page-word-file.zip (23.8 KB)

thanks

1 Like

@depi 'Berlin Type' font used in your document is not available on my side. Could you please attach it here for testing?
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 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/java/specifying-truetype-fonts-location/

Here is the MSWord document without the font “berlin”. The ZIP file contains the Word file and two PDF versions: one from Word export and one from Aspose (one page vs two pages).

single-page-word-file.zip (173.4 KB)

@depi
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-27052

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.