0

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];
    }
}

ZIPファイルへのリンク。

4

1 に答える 1

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

私は保存の問題を抱えており、このシナリオを使用して解決しました

于 2013-02-14T14:52:35.303 に答える