java.lang.Object
org.apache.pdfbox.pdmodel.interactive.digitalsignature.visible.PDFTemplateStructure

public class PDFTemplateStructure extends Object
Structure of PDF document with visible signature.
  • Field Details

  • Constructor Details

    • PDFTemplateStructure

      public PDFTemplateStructure()
  • Method Details

    • getPage

      public PDPage getPage()
      Returns document page.
      Returns:
      the page
    • setPage

      public void setPage(PDPage page)
      Sets document page
      Parameters:
      page - the current page
    • getTemplate

      public PDDocument getTemplate()
      Gets PDDocument template. This represents a digital signature that can be attached to a document
      Returns:
      the template
    • setTemplate

      public void setTemplate(PDDocument template)
      Wets PDDocument template. This represents a digital signature that can be attached to a document
      Parameters:
      template - the document used as template
    • getAcroForm

      public PDAcroForm getAcroForm()
      Gets AcroForm
      Returns:
      the AcroForm
    • setAcroForm

      public void setAcroForm(PDAcroForm acroForm)
      Sets AcroForm
      Parameters:
      acroForm - the acro form to be used for the signature
    • getSignatureField

      public PDSignatureField getSignatureField()
      Gets Signature field
      Returns:
      the signature field
    • setSignatureField

      public void setSignatureField(PDSignatureField signatureField)
      Sets signature field
      Parameters:
      signatureField - the current signature field
    • getPdSignature

      public PDSignature getPdSignature()
      Gets PDSignature
      Returns:
      the signature
    • setPdSignature

      public void setPdSignature(PDSignature pdSignature)
      Sets PDSignatureField
      Parameters:
      pdSignature - the current PDSignature object
    • getAcroFormDictionary

      public COSDictionary getAcroFormDictionary()
      Gets Dictionary of AcroForm. That's /DR entry in the AcroForm
      Returns:
      the AcroForm's dictionary
    • setAcroFormDictionary

      public void setAcroFormDictionary(COSDictionary acroFormDictionary)
      Acroform have its Dictionary, so we here set the Dictionary which is in this location: AcroForm/DR
      Parameters:
      acroFormDictionary - the current acroform dictionary
    • getSignatureRectangle

      public PDRectangle getSignatureRectangle()
      Gets SignatureRectangle
      Returns:
      the rectangle for the signature
    • setSignatureRectangle

      public void setSignatureRectangle(PDRectangle signatureRectangle)
      Sets SignatureRectangle
      Parameters:
      signatureRectangle - the rectangle to be used for the signature
    • getAffineTransform

      public AffineTransform getAffineTransform()
      Gets AffineTransform
      Returns:
      the AffineTransform
    • setAffineTransform

      public void setAffineTransform(AffineTransform affineTransform)
      Sets AffineTransform
      Parameters:
      affineTransform - the affine transformation to be used for the signature
    • getProcSet

      public COSArray getProcSet()
      Gets ProcSet Array
      Returns:
      the PorocSet array
    • setProcSet

      public void setProcSet(COSArray procSet)
      Sets ProcSet Array
      Parameters:
      procSet - the current ProcSet array
    • getImage

      public PDImageXObject getImage()
      Gets the image of visible signature
      Returns:
      the image making up the visible signature
    • setImage

      public void setImage(PDImageXObject image)
      Sets the image of visible signature
      Parameters:
      image - Image XObject
    • getFormatterRectangle

      public PDRectangle getFormatterRectangle()
      Gets formatter rectangle
      Returns:
      the formatter rectangle
    • setFormatterRectangle

      public void setFormatterRectangle(PDRectangle formatterRectangle)
      Sets formatter rectangle
      Parameters:
      formatterRectangle - the rectangle to be used to the formatter
    • getHolderFormStream

      public PDStream getHolderFormStream()
      Sets HolderFormStream
      Returns:
      the holder form stream
    • setHolderFormStream

      public void setHolderFormStream(PDStream holderFormStream)
      Sets stream of holder form Stream
      Parameters:
      holderFormStream - the stream for the holder form
    • getHolderForm

      public PDFormXObject getHolderForm()
      Gets Holder form. That form is here AcroForm/DR/XObject/{holder form name} By default, name stars with FRM. We also add number of form to the name.
      Returns:
      the holder form
    • setHolderForm

      public void setHolderForm(PDFormXObject holderForm)
      In the structure, form will be contained by XObject in the AcroForm/DR/
      Parameters:
      holderForm - the holder form
    • getHolderFormResources

      public PDResources getHolderFormResources()
      Gets Holder form resources
      Returns:
      the holder form's resources
    • setHolderFormResources

      public void setHolderFormResources(PDResources holderFormResources)
      Sets holder form resources
      Parameters:
      holderFormResources - the resources of the holder form
    • getAppearanceDictionary

      public PDAppearanceDictionary getAppearanceDictionary()
      Gets AppearanceDictionary That is /AP entry the appearance dictionary.
      Returns:
      the Appearance Dictionary
    • setAppearanceDictionary

      public void setAppearanceDictionary(PDAppearanceDictionary appearanceDictionary)
      Sets AppearanceDictionary That is /AP entry the appearance dictionary.
      Parameters:
      appearanceDictionary - the appearance dictionary
    • getInnerFormStream

      public PDStream getInnerFormStream()
      Gets Inner form Stream.
      Returns:
      the inner form stream
    • setInnterFormStream

      public void setInnterFormStream(PDStream innerFormStream)
      Sets inner form stream
      Parameters:
      innerFormStream - the stream of the inner form
    • getInnerFormResources

      public PDResources getInnerFormResources()
      Gets inner form Resource
      Returns:
      the inner form's resources
    • setInnerFormResources

      public void setInnerFormResources(PDResources innerFormResources)
      Sets inner form resource
      Parameters:
      innerFormResources - the rsesources of the inner form
    • getInnerForm

      public PDFormXObject getInnerForm()
      Gets inner form that is in this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{inner name} By default inner form name starts with "n". Then we add number of form to the name.
      Returns:
      the inner form
    • setInnerForm

      public void setInnerForm(PDFormXObject innerForm)
      sets inner form to this location: AcroForm/DR/XObject/{holder form name}/Resources/XObject/{destination}
      Parameters:
      innerForm - the inner form
    • getInnerFormName

      public COSName getInnerFormName()
      Gets name of inner form
      Returns:
      the inner forms's name
    • setInnerFormName

      public void setInnerFormName(COSName innerFormName)
      Sets inner form name
      Parameters:
      innerFormName - the name of the inner form
    • getImageFormStream

      public PDStream getImageFormStream()
      Gets Image form stream
      Returns:
      the image form's stream
    • setImageFormStream

      public void setImageFormStream(PDStream imageFormStream)
      Sets image form stream
      Parameters:
      imageFormStream - the stream of the image form
    • getImageFormResources

      public PDResources getImageFormResources()
      Gets image form resources
      Returns:
      the image form's resources
    • setImageFormResources

      public void setImageFormResources(PDResources imageFormResources)
      Sets image form resource
      Parameters:
      imageFormResources - the resources of the image form
    • getImageForm

      public PDFormXObject getImageForm()
      Gets Image form. Image form is in this structure: /AcroForm/DR/{holder form}/Resources/XObject /{inner form} /Resources/XObject/{image form name}.
      Returns:
      the image form
    • setImageForm

      public void setImageForm(PDFormXObject imageForm)
      Sets Image form. Image form will be in this structure: /AcroForm/DR/{holder form}/Resources/XObject /{inner form} /Resources/XObject/{image form name}. By default we start image form name with "img". Then we add number of image form to the form name. Sets image form
      Parameters:
      imageForm - the image form
    • getImageFormName

      public COSName getImageFormName()
      Gets image form name
      Returns:
      the image form's name
    • setImageFormName

      public void setImageFormName(COSName imageFormName)
      Sets image form name
      Parameters:
      imageFormName - the name of the image form
    • getImageName

      public COSName getImageName()
      Gets visible signature image name
      Returns:
      the visible signature's image name
    • setImageName

      public void setImageName(COSName imageName)
      Sets visible signature image name
      Parameters:
      imageName - the name of the image
    • getVisualSignature

      public COSDocument getVisualSignature()
      Gets COSDocument of visible Signature.
      Returns:
      the visual signature
      See Also:
    • setVisualSignature

      public void setVisualSignature(COSDocument visualSignature)
      Sets COSDocument of visible Signature.
      Parameters:
      visualSignature - the visual signature
      See Also:
    • getAcroFormFields

      public List<PDField> getAcroFormFields()
      Gets acroFormFields
      Returns:
      the AcroForm fields
    • setAcroFormFields

      public void setAcroFormFields(List<PDField> acroFormFields)
      Sets acroFormFields
      Parameters:
      acroFormFields - a list of acroform fields
    • getWidgetDictionary

      public COSDictionary getWidgetDictionary()
      Gets Widget Dictionary.
      Returns:
      the widget dictionary
    • setWidgetDictionary

      public void setWidgetDictionary(COSDictionary widgetDictionary)
      Sets Widget Dictionary.
      Parameters:
      widgetDictionary - the widget dictionary