ICEPDF:批注不正确的位置

时间:2019-05-16 09:56:58

标签: java pdf annotations icepdf

我正在使用icepdf v6.2.2,但注释位置存在问题

具有以下代码:

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);
    }
  }
} 

结果是icedfp查看器中的定位错误:

adobe_reader_viewer

icepdf_viewer:位置错误:
icepdf_viewer:wrong positioned

有人知道如何制作icepdf在正确的位置显示注释吗?

感谢

0 个答案:

没有答案