2013-10-18 3 views
0

QLPreviewcontroller를 사용하는 iPad 앱에서 pdf 파일 판독기를 사용해 왔지만 어느 것이 든 도움이 될 수있는 popover에 pdf 하이퍼 링크 쇼의 내부를 표시해야합니다.iPad 응용 프로그램의 popover에 pdf 하이퍼 링크 데이터를 표시하려면 어떻게해야합니까?

documentPath = [[NSBundle mainBundle] pathForResource:@"my_file" ofType:@"pdf"]; 
     fileURL = [NSURL fileURLWithPath:documentPath]; 
     //fileURL = [NSURL URLWithString:kStringURLUIDocumentInteractionControllerPDF]; 

} 
//creating the object of the QLPreviewController 
QLPreviewController *previewController = [[QLPreviewController alloc] init]; 

//settnig the datasource property to self 
previewController.dataSource = self; 

//pusing the QLPreviewController to the navigation stack 
[[self navigationController] pushViewController:previewController animated:YES]; 
//remove the right bar print button 
[previewController.navigationItem setRightBarButtonItem:nil]; 
[previewController release]; 

답변

2

당신이 원하는 것은 불가능하지 않지만 매우 복잡하며 수천 줄의 코드가 걸릴 것입니다. Quartz는 사용자가 요구하는 것을 수행하는 데 필요한 모든 기능을 가지고 있지만 문서화가 잘되어 있지 않은 구조에 대한 주요 작업이 될 것입니다.

이렇게하면 외부 라이브러리를 사용하여 훨씬 더 많은 작업을 수행 할 수 있습니다. 이전에 PSPDFKitFoxit Embedded SDK으로 해봤지만 둘 다 저렴하지 않았습니다. 코드에 GPL 라이센스가있는 경우 MuPDF을 고려할 수 있지만 상용 소프트웨어에는 도움이되지 않을 수 있습니다.