iText 8.0.5 API
iText.Signatures.PdfSignatureAppearance Class Reference

Provides convenient methods to make a signature appearance. More...

Public Types

enum   RenderingMode { RenderingMode.DESCRIPTION, RenderingMode.NAME_AND_DESCRIPTION, RenderingMode.GRAPHIC_AND_DESCRIPTION, RenderingMode.GRAPHIC }
  Signature rendering modes. More...
 

Public Member Functions

virtual int  GetPageNumber ()
  Provides the page number of the signature field which this signature appearance is associated with. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetPageNumber (int pageNumber)
  Sets the page number of the signature field which this signature appearance is associated with. More...
 
virtual Rectangle  GetPageRect ()
  Provides the rectangle that represent the position and dimension of the signature field in the page. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetPageRect (Rectangle pageRect)
  Sets the rectangle that represent the position and dimension of the signature field in the page. More...
 
virtual PdfFormXObject  GetLayer0 ()
  Get Layer 0 of the appearance. More...
 
virtual PdfFormXObject  GetLayer2 ()
  Get Layer 2 of the appearance. More...
 
virtual PdfSignatureAppearance.RenderingMode  GetRenderingMode ()
  Gets the rendering mode for this signature. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetRenderingMode (PdfSignatureAppearance.RenderingMode renderingMode)
  Sets the rendering mode for this signature. More...
 
virtual String  GetReason ()
  Returns the signing reason. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetReason (String reason)
  Sets the signing reason. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetReasonCaption (String reasonCaption)
  Sets the caption for the signing reason. More...
 
virtual String  GetLocation ()
  Returns the signing location. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetLocation (String location)
  Sets the signing location. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetLocationCaption (String locationCaption)
  Sets the caption for the signing location. More...
 
virtual String  GetSignatureCreator ()
  Returns the signature creator. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetSignatureCreator (String signatureCreator)
  Sets the name of the application used to create the signature. More...
 
virtual String  GetContact ()
  Returns the signing contact. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetContact (String contact)
  Sets the signing contact. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetCertificate (IX509Certificate signCertificate)
  Sets the certificate used to provide the text in the appearance. More...
 
virtual IX509Certificate  GetCertificate ()
  Get the signing certificate. More...
 
virtual ImageData  GetSignatureGraphic ()
  Gets the Image object to render. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetSignatureGraphic (ImageData signatureGraphic)
  Sets the Image object to render when Render is set to RenderingMode.GRAPHIC or RenderingMode.GRAPHIC_AND_DESCRIPTION. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetReuseAppearance (bool reuseAppearance)
  Indicates that the existing appearances needs to be reused as a background layer. More...
 
virtual ImageData  GetImage ()
  Gets the background image for the layer 2. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetImage (ImageData image)
  Sets the background image for the text in the layer 2. More...
 
virtual float  GetImageScale ()
  Gets the scaling to be applied to the background image. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetImageScale (float imageScale)
  Sets the scaling to be applied to the background image. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetLayer2Text (String text)
  Sets the signature text identifying the signer. More...
 
virtual String  GetLayer2Text ()
  Gets the signature text identifying the signer if set by setLayer2Text(). More...
 
virtual PdfFont  GetLayer2Font ()
  Gets the n2 and n4 layer font. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetLayer2Font (PdfFont font)
  Sets the n2 layer font. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetLayer2FontSize (float fontSize)
  Sets the n2 and n4 layer font size. More...
 
virtual float  GetLayer2FontSize ()
  Gets the n2 and n4 layer font size. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetLayer2FontColor (Color color)
  Sets the n2 and n4 layer font color. More...
 
virtual Color  GetLayer2FontColor ()
  Gets the n2 layer font color. More...
 
virtual SignatureFieldAppearance  GetSignatureAppearance ()
  Gets the signature layout element. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetSignatureAppearance (SignatureFieldAppearance modelElement)
  Sets the signature layout element. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetFontProvider (FontProvider fontProvider)
  Sets iText.Layout.Font.FontProvider. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetFontFamily (params String[] fontFamilyNames)
  Sets the preferable font families for the signature content. More...
 
virtual bool  IsInvisible ()
  Gets the visibility status of the signature. More...
 

Package Functions

  PdfSignatureAppearance (PdfDocument document, Rectangle pageRect, int pageNumber)
  Creates a PdfSignatureAppearance. More...
 
virtual PdfFormXObject  GetAppearance ()
  Constructs appearance (top-level) for a signature. More...
 
virtual DateTime  GetSignDate ()
  Returns the signature date. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetSignDate (DateTime signDate)
  Sets the signature date. More...
 
virtual iText.Signatures.PdfSignatureAppearance  SetFieldName (String fieldName)
  Set the field name of the appearance. More...
 

Detailed Description

Provides convenient methods to make a signature appearance.

Provides convenient methods to make a signature appearance. Use it in conjunction with PdfSigner.

Member Enumeration Documentation

◆ RenderingMode

Signature rendering modes.

Enumerator
DESCRIPTION 

The rendering mode is just the description.

NAME_AND_DESCRIPTION 

The rendering mode is the name of the signer and the description.

GRAPHIC_AND_DESCRIPTION 

The rendering mode is an image and the description.

GRAPHIC 

The rendering mode is just an image.

Constructor & Destructor Documentation

◆ PdfSignatureAppearance()

iText.Signatures.PdfSignatureAppearance.PdfSignatureAppearance ( PdfDocument  document,
Rectangle  pageRect,
int  pageNumber 
)
inlinepackage

Creates a PdfSignatureAppearance.

Parameters
document PdfDocument
pageRect Rectangle of the appearance
pageNumber Number of the page the appearance should be on

Member Function Documentation

◆ GetAppearance()

virtual PdfFormXObject iText.Signatures.PdfSignatureAppearance.GetAppearance ( )
inlinepackagevirtual

Constructs appearance (top-level) for a signature.

Returns
a top-level signature appearance.

Adobe Pdf DigitalDigitalSignature Appearances

◆ GetCertificate()

virtual IX509Certificate iText.Signatures.PdfSignatureAppearance.GetCertificate ( )
inlinevirtual

Get the signing certificate.

Returns
the signing certificate.

◆ GetContact()

virtual String iText.Signatures.PdfSignatureAppearance.GetContact ( )
inlinevirtual

Returns the signing contact.

Returns
The signing contact.

◆ GetImage()

virtual ImageData iText.Signatures.PdfSignatureAppearance.GetImage ( )
inlinevirtual

Gets the background image for the layer 2.

Returns
the background image for the layer 2.

◆ GetImageScale()

virtual float iText.Signatures.PdfSignatureAppearance.GetImageScale ( )
inlinevirtual

Gets the scaling to be applied to the background image.

Returns
the scaling to be applied to the background image.

◆ GetLayer0()

virtual PdfFormXObject iText.Signatures.PdfSignatureAppearance.GetLayer0 ( )
inlinevirtual

Get Layer 0 of the appearance.

Get Layer 0 of the appearance.

The size of the layer is determined by the rectangle set via SetPageRect(iText.Kernel.Geom.Rectangle)

Returns
layer 0.

◆ GetLayer2()

virtual PdfFormXObject iText.Signatures.PdfSignatureAppearance.GetLayer2 ( )
inlinevirtual

Get Layer 2 of the appearance.

Get Layer 2 of the appearance.

The size of the layer is determined by the rectangle set via SetPageRect(iText.Kernel.Geom.Rectangle)

Returns
layer 2.

◆ GetLayer2Font()

virtual PdfFont iText.Signatures.PdfSignatureAppearance.GetLayer2Font ( )
inlinevirtual

Gets the n2 and n4 layer font.

Returns
the n2 and n4 layer font.

◆ GetLayer2FontColor()

virtual Color iText.Signatures.PdfSignatureAppearance.GetLayer2FontColor ( )
inlinevirtual

Gets the n2 layer font color.

Returns
the n2 layer font color.

◆ GetLayer2FontSize()

virtual float iText.Signatures.PdfSignatureAppearance.GetLayer2FontSize ( )
inlinevirtual

Gets the n2 and n4 layer font size.

Returns
the n2 and n4 layer font size.

◆ GetLayer2Text()

virtual String iText.Signatures.PdfSignatureAppearance.GetLayer2Text ( )
inlinevirtual

Gets the signature text identifying the signer if set by setLayer2Text().

Returns
the signature text identifying the signer.

◆ GetLocation()

virtual String iText.Signatures.PdfSignatureAppearance.GetLocation ( )
inlinevirtual

Returns the signing location.

Returns
signing location.

◆ GetPageNumber()

virtual int iText.Signatures.PdfSignatureAppearance.GetPageNumber ( )
inlinevirtual

Provides the page number of the signature field which this signature appearance is associated with.

Returns
The page number of the signature field which this signature appearance is associated with.

◆ GetPageRect()

virtual Rectangle iText.Signatures.PdfSignatureAppearance.GetPageRect ( )
inlinevirtual

Provides the rectangle that represent the position and dimension of the signature field in the page.

Returns
the rectangle that represent the position and dimension of the signature field in the page.

◆ GetReason()

virtual String iText.Signatures.PdfSignatureAppearance.GetReason ( )
inlinevirtual

Returns the signing reason.

Returns
reason for signing.

◆ GetRenderingMode()

virtual PdfSignatureAppearance.RenderingMode iText.Signatures.PdfSignatureAppearance.GetRenderingMode ( )
inlinevirtual

Gets the rendering mode for this signature.

Returns
the rendering mode for this signature.

◆ GetSignatureAppearance()

virtual SignatureFieldAppearance iText.Signatures.PdfSignatureAppearance.GetSignatureAppearance ( )
inlinevirtual

Gets the signature layout element.

Returns
the signature layout element.

◆ GetSignatureCreator()

virtual String iText.Signatures.PdfSignatureAppearance.GetSignatureCreator ( )
inlinevirtual

Returns the signature creator.

Returns
The signature creator.

◆ GetSignatureGraphic()

virtual ImageData iText.Signatures.PdfSignatureAppearance.GetSignatureGraphic ( )
inlinevirtual

Gets the Image object to render.

Returns
the image.

◆ GetSignDate()

virtual DateTime iText.Signatures.PdfSignatureAppearance.GetSignDate ( )
inlinepackagevirtual

Returns the signature date.

Returns
the signature date.

◆ IsInvisible()

virtual bool iText.Signatures.PdfSignatureAppearance.IsInvisible ( )
inlinevirtual

Gets the visibility status of the signature.

Returns
the visibility status of the signature.

◆ SetCertificate()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetCertificate ( IX509Certificate  signCertificate )
inlinevirtual

Sets the certificate used to provide the text in the appearance.

Sets the certificate used to provide the text in the appearance. This certificate doesn't take part in the actual signing process.

Parameters
signCertificate the certificate.
Returns
this instance to support fluent interface.

◆ SetContact()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetContact ( String  contact )
inlinevirtual

Sets the signing contact.

Parameters
contact A new signing contact.
Returns
this instance to support fluent interface.

◆ SetFieldName()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetFieldName ( String  fieldName )
inlinepackagevirtual

Set the field name of the appearance.

Set the field name of the appearance. Field name indicates the field to be signed if it is already presented in the document (signing existing field). Required for reuseAppearance option.

Parameters
fieldName name of the field
Returns
this instance to support fluent interface

◆ SetFontFamily()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetFontFamily ( params String[]  fontFamilyNames )
inlinevirtual

Sets the preferable font families for the signature content.

Sets the preferable font families for the signature content. Note that iText.Layout.Font.FontProvider shall be set as well.

Parameters
fontFamilyNames defines an ordered list of preferable font families for the signature element.
Returns
this instance to support fluent interface.

◆ SetFontProvider()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetFontProvider ( FontProvider  fontProvider )
inlinevirtual

Sets iText.Layout.Font.FontProvider.

Sets iText.Layout.Font.FontProvider . Note, font provider is inherited property.

Parameters
fontProvider the instance of iText.Layout.Font.FontProvider.
Returns
this instance to support fluent interface.

◆ SetImage()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetImage ( ImageData  image )
inlinevirtual

Sets the background image for the text in the layer 2.

Parameters
image the background image for the layer 2.
Returns
this instance to support fluent interface.

◆ SetImageScale()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetImageScale ( float  imageScale )
inlinevirtual

Sets the scaling to be applied to the background image.

Sets the scaling to be applied to the background image. If it's zero the image will fully fill the rectangle. If it's less than zero the image will fill the rectangle but will keep the proportions. If it's greater than zero that scaling will be applied. In any of the cases the image will always be centered. It's zero by default.

Parameters
imageScale the scaling to be applied to the background image.
Returns
this instance to support fluent interface.

◆ SetLayer2Font()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetLayer2Font ( PdfFont  font )
inlinevirtual

Sets the n2 layer font.

Sets the n2 layer font. If the font size is zero, auto-fit will be used.

Parameters
font the n2 font.
Returns
this instance to support fluent interface.

◆ SetLayer2FontColor()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetLayer2FontColor ( Color  color )
inlinevirtual

Sets the n2 and n4 layer font color.

Parameters
color font color.
Returns
this instance to support fluent interface.

◆ SetLayer2FontSize()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetLayer2FontSize ( float  fontSize )
inlinevirtual

Sets the n2 and n4 layer font size.

Parameters
fontSize font size.
Returns
this instance to support fluent interface.

◆ SetLayer2Text()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetLayer2Text ( String  text )
inlinevirtual

Sets the signature text identifying the signer.

Parameters
text the signature text identifying the signer. If null or not set a standard description will be used.
Returns
this instance to support fluent interface.

◆ SetLocation()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetLocation ( String  location )
inlinevirtual

Sets the signing location.

Parameters
location A new signing location.
Returns
this instance to support fluent interface.

◆ SetLocationCaption()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetLocationCaption ( String  locationCaption )
inlinevirtual

Sets the caption for the signing location.

Parameters
locationCaption A new signing location caption.
Returns
this instance to support fluent interface.

◆ SetPageNumber()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetPageNumber ( int  pageNumber )
inlinevirtual

Sets the page number of the signature field which this signature appearance is associated with.

Sets the page number of the signature field which this signature appearance is associated with. Implicitly calls SetPageRect(iText.Kernel.Geom.Rectangle) which considers page number to process the rectangle correctly.

Parameters
pageNumber The page number of the signature field which this signature appearance is associated with.
Returns
this instance to support fluent interface.

◆ SetPageRect()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetPageRect ( Rectangle  pageRect )
inlinevirtual

Sets the rectangle that represent the position and dimension of the signature field in the page.

Parameters
pageRect The rectangle that represents the position and dimension of the signature field in the page.
Returns
this instance to support fluent interface.

◆ SetReason()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetReason ( String  reason )
inlinevirtual

Sets the signing reason.

Parameters
reason signing reason.
Returns
this instance to support fluent interface.

◆ SetReasonCaption()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetReasonCaption ( String  reasonCaption )
inlinevirtual

Sets the caption for the signing reason.

Parameters
reasonCaption A new signing reason caption.
Returns
this instance to support fluent interface.

◆ SetRenderingMode()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetRenderingMode ( PdfSignatureAppearance.RenderingMode  renderingMode )
inlinevirtual

Sets the rendering mode for this signature.

Parameters
renderingMode the rendering mode.
Returns
this instance to support fluent interface.

◆ SetReuseAppearance()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetReuseAppearance ( bool  reuseAppearance )
inlinevirtual

Indicates that the existing appearances needs to be reused as a background layer.

Parameters
reuseAppearance is an appearances reusing flag value to set.
Returns
this instance to support fluent interface.

◆ SetSignatureAppearance()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetSignatureAppearance ( SignatureFieldAppearance  modelElement )
inlinevirtual

Sets the signature layout element.

Parameters
modelElement the signature layout element.
Returns
this instance to support fluent interface.

◆ SetSignatureCreator()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetSignatureCreator ( String  signatureCreator )
inlinevirtual

Sets the name of the application used to create the signature.

Parameters
signatureCreator A new name of the application signing a document.
Returns
this instance to support fluent interface.

◆ SetSignatureGraphic()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetSignatureGraphic ( ImageData  signatureGraphic )
inlinevirtual

Sets the Image object to render when Render is set to RenderingMode.GRAPHIC or RenderingMode.GRAPHIC_AND_DESCRIPTION.

Parameters
signatureGraphic image rendered. If null the mode is defaulted to RenderingMode.DESCRIPTION
Returns
this instance to support fluent interface.

◆ SetSignDate()

virtual iText.Signatures.PdfSignatureAppearance iText.Signatures.PdfSignatureAppearance.SetSignDate ( DateTime  signDate )
inlinepackagevirtual

Sets the signature date.

Parameters
signDate A new signature date.
Returns
this instance to support fluent interface.