voyent
Annotation incorrect location  XML
Forum Index -> ICEpdf General
Author Message
zeageorge

Joined: 08/May/2019 02:39:48
Messages: 1
Offline


I'm using icepdf v6.2.2 and i'm having trouble with annotation position

with the following code:
private void initComponent() {
System.getProperties().put("org.icepdf.core.annotations.interactive.enabled", "true");
System.getProperties().put("org.icepdf.core.awtFontLoading", "true");

PropertiesManager properties = new PropertiesManager(System.getProperties(),
ResourceBundle.getBundle(PropertiesManager.DEFAULT_MESSAGE_BUNDLE));
properties.setBoolean(PropertiesManager.PROPERTY_SHOW_TOOLBAR_ANNOTATION, Boolean.FALSE);
properties.setBoolean(PropertiesManager.PROPERTY_SHOW_TOOLBAR_FIT, Boolean.TRUE);
properties.setBoolean(PropertiesManager.PROPERTY_VIEWPREF_FORM_HIGHLIGHT, Boolean.FALSE);

swingController = new SwingController();
swingController.setIsEmbeddedComponent(true);
swingViewBuilder = new SwingViewBuilder(swingController, properties);

myAnnotationCallback = new MyAnnotationCallback(swingController.getDocumentViewController());
swingController.getDocumentViewController().setAnnotationCallback(myAnnotationCallback);

innerPanel = swingViewBuilder.buildViewerPanel();
innerPanel.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(153, 153, 153)));
innerPanel.setMinimumSize(new Dimension(20, 20));
innerPanel.setMaximumSize(new Dimension(3000, 3000));

setLayout(new BorderLayout());
add(innerPanel, BorderLayout.CENTER);
add(statusMessage, BorderLayout.SOUTH);
parent.addWindowListener(swingController); // parent extends the JFrame class
}

public void load(InputStream inputStream, String filename, String filePath) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
swingController.closeDocument();
swingController.openDocument(inputStream, filename, filePath);
}

the result is some wrong positioned annotations inside the icedfp viewer.
Does anyone knows how to make icepdf to display the annotations in their correct locations ?

Thanx
[Thumb - adobe_reader_viewer.png]
 Filename adobe_reader_viewer.png [Disk] Download
 Description correct positions
 Filesize 17 Kbytes
 Downloaded:  12 time(s)

[Thumb - icepdf_viewer.png]
 Filename icepdf_viewer.png [Disk] Download
 Description wrong positioned
 Filesize 24 Kbytes
 Downloaded:  13 time(s)

 
Forum Index -> ICEpdf General
Go to:   
Powered by JForum 2.1.7ice © JForum Team