How to parse PDF in Objective C for iPad

后端 未结 2 1723
广开言路
广开言路 2021-02-09 13:05

I am stuck with parsing a PDF file. Please guide me how to do this.

Header file.

//PDFViewer.h
@interface PDFViewer : UIView 
{
 CGPDFDocumentRef pdf;
}
         


        
2条回答
  •  死守一世寂寞
    2021-02-09 13:42

    I got another simple way to parse PDF for 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..

提交回复
热议问题