PdfSecurityManagerAddSignatureField(Byte, String, Int32, RectangleF) Method |
Adds an empty signature field to a PDF document given as an array of bytes, to be signed later with the Sign
methods: a Sign call with the same signature name signs this field, at its position.
Namespace: ExpertPdf.Anywhere.PDFSecurityAssembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntaxpublic byte[] AddSignatureField(
byte[] sourcePdf,
string fieldName,
int pageIndex,
RectangleF bounds
)
Public Function AddSignatureField (
sourcePdf As Byte(),
fieldName As String,
pageIndex As Integer,
bounds As RectangleF
) As Byte()
Parameters
- sourcePdf Byte
- The PDF document. A password-protected source is opened with SourcePdfPassword.
- fieldName String
- The name of the signature field. It must not exist in the document.
- pageIndex Int32
- The index of the page of the field (0 for the first page).
- bounds RectangleF
- The position and size of the field on the page, in points from the top left corner.
Return Value
ByteThe document with the new field.
Exceptions| Exception | Condition |
|---|
| SecurePdfException | The document cannot be opened, the page index is not valid, a field with
this name exists, or the document is signed (a new field would invalidate its signatures). |
See Also