Bug 157425 - Multi-Page Text/word file to PNG Conversion using LibreOffice API's
Summary: Multi-Page Text/word file to PNG Conversion using LibreOffice API's
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-25 08:44 UTC by Madhu
Modified: 2023-10-01 12:30 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Madhu 2023-09-25 08:44:34 UTC
Description:
Let's say 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. There is no option/method to get a 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-";


Actual Results:
PNG for only 1st page. 

Expected Results:
PNG file for all pages of the text/docs file.


Reproducible: Always


User Profile Reset: No

Additional Info:
Multi-Page Text/word file to PNG Conversion using LibreOffice API's
Comment 1 m_a_riosv 2023-09-25 17:41:41 UTC
Looks like a duplicate of tdf#137601
Comment 2 documentfoundation 2023-09-26 13:29:13 UTC
I had the same issue, I confirm this is currently not working.

From what I understand, this is because the graphic filter does not take into account the pagerange paramter, but always use the currentPage.

What I ended up doing is doing two conversions, one first from the document (PPTX in my case) to pdf for each page with the correct page range, then each single page pdf to PNG
Comment 3 Madhu 2023-09-26 14:43:12 UTC
(In reply to m.a.riosv from comment #1)
> Looks like a duplicate of tdf#137601

This bug is referring to [i]th page of text to convert that into PNG. Can you please tell me, say, how a multi-page text document of 5 pages can be converted to PNG using LibreOffice API? If it is not possible, should I send a PR to update the documentation?
Comment 4 Madhu 2023-10-01 12:30:12 UTC
hi @documentfoundation@maxired.fr 

can you link me to the API that selects the [i]th page of PPTX and converts them into PDFs? Say, I have a PPTX of 10 pages, how can I select the (1-5) pages of the PPTX and convert them into 5 PDFs?(1 page per pdf). 


If there is a pageSelecter filter of PPTX, then, there must be a pageSelecter for other formats as well. Can you link me to that? 

ref: https://listarchives.libreoffice.org/global/users/2023/msg00679.html



Thanks.