[DVIPDFMx] Encrypting PDFs without user input.

Michael Joyner michael at newsrx.com
Thu Feb 17 12:53:04 KST 2011


Good afternoon,

I was trying to encrypt some PDF's with xdvipdfmx via xetex, but discovered
that it it hangs waiting for user input for the passwords via:

xelatex -output-drive="xdvipdfmx -S -E -K 128" 000000001.utex
>

and then via:

xelatex -output-drive="printf 'p1\np1\n\n\n' | xdvipdfmx -S -E -K 128"
> 000000001.utex
>

Is there a way to specify the passwords either by a file or on the command
line?

I think it should be considered a deficiency if one can tell it by use of -S
that you want password encryption enabled for a PDF, but can't
programamtically, either by a \special or other automatic mechanism to
actually provide the needed values.

I am trying to do this in a batch process without user interaction required.

I originally tried using pdftk, but it eats the pdf bookmarks. :(

-Mike

FYI: xdvipdfmx -h

This is xdvipdfmx-0.7.8 by Jonathan Kew and Jin-Hwan Cho,
an extended version of DVIPDFMx, which in turn was
an extended version of dvipdfm-0.13.2c developed by Mark A. Wicks.

FYI: xelatex --version

XeTeX 3.1415926-2.2-0.9997.4 (TeX Live 2010)
kpathsea version 6.0.0
Copyright 2010 SIL International and Jonathan Kew.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 4.4 [with modifications for XeTeX]
Compiled with zlib version 1.2.3; using 1.2.3
Compiled with FreeType2 version 2.3.11; using 2.3.11
Compiled with fontconfig version 2.3.1; using 2.2.3
Compiled with libpng version 1.2.40; using 1.2.40
Compiled with xpdf version 3.02pl4
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://project.ktug.or.kr/pipermail/dvipdfmx/attachments/20110216/d12ce63a/attachment.html>


More information about the dvipdfmx mailing list