LibreOffice / lots

Letterhead, template, form, autotext, mail merge,... extension for LibreOffice
https://wollmux.org/
European Union Public License 1.1
53 stars 32 forks source link

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

Closed Madhupatel08 closed 1 year ago

Madhupatel08 commented 1 year ago

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:

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-";

cc: @bjoernranft @chrlutz @TranNghiem @Eymux

smehrbrodt commented 1 year ago

Stop spamming unrelated projects.

Madhupatel08 commented 1 year ago

hi @smehrbrodt can you please tell, me where can I raise the ticket, since the Libre-core repo, does not have an issue section

smehrbrodt commented 1 year ago

As written in https://github.com/LibreOffice/UNOHelper/issues/41 , please file a bug in LibreOffice bugzilla: https://bugs.documentfoundation.org/