Working with Text Signature
Leave feedback
On this page
NoteNote: The features listed on this page are supported only in GroupDocs.Signature Cloud V1
GroupDocs.Signature Cloud REST API supports to sign a document with Text. It provides methods to create Text Signature in Document Pages with different options of Text, location, alignment, font, margins and appearances by using Signature Options Object data in request body.
You can create Text Signature on Document provided by fileName and document folder (if required) using following API. It expects Signature Options Object data in request body.
It returns an object which contains document name, folder location and command status.
The following GroupDocs.Signature Cloud REST API resource has been used in the example to add Text signature to a document.
curl -v "https://api.groupdocs.cloud/v1/signature/one-page.docx/text" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "authorization: Bearer $JWT_TOKEN" \
-d '{
"Margin": {"All":0,"Left":0,"Top":0,"Right":0,"Bottom":0},
"SheetNumber":1,
"RowNumber":11,
"ColumnNumber":22,
"BorderVisiblity":true,
"BorderDashStyle":5,
"BorderTransparency":0.0,
"BorderWeight":1.0,
"BackgroundTransparency":0.1,
"SignatureImplementation":"TextStamp",
"Text":"John Smith",
"Width":100,
"Height":100,
"LocationMeasureType":"Pixels",
"SizeMeasureType":"Pixels",
"RotationAngle":0,
"HorizontalAlignment":"Right",
"VerticalAlignment":"Center",
"MarginMeasureType":"Pixels",
"SignAllPages":false,
"Font":{"FontFamily":"Times New Roman","FontSize":14.0,"Bold":false,"Italic":false,"Underline":false},
"ForeColor":{"Web":"Black"},
"BorderColor":{"Web":"Black"},
"BackgroundColor":{"Web":"OrangeRed"},
"OptionsType":"WordsSignTextOptionsData"
}'
curl.exe -v "https://api.groupdocs.cloud/v1/signature/one-page.docx/text" `
-X POST `
-H "Content-Type: application/json" `
-H "Accept: application/json" `
-H "authorization: Bearer $env:JWT_TOKEN" `
-d "{
'Margin': {'All':0,'Left':0,'Top':0,'Right':0,'Bottom':0},
'SheetNumber':1,
'RowNumber':11,
'ColumnNumber':22,
'BorderVisiblity':true,
'BorderDashStyle':5,
'BorderTransparency':0.0,
'BorderWeight':1.0,
'BackgroundTransparency':0.1,
'SignatureImplementation':'TextStamp',
'Text':'John Smith',
'Width':100,
'Height':100,
'LocationMeasureType':'Pixels',
'SizeMeasureType':'Pixels',
'RotationAngle':0,
'HorizontalAlignment':'Right',
'VerticalAlignment':'Center',
'MarginMeasureType':'Pixels',
'SignAllPages':false,
'Font':{'FontFamily':'Times New Roman','FontSize':14.0,'Bold':false,'Italic':false,'Underline':false},
'ForeColor':{'Web':'Black'},
'BorderColor':{'Web':'Black'},
'BackgroundColor':{'Web':'OrangeRed'},
'OptionsType':'WordsSignTextOptionsData'
}'"
curl -v "https://api.groupdocs.cloud/v1/signature/one-page.docx/text" ^
-X POST ^
-H "Content-Type: application/json" ^
-H "Accept: application/json" ^
-H "authorization: Bearer %JWT_TOKEN%" ^
-d "{\"Margin\":{\"All\":0,\"Left\":0,\"Top\":0,\"Right\":0,\"Bottom\":0},\"SheetNumber\":1,\"RowNumber\":11,\"ColumnNumber\":22,\"BorderVisiblity\":true,\"BorderDashStyle\":5,\"BorderTransparency\":0.0,\"BorderWeight\":1.0,\"BackgroundTransparency\":0.1,\"SignatureImplementation\":\"TextStamp\",\"Text\":\"John Smith\",\"Width\":100,\"Height\":100,\"LocationMeasureType\":\"Pixels\",\"SizeMeasureType\":\"Pixels\",\"RotationAngle\":0,\"HorizontalAlignment\":\"Right\",\"VerticalAlignment\":\"Center\",\"MarginMeasureType\":\"Pixels\",\"SignAllPages\":false,\"Font\":{\"FontFamily\":\"Times New Roman\",\"FontSize\":14.0,\"Bold\":false,\"Italic\":false,\"Underline\":false},\"ForeColor\":{\"Web\":\"Black\"},\"BorderColor\":{\"Web\":\"Black\"},\"BackgroundColor\":{\"Web\":\"OrangeRed\"},\"OptionsType\":\"WordsSignTextOptionsData\"}"
{
"fileName": "one-page.docx",
"folder": "Output",
"code": 200,
"status": "OK"
}
The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.
You can creates Text Signature for document at provided URL with signature-options-objects. It retrieves file from specified URL and tries to detect file type when fileName parameter is not specified. It saves retrieved file in storage, by using fileName and folder parameters to specify desired file name and folder to save file. When file with specified name already exists in storage new unique file name will be used for file. It expects Signature Options Object data in request body and returns object which contains document name and folder location.
The following GroupDocs.Signature Cloud REST API resource has been used in the example to add Text signature to a document at provided URL.
curl -v "https://api.groupdocs.cloud/v1/signature/text?url#https%3A%2F%2Fwww.dropbox.com%2Fs%2Fbzx1xm68zd0c910%2FPieChart.docx" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "authorization: Bearer $JWT_TOKEN" \
-d '{
"Margin": {"All":0,"Left":0,"Top":0,"Right":0,"Bottom":0},
"SheetNumber":1,
"RowNumber":11,
"ColumnNumber":22,
"BorderVisiblity":true,
"BorderDashStyle":5,
"BorderTransparency":0.0,
"BorderWeight":1.0,
"BackgroundTransparency":0.1,
"SignatureImplementation":"TextStamp",
"Text":"John Smith",
"Width":100,
"Height":100,
"LocationMeasureType":"Pixels",
"SizeMeasureType":"Pixels",
"RotationAngle":0,
"HorizontalAlignment":"Right",
"VerticalAlignment":"Center",
"MarginMeasureType":"Pixels",
"SignAllPages":false,
"Font":{"FontFamily":"Times New Roman","FontSize":14.0,"Bold":false,"Italic":false,"Underline":false},
"ForeColor":{"Web":"Black"},
"BorderColor":{"Web":"Black"},
"BackgroundColor":{"Web":"OrangeRed"},
"OptionsType":"WordsSignTextOptionsData"
}'
curl.exe -v "https://api.groupdocs.cloud/v1/signature/text?url#https%3A%2F%2Fwww.dropbox.com%2Fs%2Fbzx1xm68zd0c910%2FPieChart.docx" `
-X POST `
-H "Content-Type: application/json" `
-H "Accept: application/json" `
-H "authorization: Bearer $env:JWT_TOKEN" `
-d "{
'Margin': {'All':0,'Left':0,'Top':0,'Right':0,'Bottom':0},
'SheetNumber':1,
'RowNumber':11,
'ColumnNumber':22,
'BorderVisiblity':true,
'BorderDashStyle':5,
'BorderTransparency':0.0,
'BorderWeight':1.0,
'BackgroundTransparency':0.1,
'SignatureImplementation':'TextStamp',
'Text':'John Smith',
'Width':100,
'Height':100,
'LocationMeasureType':'Pixels',
'SizeMeasureType':'Pixels',
'RotationAngle':0,
'HorizontalAlignment':'Right',
'VerticalAlignment':'Center',
'MarginMeasureType':'Pixels',
'SignAllPages':false,
'Font':{'FontFamily':'Times New Roman','FontSize':14.0,'Bold':false,'Italic':false,'Underline':false},
'ForeColor':{'Web':'Black'},
'BorderColor':{'Web':'Black'},
'BackgroundColor':{'Web':'OrangeRed'},
'OptionsType':'WordsSignTextOptionsData'
}'"
curl -v "https://api.groupdocs.cloud/v1/signature/text?url#https%3A%2F%2Fwww.dropbox.com%2Fs%2Fbzx1xm68zd0c910%2FPieChart.docx" ^
-X POST ^
-H "Content-Type: application/json" ^
-H "Accept: application/json" ^
-H "authorization: Bearer %JWT_TOKEN%" ^
-d "{\"Margin\":{\"All\":0,\"Left\":0,\"Top\":0,\"Right\":0,\"Bottom\":0},\"SheetNumber\":1,\"RowNumber\":11,\"ColumnNumber\":22,\"BorderVisiblity\":true,\"BorderDashStyle\":5,\"BorderTransparency\":0.0,\"BorderWeight\":1.0,\"BackgroundTransparency\":0.1,\"SignatureImplementation\":\"TextStamp\",\"Text\":\"John Smith\",\"Width\":100,\"Height\":100,\"LocationMeasureType\":\"Pixels\",\"SizeMeasureType\":\"Pixels\",\"RotationAngle\":0,\"HorizontalAlignment\":\"Right\",\"VerticalAlignment\":\"Center\",\"MarginMeasureType\":\"Pixels\",\"SignAllPages\":false,\"Font\":{\"FontFamily\":\"Times New Roman\",\"FontSize\":14.0,\"Bold\":false,\"Italic\":false,\"Underline\":false},\"ForeColor\":{\"Web\":\"Black\"},\"BorderColor\":{\"Web\":\"Black\"},\"BackgroundColor\":{\"Web\":\"OrangeRed\"},\"OptionsType\":\"WordsSignTextOptionsData\"}"
{
"fileName": "PieChart.docx",
"folder": "Output",
"Code": 200,
"Status" : "OK"
}
The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.
You can creates Text Signature for document with signature-options-objects. Signature Text Options and all inherited classes have been updated in Release 18.7 with newly added property BackgroundBrush which support following brush types.
Linear Gradient Brush
Brush Style option
"backgroundBrush": {"startColor": {"web": "CornflowerBlue"}, "endColor": {"web": "DarkBlue"}, "angle": 0.0, "brushType": "LinearGradientBrush"}
Radial Gradient Brush
Brush Style option
"backgroundBrush": { "innerColor": {"web": "CornflowerBlue"}, "outerColor": {"web": "DarkBlue"}, "brushType": "RadialGradientBrush"}
Solid Brush
Brush Style option
"backgroundBrush": {"color": {"web": "DarkBlue"}, "brushType": "SolidBrush"}
Texture Brush
Brush Style option
"backgroundBrush": {"imageGuid": "images\signature_01.jpg", "brushType": "TextureBrush"}
The following GroupDocs.Signature Cloud REST API resource has been used in the example to add Text signature to a document.
curl --request POST \
--url "http://api.groupdocs.cloud/v1/signature/01_pages.pptx/text?folder#storage" \
--header "authorization: Bearer $JWT_TOKEN" \
--header "content-type: application/json" \
--data '{
"borderTransparency":0.0,
"borderWeight":1.0,
"backgroundTransparency":0.0,
"signatureImplementation":"TextStamp",
"backgroundBrush":{
"startColor":{"web":"CornflowerBlue"},
"endColor":{"web":"DarkBlue"},
"angle":0.0,
"brushType":"LinearGradientBrush"
},
"left":1,"top":1,"width":200,"height":50,
"locationMeasureType":"Pixels",
"sizeMeasureType":"Pixels",
"stretch":"None",
"rotationAngle":0,
"horizontalAlignment":"Left",
"verticalAlignment":"Top",
"margin":{"all":10,"left":10,"top":10,"right":10,"bottom":10},
"marginMeasureType":"Pixels",
"text":"John Smith",
"signAllPages":false,
"font":{"fontFamily":"Times New Roman","fontSize":24.0,"bold":true,"italic":false,"underline":false},
"foreColor":{"Web":"DarkSlateBlue"},
"borderColor":{"Web":"Black"},
"backgroundColor":{"Web":"Transparent","Alpha":0},
"documentPageNumber":0,
"pagesSetup":{"firstPage":true,"lastPage":false,"oddPages":false,"evenPages":false,"pageNumbers":[1]},
"OptionsType":"SlidesSignTextOptionsData"
}'
curl.exe --request POST `
--url "http://api.groupdocs.cloud/v1/signature/01_pages.pptx/text?folder#storage" `
--header "authorization: Bearer $env:JWT_TOKEN" `
--header "content-type: application/json" `
--data "{
'borderTransparency':0.0,
'borderWeight':1.0,
'backgroundTransparency':0.0,
'signatureImplementation':'TextStamp',
'backgroundBrush':{
'startColor':{'web':'CornflowerBlue'},
'endColor':{'web':'DarkBlue'},
'angle':0.0,
'brushType':'LinearGradientBrush'
},
'left':1,'top':1,'width':200,'height':50,
'locationMeasureType':'Pixels',
'sizeMeasureType':'Pixels',
'stretch':'None',
'rotationAngle':0,
'horizontalAlignment':'Left',
'verticalAlignment':'Top',
'margin':{'all':10,'left':10,'top':10,'right':10,'bottom':10},
'marginMeasureType':'Pixels',
'text':'John Smith',
'signAllPages':false,
'font':{'fontFamily':'Times New Roman','fontSize':24.0,'bold':true,'italic':false,'underline':false},
'foreColor':{'Web':'DarkSlateBlue'},
'borderColor':{'Web':'Black'},
'backgroundColor':{'Web':'Transparent','Alpha':0},
'documentPageNumber':0,
'pagesSetup':{'firstPage':true,'lastPage':false,'oddPages':false,'evenPages':false,'pageNumbers':[1]},
'OptionsType':'SlidesSignTextOptionsData'
}'"
curl --request POST ^
--url "http://api.groupdocs.cloud/v1/signature/01_pages.pptx/text?folder#storage" ^
--header "authorization: Bearer %JWT_TOKEN%" ^
--header "content-type: application/json" ^
--data "{\"borderTransparency\":0.0,\"borderWeight\":1.0,\"backgroundTransparency\":0.0,\"signatureImplementation\":\"TextStamp\",\"backgroundBrush\":{\"startColor\":{\"web\":\"CornflowerBlue\"},\"endColor\":{\"web\":\"DarkBlue\"},\"angle\":0.0,\"brushType\":\"LinearGradientBrush\"},\"left\":1,\"top\":1,\"width\":200,\"height\":50,\"locationMeasureType\":\"Pixels\",\"sizeMeasureType\":\"Pixels\",\"stretch\":\"None\",\"rotationAngle\":0,\"horizontalAlignment\":\"Left\",\"verticalAlignment\":\"Top\",\"margin\":{\"all\":10,\"left\":10,\"top\":10,\"right\":10,\"bottom\":10},\"marginMeasureType\":\"Pixels\",\"text\":\"John Smith\",\"signAllPages\":false,\"font\":{\"fontFamily\":\"Times New Roman\",\"fontSize\":24.0,\"bold\":true,\"italic\":false,\"underline\":false},\"foreColor\":{\"Web\":\"DarkSlateBlue\"},\"borderColor\":{\"Web\":\"Black\"},\"backgroundColor\":{\"Web\":\"Transparent\",\"Alpha\":0},\"documentPageNumber\":0,\"pagesSetup\":{\"firstPage\":true,\"lastPage\":false,\"oddPages\":false,\"evenPages\":false,\"pageNumbers\":[1]},\"OptionsType\":\"SlidesSignTextOptionsData\"}"
{
"fileName": "01_pages.pptx",
"folder": "Output",
"Code": 200,
"Status" : "OK"
}
The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.
You can create Text Signature on Document provided by fileName and document folder (if required) using following API. It expects Signature Options Object data in request body.
It returns an object which contains document name, folder location and command status.CellsSignTextOptionsData, ImagesSignTextOptionsData, PdfSignTextOptionsData, SlidesSignTextOptionsData, WordsSignTextOptionsData classes were updated in (Release 18.7) with newly added properties TextHorizontalAlignment and TextVerticalAlignment .
Text Horizontal Alignment
"textHorizontalAlignment": "Left"
Text Vertical Alignment
"textVerticalAlignment": "Top"
The following GroupDocs.Signature Cloud REST API resource has been used in the example to add Text signature to a document.
curl --request POST \
--url "http://api.groupdocs.cloud/v1/signature/01_pages.png/text?folder#storage" \
--header "authorization: Bearer $JWT_TOKEN" \
--header "content-type: application/json" \
--data '{
"borderDashStyle":0,
"borderTransparency":0.0,
"borderWeight":5.0,
"backgroundTransparency":0.0,
"signatureImplementation":"TextAsImage",
"opacity":1.0,
"documentPageNumber":1,
"pagesSetup":{"firstPage":false,"lastPage":false,"oddPages":false,"evenPages":false,"pageNumbers":[]},
"signAllPages":false,
"textHorizontalAlignment":"Left",
"textVerticalAlignment":"Top",
"left":1,"top":1,"width":200,"height":40,
"locationMeasureType":"Pixels",
"sizeMeasureType":"Pixels",
"stretch":"None",
"rotationAngle":0,
"horizontalAlignment":"Left",
"verticalAlignment":"Top",
"margin":{"all":10,"left":10,"top":10,"right":10,"bottom":10},
"marginMeasureType":"Pixels",
"text":" John Smith",
"font":{"fontFamily":"Times New Roman","fontSize":24.0,"bold":true,"italic":false,"underline":false},
"foreColor":{"Web":"DarkSlateBlue"},
"borderColor":{"Web":"DarkSlateBlue"},
"backgroundColor":{"Web":"Goldenrod"},
"OptionsType":"ImagesSignTextOptionsData"
}'
curl.exe --request POST `
--url "http://api.groupdocs.cloud/v1/signature/01_pages.png/text?folder#storage" `
--header "authorization: Bearer $env:JWT_TOKEN" `
--header "content-type: application/json" `
--data "{
'borderDashStyle':0,
'borderTransparency':0.0,
'borderWeight':5.0,
'backgroundTransparency':0.0,
'signatureImplementation':'TextAsImage',
'opacity':1.0,
'documentPageNumber':1,
'pagesSetup':{'firstPage':false,'lastPage':false,'oddPages':false,'evenPages':false,'pageNumbers':[]},
'signAllPages':false,
'textHorizontalAlignment':'Left',
'textVerticalAlignment':'Top',
'left':1,'top':1,'width':200,'height':40,
'locationMeasureType':'Pixels',
'sizeMeasureType':'Pixels',
'stretch':'None',
'rotationAngle':0,
'horizontalAlignment':'Left',
'verticalAlignment':'Top',
'margin':{'all':10,'left':10,'top':10,'right':10,'bottom':10},
'marginMeasureType':'Pixels',
'text':' John Smith',
'font':{'fontFamily':'Times New Roman','fontSize':24.0,'bold':true,'italic':false,'underline':false},
'foreColor':{'Web':'DarkSlateBlue'},
'borderColor':{'Web':'DarkSlateBlue'},
'backgroundColor':{'Web':'Goldenrod'},
'OptionsType':'ImagesSignTextOptionsData'
}'"
curl --request POST ^
--url "http://api.groupdocs.cloud/v1/signature/01_pages.png/text?folder#storage" ^
--header "authorization: Bearer %JWT_TOKEN%" ^
--header "content-type: application/json" ^
--data "{\"borderDashStyle\":0,\"borderTransparency\":0.0,\"borderWeight\":5.0,\"backgroundTransparency\":0.0,\"signatureImplementation\":\"TextAsImage\",\"opacity\":1.0,\"documentPageNumber\":1,\"pagesSetup\":{\"firstPage\":false,\"lastPage\":false,\"oddPages\":false,\"evenPages\":false,\"pageNumbers\":[]},\"signAllPages\":false,\"textHorizontalAlignment\":\"Left\",\"textVerticalAlignment\":\"Top\",\"left\":1,\"top\":1,\"width\":200,\"height\":40,\"locationMeasureType\":\"Pixels\",\"sizeMeasureType\":\"Pixels\",\"stretch\":\"None\",\"rotationAngle\":0,\"horizontalAlignment\":\"Left\",\"verticalAlignment\":\"Top\",\"margin\":{\"all\":10,\"left\":10,\"top\":10,\"right\":10,\"bottom\":10},\"marginMeasureType\":\"Pixels\",\"text\":\" John Smith\",\"font\":{\"fontFamily\":\"Times New Roman\",\"fontSize\":24.0,\"bold\":true,\"italic\":false,\"underline\":false},\"foreColor\":{\"Web\":\"DarkSlateBlue\"},\"borderColor\":{\"Web\":\"DarkSlateBlue\"},\"backgroundColor\":{\"Web\":\"Goldenrod\"},\"OptionsType\":\"ImagesSignTextOptionsData\"}"
{
"fileName": "01_pages.png",
"folder": "Output",
"code": 200,
"status": "OK"
}
The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.