我使用名为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];
}
}
答案 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解决了它