开发者

How Fit the pdf page of different size to the screen of the iPad?

开发者 https://www.devze.com 2023-02-02 19:52 出处:网络
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

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:

  1. Take one UIwebView (name:pdfView).
  2. Give Iboutlet connection to it & Delegate it to FilesOwner
  3. In Viewdidload

    [self.pdfView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"ObjC" ofType:@"pdf"]]]];
    
  4. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消