Class PDFNewDocument

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

    public class PDFNewDocument
    extends AbstractSimpleSource
    implements FileWriter, ClassCrossReference
    Creates an empty PDF document.
    Needs to be finalized with adams.flow.sink.PDFCloseDocument.
    The output of this source can be processed by adams.flow.transformer.PDFAppendDocument.

    See also:
    adams.flow.transformer.PDFAppendDocument
    adams.flow.sink.PDFCloseDocument

    Input/output:
    - generates:
       adams.flow.transformer.pdfproclet.PDFGenerator


    -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: PDFNewDocument
     
    -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-file <adams.core.io.PlaceholderFile> (property: outputFile)
        The name of 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
     
    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.
    • Constructor Detail

      • PDFNewDocument

        public PDFNewDocument()
    • 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.
      • generates

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

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