FROM : John Calhoun
DATE : Thu Apr 26 23:44:31 2007
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_removed>)
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_removed>
This email sent to <email_removed>
DATE : Thu Apr 26 23:44:31 2007
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_removed>)
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_removed>
This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Alexander Griekspo… | Apr 26, 23:32 | |
| John Calhoun | Apr 26, 23:44 |






Cocoa mail archive

