0

I use a PDF reader called vfr to read local pdf files. I also tried to read online pdf files but it didn't work.

This the code:

- (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.

4

1 回答 1

0

您可以制作以下 senario ...

  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 解决了它

于 2013-02-14T14:52:35.303 回答