[Libreoffice-bugs] [Bug 129206] Macro is not always run & produce pdf file

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Dec 5 18:33:06 UTC 2019


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

--- Comment #1 from Oliver Brinzing <oliver.brinzing at gmx.de> ---
have you tried to replace the watermark/store Dispatches ?

java code would look something like this:

Object xDoc = xComponentLoader.loadComponentFromURL(loadUrl,           
"_blank", 0, new PropertyValue[0]);

// Create PDF filter data
PropertyValue pdfFilterData[] = new PropertyValue[1];

// Specifies the PDF version that should be generated:
// 0: PDF 1.4 (default selection) 1: PDF/A-1 (ISO 19005-1:2005)
pdfFilterData[0] = new PropertyValue();
pdfFilterData[0].Name = "SelectPdfVersion";
pdfFilterData[0].Value = new Integer(1);

PropertyValue[] conversionProperties = new PropertyValue[2];
conversionProperties[0] = new PropertyValue();
conversionProperties[0].Name = "FilterName";
conversionProperties[0].Value = "writer_pdf_Export";

conversionProperties[1] = new PropertyValue();
conversionProperties[1].Name = "FilterData";
conversionProperties[1].Value = pdfFilterData;

XStorable xStorable = UnoRuntime.queryInterface(XStorable.class, xDoc);
xStorable.storeToURL(storeUrl, conversionProperties);

XCloseable xClose = UnoRuntime.queryInterface(XCloseable.class, xDoc);
xClose.close(true);

and found a pice of python for watermark:
https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=88965

-- 
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/20191205/c5672230/attachment.html>


More information about the Libreoffice-bugs mailing list