Class PdfBuilder

  • All Implemented Interfaces:
    groovy.lang.GroovyObject

    public class PdfBuilder
    extends java.lang.Object
    implements groovy.lang.GroovyObject
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.pdfbox.pdmodel.PDDocument document  
      static org.slf4j.Logger log  
    • Constructor Summary

      Constructors 
      Constructor Description
      PdfBuilder()  
    • Field Detail

      • log

        public static final org.slf4j.Logger log
      • document

        protected org.apache.pdfbox.pdmodel.PDDocument document
    • Constructor Detail

      • PdfBuilder

        public PdfBuilder()
    • Method Detail

      • encrypt

        public PdfBuilder encrypt​(java.lang.String ownerPassword)
      • getMetaClass

        public groovy.lang.MetaClass getMetaClass()
        Specified by:
        getMetaClass in interface groovy.lang.GroovyObject
      • setMetaClass

        public void setMetaClass​(groovy.lang.MetaClass mc)
        Specified by:
        setMetaClass in interface groovy.lang.GroovyObject
      • load

        public PdfBuilder load​(java.lang.String path)
      • load

        public PdfBuilder load​(java.lang.String... paths)
      • save

        public java.io.File save​(java.lang.String path)
      • build

        public org.apache.pdfbox.pdmodel.PDDocument build()
      • includeImage

        public PdfBuilder includeImage​(java.lang.String filePath,
                                       int pageNumber,
                                       float x,
                                       float y,
                                       float width,
                                       float height)
      • includeImage

        public PdfBuilder includeImage​(java.io.File file,
                                       int pageNumber,
                                       float x,
                                       float y,
                                       float width,
                                       float height)
      • fill

        public PdfBuilder fill​(java.lang.String xml,
                               java.util.Map<java.lang.String,​java.lang.String> fonts)
      • merge

        public PdfBuilder merge​(org.apache.pdfbox.pdmodel.PDDocument... documents)
      • encrypt

        public PdfBuilder encrypt​(java.lang.String ownerPassword,
                                  java.lang.String userPassword)
      • removePages

        public PdfBuilder removePages​(int... pages)
      • resize

        public PdfBuilder resize​(float left,
                                 float right,
                                 float up,
                                 float down)