SnapPDFSnapPDF
endpoint

Sign

POST /api/v1/sign

Apply a visual signature (typed or image). For cryptographic PAdES signing see /sign/digital.

credits: 1returns: application/pdf

Parameters

NameTypeRequiredDescription
filemultipart filerequiredSource PDF.
mode"type" | "image"requiredSignature style.
fieldJSON stringrequired{ page, x, y, width, height }
typedNamestringoptionalRequired when mode=type.
signatureImagemultipart fileoptionalRequired when mode=image.
timestampbooleanoptionalStamp "signed at <ts>" footer.
signerNamestringoptionalFooter text.
signerEmailstringoptionalFooter text.

Examples

curl
curl -X POST https://api.snappdf.au/api/v1/sign \
  -H "Authorization: Bearer $SNAPPDF_API_KEY" \
  -F "file=@contract.pdf" -F "mode=type" -F "typedName=Jane Smith" \
  -F 'field={"page":1,"x":100,"y":100,"width":200,"height":50}' \
  -o signed.pdf
JavaScript
await snap.pdf.sign({ file: bytes, mode: 'type', field: {page: 1, x: 100, y: 100, width: 200, height: 50}, typedName: 'Jane Smith' });
Python
snap.pdf.sign(file=bytes, mode="type", field={"page":1,"x":100,"y":100,"width":200,"height":50}, typed_name="Jane Smith")
PHP
$snap->pdf->sign(file: $bytes, mode: 'type', field: ['page'=>1,'x'=>100,'y'=>100,'width'=>200,'height'=>50], typedName: 'Jane Smith');
Ruby
snap.pdf.sign(file: bytes, mode: 'type', field: {page:1,x:100,y:100,width:200,height:50}, typed_name: 'Jane Smith')
Go
client.Sign(ctx, &snappdf.SignInput{File: bytes, Mode: "type", Field: snappdf.SignField{Page:1, X:100, Y:100, Width:200, Height:50}, TypedName: "Jane Smith"})