HiraokaHyperTools.iTextSharp-LGPL
0.2.5
|
Classes | |
class | FRangeStream |
interface | ISignatureEvent |
Public Types | |
enum class | SignatureRender { Description , NameAndDescription , GraphicAndDescription } |
Public Member Functions | |
bool | IsInvisible () |
void | SetCrypto (ICipherParameters privKey, X509Certificate[] certChain, object[] crlList, PdfName filter) |
void | SetVisibleSignature (Rectangle pageRect, int page, String fieldName) |
void | SetVisibleSignature (String fieldName) |
PdfTemplate | GetLayer (int layer) |
PdfTemplate | GetTopLayer () |
PdfTemplate | GetAppearance () |
void | SetExternalDigest (byte[] digest, byte[] RSAdata, String digestEncryptionAlgorithm) |
bool | IsNewField () |
String | GetNewSigName () |
void | PreClose () |
void | PreClose (Hashtable exclusionSizes) |
void | Close (PdfDictionary update) |
bool | IsPreClosed () |
Image | GetImage () |
Static Public Member Functions | |
static float | FitText (Font font, String text, Rectangle rect, float maxFontSize, int runDirection) |
Static Public Attributes | |
static PdfName | SELF_SIGNED = PdfName.ADOBE_PPKLITE |
static PdfName | VERISIGN_SIGNED = PdfName.VERISIGN_PPKVS |
static PdfName | WINCER_SIGNED = PdfName.ADOBE_PPKMS |
const int | NOT_CERTIFIED = 0 |
const int | CERTIFIED_NO_CHANGES_ALLOWED = 1 |
const int | CERTIFIED_FORM_FILLING = 2 |
const int | CERTIFIED_FORM_FILLING_AND_ANNOTATIONS = 3 |
const String | questionMark |
Properties | |
SignatureRender | Render [get, set] |
Image | SignatureGraphic [get, set] |
string | Layer2Text [get, set] |
string | Layer4Text [get, set] |
Rectangle | Rect [get] |
string | Reason [get, set] |
string | Location [get, set] |
ICipherParameters | PrivKey [get] |
X509Certificate[] | CertChain [get] |
object[] | CrlList [get] |
PdfName | Filter [get] |
int | Page [get] |
String | FieldName [get] |
Rectangle | PageRect [get] |
DateTime | SignDate [get, set] |
string | TempFile [get] |
Stream | RangeStream [get] |
PdfDictionary | CryptoDictionary [get, set] |
PdfStamper | Stamper [get] |
PdfSigGenericPKCS | SigStandard [get] |
string | Contact [get, set] |
Font | Layer2Font [get, set] |
bool | Acro6Layers [get, set] |
int | RunDirection [get, set] |
ISignatureEvent | SignatureEvent [get, set] |
Image | Image [get, set] |
float | ImageScale [get, set] |
int | CertificationLevel [get, set] |
This class takes care of the cryptographic options and appearances that form a signature.
void iTextSharp.text.pdf.PdfSignatureAppearance.Close | ( | PdfDictionary | update | ) |
This is the last method to be called when using external signatures. The general sequence is: PreClose(), GetDocumentBytes() and Close().
update
is a PdfDictionary
that must have exactly the same keys as the ones provided in preClose(Hashtable).
update | a PdfDictionary with the key/value that will fill the holes defined in preClose(Hashtable) |
DocumentException | on error |
IOException | on error |
|
static |
Fits the text to some rectangle adjusting the font size as needed.
font | the font to use |
text | the text |
rect | the rectangle where the text must fit |
maxFontSize | the maximum font size |
runDirection | the run direction |
PdfTemplate iTextSharp.text.pdf.PdfSignatureAppearance.GetAppearance | ( | ) |
Gets the main appearance layer.
Consult PPKAppearances.pdf for further details.
DocumentException | on error |
IOException | on error |
Image iTextSharp.text.pdf.PdfSignatureAppearance.GetImage | ( | ) |
Gets the background image for the layer 2.
PdfTemplate iTextSharp.text.pdf.PdfSignatureAppearance.GetLayer | ( | int | layer | ) |
Gets a template layer to create a signature appearance. The layers can go from 0 to 4.
Consult PPKAppearances.pdf for further details.
layer | the layer |
String iTextSharp.text.pdf.PdfSignatureAppearance.GetNewSigName | ( | ) |
Gets a new signature fied name that doesn't clash with any existing name.
PdfTemplate iTextSharp.text.pdf.PdfSignatureAppearance.GetTopLayer | ( | ) |
Gets the template that aggregates all appearance layers. This corresponds to the /FRM resource.
Consult PPKAppearances.pdf for further details.
bool iTextSharp.text.pdf.PdfSignatureAppearance.IsInvisible | ( | ) |
Gets the visibility status of the signature.
bool iTextSharp.text.pdf.PdfSignatureAppearance.IsNewField | ( | ) |
Checks if a new field was created.
true
if a new field was created, false
if signing an existing field or if the signature is invisible bool iTextSharp.text.pdf.PdfSignatureAppearance.IsPreClosed | ( | ) |
Checks if the document is in the process of closing.
true
if the document is in the process of closing, false
otherwise void iTextSharp.text.pdf.PdfSignatureAppearance.PreClose | ( | ) |
This is the first method to be called when using external signatures. The general sequence is: PreClose(), GetDocumentBytes() and Close().
If calling PreClose() dont't call PdfStamper.Close().
No external signatures are allowed if this methos is called.
IOException | on error |
DocumentException | on error |
void iTextSharp.text.pdf.PdfSignatureAppearance.PreClose | ( | Hashtable | exclusionSizes | ) |
This is the first method to be called when using external signatures. The general sequence is: PreClose(), GetDocumentBytes() and Close().
If calling PreClose() dont't call PdfStamper.Close().
If using an external signature exclusionSizes
must contain at least the PdfName.CONTENTS
key with the size that it will take in the document. Note that due to the hex string coding this size should be byte_size*2+2.
exclusionSizes | a Hashtable with names and sizes to be excluded in the signature calculation. The key is a PdfName and the value an Integer . At least the PdfName.CONTENTS must be present |
IOException | on error |
DocumentException | on error |
void iTextSharp.text.pdf.PdfSignatureAppearance.SetCrypto | ( | ICipherParameters | privKey, |
X509Certificate[] | certChain, | ||
object[] | crlList, | ||
PdfName | filter | ||
) |
Sets the cryptographic parameters.
privKey | the private key |
certChain | the certificate chain |
crlList | the certificate revocation list. It may be null |
filter | the crytographic filter type. It can be SELF_SIGNED, VERISIGN_SIGNED or WINCER_SIGNED |
void iTextSharp.text.pdf.PdfSignatureAppearance.SetExternalDigest | ( | byte[] | digest, |
byte[] | RSAdata, | ||
String | digestEncryptionAlgorithm | ||
) |
Sets the digest/signature to an external calculated value.
digest | the digest. This is the actual signature |
RSAdata | the extra data that goes into the data tag in PKCS#7 |
digestEncryptionAlgorithm | the encryption algorithm. It may must be null if the digest is also null . If the digest is not null then it may be "RSA" or "DSA" |
void iTextSharp.text.pdf.PdfSignatureAppearance.SetVisibleSignature | ( | Rectangle | pageRect, |
int | page, | ||
String | fieldName | ||
) |
Sets the signature to be visible. It creates a new visible signature field.
pageRect | the position and dimension of the field in the page |
page | the page to place the field. The fist page is 1 |
fieldName | the field name or null to generate automatically a new field name |
void iTextSharp.text.pdf.PdfSignatureAppearance.SetVisibleSignature | ( | String | fieldName | ) |
Sets the signature to be visible. An empty signature field with the same name must already exist.
fieldName | the existing empty signature field name |
|
static |
|
static |
|
static |
|
static |
|
static |
Commands to draw a yellow question mark in a stream content
|
static |
The self signed filter.
|
static |
The VeriSign filter.
|
static |
The Windows Certificate Security.
|
getset |
Acrobat 6.0 and higher recomends that only layer n2 and n4 be present. This method sets that mode.
acro6Layers | if true only the layers n2 and n4 will be present |
|
get |
Gets the certificate chain.
|
getset |
Sets the document type to certified instead of simply signed.
certificationLevel | the values can be: NOT_CERTIFIED , CERTIFIED_NO_CHANGES_ALLOWED , CERTIFIED_FORM_FILLING and CERTIFIED_FORM_FILLING_AND_ANNOTATIONS |
|
getset |
Sets the signing contact.
contact | the signing contact |
|
get |
Gets the certificate revocation list.
|
getset |
Gets the user made signature dictionary. This is the dictionary at the /V key.
|
get |
Gets the field name.
|
get |
Gets the filter used to sign the document.
|
getset |
Sets the background image for the layer 2.
image | the background image for the layer 2 |
|
getset |
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.
imageScale | the scaling to be applied to the background image |
|
getset |
Sets the n2 and n4 layer font. If the font size is zero, auto-fit will be used.
layer2Font | the n2 and n4 font |
|
getset |
Sets the signature text identifying the signer.
text | the signature text identifying the signer. If null or not set a standard description will be used |
|
getset |
Sets the text identifying the signature status.
text | the text identifying the signature status. If null or not set the description "Signature Not Verified" will be used |
|
getset |
Sets the signing location.
location | the signing location |
|
get |
Gets the page number of the field.
|
get |
Gets the rectangle that represent the position and dimension of the signature in the page.
|
get |
Gets the private key.
|
get |
Gets the document bytes that are hashable when using external signatures. The general sequence is: PreClose(), GetRangeStream() and Close().
|
getset |
Sets the signing reason.
reason | the signing reason |
|
get |
Gets the rectangle representing the signature dimensions.
null
or have zero width or height for invisible signatures
|
getset |
|
getset |
Sets the run direction in the n2 and n4 layer.
runDirection | the run direction |
|
getset |
Sets the signature event to allow modification of the signature dictionary.
signatureEvent | the signature event |
|
getset |
|
getset |
Gets the signature date.
|
get |
Gets the instance of the standard signature dictionary. This instance is only available after pre close.
The main use is to insert external signatures.
|
get |
Gets the PdfStamper
associated with this instance.
PdfStamper
associated with this instance
|
get |
Gets the temporary file.
null
is the document is created in memory