0
首先,我使用的是版本1.10.2PSPDFKit無法獲得文檔參考(儘管存在文件)
我有問題要打開PDF文檔。
NSURL* documentURL = [NSURL URLWithString:[[loader getPDFResourcePath:file] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
PSPDFDocument* document = [PSPDFDocument PDFDocumentWithUrl:documentURL];
PSPDFViewController* pdfController = [[PSPDFViewController alloc] initWithDocument:document];
[self presentModalViewController:pdfController animated:NO];
但我發現了這些錯誤代碼:
Oct 16 14:35:52 device-07 MODULESTEST[5150] <Error>: CFURLCreateDataAndPropertiesFromResource: failed with error code -15.
2012-10-16 14:35:52.217 MODULESTEST[5150:707] Error: -[PSPDFGlobalLock documentProviderForDocument:page:]/246 Cannot get document reference (although file exists) for /var/mobile/Applications/24968027-8B41-4B3B-937F-B9624F9661CB/MODULESTEST.app/buildresources/testbundles/bundle_one.bundle//activities/content_specifications.pdf
2012-10-16 14:50:10.038 MODULESTEST[5170:170b] Warning: __45-[PSPDFCache cacheDocument:startAtPage:size:]_block_invoke_0/1015 Document has zero pages. Not caching.
我也用已經iExplorer3和文件存在於應用程序。