All Implemented Interfaces:
DynamicPropertyProvider, LocaleListener, MutableDynamicPropertyProvider, StyleProvider, ComponentLifecycle, QualityMonitor, VisionComponent, ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
ICEPDFViewer

public class PDFViewer extends AbstractVisionPanel
See Also:
  • Field Details

    • PREFERRED_SIZE

      public static final Dimension PREFERRED_SIZE
    • controller

      protected org.icepdf.ri.common.SwingController controller
    • filePath

      protected String filePath
    • toolBarVisible

      protected boolean toolBarVisible
    • footerVisible

      protected boolean footerVisible
    • utilityPaneVisible

      protected boolean utilityPaneVisible
    • fitMode

      protected int fitMode
    • viewMode

      protected int viewMode
    • pageProp

      protected PropChangeHolder<Integer> pageProp
  • Constructor Details

    • PDFViewer

      public PDFViewer()
  • Method Details

    • onStartup

      protected void onStartup()
      Description copied from class: AbstractVisionPanel
      Subclasses should override this to provide startup logic.
      Overrides:
      onStartup in class AbstractVisionPanel
    • onShutdown

      protected void onShutdown()
      Description copied from class: AbstractVisionPanel
      Subclasses should override this to provide shutdown logic.
      Overrides:
      onShutdown in class AbstractVisionPanel
    • getController

      public org.icepdf.ri.common.SwingController getController()
    • getFilePath

      public String getFilePath()
    • setFilePath

      public void setFilePath(String filePath)
    • tryOpen

      public boolean tryOpen(String path)
      Attempts to open a PDF at the given path.
      Parameters:
      path - the file path or URL of the pdf to be opened
    • isToolBarVisible

      public boolean isToolBarVisible()
    • setToolBarVisible

      public void setToolBarVisible(boolean show)
    • isUtilityPaneVisible

      public boolean isUtilityPaneVisible()
    • setUtilityPaneVisible

      public void setUtilityPaneVisible(boolean visible)
    • getPageFitMode

      public int getPageFitMode()
    • setPageFitMode

      public void setPageFitMode(int newMode)
    • getPageViewMode

      public int getPageViewMode()
    • setPageViewMode

      public void setPageViewMode(int newMode)
    • isFooterVisible

      public boolean isFooterVisible()
    • setFooterVisible

      public void setFooterVisible(boolean visible)
    • loadPDFBytes

      public void loadPDFBytes(byte[] pdfBytes, String description)
    • print

      public void print()
      Prints the current PDF using a print dialog. Used for scripting
    • print

      public void print(boolean withDialog)
      Print the current PDF.
      Parameters:
      withDialog - If true, shows the user a print dialog. Used for scripting
    • getZoomFactor

      public float getZoomFactor()
      Returns the current zoom level. Will return 0 if the component is not initialized yet. Used for scripting
      Returns:
      zoomFactor
    • setZoomFactor

      public void setZoomFactor(float zoomFactor)
      Sets the zoom level. Used for scripting
      Parameters:
      zoomFactor - Will be adjusted if outside of documentview's min/max
    • setPrintingMode

      @Deprecated public void setPrintingMode(int mode)
      Deprecated.
    • setPrintMode

      @Deprecated public void setPrintMode(int mode)
      Deprecated.
    • setPrintingDPI

      @Deprecated public void setPrintingDPI(int dpi)
      Deprecated.
    • setMouseoverText

      @Deprecated public void setMouseoverText(String txt)
      Deprecated.
    • setBytes

      @Deprecated public void setBytes(byte[] bytes)
      Deprecated.
    • setFilename

      @Deprecated public void setFilename(String filePath)
      Deprecated.
    • getFilename

      @Deprecated public String getFilename()
      Deprecated.
      Use getFilePath instead.