Scaling pdf file

Looking at the sample QuartzDemo app, I adore the PDF growth rate using only quartz (i.e. no uiwebview). However, when I zoom in on PDF, it doesn't seem clearer than it does on PDF.

+2


source to share


2 answers


The easiest way to achieve this is to implement a CATiledLayer based view and add it as a UIScrollView subview.

Set the OffDetail levels to 3 and the levelsOfDetailBias to 2, for example (one zoom level and two zoom levels).



The UIScrollView and CATiledLayer classes will do all the work for you :-)

+1


source


It actually just scales on a preprocessed PDF image, so it's akin to a png extension or similar. To actually enlarge the PDF format, you need to re-render the PDF with a large zoom factor and only display the rectangle that should be visible.



0


source







All Articles