Hello, Does anyone know how to use core graphics to draw a pdf like in iBooks. I can already draw a pdf page using core graphics but was curious how iBooks shows a lower quality view of each page so it loads fast and then when you stay on a page longer it renders it a full quality. This makes it able to open the pdf without having to make the user wait like most magazine apps you see on ipad. Any ideas would help!
+3
A:
I assume they use multiple layers, the first layer loads the pdf in low resolution and the better resolution is prepared in the background. When ready these layers are swapped.
Have a look at CGPDFDocumentRef and CATiledLayer in the documentation.
mgratzer
2010-09-28 08:19:13
+1 for only have 6 rep
willcodejavaforfood
2010-09-28 08:19:58
Yup, a CATiledLayer is how it's done, JosephH below posted a great link
marchinram
2010-09-29 14:41:40
+2
A:
Apple have some "ZoomingPDFViewer" sample code:
I suspect that might give you some good ideas :-)
JosephH
2010-09-28 13:32:14
Perfect, this is exactly what I was looking for, I'll remember to check the documentation first before I ask questions next time!!!
marchinram
2010-09-29 14:40:47