Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert a Multi-Page Text/word file to PNG using LibreOffice API in JAVA #42

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
How to convert a Multi-Page Text file to PNG, for example:- I have a Text document of 5 pages and I want to convert that into PNG. By default, it's giving a PNG of only 1st page. How to get the PNG file for ith page using LibreOffice.

I used the PageRange filter like this, but it does not work, it's also giving the PNG only for 1st page.

Also, I'm not able to generate multiple PNGs for multi-page word files using the LibreOffice Application

CLI:-
```
soffice --convert-to 'png:writer_png_Export:{"PageRange":{"type":"string","value":"2-"}}' test.odt
```

JAVA:

```java
conversionProperties[0] = new com.sun.star.beans.PropertyValue();
conversionProperties[0].Name = "FilterName";
conversionProperties[0].Value ="writer_png_Export";

conversionProperties[1] = new com.sun.star.beans.PropertyValue();
conversionProperties[1].Name = "PageRange";
conversionProperties[1].Value ="2-";
```