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?

  • 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

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.

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.