Class PDFInfo

  • All Implemented Interfaces:
    AdditionalInformationHandler, ArrayProvider, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ArrayProvider, DataInfoActor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class PDFInfo
    extends AbstractArrayProvider
    implements DataInfoActor
    Outputs information on a PDF file.

    Input/output:
    - accepts:
       java.lang.String
       java.io.File
    - generates:
       java.lang.Integer


    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: PDFInfo
     
    -annotation <adams.core.base.BaseAnnotation> (property: annotations)
        The annotations to attach to this actor.
        default: 
     
    -skip <boolean> (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded 
        as it is.
        default: false
     
    -stop-flow-on-error <boolean> (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
        default: false
     
    -silent <boolean> (property: silent)
        If enabled, then no errors are output in the console; Note: the enclosing 
        actor handler must have this enabled as well.
        default: false
     
    -output-array <boolean> (property: outputArray)
        If enabled, the info items get output as array rather than one-by-one.
        default: false
     
    -type <NUM_PAGES|WIDTH|HEIGHT> (property: type)
        The type of information to generate.
        default: NUM_PAGES
     
    -page-index <adams.core.Index> (property: pageIndex)
        The page index to use for generating page-specific information. An index 
        is a number starting with 1; the following placeholders can be used as well:
         first, second, third, last_2, last_1, last
        default: first
        example: An index is a number starting with 1; the following placeholders can be used as well: first, second, third, last_2, last_1, last
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Type

        protected PDFInfo.InfoType m_Type
        the type of information to generate.
      • m_PageIndex

        protected Index m_PageIndex
        the index of the page to get the information for.
    • Constructor Detail

      • PDFInfo

        public PDFInfo()
    • Method Detail

      • setType

        public void setType​(PDFInfo.InfoType value)
        Sets the type of information to generate.
        Parameters:
        value - the type
      • getType

        public PDFInfo.InfoType getType()
        Returns the type of information to generate.
        Returns:
        the type
      • typeTipText

        public String typeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPageIndex

        public void setPageIndex​(Index value)
        Sets the page index to use for page specific information.
        Parameters:
        value - the 1-based index
      • getPageIndex

        public Index getPageIndex()
        Returns the page index to use for page specific information.
        Returns:
        the 1-based index
      • pageIndexTipText

        public String pageIndexTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        Returns:
        java.lang.String.class, java.io.File.class
      • doExecute

        protected String doExecute()
        Executes the flow item.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message