A Text electronic signature is an arbitrary text that is added to a document in a native way dependent on document type. GroupDocs.Signature Cloud provides text signature feature and allows to customize wide range of text settings - from font name, size and color to alignment, borders, shadow effects etc. This is how text signature may look like:
To manipulate with text signatures GroupDocs.Signature Cloud provides various text sign options.
API usage
There are steps that usage of GroupDocs.Signature Cloud consists of:
Upload input document into cloud storage and other files, like digital certificate or image stamp
Sign document
Download output document
For storage operations, like uploading or downloading documents, please refer to the corresponding articles of this manual.
Swagger UI lets you call this REST API directly from the browser.
cURL example
// First get JSON Web Token
// Please get your Client Id and Client Secret from https://dashboard.groupdocs.cloud/applications. Kindly place Client Id in "client_id" and Client Secret in "client_secret" argument.
curl-v"https://api.groupdocs.cloud/connect/token"\-XPOST\-d"grant_type#client_credentials&client_id#xxxx&client_secret#xxxx"\-H"Content-Type: application/x-www-form-urlencoded"\-H"Accept: application/json"// cURL example to get document information
curl-v"https://api.groupdocs.cloud/v2.0/signature/create"\-XPOST\-H"Content-Type: application/json"\-H"Accept: application/json"\-H"Authorization: Bearer <jwt token>"-d"{
'FileInfo': {
'FilePath': 'one-page.docx'
},
'Options': [
{
'AllPages': true,
'SignatureType': 'Text',
'Text': 'GroupDocs.Signature Cloud',
'Left': 100,
'Top': 100,
'Width': 500,
'Height': 100,
'Font': {
'FontFamily': 'Arial',
'FontSize': 14,
'Bold': true
},
'ForeColor': { 'Web': 'BlueViolet' }
}
],
'SaveOptions': {
'OutputFilePath': 'signedText_one-page.docx'
}
}"
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.
// For complete examples and data files, please go to https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-dotnet-samplesstringMyClientSecret="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudstringMyClientId="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudvarconfiguration=newConfiguration(MyClientId,MyClientSecret);varapiInstance=newSignApi(configuration);// Sign optionsvaroptions=newSignTextOptions{SignatureType=SignatureTypeEnum.Text,Text="GroupDocs.Signature Cloud",Left=100,Top=100,Width=100,Height=100,LocationMeasureType=SignTextOptions.LocationMeasureTypeEnum.Pixels,SizeMeasureType=SignTextOptions.SizeMeasureTypeEnum.Pixels,Stretch=SignTextOptions.StretchEnum.None,RotationAngle=0,HorizontalAlignment=SignTextOptions.HorizontalAlignmentEnum.None,VerticalAlignment=SignTextOptions.VerticalAlignmentEnum.None,Margin=newPadding{All=5},MarginMeasureType=SignTextOptions.MarginMeasureTypeEnum.Pixels,Font=newSignatureFont{FontFamily="Arial",FontSize=12,Bold=true,Italic=false,Underline=false},ForeColor=newColor{Web="BlueViolet"},Border=newBorderLine{Color=newColor{Web="DarkOrange"},Visible=true,Style=BorderLine.StyleEnum.Dash},BackgroundColor=newColor{Web="DarkOrange"},AllPages=false,Page=1,PagesSetup=newPagesSetup{EvenPages=false,FirstPage=true,LastPage=false,OddPages=false,PageNumbers=newList<int?>{1}}};// Sign settingsvarsignSettings=newSignSettings{FileInfo=newFileInfo{FilePath="one-page.docx"},SaveOptions=newSaveOptions{OutputFilePath="signedText_one-page.docx",SaveFormat="docx"},Options=newList<SignOptions>{options}};// Create request.varrequest=newCreateSignaturesRequest(signSettings);// Call api method with request.varresponse=apiInstance.CreateSignatures(request);
// For complete examples and data files, please go to https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-java-samples
StringMyClientSecret="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
StringMyClientId="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
Configurationconfiguration=newConfiguration(MyClientId,MyClientSecret);SignApiapiInstance=newSignApi(configuration);FFileInfofileInfo=newFileInfo();fileInfo.setFilePath("Signaturedocs\\one-page.docx");fileInfo.setPassword(null);fileInfo.setVersionId(null);fileInfo.setStorageName(Constants.MYStorage);InfoSettingsinfoSettings=newInfoSettings();infoSettings.setFileInfo(fileInfo);SignTextOptionsoptions=newSignTextOptions();options.setSignatureType(SignatureTypeEnum.TEXT);// set signature properties
options.setText("John Smith");// set signature position on a page
options.setLeft(100);options.setTop(100);options.setWidth(100);options.setHeight(100);options.setLocationMeasureType(LocationMeasureTypeEnum.PIXELS);options.setSizeMeasureType(SizeMeasureTypeEnum.PIXELS);options.setStretch(StretchEnum.NONE);options.setRotationAngle(0);options.setHorizontalAlignment(HorizontalAlignmentEnum.NONE);options.setVerticalAlignment(VerticalAlignmentEnum.NONE);Paddingpadding=newPadding();padding.setAll(5);options.setMargin(padding);options.setMarginMeasureType(MarginMeasureTypeEnum.PIXELS);ColorbackgroundColor=newColor();backgroundColor.setWeb("DarkOrange");options.setBackgroundColor(backgroundColor);*setpagesforsigning(eachofthesepagesettingscouldbeusedsingly)options.setPage(1);options.setAllPages(true);PagesSetuppagesSetup=newPagesSetup();pagesSetup.setEvenPages(false);pagesSetup.setFirstPage(true);pagesSetup.setLastPage(false);pagesSetup.setOddPages(false);pagesSetup.addPageNumbersItem(1);options.setPagesSetup(pagesSetup);SaveOptionssaveOptions=newSaveOptions();saveOptions.setOutputFilePath("Signaturedocs\\signedText_one-page.docx");SignSettingssignSettings=newSignSettings();signSettings.setFileInfo(fileInfo);signSettings.addOptionsItem(options);signSettings.setSaveOptions(saveOptions);CreateSignaturesRequestrequest=newCreateSignaturesRequest(signSettings);SignResultresponse=apiInstance.createSignatures(request);
// For complete examples and data files, please go to https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-php-samples
useGroupDocs\Signature\Model;useGroupDocs\Signature\Model\Requests;$ClientId="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
$ClientSecret="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
$configuration=newGroupDocs\Signature\Configuration();$configuration->setAppSid($ClientId);$configuration->setAppKey($ClientSecret);$apiInstance=newGroupDocs\Signature\SignApi($configuration);$fileInfo=newGroupDocs\Signature\Model\FileInfo();$fileInfo->setFilePath("signaturedocs\one-page.docx");$fileInfo->setPassword("");$settings=newGroupDocs\Signature\Model\SignSettings();$settings->setFileInfo($fileInfo);$saveOptions=newGroupDocs\Signature\Model\SaveOptions();$saveOptions->setOutputFilePath("signaturedocs\signedTextOne_page.docx");$settings->setSaveOptions($saveOptions);$options=newGroupDocs\Signature\Model\SignTextOptions();$options->setPage(1);$options->setAllPages(false);$options->setSignatureType(GroupDocs\Signature\Model\OptionsBase::SIGNATURE_TYPE_TEXT);$options->setText("GroupDocs Cloud");$options->setLeft(100);$options->setTop(100);$options->setWidth(100);$options->setHeight(100);$options->setLocationMeasureType(GroupDocs\Signature\Model\SignTextOptions::LOCATION_MEASURE_TYPE_PIXELS);$options->setSizeMeasureType(GroupDocs\Signature\Model\SignTextOptions::SIZE_MEASURE_TYPE_PIXELS);$options->setStretch(GroupDocs\Signature\Model\SignTextOptions::STRETCH_NONE);$options->setRotationAngle(0);$options->setHorizontalAlignment(GroupDocs\Signature\Model\SignTextOptions::HORIZONTAL_ALIGNMENT_NONE);$options->setVerticalAlignment(GroupDocs\Signature\Model\SignTextOptions::VERTICAL_ALIGNMENT_NONE);$padding=newGroupDocs\Signature\Model\Padding();$padding->setAll(5);$options->setMargin($padding);$options->setMarginMeasureType(GroupDocs\Signature\Model\SignTextOptions::MARGIN_MEASURE_TYPE_PIXELS);$color=newGroupDocs\Signature\Model\Color();$color->setWeb("BlueViolet");$options->setForeColor($color);$pagesSetup=newGroupDocs\Signature\Model\PagesSetup();$pagesSetup->setEvenPages(false);$pagesSetup->setFirstPage(true);$pagesSetup->setLastPage(false);$pagesSetup->setOddPages(false);$pagesSetup->setPageNumbers([1]);$options->setPagesSetup($pagesSetup);$settings->setOptions([$options]);$request=newGroupDocs\Signature\Model\Requests\createSignaturesRequest($settings);$response=$apiInstance->createSignatures($request);
// For complete examples and data files, please go to https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-node-samples
global.signature_cloud=require("groupdocs-signature-cloud");global.clientId="XXXX-XXXX-XXXX-XXXX";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
global.clientSecret="XXXXXXXXXXXXXXXX";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
global.signApi=signature_cloud.SignApi.fromKeys(clientId,clientSecret);letfileInfo=newsignature_cloud.FileInfo();fileInfo.filePath="signaturedocs/one-page.docx";letopts=newsignature_cloud.SignTextOptions();opts.signatureType=signature_cloud.OptionsBase.SignatureTypeEnum.Text;opts.text='GroupDocs.Signature Cloud';// set signature position on a page
opts.left=100;opts.top=100;opts.width=100;opts.height=100;opts.locationMeasureType=signature_cloud.SignTextOptions.LocationMeasureTypeEnum.Pixels;opts.sizeMeasureType=signature_cloud.SignTextOptions.SizeMeasureTypeEnum.Pixels;opts.stretch=signature_cloud.SignTextOptions.StretchEnum.None;opts.rotationAngle=0;opts.horizontalAlignment=signature_cloud.SignTextOptions.HorizontalAlignmentEnum.None;opts.verticalAlignment=signature_cloud.SignTextOptions.VerticalAlignmentEnum.None;opts.margin=newsignature_cloud.Padding();opts.margin.all=5;opts.marginMeasureType=signature_cloud.SignTextOptions.MarginMeasureTypeEnum.Pixels;// set signature appearance
opts.font=newsignature_cloud.SignatureFont();opts.font.fontFamily="Arial";opts.font.fontSize=12;opts.font.bold=true;opts.font.italic=false;opts.font.underline=false;opts.foreColor=newsignature_cloud.Color();opts.foreColor.web="BlueViolet";opts.backgroundColor=newsignature_cloud.Color();opts.backgroundColor.web="DarkOrange";opts.page=1;letsettings=newsignature_cloud.SignSettings();settings.fileInfo=fileInfo;settings.options=[opts];settings.saveOptions=newsignature_cloud.SaveOptions();settings.saveOptions.outputFilePath="signaturedocs/signedText_one-page.docx";letrequest=newsignature_cloud.CreateSignaturesRequest(settings);letresponse=awaitsignApi.createSignatures(request);
# For complete examples and data files, please go to https://github.com/groupdocs-signature_cloud-cloud/groupdocs-signature_cloud-cloud-python-samplesfromgroupdocs_signature_cloudimport*importgroupdocs_signature_cloudclient_id="XXXX-XXXX-XXXX-XXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudclient_secret="XXXXXXXXXXXXXXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudapi=groupdocs_signature_cloud.SignApi.from_keys(client_id,client_secret)fileInfo=FileInfo()fileInfo.file_path="signaturedocs\\one-page.docx"opts=SignTextOptions()opts.signature_type='Text'opts.text='GroupDocs.Signature Cloud'# set signature position on a pageopts.left=100opts.top=100opts.width=100opts.height=100opts.location_measure_type="Pixels"opts.size_measure_type="Pixels"opts.stretch="None"opts.rotation_angle=0opts.horizontal_alignment="None"opts.vertical_alignment="None"opts.margin=Padding()opts.margin.all=5opts.margin_measure_type="Pixels"# set signature appearanceopts.font=SignatureFont()opts.font.font_family="Arial"opts.font.font_size=12opts.font.bold=Trueopts.font.italic=Falseopts.font.underline=Falseopts.fore_color=Color()opts.fore_color.web="BlueViolet"opts.background_color=Color()opts.background_color.web="DarkOrange"opts.page=1settings=SignSettings()settings.options=[opts]settings.save_options=SaveOptions()settings.save_options.output_file_path="signaturedocs\\signedTextOne_page.docx"settings.file_info=fileInforequest=CreateSignaturesRequest(settings)response=api.create_signatures(request)
# For complete examples and data files, please go to https://github.com/groupdocs-signature-cloud/groupdocs-signature-cloud-ruby-samplesrequire'groupdocs_signature_cloud'$client_id="XXXX-XXXX-XXXX-XXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud$client_secret="XXXXXXXXXXXXXXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudapi=GroupDocsSignatureCloud::SignApi.from_keys($client_id,$client_secret)$info=GroupDocsSignatureCloud::FileInfo.new()$info.file_path="signaturedocs\\one-page.docx"$opts=GroupDocsSignatureCloud::SignTextOptions.new()$opts.signature_type="Text"$opts.text='GroupDocs.Signature Cloud'# set signature position on a page$opts.left=100$opts.top=100$opts.width=100$opts.height=100$opts.location_measure_type="Pixels"$opts.size_measure_type="Pixels"$opts.stretch="None"$opts.rotation_angle=0$opts.horizontal_alignment="None"$opts.vertical_alignment="None"$opts.margin=GroupDocsSignatureCloud::Padding.new()$opts.margin.all=5$opts.margin_measure_type="Pixels"# set signature appearance$opts.font=GroupDocsSignatureCloud::SignatureFont.new()$opts.font.font_family="Arial"$opts.font.font_size=12$opts.font.bold=true$opts.font.italic=false$opts.font.underline=false$opts.fore_color=GroupDocsSignatureCloud::Color.new()$opts.fore_color.web="BlueViolet"$opts.background_color=GroupDocsSignatureCloud::Color.new()$opts.background_color.web="DarkOrange"$opts.page=1$settings=GroupDocsSignatureCloud::SignSettings.new()$settings.options=[$opts]$settings.save_options=GroupDocsSignatureCloud::SaveOptions.new()$settings.save_options.output_file_path="signaturedocs\\signedTextOne_page.docx"$settings.file_info=$info$request=GroupDocsSignatureCloud::CreateSignaturesRequest.new($settings)# Executing an API.$response=api.create_signatures($request)
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.