Re: PDFview and Password protected PDFs
Re: PDFview and Password protected PDFs
- Subject: Re: PDFview and Password protected PDFs
- From: John Calhoun <email@hidden>
- Date: Thu, 26 Apr 2007 14:44:31 -0700
On Apr 26, 2007, at 2:32 PM, Alexander Griekspoor wrote:
I use a PDFview in which I preview PDF files (i.o.w. iterative load
PDFs in the same PDFView) but ran into a problem. Whenever I load a
password protected PDF I get a red view with a password field.
However when I load another unprotected PDF without adding the
password for the previous one first, it won't load.
The problem is that the PDFView (in Tiger) doesn't get rid of the
password UI in -[PDFView setDocument:] as you would expect. This is a
bug (fixed in Leopard).
Your choices are to:
1) create a new PDFView for new documents (this is what Preview does
and why we never ran into this bug in Tiger development).
2) pre-flight the PDFDocument's before calling -[PDFView
setDocument:]. In short, don't allow locked PDFDocuments (perhaps
bring up your own password UI in order to unlock the PDFDocument
before [PDFView setDocument:]).
3) take the risky approach of calling private PDFView methods (be sure
to call -[respondsToSelector:] first). You might try: - (BOOL)
[PDFView passwordUIDisplayed] and -[[PDFView documentView]
removePasswordView].
john calhoun—_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden