problem with rendering pdf on the entire screen of pdf

后端 未结 3 1515
借酒劲吻你
借酒劲吻你 2020-12-22 07:18

Hi all I tried in many ways to print a pdf according with the size of the pdf book.i also searched in many links and many codes like apple codes,github and many such type of

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-22 07:52

    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.

提交回复
热议问题