Hello i am working on a pdf rea开发者_JS百科der application.I have used tiled layer to render PDF but i am getting my page shifted to upside down according to size of the pfd file size.Please suggest me a way to fit my page to the screen automatically.Thank you in advance
There is a simple way to read a PDF in iPhone/iPad:
- Take one UIwebView (name:pdfView).
- Give Iboutlet connection to it & Delegate it to FilesOwner
In Viewdidload
[self.pdfView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"ObjC" ofType:@"pdf"]]]];
ObjC.pdf should be in resource folder..
Now to Fit the pdf page of different size to the screen of the iPad just open respective .xib file then go to inspector of UIwebView then web view attributes and there tick mark scales page to fit option.
精彩评论