Reputation: 7957
I've been using Delphi and the Adobe Acrobat 9 API. I'm simply opening a PDF and printing it, followed by closing it without saving anything.
I'm having an issue while opening some PDFs though. If the PDF is password protected the Open method displays Adobe's "Input password" prompt. My application is running in an automated fashion, and therefor cannot proceed beyond this password prompt until somebody clicks cancel.
I've been looking for something that will either notify me that the file is password protected prior to opening it, or a parameter or something that will skip password protected files. I need my program to assume it cannot open any passworded PDF.
Upvotes: 2
Views: 1574
Reputation: 11
I had a similar issue where I needed to find out if printing was allowed before doing a print commnad on the PDF. The API does not complain and the print function returns success even though the PDF file does not allow for printing. I wrote a solution a while back by writing an Adobe plug in. If it's not out-of-the box, you 'll need to write a plug in.
Upvotes: 1
Reputation: 1238
How about detecting whether the PDF is secured first before trying to open it?
Upvotes: 1