Class PDFDebugger

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class PDFDebugger extends JFrame
PDF Debugger.
See Also:
  • Field Details

    • LOG

      private static org.apache.commons.logging.Log LOG
    • SPECIALCOLORSPACES

      private static final Set<COSName> SPECIALCOLORSPACES
    • OTHERCOLORSPACES

      private static final Set<COSName> OTHERCOLORSPACES
    • PDF_FILTER

      private static final FileFilter PDF_FILTER
    • PASSWORD

      private static final String PASSWORD
      See Also:
    • VIEW_STRUCTURE

      private static final String VIEW_STRUCTURE
      See Also:
    • SHORCUT_KEY_MASK

      private static final int SHORCUT_KEY_MASK
    • statusPane

      private TreeStatusPane statusPane
    • recentFiles

      private RecentFiles recentFiles
    • windowPrefs

      private WindowPrefs windowPrefs
    • isPageMode

      private boolean isPageMode
    • document

      private PDDocument document
    • currentFilePath

      private String currentFilePath
    • OS_NAME

      private static final String OS_NAME
    • IS_MAC_OS

      private static final boolean IS_MAC_OS
    • jScrollPaneRight

      private JScrollPane jScrollPaneRight
    • jSplitPane

      private JSplitPane jSplitPane
    • jTextPane

      private JTextPane jTextPane
    • statusBar

      private ReaderBottomPanel statusBar
    • tree

      private Tree tree
    • documentPanel

      private final JPanel documentPanel
    • saveAsMenuItem

      private JMenuItem saveAsMenuItem
    • recentFilesMenu

      private JMenu recentFilesMenu
    • printMenuItem

      private JMenuItem printMenuItem
    • printDpiMenu

      private JMenu printDpiMenu
    • reopenMenuItem

      private JMenuItem reopenMenuItem
    • findMenu

      private JMenu findMenu
    • findMenuItem

      private JMenuItem findMenuItem
    • findNextMenuItem

      private JMenuItem findNextMenuItem
    • findPreviousMenuItem

      private JMenuItem findPreviousMenuItem
    • viewModeItem

      private JMenuItem viewModeItem
    • allowSubsampling

      public static JCheckBoxMenuItem allowSubsampling
    • repairAcroFormMenuItem

      public static JCheckBoxMenuItem repairAcroFormMenuItem
    • configuration

      public static final Properties configuration
  • Constructor Details

    • PDFDebugger

      public PDFDebugger()
      Constructor.
    • PDFDebugger

      public PDFDebugger(boolean viewPages)
      Constructor.
  • Method Details

    • loadConfiguration

      private void loadConfiguration()
      Loads the local configuration file, if any.
    • initComponents

      private void initComponents()
      This method is called from within the constructor to initialize the form.
    • initGlobalEventHandlers

      protected void initGlobalEventHandlers()
      Initialize application global event handlers. Protected to allow subclasses to override this method if they don't want the global event handler overridden.
    • createFileMenu

      private JMenu createFileMenu()
    • createEditMenu

      private JMenu createEditMenu()
    • createViewMenu

      private JMenu createViewMenu()
    • createFindMenu

      private JMenu createFindMenu()
    • getFindMenu

      public JMenu getFindMenu()
      Returns the File menu.
    • getFindMenuItem

      public JMenuItem getFindMenuItem()
      Returns the Edit > Find > Find menu item.
    • getFindNextMenuItem

      public JMenuItem getFindNextMenuItem()
      Returns the Edit > Find > Find Next menu item.
    • getFindPreviousMenuItem

      public JMenuItem getFindPreviousMenuItem()
      Returns the Edit > Find > Find Previous menu item.
    • osxOpenFiles

      private void osxOpenFiles(String filename)
      This method is called via reflection on Mac OS X.
    • osxQuit

      private void osxQuit()
      This method is called via reflection on Mac OS X.
    • saveAsMenuItemActionPerformed

      private void saveAsMenuItemActionPerformed(ActionEvent evt)
    • openMenuItemActionPerformed

      private void openMenuItemActionPerformed(ActionEvent evt)
    • jTree1ValueChanged

      private void jTree1ValueChanged(TreeSelectionEvent evt)
    • isSpecialColorSpace

      private boolean isSpecialColorSpace(Object selectedNode)
    • isOtherColorSpace

      private boolean isOtherColorSpace(Object selectedNode)
    • isPage

      private boolean isPage(Object selectedNode)
    • isFlagNode

      private boolean isFlagNode(Object selectedNode, Object parentNode)
    • isEncrypt

      private boolean isEncrypt(Object obj)
    • isFontDescriptor

      private boolean isFontDescriptor(Object obj)
    • isAnnot

      private boolean isAnnot(Object obj)
    • isStream

      private boolean isStream(Object selectedNode)
    • isString

      private boolean isString(Object selectedNode)
    • isFont

      private boolean isFont(Object selectedNode)
    • isCIDFont

      private boolean isCIDFont(COSDictionary dic)
    • showColorPane

      private void showColorPane(Object csNode) throws IOException
      Show a Panel describing color spaces in more detail and interactive way.
      Parameters:
      csNode - the special color space containing node.
      Throws:
      IOException
    • showPage

      private void showPage(Object selectedNode)
    • showFlagPane

      private void showFlagPane(Object parentNode, Object selectedNode)
    • showStream

      private void showStream(COSStream stream, TreePath path) throws IOException
      Throws:
      IOException
    • showFont

      private void showFont(Object selectedNode, TreePath path)
    • replaceRightComponent

      private void replaceRightComponent(Component pane)
    • showString

      private void showString(Object selectedNode)
    • getNodeKey

      private COSName getNodeKey(Object selectedNode)
    • getUnderneathObject

      private Object getUnderneathObject(Object selectedNode)
    • convertToString

      private String convertToString(Object selectedNode)
    • exitMenuItemActionPerformed

      private void exitMenuItemActionPerformed(ActionEvent ignored)
    • performApplicationExit

      protected void performApplicationExit()
      Exit the application after the window is closed. This is protected to let subclasses override the behavior.
    • printMenuItemActionPerformed

      private void printMenuItemActionPerformed(ActionEvent evt)
    • main

      public static void main(String[] args) throws Exception
      Entry point.
      Parameters:
      args - the command line arguments
      Throws:
      Exception - If anything goes wrong.
    • readPDFFile

      private void readPDFFile(String filePath, String password) throws IOException
      Throws:
      IOException
    • readPDFFile

      private void readPDFFile(File file, String password) throws IOException
      Throws:
      IOException
    • readPDFurl

      private void readPDFurl(String urlString, String password) throws IOException
      Throws:
      IOException
    • initTree

      private void initTree()
    • addRecentFileItems

      private void addRecentFileItems()
    • usage

      private static void usage()
      This will print out a message telling how to use this utility.
    • getPageLabel

      public static String getPageLabel(PDDocument document, int pageIndex)
      Convenience method to get the page label if available.
      Parameters:
      document -
      pageIndex - 0-based page number.
      Returns:
      a page label or null if not available.