3

If I have a password protected PDF (my own document, source unfortunately lost), and I want to include a portion of it in a new document, can that be done?

This previous question explains how to do it in general, but when I try this with a passworded input and compile using XeLaTeX, I get a XeLaTeX error xelatex> <use "myOldPdf.pdf"> Command Line Error: Incorrect password. Is there a way to pass XeLaTeX a password for this file?

4
  • 1
    Is removing the password an option? If so, you could do it for example with pdftk . . .
    – DG'
    Dec 17 '13 at 20:05
  • @DG: That would work fine. Can you explain further? Thanks.
    – SSilk
    Dec 17 '13 at 20:07
  • @DG: I'm having trouble opening this document in pdftk. I think the password I have a user password, not owner, but I have no idea what I set as the owner password.
    – SSilk
    Dec 17 '13 at 20:19
  • 1
    There are several programs that can remove passwords. Maybe one of these solutions will work for you: blog.marcus-brinkmann.de/2011/06/08/remove-password-from-pdf and cyberciti.biz/faq/removing-password-from-pdf-on-linux
    – DG'
    Dec 17 '13 at 20:43
4

No. You have to remove the password from the PDF to be able to handle it with XeTeX/pdfTeX/LuaTeX - no program in the TeX "universe" handles password-protected PDFs.

1

Yes, in certain conditions. Running Texlive on Linux does permit you to include password protected PDFs with XeLaTeX, without needing the password, but the same setup on Windows does not.

On Windows it fails with :

xdvipdfmx:fatal: Image inclusion failed for "XXXX.pdf". No output PDF file written.

1
  • I edited my answer to reflect the fact that ultimately, there is a way to include the source PDF into the new document. The comments in the question led me to belive the real question is if there are any ways to include the password protected source into the new document.
    – S.Comeau
    May 21 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.