Open in office is display and at ending landscape page header remain the same size, trans it to pdf use aspose its ending landscape page header becomes narrows

Open in office is display and at ending landscape page header remain the same size, trans it to pdf use aspose its ending landscape page header becomes narrows

.

SMP-EE-007-02 设备预防性维护和维修管理.docx (113.3 KB)

aspose 25.3

@pengpengon

Could you please clarify what specific issue you are facing with the landscape page header when converting to PDF using Aspose.Words? Are you looking for a solution to maintain the header size or something else?

@pengpengon
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-28187

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.

@pengpengon We have completed analyzing the issue. Please try enabling open type features. You should be install the above package

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>25.4</version>
    <classifier>jdk17</classifier>
</dependency>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>25.4</version>
    <classifier>shaping-harfbuzz-plugin</classifier>
</dependency>

and modify the code as shown below:

// Open a document
Document doc = new Document("in.docx");

// When text shaper factory is set, layout starts to use OpenType features.
// An Instance property returns static BasicTextShaperCache object wrapping HarfBuzzTextShaperFactory
doc.getLayoutOptions().setTextShaperFactory(com.aspose.words.shaping.harfbuzz.HarfBuzzTextShaperFactory.getInstance());

// Render the document to PDF format
doc.save("out.pdf");

See more about advanced typograph features in the documentation:
https://docs.aspose.com/words/java/enable-opentype-features/