简体   繁体   中英

How to convert only desired docx page to pdf using documents4j

I have been working with documents4j library to convertdocx to pdf. But I want to convert only the first page of docx to pdf and store it. Where and how should I pass the arguments in order to convert only the first page?

Currently, there is no such option as it is not possible to communicate meta data to the transformers. You can write your own adapter, though where this would be possible by specifying a custom format.

Have a look at the MicrosoftWordBridge and how it is implemented. You will need to tweak the script that executes the conversion in order to make this happen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM