简体   繁体   中英

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

您好,我正在使用pdf阅读器应用程序。我使用了图块层来呈现PDF,但是我根据pfd文件大小将页面上下颠倒。请建议我一种自动将页面适合屏幕的方法。先感谢您

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM