Class PEFHandler.Builder

  • Enclosing class:
    PEFHandler

    public static class PEFHandler.Builder
    extends Object
    Provides a Builder for PEFHandler.
    • Constructor Detail

      • Builder

        public Builder​(EmbosserWriter embosser)
        Create a new PEFHandler builder.
        Parameters:
        embosser - the embosser writer to use
    • Method Detail

      • range

        public PEFHandler.Builder range​(Range value)
        Sets the range of pages to output.
        Parameters:
        value - the range
        Returns:
        returns this object
      • align

        public PEFHandler.Builder align​(PEFHandler.Alignment value)
        Sets page alignment to use if the physical paper is bigger than the pages.
        Parameters:
        value - the value to use
        Returns:
        returns this object
      • offset

        public PEFHandler.Builder offset​(int value)
        Sets the page margin offset where positive numbers adjust towards the right side of the paper, and negative numbers adjust towards the left side.
        Parameters:
        value - the offset
        Returns:
        returns this object
      • topOffset

        public PEFHandler.Builder topOffset​(int value)
        Sets the top offset.
        Parameters:
        value - the offset
        Returns:
        returns this object
      • build

        public PEFHandler build()
                         throws IOException
        Builds a PEFHandler from this builder's current configuration.
        Returns:
        returns a new PEFHandler
        Throws:
        IOException - if an I/O error occurs