[Libreoffice-bugs] [Bug 144653] New: The command ".uno:ExportToPDF" ignore all given options in FilterData argument.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Sep 22 08:30:17 UTC 2021


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

            Bug ID: 144653
           Summary: The command ".uno:ExportToPDF" ignore all given
                    options in FilterData argument.
           Product: LibreOffice
           Version: 7.1.5.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Printing and PDF export
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: grv0815 at gmail.com

Description:
I recorded two pdf exports of a writer document with different quality and
resolution setting with the macro recorder. You can find the shortened result
below.
The code create two pdf files with the given filenames but this files are
identical. The export use for both calls the once manually given options from
the export dialog. Afaik, this should be only with the ".uno:ExportDirectToPDF"
command.


Here is the recorded basic macro:

sub PDF_Export
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "URL"
args1(0).Value = "file:///C:/Users/###Path to File###-OrigDPI-lossless.pdf"
args1(1).Name = "FilterName"
args1(1).Value = "writer_pdf_Export"
args1(2).Name = "FilterData"
args1(2).Value =
Array(Array("UseLosslessCompression",0,true,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("Quality",0,90,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("ReduceImageResolution",0,false,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("MaxImageResolution",0,150,com.sun.star.beans.PropertyState.DIRECT_VALUE),###and
so on###)

dispatcher.executeDispatch(document, ".uno:ExportToPDF", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(2) as new com.sun.star.beans.PropertyValue
args2(0).Name = "URL"
args2(0).Value = "file:///C:/Users/###Path to File###-OrigDPI-95vH.pdf"
args2(1).Name = "FilterName"
args2(1).Value = "writer_pdf_Export"
args2(2).Name = "FilterData"
args2(2).Value =
Array(Array("UseLosslessCompression",0,false,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("Quality",0,95,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("ReduceImageResolution",0,false,com.sun.star.beans.PropertyState.DIRECT_VALUE),Array("MaxImageResolution",0,150,com.sun.star.beans.PropertyState.DIRECT_VALUE),###and
so on###)

dispatcher.executeDispatch(document, ".uno:ExportToPDF", "", 0, args2())


Steps to Reproduce:
1. Open writer document with a "big" picture.
2. start the macro recorder.
3. Export as PDF with the options UseLosslessCompression=true and
ReduceImageResolution=false into File A.pdf
4. Export as PDF with the options Quality=60% and ReduceImageResolution=75dpi
into File B.pdf
5. stop macro recording and run the created basic macro

Actual Results:
The files A.pdf and B.pdf have the same size and both include the 75dpi picture
of poor 60% quality - because this was the last manually configured setting in
the export pdf dialog.

Expected Results:
The Picture in File A.pdf should have the original resolution and quality, due
to the settings UseLosslessCompression=true and ReduceImageResolution=false.
The Picture in File B.pdf should have the reduced resolution and quality, due
to the settings Quality=60% and ReduceImageResolution=75dpi



Reproducible: Always


User Profile Reset: Yes



Additional Info:
First found in Version 7.1.5.2, updated to 7.1.6.2 and now to

Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-AT (de_AT); UI: de-DE
Calc: CL

The bug is in all three versions reproducible

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210922/937390b2/attachment.htm>


More information about the Libreoffice-bugs mailing list