我正在使用 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);
}