Class AbstractPdfProclet

    • Field Detail

      • m_RegExpFilename

        protected BaseRegExp m_RegExpFilename
        the regexp to use on the filename.
    • Constructor Detail

      • AbstractPdfProclet

        public AbstractPdfProclet()
    • Method Detail

      • setRegExpFilename

        public void setRegExpFilename​(BaseRegExp value)
        Sets the regular expression that the filename must match.
        Specified by:
        setRegExpFilename in interface PdfProclet
        Parameters:
        value - the expression
      • getRegExpFilename

        public BaseRegExp getRegExpFilename()
        Returns the regular expression that the filename must match.
        Specified by:
        getRegExpFilename in interface PdfProclet
        Returns:
        the expression
      • regExpFilenameTipText

        public String regExpFilenameTipText()
        Returns the tip text for this property.
        Specified by:
        regExpFilenameTipText in interface PdfProclet
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getExtensions

        public abstract BaseString[] getExtensions()
        Returns the extensions that the processor can process.
        Specified by:
        getExtensions in interface PdfProclet
        Returns:
        the extensions (no dot)
      • addElement

        protected boolean addElement​(PDFGenerator generator,
                                     com.itextpdf.text.Element element)
                              throws Exception
        Adds the element to the document.
        Parameters:
        generator - the context
        element - the element to add
        Returns:
        true if successfully added
        Throws:
        Exception - if adding fails
      • addColumnTextAt

        protected com.itextpdf.text.pdf.ColumnText addColumnTextAt​(PDFGenerator generator,
                                                                   float x,
                                                                   float y)
                                                            throws Exception
        Adds the column text to the document at the specified location. Dimension: x to page width, 0 to y.
        Parameters:
        generator - the context
        Returns:
        the column text
        Throws:
        Exception - if adding fails
      • preProcess

        protected boolean preProcess​(PDFGenerator generator,
                                     File file)
                              throws Exception
        For pre-processing the document.
        Parameters:
        generator - the context
        file - the file to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • doProcess

        protected abstract boolean doProcess​(PDFGenerator generator,
                                             File file)
                                      throws Exception
        The actual processing of the document.
        Parameters:
        generator - the context
        file - the file to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • postProcess

        protected boolean postProcess​(PDFGenerator generator,
                                      File file)
                               throws Exception
        For post-processing the document.
        Parameters:
        generator - the context
        file - the file to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • canProcess

        public boolean canProcess​(PDFGenerator generator,
                                  File file)
        Whether the processor can handle this particular file.
        Specified by:
        canProcess in interface PdfProclet
        Parameters:
        generator - the context
        file - the file to check
        Returns:
        true if the file can be handled
      • process

        public boolean process​(PDFGenerator generator,
                               File file)
        Processes the given file.
        Specified by:
        process in interface PdfProclet
        Parameters:
        generator - the context
        file - the file to add
        Returns:
        true if successfully added
      • canProcess

        public abstract boolean canProcess​(PDFGenerator generator,
                                           Object obj)
        Whether the processor can handle this particular object.
        Specified by:
        canProcess in interface PdfProclet
        Parameters:
        generator - the context
        obj - the object to check
        Returns:
        true if the object can be handled
      • preProcess

        protected boolean preProcess​(PDFGenerator generator,
                                     Object obj)
                              throws Exception
        For pre-processing the document.
        Parameters:
        generator - the context
        obj - the object to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • doProcess

        protected abstract boolean doProcess​(PDFGenerator generator,
                                             Object obj)
                                      throws Exception
        The actual processing of the document.
        Parameters:
        generator - the context
        obj - the object to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • postProcess

        protected boolean postProcess​(PDFGenerator generator,
                                      Object obj)
                               throws Exception
        For post-processing the document.
        Parameters:
        generator - the context
        obj - the object to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • process

        public boolean process​(PDFGenerator generator,
                               Object obj)
        Processes the given object.
        Specified by:
        process in interface PdfProclet
        Parameters:
        generator - the context
        obj - the object to process
        Returns:
        true if successfully added