[XeTeX] How can I encrypt (limit permissions) in my PDF?

Ron Aaron ron at ronware.org
Sun Apr 24 09:24:47 CEST 2011


Hi, all --

If I create a simple PDF using xetex, I can post-process it using
"pdftk" to create a "restricted" PDF which doesn't allow copy and paste,
for example.

After looking around, I noticed that 'xdvipdfmx' is *supposed* to also
be able to do this; so I did something like:

    xetex --output-driver='xdvipdfmx -S' simple.tex

However, this has two problems.  First, it prompts for both owner and
user passwords for the PDF, and there does not seem to be any way to
specify them in a file or an option.  Second, xdivpdfmx actually crashes
with a "segmentation fault".  Not very useful -- and the PDF is not
generated, nor is a useful error given as to what may be the problem.

What I would like ideally is to have a way to add a "\special{}" and get
an encrypted PDF.  Barring that, some what to have xdvipdfmx work
correctly. 

Does anyone have ideas on how to make this work?

Thanks,
Ron


More information about the XeTeX mailing list