Bug 121808 - LibreOfficeKit saveAs options fails for PDF export filter
Summary: LibreOfficeKit saveAs options fails for PDF export filter
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2018-11-29 17:09 UTC by jghadsrf
Modified: 2019-10-14 02:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
My ugly lokit test application (3.24 KB, text/x-c++src)
2018-11-29 17:10 UTC, jghadsrf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jghadsrf 2018-11-29 17:09:47 UTC
Description:
By adding

<item oor:path="/org.openoffice.Office.Common/Filter/PDF/Export"><prop oor:name="SelectPdfVersion" oor:op="fuse"><value>1</value></prop></item>

to registrymodifications.xcu I can get LibreOfficeKit save PDF/A-1 (ISO 19005-1:2005) file.

However adding the SelectPdfVersion=1 option via the LibreOfficeKit API has no effect. 

Plain PDF 1.5 will be generated. I also tried several other options (PageRange, Watermark, ..) and all I have tried so far seem to fail to function at all.

I tried this with several LibreOffice versions (from 5.x and 6.x lines) and it seems to me the options in the API has been totally broken for a while now.


Steps to Reproduce:
1. Add any option to the lokit API for PDF export
2. Check the result
3. The options have no effect

Actual Results:
The options have no impact.

Expected Results:
The options to have impact on the PDF generation.


Reproducible: Always


User Profile Reset: No



Additional Info:
I will attach my (ugly C++ hack) test program. You can also reproduce this with https://github.com/xrmx/pylokit if you want work less.
Comment 1 jghadsrf 2018-11-29 17:10:41 UTC
Created attachment 147154 [details]
My ugly lokit test application
Comment 2 jghadsrf 2018-11-29 17:16:23 UTC
The same with pylokit:

from pylokit import Office
import os

lo_path = "/path/to/libreoffice/program/dir"

with Office(lo_path) as lo:
    with lo.documentLoad("test.dox") as doc:
        doc.saveAs("test.pdf", fmt="pdf", options="SelectPdfVersion=1")

os._exit(0)
Comment 3 Xisco Faulí 2019-01-14 17:08:55 UTC
Thank you for reporting the bug.
it seems you're using an old version of LibreOffice.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 4 QA Administrators 2019-09-13 02:50:58 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2019-10-14 02:28:44 UTC
Dear jghadsrf,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp