Reading Open-XML documents in IOS

前端 未结 3 1553
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 02:55

I have used the CGPDFDocument class to read .pdf documents and retrieve the # of pages or pull back a page by number.

I am looking for a si

3条回答
  •  被撕碎了的回忆
    2020-12-04 03:43

    Loading a local PDF file into the web view

    - (void)viewDidLoad {
        [super viewDidLoad];
    
        NSString *thePath = [[NSBundle mainBundle] pathForResource:@"iPhone_User_Guide" ofType:@"doc"];
        if (thePath) {
            NSData *pdfData = [NSData dataWithContentsOfFile:thePath];
            [(UIWebView *)self.view loadData:pdfData MIMEType:@"application/doc"
                textEncodingName:@"utf-8" baseURL:nil];
        }
    }
    

    and if through network then

    [self.myWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/iphone_user_guide.pdf"]]];
    

提交回复
热议问题