Apache OpenOffice (AOO) Bugzilla – Issue 115592
OOBasic PDF Export Filter does not apply filter settings when exporting
Last modified: 2017-05-20 10:44:56 UTC
When trying to export an ODT document as PDF with OOBasic (code in attachment) the filter values don't seem to be applied to the export. Tried storeToURL() command and a recorded macro which used dispatcher.executeDispatch(document, ".uno:ExportToPDF", "", 0, args1()). None of them seemed to export with the correct settings given in the arrays. Sometimes it looked like the values from the 'File -> Export to PDF...' dialogue were used. But then again some values were ignored (e.g. the Zoom Level was not applied).
Created attachment 74875 [details] PDF Export test macros
MRU->OS/PL: could you please have a look at this? Thanks!
I can only tell that the "FilterData" doesn't make it to the place where it would be used (filter/source/pdf/pdffilter.cxx: PDFFilter::implExport). Since there are no FilterData in the media descriptor, the defaults (out of the configuration, that is the last user defined options from the PDF export dialog) are filled in. @cd,mav: this seems to be more of a framework problem ? Could you please have a look ?
The filter options are normally set in the dispatch request using the dialog. If storeToURL() is called directly, the user has to provide the options explicitly in the MediaDescriptor, otherwise the default options are used. So the second macro is just a wrong implementation. The fact that the dispatch request of the recorded macro does not work looks indeed to be a framework problem. Since pl could reproduce the problem, I am setting the issue to confirmed. Setting the target to 3.x for now.
Since I could not find any valuable information or examples about the FilterData you can supply with storeToURL() and the pdf filter I am kind of guessing here. But if the way to do it is basically using the filter data of the recorded macro for the storeToURL() function, then it does not work either for me (see attachment 2 [details]). The settings are just not applied. If this is yet another implementation problem, could you please be so kind and give me a hint on how to do this correctly? (The lack of examples using this in basic is really frustrating)
Created attachment 75017 [details] Export test 2
Yes, the second test looks good from the first view. Thank you for the additional test, it allows to localize the problem easier.
.
Have additional tests if required to show problem exists with calc_pdf_export and calling from a vb.net program. I believe importance should be raised as it is impossible to be sure creation of pdf will correspond to requirements as it just uses the last settings save from the dialog boxes
Reset the assignee to the default "issues@openoffice.apache.org".