2017-10-13 10 views
1

私は、iOSとpdfsを表示・編集するmacアプリケーションの実装に取り​​組んでいます。PDFTron macの実装

  • iOSバージョンの実装は、次のコードを使用して終了します。
  • 問題はMac版で、pdfsの表示と編集に必要なPTPDFViewCtrlとToolManagerクラスは含まれていません。

同等のクラスを使用して、Macの実装や推奨されるMacの実装を経験したことがある人はいますか?

#pragma mark - PDFKit 
-(void)initialConfig { 

#warning MISSING PDFTRon license key 
    // initialize PDFNet 
    [PTPDFNet Initialize:@""]; 

    PTPDFViewCtrl *ctrl = [PTPDFViewCtrl new]; 
    CGFloat offset = 20; 
    ctrl.frame = CGRectMake(0, offset, self.view.frame.size.width, self.view.frame.size.height - offset); 
    [ctrl SetBackgroundColor:0 g:0 b:0 a:0]; 
    [ctrl SetHighlightFields:YES]; 
self.view.backgroundColor = [UIColor lightGrayColor]; 
    [self.view addSubview:ctrl]; 

    // open the PDF document included in the bundle in the PTPDFViewCtrl 
    PTPDFDoc *doc = [[PTPDFDoc alloc]initWithFilepath:self.viewModel.getFilePath]; 
    [ctrl SetDoc:doc]; 
    self.viewModel.doc = doc; 

    [ctrl setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth]; 

    // add the toolmanager (used to implement text selection, annotation editing, etc. 
    ToolManager *toolManager = [[ToolManager alloc] initWithPDFViewCtrl:ctrl]; 
    [toolManager changeTool:[PanTool self]]; 
    ctrl.toolDelegate = toolManager; 
} 

任意の助けのためにありがとうございました。 Matti

答えて

1

PDFNetCMac C/C++のダウンロードには、Java SWINGサンプルプロジェクトが含まれていますが、このサンプルは保守もサポートもされていません。 PDFViewクラスを使用し、統合の基本をいくつか示します。このサンプルでは、​​たとえば注釈付けをサポートしていません。

同様に、Qtのようなクロスプラットフォームフレームワークとの統合のガイドとして使用しているC++ Windows MFCサンプルもあります。

PDF WebViewerを使用するのは、ユーザーインターフェイスをネイティブmacOSアプリケーションのブラウザ要素に移動する必要がありますが、WebViewerにはフォームの記入や注釈付けなどの完全な表示が含まれています。

関連する問題