3

I want show per page pdf in portait mode and display two pages when rotate to landscape mode on ipad . I had search on internet and can't find any solution. I thought two possible way.

1.Using webview but I don't know how to display two page in one webview in a webview.

2.Using CGPDF API read from two page and merge to one pdf file. But I think this may be very slow and not sure if this could do it .

or any other way could solve this problem? Thanks!!

coolbird
  • 31
  • 3

1 Answers1

0

I don't think you will have much success with using a UIWebView there. There's however nothing stopping you from putting two CATiledLayers into a UIView and display them next to each other. In fact, that's exactly what I did in my iOS PDF parsing framework.

Just set the contentView as the containerView, that includes both tiled layers, and they work perfectly together. Keep an eye on your memory though, I wouldn't allow them both rendering pdf at the same time, that most likely crashes your app due to low memory. (Drawing a PDF is really resource intensive)

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
steipete
  • 7,581
  • 5
  • 47
  • 81