Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PDFview and Password protected PDFs



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >PDFview and Password protected PDFs (From: Alexander Griekspoor <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.