Bug 161294 - add command line option for export of slide range to SVG
Summary: add command line option for export of slide range to SVG
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha1+
Hardware: All All
: lowest enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Commandline
  Show dependency treegraph
 
Reported: 2024-05-27 09:31 UTC by Timur
Modified: 2024-06-14 04:56 UTC (History)
2 users (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 Timur 2024-05-27 09:31:20 UTC
Motive for this report is a possible situation where we have a large presentation document (imagine dozens of slides) that stucks on unknown slide.
How to find it fast?

I propose adding command line option for export-to of selected slides. Then we can script finding a troubled slide.

Recently in bug 69192 command line switch was added to start at arbitrary slide number. Not sure if something can combined like: soffice --show=3 --convert-to svg file.odp.
Comment 1 Mike Kaganski 2024-05-27 10:07:19 UTC
WF IMO.
Exporting presentation is not a simple task with easy way to limit to some slides. One example: what to do with custom presentations (that may refer to the unexported slides)?

IMO, the idea to introduce functionality specific for testing of bugreports is not a good direction. These would themselves create new bugs; and testing with these would not necessarily use the same code as the problem happening when using normal ways.

The "stucks on unknown slide" problem is an example of the problem that will most of the time *not* be solved by the proposal, because the problem would happen on *import*, which would be required anyway, not on export.
Comment 2 Timur 2024-05-27 10:53:00 UTC
Custom presentations have GUI bug 33944 and bug 143283, and that is not a primary usage, I'd consider that a future issue. 
Any command line option that does what GUI can is welcome (not all are the same priority). So not WF for me of course. We need others to opine.
Comment 3 Mike Kaganski 2024-05-27 11:24:22 UTC
(In reply to Timur from comment #2)
> Any command line option that does what GUI can is welcome

Note that for --convert-to, this is not true. The fundamental concept of --convert-to is to do as close to complete conversion as possible. We do not do any editing in that command at all, like page reformatting, content editing, ... - we take as much information from the source format as possible, and put as much information into the destination as possible.

For anything like "what GUI can", there are macros.
Comment 4 Justin L 2024-05-27 12:43:00 UTC
(In reply to Timur from comment #0)
> Recently command line switch was added to start at arbitrary slide number.
Not likely much help here. That just tweaked existing functionality (which itself already was very long and convoluted).

> Not sure if something can combined like: soffice --show=3
> --convert-to svg file.odp.
Definitely combining will not (and should not) work. --show is considered a "mode" and --convert-to is another "mode". Each new mode stops the previous mode.

The use-case for adding such a feature would be way too limited to justify the effort (which would be significant). WONTFIX
Comment 5 Stéphane Guillou (stragu) 2024-06-11 12:46:28 UTC
As Miklos said in 146695 comment 3:
> I think it makes sense to expose filter parameters which are already
> available for the UI and for extensions to the cmdline users, sure.
But I think this should follow the same syntax of (existing) property mapping as for PDF in 0c3b8792b712e939d2ad524d554f96616b4844be, and be requested for a specific filter.

In the current state of this report, I agree with "won't fix".
Comment 6 Timur 2024-06-11 17:12:32 UTC
Export to PDF is fine and would fulfill the purpose of the request.
Comment 7 Stéphane Guillou (stragu) 2024-06-12 05:51:02 UTC
(In reply to Timur from comment #6)
> Export to PDF is fine and would fulfill the purpose of the request.
This currently works for Impress documents:

libreoffice24.2 --headless --convert-to 'pdf:impress_pdf_Export:{"PageRange":{"type":"string","value":"2-3"}}' sample.odp

Does that cover it?
Comment 8 Timur 2024-06-13 22:37:29 UTC
Thanks Stéphane for that, it works. 
I made an omission here, namely primary focus was convert to svg not pdf.
So if svg is possible that would be great. If not, pdf will be used.
Comment 9 Stéphane Guillou (stragu) 2024-06-14 04:56:53 UTC
OK, I missed that. I clarified the summary.

With 3× "won't fix", let's close, at least for now.

It's very much possible that in the future, we end up with a proper SVG export dialog with options like slide range, see bug 66870 and bug 117708. At that stage, we could reconsider adding the same kind of command line syntax as for the PDF filter, so there is a clean 1-to-1 property mapping as suggested by Miklos.