Class PDFCreate

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

    public class PDFCreate
    extends AbstractTransformer
    implements FileWriter
    Actor for generating PDF files. Images (GIF/PNG/JPEG), plain text files and CSV files are supported. CSV files are automatically added as tables (if they contain comments, then these will get added as well).
    The filename of the generated PDF is forwarded.

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


    -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: PDFCreate
     
    -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 <adams.core.io.PlaceholderFile> (property: output)
        The PDF file to generate.
        default: ${CWD}
     
    -page-size <A0|A1|A10|A2|A3|A4|A5|A6|A7|A8|A9|ARCH_A|ARCH_B|ARCH_C|ARCH_D|ARCH_E|B0|B1|B10|B2|B3|B4|B5|B6|B7|B8|B9|CROWN_OCTAVO|CROWN_QUARTO|DEMY_OCTAVO|DEMY_QUARTO|EXECUTIVE|FLSA|FLSE|HALFLETTER|ID_1|ID_2|ID_3|LARGE_CROWN_OCTAVO|LARGE_CROWN_QUARTO|LEDGER|LEGAL|LETTER|NOTE|PENGUIN_LARGE_PAPERBACK|PENGUIN_SMALL_PAPERBACK|POSTCARD|ROYAL_OCTAVO|ROYAL_QUARTO|SMALL_PAPERBACK|TABLOID> (property: pageSize)
        The page size of the generated PDF.
        default: A4
     
    -page-orientation <PORTRAIT|LANDSCAPE> (property: pageOrientation)
        The page orientation of the generated PDF.
        default: PORTRAIT
     
    -proclet <adams.flow.transformer.pdfproclet.PdfProclet> [-proclet ...] (property: proclets)
        The processors for processing the files.
        default: adams.flow.transformer.pdfproclet.PlainText, adams.flow.transformer.pdfproclet.SpreadSheet -reader \"adams.data.io.input.CsvSpreadSheetReader -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.DefaultSpreadSheet\", adams.flow.transformer.pdfproclet.Image
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_PageSize

        protected PageSize m_PageSize
        the page size.
      • m_PageOrientation

        protected PageOrientation m_PageOrientation
        the page orientation.
      • m_Proclets

        protected PdfProclet[] m_Proclets
        the PDF processors.
    • Constructor Detail

      • PDFCreate

        public PDFCreate()
    • Method Detail

      • outputFileTipText

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

        public void setPageSize​(PageSize value)
        Sets the page size.
        Parameters:
        value - the size
      • getPageSize

        public PageSize getPageSize()
        Returns the page size.
        Returns:
        the size
      • pageSizeTipText

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

        public void setPageOrientation​(PageOrientation value)
        Sets the page orientation.
        Parameters:
        value - the orientation
      • getPageOrientation

        public PageOrientation getPageOrientation()
        Returns the page orientation.
        Returns:
        the orientation
      • pageOrientationTipText

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

        public void setProclets​(PdfProclet[] value)
        Sets the processors for processing the files.
        Parameters:
        value - the processors to use
      • getProclets

        public PdfProclet[] getProclets()
        Returns the processors in use.
        Returns:
        the processors in use
      • procletsTipText

        public String procletsTipText()
        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.lang.String[].class, java.io.File.class, java.io.File[].class
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Specified by:
        generates in interface OutputProducer
        Returns:
        java.lang.String.class
      • doExecute

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