Q: Is it possible to remove the black border around pages in Qoppa’s PDF component? See screenshot below.

No Border for Pages
No Border for Pages

A: Yes, it is. See code sample below. Modifying the border we use on page view components can be done with an IPDFListener after the document is opened.  Also the documentChanged() method needs to  be overwritten to modify the border on any new pages.

PDFNotesBean pdfNotesBean = new PDFNotesBean() {
      @Override
      public void documentChanged(DocumentEvent de)
      {
            super.documentChanged(de);
 
            if (de.getEventType() == DocumentEvent.PAGE_ADDED)
            {
                  getPageView(de.getPageIndex() + 1).setBorder(BorderFactory.createEmptyBorder());
            }
      }
};
 
pdfNotesBean.addPDFListener(new IPDFListener() {
 
      @Override
      public void afterDocOpened(PDFNotesBean notesBean, String docName, File pdfFile)
      {
            for (int i = 1; i <= notesBean.getPageCount(); ++i)
            {
                  notesBean.getPageView(i).setBorder(BorderFactory.createEmptyBorder());
            }
      }
      @Override
      public void afterDocSaved(PDFNotesBean notesBean, String docName, File pdfFile)
      {
      }
      @Override
      public void afterDocClosed(PDFNotesBean notesBean)
      {
      }
      @Override
      public void annotAdded(PDFNotesBean notesBean, Annotation newAnnot, IPDFPage pdfPage, int pageIndex)
      {
      }
      @Override
      public void annotDeleted(PDFNotesBean notesBean, Annotation annot, int pageIndex)
      {
      }
      @Override
      public void annotModified(PDFNotesBean notesBean, Annotation annot, int pageIndex)
      {
      }
});