• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Prevent display of PDF controls in a WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prevent display of PDF controls in a WebView


  • Subject: Re: Prevent display of PDF controls in a WebView
  • From: Antonio Nunes <email@hidden>
  • Date: Sun, 02 Sep 2012 23:30:36 +0100

On 2 Sep 2012, at 18:32, Phillip Mills <email@hidden> wrote:

> In an OSX application, I use a WebView to display a variety of file types. When the type is PDF, something within Cocoa (PDFKit?) intercepts mouse movement in the lower portion of the screen and responds by displaying a translucent gray view with clickable areas that give options for the user to zoom in and out, open the file in Preview, or save it as a download.
>
> I see this on 10.8 but testers have reported it back to 10.6.8.
>
> (Part of my problem may be that I don't know what to call this element: contextual floating toolbar? ...hud panel? ...?)
>
> Anyway, I need to prevent it from appearing as it both interferes with how the program is supposed to function visually and gives options (zoom) that will cause incorrect program behavior if used.
>
> How is this thing activated and, much more important, how do I stop it?

You stand a good chance to get the desired results using a PDFView. I would subclass the PDFView to intercept the contextual menu (and not show any, if I understand what you need), and make sure commands like zoom in, zoom out and zoom actual don't make it through. There might be more you need to adjust, but off the top of my head, this should get you a great deal of the way there. Another consideration would be to use your own (non-PDFView subclass) view, and draw the PDF pages in there. Drawing a PDFPage into a view is fairly straightforward, but of course, creating your own PDF view is likely more work than subclassing and customizing the provided PDFView.

-António

-----------------------------------------------
Touch is a language without words
-----------------------------------------------





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


References: 
 >Prevent display of PDF controls in a WebView (From: Phillip Mills <email@hidden>)

  • Prev by Date: Re: Seeking advice re: placement of UndoManager
  • Next by Date: Security-scoped bookmark feature?
  • Previous by thread: Re: Prevent display of PDF controls in a WebView
  • Next by thread: Code Signing for Mountain Lion
  • Index(es):
    • Date
    • Thread