We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

unoconv headless multiple options, secure PDF [closed]

asked 2012-08-15 16:05:48 +0200

JohnFC gravatar image


I'm trying to export a PDF that has permissions set so that the PDF cannot be printed, changed, etc but unoconv doesn't appear to take multiple export options. I've tried this, which appears to be accepted but ignored:

unoconv -f pdf -e RestrictPermissions=true -e PermissionPassword=test -e Printing=0 -e Changes=0 -e EnableCopyingOfContent=false tester.doc

I've enclosed them in quotes and it complains and ignores the options entirely.

Any ideas?

Or if there is libreoffice -e options I can use instead would be most useful.



edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-21 04:44:50.174176

4 Answers

Sort by » oldest newest most voted

answered 2012-08-20 15:20:09 +0200

dag gravatar image

This was a genuine issue with unoconv v0.5 that we have fixed in trunk. This fix will be part of the upcoming v0.6 release.

More information from: https://github.com/dagwieers/unoconv/issues/75

edit flag offensive delete link more

answered 2012-08-16 09:40:10 +0200

tohuwawohu gravatar image

Generally, it should work without quotes - just add multiple -e options with a key/value combination. I've tested your example with a simple test doc on Ubuntu 10.04 / unoconv 0.4 (manually built, sources from github) / OOo and LO installed. After receiving some segmentation faults, it worked at the third or fourth time i tried.

So, the problem isn't the syntax. It may be a unoconv problem. You should start checking with unoconv version you're using. The version that ships with Ubuntu Lucid doesn't support -e options at all! After verifying that your version supports -e, you could test with simple conversion tasks (no -e option) to check if unoconv works generally. It may be worth the work to build your own unoconv from the github sources.

edit flag offensive delete link more

answered 2013-02-05 17:05:44 +0200

granolageek gravatar image

I can confirm that LO 3.6 (mis)behaves in the same way when it is run headless directly from the command line. It completely ignores the last settings in the GUI and defaults its output.

This appears to an LO issue and no problem with unoconv.

edit flag offensive delete link more

answered 2012-08-19 18:37:32 +0200

It doesn't work here either.

I added debugging code to unoconv and the parameters do seem to be passed to LO, although they don't seem to have any effect. I can't generate any sort of protected PDF either.

LO does create a protected PDF when using the dialog in normal mode (not --headless).

Not sure exactly where to look at this point.

edit flag offensive delete link more


Which unoconv version, which OS, which python version? Does your unoconv honor simple, non-security -e options? Which combination of options did you test exactly?

tohuwawohu gravatar imagetohuwawohu ( 2012-08-20 07:03:52 +0200 )edit

Question Tools

1 follower


Asked: 2012-08-15 16:05:48 +0200

Seen: 2,365 times

Last updated: Feb 05 '13