pdf阅读器在线文件

时间:2012-12-01 19:35:05

标签: xcode pdf

我使用名为vfr的PDF阅读器来阅读本地pdf文件。我也尝试阅读在线pdf文件,但它没有用。

这段代码:

- (IBAction)didClickOpenPDF {

    NSString *pdfURL = @"www.ciep.fr/tcf/document/manuel_candidat.PDF";
    ReaderDocument *document = [ReaderDocument withDocumentFilePath:pdfURL password:nil];

    if (document != nil)
    {
        ReaderViewController *readerViewController = [[ReaderViewController alloc] initWithReaderDocument:document];
        readerViewController.delegate = self;

        readerViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
        readerViewController.modalPresentationStyle = UIModalPresentationFullScreen;

        [self presentModalViewController:readerViewController animated:YES];
    }
}

Link to ZIP file.

1 个答案:

答案 0 :(得分:0)

你可以制作以下场景......

  1 - Save the file to the local storage

  2 - read the full path/local url of the downloaded file

  3 - invoke didClickOpenPDF with the path/local url of the PDF

我有保存问题,我使用此senario解决了它