Am using icepdf to show pdf on my swing application. I have external buttons for pdf navigation. I need to navigate so many pdfs, but inside the same panel without closing.
My code for 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();
}
}
This is loading same pdf everytime.