Class EmbeddedFilePanel


  • public class EmbeddedFilePanel
    extends SidePanelFactory
    Create a SidePanel that will display a list of embedded files in the PDF.
    The following initialization parameters can be specified to configure this feature.
    savetrue, false or desktop, for setSaveEnabled(). Default is true
    The name of this feature is ShowHideEmbeddedFiles

    This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

    Since:
    2.18
    • Constructor Detail

      • EmbeddedFilePanel

        public EmbeddedFilePanel()
        Create a new EmbeddedFilePanel
    • Method Detail

      • isSidePanelRequired

        public boolean isSidePanelRequired​(DocumentPanel docpanel)
        Description copied from class: SidePanelFactory
        Determines whether this side panel is required for this PDF. By default this method returns true, but an example of where this wouldn't apply is for the Bookmarks panel on a PDF with no bookmarks. Note prior to 2.26, this method took a PDF instead of a DocumentPanel
        Overrides:
        isSidePanelRequired in class SidePanelFactory
      • setSaveEnabled

        public void setSaveEnabled​(boolean enabled)
        Set whether to allow embedded files to be saved to the filesystem
        Parameters:
        enabled - if true, embedded files can be saved to the filesystem
      • setSaveToDesktop

        public void setSaveToDesktop​(boolean desktop)
        If save is enabled, implement this by creating a temporary file and openinng it with the Desktop.open(java.io.File) method. This defaults to false.
      • isSaveEnabled

        public boolean isSaveEnabled()
        Return whether files can be saved to the filesystem, as set by setSaveEnabled(boolean)
        Returns:
        if true, embedded files can be saved to the filesystem
      • isSaveToDesktop

        public boolean isSaveToDesktop()