1

私のスイングアプリケーションでpdfを表示するためにicepdfを使用しています。PDFナビゲーション用の外部ボタンがあります。非常に多くのPDFをナビゲートする必要がありますが、同じパネル内を閉じずに移動します。

Icepdfの私のコード:

public static void pdfviewerICE(currentpdfurl) {
    filePath = currentpdfurl;

    // build a controller
    SwingController controller = new SwingController();

    // Build a SwingViewFactory configured with the controller
    SwingViewBuilder factory = new SwingViewBuilder(controller);
    PropertiesManager properties = new PropertiesManager(
        System.getProperties(),
        ResourceBundle.getBundle(PropertiesManager.DEFAULT_MESSAGE_BUNDLE));

    properties.set(PropertiesManager.PROPERTY_DEFAULT_ZOOM_LEVEL, "1.75");

    JSplitPane jSplitPane_PDF = factory.buildUtilityAndDocumentSplitPane(true);
    controller.openDocument(filePath);
    if ((internalFrame.getComponents()!= null) || (internalFrame.isClosed())) {
         internalFrame.add(jSplitPane_PDF);
    internalFrame.show();
   }
}

これは毎回同じpdfをロードしています。

4

1 に答える 1

2

プラサート・バラ

「コントローラー」を公開する必要があります。次に、pdfページが変更されたときにコントローラーを呼び出します

コード: controller.openDocument(currentpdfurl);

私も同じ問題を抱えていました。これにより、クエリが確実に解決されます。

于 2015-03-30T12:33:12.860 に答える