https://bugs.documentfoundation.org/show_bug.cgi?id=157668

            Bug ID: 157668
           Summary: Allow passing parameters to graphic export filters
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: difficultyMedium, easyHack, skillCpp
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]

Since LibreOffice v.7.4, there is a way to pass any filter option available for
PDF export, from the command line [1], [2].

The commit that enabled that was 0c3b8792b712e939d2ad524d554f96616b4844be.

Currently there is no way to pass e.g. dimensions, or resolution, or other
parameters to the graphic export (PNG/JPEG/etc.) from the command line, because
a command line like

> soffice --convert-to png:writer_png_Export:params_here example.odt

will pass the string "params_here" into the respective filter inside a property
called "FilterOptions", while the filter only uses a property named
"FilterData", which must be a sequence of beans::PropertyValue. See
GraphicExportFilter::gatherProperties.

The idea is to implement a similar processing of FilterOptions in the
gatherProperties, as implemented in the abovementioned commit for PDF. The
syntax of the passed parameters should be the same as for the PDF, i.e. a JSON
structure like

> soffice --convert-to 
> 'png:writer_png_Export:{"PixelWidth":{"type":"long","value":"200"},"PixelHeight":{"type":"long","value":"100"}}'
>  example.odt

[1] https://vmiklos.hu/blog/pdf-convert-to.html
[2]
https://help.libreoffice.org/latest/en-US/text/shared/guide/pdf_params.html?DbPAR=SHARED

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to