I'm doing some drawing on pdfs, and I've found what may be a problem on Xcode handling of pdf dimensions, which then become clear when CGPDFDocumentCreateWithURL is triggered.
I have two PDFs. One is A4 portrait size (612w x 792h) and it displays fine. The other one is closer to A4 landscape, 842w x 595h. While it displays in the UIScrollview I'm using, the vertical offset of page height (pageRect.size.height) in CGContextTranslateCTM caused it to move too far down the view. I NSlogged pageRect dimensions and found that the height and width had been flipped. I then checked back to the pdf's listing in supporting documents, and while clearly displaying the pdf as landscape, the dimensions were shown as 595x842, whereas the A4 portrait was correctly dimensioned as 612x792.
Has anyone else hit this problem, and is there a fix.
The link to the original landscape file is here.