Reading password protected PDF file

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Pitoziq
Posts: 1
Joined: 2012-08-07T13:05:41-07:00
Authentication code: 67789

Reading password protected PDF file

Post by Pitoziq »

Is it possible to read password protected PDF file using Imagick? I have tried to find some info about it, but without success, found info about command line interface only (using -authenticate option). Password for PDF file is known of course.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Reading password protected PDF file

Post by Bonzo »

Not all options are supported with Imagick and there does not seem to be a lot of work being done to it. If you can not find any information on the php Imagick website I would say you can not do what you want.

Imagick is not written or supported by the Imagemagick developers.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Reading password protected PDF file

Post by mkoppanen »

For most of the options the following should work:

Code: Select all

proto bool Imagick::setOption(string key, string value)
In this case you could try:

Code: Select all

$im->setOption("authenticate", "password");
Mikko Koppanen
My blog: http://valokuva.org
Post Reply