public class PDFTemplateStructure
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private PDAcroForm |
acroForm |
private COSDictionary |
acroFormDictionary |
private java.util.List<PDField> |
acroFormFields |
private java.awt.geom.AffineTransform |
affineTransform |
private PDAppearanceDictionary |
appearanceDictionary |
private PDRectangle |
formatterRectangle |
private PDFormXObject |
holderForm |
private PDResources |
holderFormResources |
private PDStream |
holderFormStream |
private PDImageXObject |
image |
private PDFormXObject |
imageForm |
private COSName |
imageFormName |
private PDResources |
imageFormResources |
private PDStream |
imageFormStream |
private COSName |
imageName |
private PDFormXObject |
innerForm |
private COSName |
innerFormName |
private PDResources |
innerFormResources |
private PDStream |
innerFormStream |
private PDPage |
page |
private PDSignature |
pdSignature |
private COSArray |
procSet |
private PDSignatureField |
signatureField |
private PDRectangle |
signatureRectangle |
private PDDocument |
template |
private COSDocument |
visualSignature |
private COSDictionary |
widgetDictionary |
Constructor and Description |
---|
PDFTemplateStructure() |
Modifier and Type | Method and Description |
---|---|
PDAcroForm |
getAcroForm()
Gets AcroForm
|
COSDictionary |
getAcroFormDictionary()
Gets Dictionary of AcroForm.
|
java.util.List<PDField> |
getAcroFormFields()
Gets acroFormFields
|
java.awt.geom.AffineTransform |
getAffineTransform()
Gets AffineTransform
|
PDAppearanceDictionary |
getAppearanceDictionary()
Gets AppearanceDictionary
That is /AP entry the appearance dictionary.
|
PDRectangle |
getFormatterRectangle()
Gets formatter rectangle
|
PDFormXObject |
getHolderForm()
Gets Holder form.
|
PDResources |
getHolderFormResources()
Gets Holder form resources
|
PDStream |
getHolderFormStream()
Sets HolderFormStream
|
PDImageXObject |
getImage()
Gets the image of visible signature
|
PDFormXObject |
getImageForm()
Gets Image form.
|
COSName |
getImageFormName()
Gets image form name
|
PDResources |
getImageFormResources()
Gets image form resources
|
PDStream |
getImageFormStream()
Gets Image form stream
|
COSName |
getImageName()
Gets visible signature image name
|
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".
|
COSName |
getInnerFormName()
Gets name of inner form
|
PDResources |
getInnerFormResources()
Gets inner form Resource
|
PDStream |
getInnerFormStream()
Gets Inner form Stream.
|
PDPage |
getPage()
Returns document page.
|
PDSignature |
getPdSignature()
Gets PDSignature
|
COSArray |
getProcSet()
Gets ProcSet Array
|
PDSignatureField |
getSignatureField()
Gets Signature field
|
PDRectangle |
getSignatureRectangle()
Gets SignatureRectangle
|
PDDocument |
getTemplate()
Gets PDDocument template.
|
java.io.ByteArrayInputStream |
getTemplateAppearanceStream()
Deprecated.
This will be removed in 2.1 because the method name is misleading and confusing,
and the work done rather belongs into the calling class:
|
COSDocument |
getVisualSignature()
Gets COSDocument of visible Signature.
|
COSDictionary |
getWidgetDictionary()
Gets Widget Dictionary.
|
void |
setAcroForm(PDAcroForm acroForm)
Sets AcroForm
|
void |
setAcroFormDictionary(COSDictionary acroFormDictionary)
Acroform have its Dictionary, so we here set
the Dictionary which is in this location:
AcroForm/DR
|
void |
setAcroFormFields(java.util.List<PDField> acroFormFields)
Sets acroFormFields
|
void |
setAffineTransform(java.awt.geom.AffineTransform affineTransform)
Sets AffineTransform
|
void |
setAppearanceDictionary(PDAppearanceDictionary appearanceDictionary)
Sets AppearanceDictionary
That is /AP entry the appearance dictionary.
|
void |
setFormatterRectangle(PDRectangle formatterRectangle)
Sets formatter rectangle
|
void |
setHolderForm(PDFormXObject holderForm)
In the structure, form will be contained by XObject in the AcroForm/DR/
|
void |
setHolderFormResources(PDResources holderFormResources)
Sets holder form resources
|
void |
setHolderFormStream(PDStream holderFormStream)
Sets stream of holder form Stream
|
void |
setImage(PDImageXObject image)
Sets the image of visible signature
|
void |
setImageForm(PDFormXObject imageForm)
Sets Image form.
|
void |
setImageFormName(COSName imageFormName)
Sets image form name
|
void |
setImageFormResources(PDResources imageFormResources)
Sets image form resource
|
void |
setImageFormStream(PDStream imageFormStream)
Sets image form stream
|
void |
setImageName(COSName imageName)
Sets visible signature image name
|
void |
setInnerForm(PDFormXObject innerForm)
sets inner form to this location:
AcroForm/DR/XObject/{holder form name}/Resources/XObject/{destination}
|
void |
setInnerFormName(COSName innerFormName)
Sets inner form name
|
void |
setInnerFormResources(PDResources innerFormResources)
Sets inner form resource
|
void |
setInnterFormStream(PDStream innerFormStream)
Sets inner form stream
|
void |
setPage(PDPage page)
Sets document page
|
void |
setPdSignature(PDSignature pdSignature)
Sets PDSignatureField
|
void |
setProcSet(COSArray procSet)
Sets ProcSet Array
|
void |
setSignatureField(PDSignatureField signatureField)
Sets signature field
|
void |
setSignatureRectangle(PDRectangle signatureRectangle)
Sets SignatureRectangle
|
void |
setTemplate(PDDocument template)
Wets PDDocument template.
|
void |
setVisualSignature(COSDocument visualSignature)
Sets COSDocument of visible Signature.
|
void |
setWidgetDictionary(COSDictionary widgetDictionary)
Sets Widget Dictionary.
|
private PDPage page
private PDDocument template
private PDAcroForm acroForm
private PDSignatureField signatureField
private PDSignature pdSignature
private COSDictionary acroFormDictionary
private PDRectangle signatureRectangle
private java.awt.geom.AffineTransform affineTransform
private COSArray procSet
private PDImageXObject image
private PDRectangle formatterRectangle
private PDStream holderFormStream
private PDResources holderFormResources
private PDFormXObject holderForm
private PDAppearanceDictionary appearanceDictionary
private PDStream innerFormStream
private PDResources innerFormResources
private PDFormXObject innerForm
private PDStream imageFormStream
private PDResources imageFormResources
private java.util.List<PDField> acroFormFields
private COSName innerFormName
private COSName imageFormName
private COSName imageName
private COSDocument visualSignature
private PDFormXObject imageForm
private COSDictionary widgetDictionary
public PDPage getPage()
public void setPage(PDPage page)
page
- public PDDocument getTemplate()
public void setTemplate(PDDocument template)
template
- public PDAcroForm getAcroForm()
public void setAcroForm(PDAcroForm acroForm)
acroForm
- public PDSignatureField getSignatureField()
public void setSignatureField(PDSignatureField signatureField)
signatureField
- public PDSignature getPdSignature()
public void setPdSignature(PDSignature pdSignature)
pdSignature
- public COSDictionary getAcroFormDictionary()
public void setAcroFormDictionary(COSDictionary acroFormDictionary)
acroFormDictionary
- public PDRectangle getSignatureRectangle()
public void setSignatureRectangle(PDRectangle signatureRectangle)
signatureRectangle
- public java.awt.geom.AffineTransform getAffineTransform()
public void setAffineTransform(java.awt.geom.AffineTransform affineTransform)
affineTransform
- public COSArray getProcSet()
public void setProcSet(COSArray procSet)
procSet
- public PDImageXObject getImage()
public void setImage(PDImageXObject image)
image
- Image XObjectpublic PDRectangle getFormatterRectangle()
public void setFormatterRectangle(PDRectangle formatterRectangle)
formatterRectangle
- public PDStream getHolderFormStream()
public void setHolderFormStream(PDStream holderFormStream)
holderFormStream
- public PDFormXObject getHolderForm()
public void setHolderForm(PDFormXObject holderForm)
holderForm
- public PDResources getHolderFormResources()
public void setHolderFormResources(PDResources holderFormResources)
holderFormResources
- public PDAppearanceDictionary getAppearanceDictionary()
public void setAppearanceDictionary(PDAppearanceDictionary appearanceDictionary)
appearanceDictionary
- public PDStream getInnerFormStream()
public void setInnterFormStream(PDStream innerFormStream)
innerFormStream
- public PDResources getInnerFormResources()
public void setInnerFormResources(PDResources innerFormResources)
innerFormResources
- public PDFormXObject getInnerForm()
public void setInnerForm(PDFormXObject innerForm)
innerForm
- public COSName getInnerFormName()
public void setInnerFormName(COSName innerFormName)
innerFormName
- public PDStream getImageFormStream()
public void setImageFormStream(PDStream imageFormStream)
imageFormStream
- public PDResources getImageFormResources()
public void setImageFormResources(PDResources imageFormResources)
imageFormResources
- public PDFormXObject getImageForm()
public void setImageForm(PDFormXObject imageForm)
imageForm
- public COSName getImageFormName()
public void setImageFormName(COSName imageFormName)
imageFormName
- public COSName getImageName()
public void setImageName(COSName imageName)
imageName
- public COSDocument getVisualSignature()
COSDocument
public void setVisualSignature(COSDocument visualSignature)
visualSignature
- COSDocument
public java.util.List<PDField> getAcroFormFields()
public void setAcroFormFields(java.util.List<PDField> acroFormFields)
acroFormFields
- @Deprecated public java.io.ByteArrayInputStream getTemplateAppearanceStream() throws java.io.IOException
COSDocument visualSignature = structure.getVisualSignature();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
COSWriter writer = new COSWriter(baos);
writer.write(visualSignature);
writer.close();
structure.getTemplate().close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
java.io.IOException
public COSDictionary getWidgetDictionary()
public void setWidgetDictionary(COSDictionary widgetDictionary)
widgetDictionary
-