ICEPDF Java中的书签设置

时间:2018-09-26 08:03:58

标签: java frameworks bookmarks icepdf

我正在使用pdf查看器IcePDF,但是当我运行我的应用程序时,书签不可用。我尝试了其他PDF,并且仅在目录位于第一页时才起作用。有人可以帮我找到此功能的设置吗?

编辑:

这是使用ICEPdf的代码

public static void main(String[] args) {
    final String filePath = "myFile.pdf";

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

    PropertiesManager properties = new PropertiesManager(System.getProperties(),
            ResourceBundle.getBundle(PropertiesManager.DEFAULT_MESSAGE_BUNDLE));

    properties.setBoolean(PropertiesManager.PROPERTY_SHOW_UTILITY_PRINT, false); 

    SwingViewBuilder factory = new SwingViewBuilder(controller, properties);

    JPanel viewerComponentPanel = factory.buildViewerPanel();

    // add interactive mouse link annotation support via callback
    controller.getDocumentViewController().setAnnotationCallback(
            new MyAnnotationCallback(controller.getDocumentViewController()));

    //controller.getDocumentViewController().setDestinationTarget(controller.getDocument().getCatalog().getDestinations().);

    JFrame applicationFrame = new JFrame();
    applicationFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    applicationFrame.setTitle("Test ICEPdf");
    applicationFrame.getContentPane().add(viewerComponentPanel);

    // Now that the GUI is all in place, we can try openning a PDF
    controller.openDocument(filePath);

    // show the component
    applicationFrame.pack();
    applicationFrame.setVisible(true);
}

0 个答案:

没有答案