Last active
July 8, 2019 14:56
-
-
Save groupdocscloud/371ae0feb03d6df33ec242272ccf7112 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signature-Python-v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Barcode_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SignBarcodeOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.signature_type = 'Barcode' | |
opts.text = '123456789012' | |
opts.barcode_type = 'Code128' | |
opts.code_text_alignment = 'None' | |
# set signature position on a page | |
opts.left = 100 | |
opts.top = 100 | |
opts.width = 300 | |
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 = Padding() | |
opts.margin.all = 5 | |
opts.margin_measure_type = "Pixels" | |
# set signature appearance | |
opts.fore_color = Color() | |
opts.fore_color.web = "BlueViolet" | |
opts.border_color = Color() | |
opts.border_color.web = "DarkOrange" | |
opts.background_color = Color() | |
opts.background_color.web = "DarkOrange" | |
opts.opacity = 0.8 | |
opts.inner_margins = Padding() | |
opts.inner_margins.all = 2 | |
opts.border_visiblity = True | |
opts.border_dash_style = "Dash" | |
opts.border_weight = 12 | |
opts.page = 1 | |
opts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = SignSettings() | |
settings.options = [opts] | |
settings.save_options = SaveOptions() | |
settings.save_options.output_file_path = "signaturedocs\\signedBarcodeOne_page.docx" | |
settings.file_info = fileInfo | |
request = CreateSignaturesRequest(settings) | |
response = api.create_signatures(request) | |
print("file_path: " + response.file_info.file_path) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Barcode_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Collection_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
Barcodeopts = SignBarcodeOptions() | |
Barcodeopts.document_type = "WordProcessing" | |
# set signature properties | |
Barcodeopts.signature_type = 'Barcode' | |
Barcodeopts.text = '123456789012' | |
Barcodeopts.barcode_type = 'Code128' | |
Barcodeopts.code_text_alignment = 'None' | |
# set signature position on a page | |
Barcodeopts.left = 100 | |
Barcodeopts.top = 100 | |
Barcodeopts.width = 300 | |
Barcodeopts.height = 100 | |
Barcodeopts.location_measure_type = "Pixels" | |
Barcodeopts.size_measure_type = "Pixels" | |
Barcodeopts.stretch = "None" | |
Barcodeopts.rotation_angle = 0 | |
Barcodeopts.horizontal_alignment = "None" | |
Barcodeopts.vertical_alignment = "None" | |
Barcodeopts.margin = Padding() | |
Barcodeopts.margin.all = 5 | |
Barcodeopts.margin_measure_type = "Pixels" | |
# set signature appearance | |
Barcodeopts.fore_color = Color() | |
Barcodeopts.fore_color.web = "BlueViolet" | |
Barcodeopts.border_color = Color() | |
Barcodeopts.border_color.web = "DarkOrange" | |
Barcodeopts.background_color = Color() | |
Barcodeopts.background_color.web = "DarkOrange" | |
Barcodeopts.opacity = 0.8 | |
Barcodeopts.inner_margins = Padding() | |
Barcodeopts.inner_margins.all = 2 | |
Barcodeopts.border_visiblity = True | |
Barcodeopts.border_dash_style = "Dash" | |
Barcodeopts.border_weight = 12 | |
Barcodeopts.page = 1 | |
Barcodeopts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
Barcodeopts.pages_setup = ps | |
QRCodeopts = SignQRCodeOptions() | |
QRCodeopts.document_type = "WordProcessing" | |
# set signature properties | |
QRCodeopts.signature_type = 'QRCode' | |
QRCodeopts.text = 'GroupDocs.Signature Cloud' | |
QRCodeopts.qr_code_type = 'Aztec' | |
# set signature position on a page | |
QRCodeopts.left = 100 | |
QRCodeopts.top = 100 | |
QRCodeopts.width = 200 | |
QRCodeopts.height = 100 | |
QRCodeopts.location_measure_type = "Pixels" | |
QRCodeopts.size_measure_type = "Pixels" | |
QRCodeopts.stretch = "None" | |
QRCodeopts.rotation_angle = 0 | |
QRCodeopts.horizontal_alignment = "None" | |
QRCodeopts.vertical_alignment = "None" | |
QRCodeopts.margin = Padding() | |
QRCodeopts.margin.all = 5 | |
QRCodeopts.margin_measure_type = "Pixels" | |
# set signature appearance | |
QRCodeopts.fore_color = Color() | |
QRCodeopts.fore_color.web = "BlueViolet" | |
QRCodeopts.border_color = Color() | |
QRCodeopts.border_color.web = "DarkOrange" | |
QRCodeopts.background_color = Color() | |
QRCodeopts.background_color.web = "DarkOrange" | |
QRCodeopts.opacity = 0.8 | |
QRCodeopts.inner_margins = Padding() | |
QRCodeopts.inner_margins.all = 2 | |
QRCodeopts.border_visiblity = True | |
QRCodeopts.border_dash_style = "Dash" | |
QRCodeopts.border_weight = 12 | |
QRCodeopts.page = 1 | |
QRCodeopts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
QRCodeopts.pages_setup = ps | |
settings = SignSettings() | |
settings.options = [Barcodeopts,QRCodeopts] | |
settings.save_options = SaveOptions() | |
settings.save_options.output_file_path = "signaturedocs\\signedCollectionOne_page.docx" | |
settings.file_info = fileInfo | |
request = CreateSignaturesRequest(settings) | |
response = api.create_signatures(request) | |
print("file_path: " + response.file_info.file_path) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Collection_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Copy_File: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FileApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.CopyFileRequest("signaturedocs\\one-page.docx", "signaturedocs\\one-page-copied.docx", Common_Utilities.myStorage, Common_Utilities.myStorage) | |
api.copy_file(request) | |
print("Expected response type is Void: 'signaturedocs/one-page.docx' file copied as 'signaturedocs/one-page-copied.docx'.") | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Copy_Folder: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FolderApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.CopyFolderRequest("signaturedocs", "signaturedocs1", Common_Utilities.myStorage, Common_Utilities.myStorage) | |
api.copy_folder(request) | |
print("Expected response type is Void: 'signaturedocs' folder copied as 'signaturedocs1'.") | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Create_Folder: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FolderApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.CreateFolderRequest("Assembler", Common_Utilities.myStorage) | |
api.create_folder(request) | |
print("Expected response type is Void: 'Assembler' folder created.") | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Delete_File: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FileApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.DeleteFileRequest("signaturedocs1\\one-page.docx", Common_Utilities.myStorage) | |
api.delete_file(request) | |
print("Expected response type is Void: 'signaturedocs1/one-page.docx' deleted.") | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Delete_Folder: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FolderApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.DeleteFolderRequest("signaturedocs\\signaturedocs1", Common_Utilities.myStorage, True) | |
api.delete_folder(request) | |
print("Expected response type is Void: 'signaturedocs/signaturedocs1' folder deleted recursively.") | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Digital_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SignDigitalOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.signature_type = 'Digital' | |
opts.image_guid = "signaturedocs\\signature.jpg" | |
opts.certificate_guid = "signaturedocs\\temp.pfx" | |
opts.password = '1234567890' | |
# set signature position on a page | |
opts.left = 100 | |
opts.top = 100 | |
opts.width = 200 | |
opts.height = 100 | |
opts.location_measure_type = "Pixels" | |
opts.size_measure_type = "Pixels" | |
opts.rotation_angle = 0 | |
opts.horizontal_alignment = "None" | |
opts.vertical_alignment = "None" | |
opts.margin = Padding() | |
opts.margin.all = 5 | |
opts.margin_measure_type = "Pixels" | |
# set signature appearance | |
opts.opacity = 0.8 | |
opts.page = 1 | |
opts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = SignSettings() | |
settings.options = [opts] | |
settings.save_options = SaveOptions() | |
settings.save_options.output_file_path = "signaturedocs\\signedDigitalOne_page.docx" | |
settings.file_info = fileInfo | |
request = CreateSignaturesRequest(settings) | |
response = api.create_signatures(request) | |
print("file_path: " + response.file_info.file_path) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Digital_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_DocumentInfo_File: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_InfoApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "Signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
settings = InfoSettings() | |
settings.file_info = fileInfo | |
request = GetInfoRequest(settings) | |
response = api.get_info(request) | |
print("file_path: " + response.file_info.file_path) | |
except ApiException as e: | |
print("Exception when calling Signature_Python_DocumentInfo_File: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Download_File: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FileApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.DownloadFileRequest("signaturedocs\\one-page.docx", Common_Utilities.myStorage) | |
response = api.download_file(request) | |
print("Expected response type is Stream: " + str(len(response))) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities; | |
class Signature_Python_Get_All_Supported_Formats: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_InfoApi_Instance() | |
try: | |
# Retrieve supported file-formats | |
response = api.get_supported_file_formats() | |
# Print out supported file-formats | |
print("Supported file-formats:") | |
for fileformat in response.formats: | |
print('{0} ({1})'.format(fileformat.file_format, fileformat.extension)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling get_supported_signature_types: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Get_Disc_Usage: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_StorageApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.GetDiscUsageRequest(Common_Utilities.myStorage) | |
response = api.get_disc_usage(request) | |
print("Expected response type is DiscUsage: " + str(response)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Get_File_Versions: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_StorageApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.GetFileVersionsRequest("signaturedocs\\one-page.docx", Common_Utilities.myStorage) | |
response = api.get_file_versions(request) | |
print("Expected response type is FileVersions: " + str(response)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Get_Files_List: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FolderApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.GetFilesListRequest("signaturedocs\\sample.docx", Common_Utilities.myStorage) | |
response = api.get_files_list(request) | |
print("Expected response type is FilesList: " + str(response)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities; | |
class Signature_Python_Get_Supported_Barcodes: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_InfoApi_Instance() | |
try: | |
# Retrieve supported file-formats | |
response = api.get_supported_barcodes() | |
# Print out supported file-formats | |
print("Supported barcode_types:") | |
for fileformat in response.barcode_types: | |
print('{0})'.format(fileformat.name )) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Get_Supported_Barcodes: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities; | |
class Signature_Python_Get_Supported_QRCodes: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_InfoApi_Instance() | |
try: | |
# Retrieve supported file-formats | |
response = api.get_supported_qr_codes() | |
# Print out supported file-formats | |
print("Supported barcode_types:") | |
for fileformat in response.qr_code_types: | |
print('{0})'.format(fileformat.name )) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Get_Supported_QRCodes: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Image_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SignImageOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.signature_type = 'Image' | |
opts.image_guid = "signaturedocs\\signature.jpg" | |
# set signature position on a page | |
opts.left = 100 | |
opts.top = 100 | |
opts.width = 200 | |
opts.height = 100 | |
opts.location_measure_type = "Pixels" | |
opts.size_measure_type = "Pixels" | |
opts.rotation_angle = 0 | |
opts.horizontal_alignment = "None" | |
opts.vertical_alignment = "None" | |
opts.margin = Padding() | |
opts.margin.all = 5 | |
opts.margin_measure_type = "Pixels" | |
# set signature appearance | |
opts.opacity = 0.8 | |
opts.page = 1 | |
opts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = SignSettings() | |
settings.options = [opts] | |
settings.save_options = SaveOptions() | |
settings.save_options.output_file_path = "signaturedocs\\signedImageOne_page.docx" | |
settings.file_info = fileInfo | |
request = CreateSignaturesRequest(settings) | |
response = api.create_signatures(request) | |
print("file_path: " + response.file_info.file_path) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Image_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Move_File: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FileApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.MoveFileRequest("signaturedocs\\one-page.docx", "signaturedocs1\\one-page.docx", Common_Utilities.myStorage, Common_Utilities.myStorage) | |
api.move_file(request) | |
print("Expected response type is Void: 'signaturedocs/one-page.docx' file moved to 'signaturedocs1/one-page.docx'.") | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Move_Folder: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FolderApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.MoveFolderRequest("signaturedocs1", "signaturedocs1\\signaturedocs", Common_Utilities.myStorage, Common_Utilities.myStorage) | |
api.move_folder(request) | |
print("Expected response type is Void: 'signaturedocs1' folder moved to 'signaturedocs/signaturedocs1'.") | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Object_Exists: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_StorageApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.ObjectExistsRequest("signaturedocs\\one-page.docx", Common_Utilities.myStorage) | |
response = api.object_exists(request) | |
print("Expected response type is ObjectExist: " + str(response)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_QRCode_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SignQRCodeOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.signature_type = 'QRCode' | |
opts.text = 'GroupDocs.Signature Cloud' | |
opts.qr_code_type = 'Aztec' | |
# set signature position on a page | |
opts.left = 100 | |
opts.top = 100 | |
opts.width = 200 | |
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 = Padding() | |
opts.margin.all = 5 | |
opts.margin_measure_type = "Pixels" | |
# set signature appearance | |
opts.fore_color = Color() | |
opts.fore_color.web = "BlueViolet" | |
opts.border_color = Color() | |
opts.border_color.web = "DarkOrange" | |
opts.background_color = Color() | |
opts.background_color.web = "DarkOrange" | |
opts.opacity = 0.8 | |
opts.inner_margins = Padding() | |
opts.inner_margins.all = 2 | |
opts.border_visiblity = True | |
opts.border_dash_style = "Dash" | |
opts.border_weight = 12 | |
opts.page = 1 | |
opts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = SignSettings() | |
settings.options = [opts] | |
settings.save_options = SaveOptions() | |
settings.save_options.output_file_path = "signaturedocs\\signedQRCodeOne_page.docx" | |
settings.file_info = fileInfo | |
request = CreateSignaturesRequest(settings) | |
response = api.create_signatures(request) | |
print("file_path: " + response.file_info.file_path) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_QRCode_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Search_Barcode_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedBarcodeOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SearchBarcodeOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.page = 1 | |
opts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
opts.signature_type = 'Barcode' | |
opts.barcode_type = 'Code39Standard' | |
opts.text = '123456789012' | |
opts.match_type = 'Contains' | |
settings = SearchSettings() | |
settings.options = [opts] | |
settings.file_info = fileInfo | |
request = SearchSignaturesRequest(settings) | |
response = api.search_signatures(request) | |
print("Signatures length: " + str(len(response.signatures))) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Search_Barcode_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Search_Collection_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedCollectionOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
Digitalopts = SearchDigitalOptions() | |
Digitalopts.document_type = "WordProcessing" | |
# set signature properties | |
Digitalopts.signature_type = 'Digital' | |
Digitalopts.match_type = 'Contains' | |
Digitalopts.left = 100 | |
Digitalopts.top = 100 | |
Digitalopts.width = 200 | |
Digitalopts.height = 100 | |
Digitalopts.location_measure_type = "Pixels" | |
Digitalopts.size_measure_type = "Pixels" | |
Digitalopts.rotation_angle = 0 | |
Digitalopts.horizontal_alignment = "None" | |
Digitalopts.vertical_alignment = "None" | |
Digitalopts.margin = Padding() | |
Digitalopts.margin.all = 5 | |
Digitalopts.margin_measure_type = "Pixels" | |
Barcodeopts = SearchBarcodeOptions() | |
Barcodeopts.document_type = "WordProcessing" | |
# set signature properties | |
Barcodeopts.page = 1 | |
Barcodeopts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
Barcodeopts.pages_setup = ps | |
Barcodeopts.signature_type = 'Barcode' | |
Barcodeopts.barcode_type = 'Code39Standard' | |
Barcodeopts.text = '123456789012' | |
Barcodeopts.match_type = 'Contains' | |
settings = SearchSettings() | |
settings.options = [Digitalopts,Barcodeopts] | |
settings.file_info = fileInfo | |
request = SearchSignaturesRequest(settings) | |
response = api.search_signatures(request) | |
print("Signatures length: " + str(len(response.signatures))) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Search_Collection_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Search_Digital_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedDigitalOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SearchDigitalOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.signature_type = 'Digital' | |
opts.match_type = 'Contains' | |
opts.left = 100 | |
opts.top = 100 | |
opts.width = 200 | |
opts.height = 100 | |
opts.location_measure_type = "Pixels" | |
opts.size_measure_type = "Pixels" | |
opts.rotation_angle = 0 | |
opts.horizontal_alignment = "None" | |
opts.vertical_alignment = "None" | |
opts.margin = Padding() | |
opts.margin.all = 5 | |
opts.margin_measure_type = "Pixels" | |
settings = SearchSettings() | |
settings.options = [opts] | |
settings.file_info = fileInfo | |
request = SearchSignaturesRequest(settings) | |
response = api.search_signatures(request) | |
print("Signatures length: " + str(len(response.signatures))) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Search_Digital_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Search_QRCode_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedQRCodeOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SearchBarcodeOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.page = 1 | |
opts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
opts.signature_type = 'QRCode' | |
opts.match_type = 'Contains' | |
settings = SearchSettings() | |
settings.options = [opts] | |
settings.file_info = fileInfo | |
request = SearchSignaturesRequest(settings) | |
response = api.search_signatures(request) | |
print("Signatures length: " + str(len(response.signatures))) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Search_QRCode_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Stamp_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SignStampOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
opts.signature_type = 'Stamp' | |
opts.image_guid = "signaturedocs\\signature.jpg" | |
# set signature position on a page | |
opts.left = 100 | |
opts.top = 100 | |
opts.width = 300 | |
opts.height = 200 | |
opts.location_measure_type = "Pixels" | |
opts.size_measure_type = "Pixels" | |
opts.rotation_angle = 0 | |
opts.horizontal_alignment = "None" | |
opts.vertical_alignment = "None" | |
opts.margin = Padding() | |
opts.margin.all = 5 | |
opts.margin_measure_type = "Pixels" | |
# set signature appearance | |
opts.background_color = Color() | |
opts.background_color.web = "CornflowerBlue" | |
opts.background_color_crop_type = "InnerArea" | |
opts.background_image_crop_type = "MiddleArea" | |
opts.opacity = 0.8 | |
outline = StampLine() | |
outline.text = "John Smith" | |
outline.font = SignatureFont() | |
outline.font.font_family = "Arial" | |
outline.font.font_size = 12 | |
outline.font.bold = True | |
outline.font.italic = True | |
outline.font.underline = True | |
outline.text_bottom_intent = 5 | |
outline.text_color = Color() | |
outline.text_color.web = "Gold" | |
outline.text_repeat_type = "FullTextRepeat" | |
outline.background_color = Color() | |
outline.background_color.web = "BlueViolet" | |
outline.height = 20 | |
outline.inner_border = BorderLine() | |
outline.inner_border.color = Color() | |
outline.inner_border.color.web = "DarkOrange" | |
outline.inner_border.style = "LongDash" | |
outline.inner_border.transparency = 0.5 | |
outline.inner_border.weight = 1.2 | |
outline.outer_border = BorderLine() | |
outline.outer_border.color = Color() | |
outline.outer_border.color.web = "DarkOrange" | |
outline.outer_border.style = "LongDashDot" | |
outline.outer_border.transparency = 0.7 | |
outline.outer_border.weight = 1.4 | |
outline.visible = True | |
opts.outer_lines = [outline] | |
innerline = StampLine() | |
innerline.text = "John Smith" | |
innerline.font = SignatureFont() | |
innerline.font.font_family = "Times New Roman" | |
innerline.font.font_size = 20 | |
innerline.font.bold = True | |
innerline.font.italic = True | |
innerline.font.underline = True | |
innerline.text_bottom_intent = 3 | |
innerline.text_color = Color() | |
innerline.text_color.web = "Gold" | |
innerline.text_repeat_type = "None" | |
innerline.background_color = Color() | |
innerline.background_color.web = "CornflowerBlue" | |
innerline.height = 30 | |
innerline.inner_border = BorderLine() | |
innerline.inner_border.color = Color() | |
innerline.inner_border.color.web = "OliveDrab" | |
innerline.inner_border.style = "LongDash" | |
innerline.inner_border.transparency = 0.5 | |
innerline.inner_border.weight = 1.2 | |
innerline.outer_border = BorderLine() | |
innerline.outer_border.color = Color() | |
innerline.outer_border.color.web = "GhostWhite" | |
innerline.outer_border.style = "Dot" | |
innerline.outer_border.transparency = 0.4 | |
innerline.outer_border.weight = 1.4 | |
innerline.visible = True | |
opts.inner_lines = [innerline] | |
opts.page = 1 | |
opts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = SignSettings() | |
settings.options = [opts] | |
settings.save_options = SaveOptions() | |
settings.save_options.output_file_path = "signaturedocs\\signedStampOne_page.docx" | |
settings.file_info = fileInfo | |
request = CreateSignaturesRequest(settings) | |
response = api.create_signatures(request) | |
print("file_path: " + response.file_info.file_path) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Stamp_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Storage_Exist: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_StorageApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.StorageExistsRequest(Common_Utilities.myStorage) | |
response = api.storage_exists(request) | |
print("Expected response type is StorageExist: " + str(response)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Text_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\one-page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = SignTextOptions() | |
opts.document_type = "WordProcessing" | |
# set signature properties | |
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 = Padding() | |
opts.margin.all = 5 | |
opts.margin_measure_type = "Pixels" | |
# set signature appearance | |
opts.font = SignatureFont() | |
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 = Color() | |
opts.fore_color.web = "BlueViolet" | |
opts.border_color = Color() | |
opts.border_color.web = "DarkOrange" | |
opts.background_color = Color() | |
opts.background_color.web = "DarkOrange" | |
opts.border_visiblity = True | |
opts.border_dash_style = "Dash" | |
opts.page = 1 | |
opts.all_pages = False | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = SignSettings() | |
settings.options = [opts] | |
settings.save_options = SaveOptions() | |
settings.save_options.output_file_path = "signaturedocs\\signedTextOne_page.docx" | |
settings.file_info = fileInfo | |
request = CreateSignaturesRequest(settings) | |
response = api.create_signatures(request) | |
print("file_path: " + response.file_info.file_path) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Text_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Upload_File: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_FileApi_Instance() | |
try: | |
request = groupdocs_signature_cloud.UploadFileRequest("signaturedocs\\one-page.docx", "D:\\ewspace\\GroupDocs.Signature.Cloud.Python.Examples\\src\\Resources\\signaturedocs\\one-page.docx", Common_Utilities.myStorage) | |
response = api.upload_file(request) | |
print("Expected response type is FilesUploadResult: " + str(response)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception while calling API: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Verify_Barcode_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedBarcodeOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = VerifyBarcodeOptions() | |
# set signature properties | |
opts.document_type = "WordProcessing" | |
opts.signature_type = 'Barcode' | |
opts.text = '123456789012' | |
opts.barcode_type = 'Code39Standard' | |
opts.match_type = 'Contains' | |
opts.page = 1 | |
opts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = VerifySettings() | |
settings.options = [opts] | |
settings.file_info = fileInfo | |
request = VerifySignaturesRequest(settings) | |
response = api.verify_signatures(request) | |
print("Response File Info: " + str(response.file_info)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Verify_Barcode_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Verify_Collection_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedCollectionOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
Barcodeopts = VerifyBarcodeOptions() | |
# set signature properties | |
Barcodeopts.document_type = "WordProcessing" | |
Barcodeopts.signature_type = 'Barcode' | |
Barcodeopts.text = '123456789012' | |
Barcodeopts.barcode_type = 'Code39Standard' | |
Barcodeopts.match_type = 'Contains' | |
Barcodeopts.page = 1 | |
Barcodeopts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
Barcodeopts.pages_setup = ps | |
QRCodeopts = VerifyQRCodeOptions() | |
# set signature properties | |
QRCodeopts.document_type = "WordProcessing" | |
QRCodeopts.signature_type = 'QRCode' | |
QRCodeopts.text = 'GroupDocs.Signature Cloud' | |
QRCodeopts.qr_code_type = 'Aztec' | |
QRCodeopts.match_type = 'Contains' | |
QRCodeopts.page = 1 | |
QRCodeopts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
QRCodeopts.pages_setup = ps | |
settings = VerifySettings() | |
settings.options = [Barcodeopts,QRCodeopts] | |
settings.file_info = fileInfo | |
request = VerifySignaturesRequest(settings) | |
response = api.verify_signatures(request) | |
print("Response File Info: " + str(response.file_info)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Verify_Collection_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Verify_Digital_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedDigitalOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = VerifyDigitalOptions() | |
# set signature properties | |
opts.document_type = "WordProcessing" | |
opts.signature_type = 'Digital' | |
opts.page = 1 | |
opts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = VerifySettings() | |
settings.options = [opts] | |
settings.file_info = fileInfo | |
request = VerifySignaturesRequest(settings) | |
response = api.verify_signatures(request) | |
print("Response File Info: " + str(response.file_info)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Verify_Digital_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Verify_QRCode_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedQRCodeOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = VerifyQRCodeOptions() | |
# set signature properties | |
opts.document_type = "WordProcessing" | |
opts.signature_type = 'QRCode' | |
opts.text = 'GroupDocs.Signature Cloud' | |
opts.qr_code_type = 'Aztec' | |
opts.match_type = 'Contains' | |
opts.page = 1 | |
opts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = VerifySettings() | |
settings.options = [opts] | |
settings.file_info = fileInfo | |
request = VerifySignaturesRequest(settings) | |
response = api.verify_signatures(request) | |
print("Response File Info: " + str(response.file_info)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Verify_QRCode_Signature: {0}".format(e.message)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import modules | |
from groupdocs_signature_cloud import * | |
import groupdocs_signature_cloud | |
from Common_Utilities.Utils import Common_Utilities | |
class Signature_Python_Verify_Text_Signature: | |
@classmethod | |
def Run(self): | |
# Create instance of the API | |
api = Common_Utilities.Get_SignApi_Instance() | |
try: | |
fileInfo = FileInfo() | |
fileInfo.file_path = "signaturedocs\\signedTextOne_page.docx" | |
fileInfo.password = None | |
fileInfo.version_id = None | |
fileInfo.storage_name = Common_Utilities.myStorage | |
opts = VerifyTextOptions() | |
# set signature properties | |
opts.document_type = "WordProcessing" | |
opts.signature_type = 'Text' | |
opts.text = 'GroupDocs.Signature Cloud' | |
opts.match_type = 'Contains' | |
opts.page = 1 | |
opts.all_pages = True | |
ps = PagesSetup() | |
ps.even_pages = False | |
ps.first_page = True | |
ps.last_page = False | |
ps.odd_pages = False | |
ps.page_numbers = [1] | |
opts.pages_setup = ps | |
settings = VerifySettings() | |
settings.options = [opts] | |
settings.file_info = fileInfo | |
request = VerifySignaturesRequest(settings) | |
response = api.verify_signatures(request) | |
print("Response File Info: " + str(response.file_info)) | |
except groupdocs_signature_cloud.ApiException as e: | |
print("Exception when calling Signature_Python_Verify_Text_Signature: {0}".format(e.message)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment