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
With the help of the Ask LibreOffice Community, I have found the error in my code collecting the filter arguments. The command ".uno:ExportToPDF" works perfect! This Ask LibreOffice post contain the details: https://ask.libreoffice.org/t/der-filter-writer-pdf-export-ignoriert-alle-argumente-aus-den-mitgegebenen-filterdata-properties/68343/6?u=grv0815 This bug report can be closed. I'm sorry for my false positive report.
Thanks for coming back here and following up!