Class PDFProcessor

  • All Implemented Interfaces:
    Processor

    public class PDFProcessor
    extends java.lang.Object
    implements Processor
    Processor implementation that translates CommandSequences to a Document in the Portable Document Format (PDF).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean compressed  
    • Constructor Summary

      Constructors 
      Constructor Description
      PDFProcessor()
      Initializes a PDFProcessor for compressed PDF documents.
      PDFProcessor​(boolean compressed)
      Initializes a PDFProcessor with the specified compression settings.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Document getDocument​(CommandSequence commands, PageSize pageSize)
      Constructs a Document from the specified commands.
      boolean isCompressed()
      Returns whether the current PDF document is compressed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • compressed

        private final boolean compressed
    • Constructor Detail

      • PDFProcessor

        public PDFProcessor()
        Initializes a PDFProcessor for compressed PDF documents.
      • PDFProcessor

        public PDFProcessor​(boolean compressed)
        Initializes a PDFProcessor with the specified compression settings.
        Parameters:
        compressed - true if compression is enabled, false otherwise.
    • Method Detail

      • isCompressed

        public boolean isCompressed()
        Returns whether the current PDF document is compressed.
        Returns:
        true if the document is compressed, false otherwise.
      • getDocument

        public Document getDocument​(CommandSequence commands,
                                    PageSize pageSize)
        Description copied from interface: Processor
        Constructs a Document from the specified commands.
        Specified by:
        getDocument in interface Processor
        Parameters:
        commands - Commands used to create the Document.
        pageSize - Size of the resulting Document.
        Returns:
        Document representation of the commands.