简体   繁体   English

如何将不同大小的pdf页面适合iPad的屏幕?

[英]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: 有一种在iPhone / iPad中阅读PDF的简单方法:

  1. Take one UIwebView (name:pdfView). 取一个UIwebView(名称:pdfView)。
  2. Give Iboutlet connection to it & Delegate it to FilesOwner 为其提供Iboutlet连接并将其委托给FilesOwner
  3. In Viewdidload 在Viewdidload中

     [self.pdfView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"ObjC" ofType:@"pdf"]]]]; 
  4. ObjC.pdf should be in resource folder.. ObjC.pdf应位于资源文件夹中。
    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. 现在要将不同大小的pdf页面适合iPad的屏幕,只需打开相应的.xib文件,然后转到UIwebView的检查器,然后转到Web视图属性,然后单击刻度刻度页面以适合选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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