• 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: PDF Rendering on iPad's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: PDF Rendering on iPad's


  • Subject: RE: PDF Rendering on iPad's
  • From: Julius Oklamcak <email@hidden>
  • Date: Wed, 25 Jul 2012 11:43:35 -0400

Dave,

> I have a few questions about rendering PDFs and wondered if
> anyone here could help.

In my open source iOS PDF viewer (https://github.com/vfr/Reader) I employ
two techniques:

1) Show a low resolution image of the page below the CATiledLayer-based
zoom-able page view. These low resolution page images are generated on a
background thread and are also cached as PNGs for future use. This gives the
user something to see while CATiledLayer draws in the details on top of it.

2) Reduce the number (and increase the size) of tiles that CATiledLayer asks
to be drawn. I set the CATiledLayer's tile size to either 512 or 1024 pixels
depending on the device's screen size and scale (CATiledLayer limits the
tile size to 1024 pixels). If the screen scale is greater than 1.0, I set
the levelsOfDetailBias to 1 (any higher and CATiledLayer asks for many,
smaller tiles). I also return a small value for +fadeDuration (as returning
0.0 exposes a bug in CATiledLayer - sometimes a tile won't draw or flickers
in and out until you touch the screen). All of this is done in a
CATiledLayer subclass
(https://github.com/vfr/Reader/blob/master/Sources/ReaderContentTile.m)
which is used to back the PDF page content UIView.

You should also be aware that there is a bug in iOS 5.1.x where CATiledLayer
will ask for the same tile to be drawn 2 or 3 times.

If there is anything else, let me know...jo

_______________________________________________

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: 
 >PDF Rendering on iPad's (From: Dave <email@hidden>)

  • Prev by Date: PDF Rendering on iPad's
  • Next by Date: When does NSInputStream's -getBuffer:length: actually work?
  • Previous by thread: PDF Rendering on iPad's
  • Next by thread: When does NSInputStream's -getBuffer:length: actually work?
  • Index(es):
    • Date
    • Thread