views:

181

answers:

1

How can I extract the title from an encrypted (write protected, not password protected) PDF file using PHP on Linux? Usage of external libraries or binaries are OK. Zen_PDF did not work (Exception: Encrypted document modification is not supported) nor did libextract (title="filename of pdf.pdf")

+1  A: 

If you're using *nix, have you tried XPDF?

There is a blog post here about how someone has used it for a customer of their's - whether it will be of any help I'm unsure.

EDIT: There seems to be some code here that could help - a simple class that reads a PDF into plaintext. Unsure if it supports decryption.

EDIT2: There are also a number of resources in PHP documentation that may help you. Click.

EDIT3: FPDF and FPDI may also help. Probably your best bet after some research.

Daniel May
XPDF's pdftotext -htmlmeta works great. Thanks!
Josh