Summary: | MaxImageResolution is ignored in macro | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | dainius.mazuika |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | medium | ||
Version: | 7.3.5.2 release | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 107659 |
Description
dainius.mazuika
2022-08-25 09:42:43 UTC
Confirmed in: Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 4044dbbbbdd6a151fa400a270ea685447e654c7b CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: CL Why do you expect that you can pass an array of arrays as args to executeDispatch? You need to prepare an array of *PropertyValue* struct, and array(array(a,b,c,d)) is not the correct way to do it. Hence, the array("MaxImageResolution", 0, 150, 0) will not be copied to a PropertyValue structure in PDFFilter::implExport. IMO, NOTABUG. For comparison, this works fine: function PropertyValue(n, v) dim result as new com.sun.star.beans.PropertyValue result.Name = n result.Value = v PropertyValue = result end function sub Main2 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 ---------------------------------------------------------------------- args1 = Array(PropertyValue("URL", "file:///D:/150.pdf"),_ PropertyValue("FilterName", "writer_pdf_Export"),_ PropertyValue("FilterData", Array(PropertyValue("UseLosslessCompression", false),_ PropertyValue("Quality", 87,),_ PropertyValue("ReduceImageResolution", true),_ PropertyValue("MaxImageResolution", 150),_ PropertyValue("UseTaggedPDF", false),_ PropertyValue("SelectPdfVersion", 0),_ PropertyValue("PDFUACompliance", false),_ PropertyValue("ExportNotes", false),_ PropertyValue("ViewPDFAfterExport", true),_ PropertyValue("ExportBookmarks", false),_ PropertyValue("OpenBookmarkLevels", -1),_ PropertyValue("UseTransitionEffects", true),_ PropertyValue("IsSkipEmptyPages", true),_ PropertyValue("ExportPlaceholders", false),_ PropertyValue("IsAddStream", false),_ PropertyValue("ExportFormFields", false),_ PropertyValue("FormsType", 0),_ PropertyValue("AllowDuplicateFieldNames", false),_ PropertyValue("HideViewerToolbar", false),_ PropertyValue("HideViewerMenubar", false),_ PropertyValue("HideViewerWindowControls", false),_ PropertyValue("ResizeWindowToInitialPage", false),_ PropertyValue("CenterWindow", false),_ PropertyValue("OpenInFullScreenMode", false),_ PropertyValue("DisplayPDFDocumentTitle", true),_ PropertyValue("InitialView", 0),_ PropertyValue("Magnification", 1),_ PropertyValue("Zoom", 100),_ PropertyValue("PageLayout", 2),_ PropertyValue("FirstPageOnLeft", false),_ PropertyValue("InitialPage", 1),_ PropertyValue("Printing", 2),_ PropertyValue("Changes", 4),_ PropertyValue("EnableCopyingOfContent", true),_ PropertyValue("EnableTextAccessForAccessibilityTools", true),_ PropertyValue("ExportLinksRelativeFsys", true),_ PropertyValue("PDFViewSelection", 0),_ PropertyValue("ConvertOOoTargetToPDFTarget", false),_ PropertyValue("ExportBookmarksToPDFDestination", false),_ PropertyValue("SignPDF", false),_ PropertyValue("_OkButtonString", ""),_ PropertyValue("Watermark", ""),_ PropertyValue("EncryptFile", false),_ PropertyValue("PreparedPasswords", Empty),_ PropertyValue("RestrictPermissions", false),_ PropertyValue("PreparedPermissionPassword", Array()),_ PropertyValue("SignatureLocation", ""),_ PropertyValue("SignatureReason", ""),_ PropertyValue("SignatureContactInfo", ""),_ PropertyValue("SignaturePassword", ""),_ PropertyValue("SignatureCertificate", Empty),_ PropertyValue("SignatureTSA", ""),_ PropertyValue("UseReferenceXObject", false)))) dispatcher.executeDispatch(document, ".uno:ExportToPDF", "", 0, args1()) end sub (In reply to Mike Kaganski from comment #2) > Why do you expect that you can pass an array of arrays as args to > executeDispatch? Sorry for a thinko; what I meant was that you need to prepare an array of PropertyValue as *FilterData*. Aš I Remember the problem is that two macros, generated by macro recorder are not working as expected. Not using libre extensively anymore, but will try to recheck original usage scenario. |