Search Barcode Signature

Note
Note:  The features listed on this page are supported only in GroupDocs.Signature Cloud V1

GroupDocs.Signature Cloud REST API supports to search Barcode signatures in supported document formats. It provides method to search Barcode Signature in Document Pages with different options barcodeType, Name, text, matchType and other search features by using Search Options Object data in request body.

Search Barcode Signature

You can search Barcode Signature on Document provided by fileName and document folder (if required) using following API. It expects Search Options Object data in request body.

It returns an object which contains document name, folder location and search result.

Resource

The following GroupDocs.Signature Cloud REST API resource has been used in the example to search Barcode signature in a document.

cURL example

curl --request POST \
--url http://api.groupdocs.cloud/v1/signature/SignedForVerificationAll.xlsx/barcode/search?folder#signed \
--header 'authorization: [Access Token]' \
--header 'content-type: application/json' \
--data '{ "barcodeTypeName": "Code39Standard", "text": "123456789012", "matchType": "Contains", "documentPageNumber": 1, "pagesSetup": { "firstPage": true, "lastPage": false, "oddPages": false, "evenPages": false, "pageNumbers": [ 1 ] }, "searchAllPages": true, "OptionsType": "CellsSearchBarcodeOptionsData" }'
{
  "signatures": [
    {
      "barcodeTypeName": "Code39Standard",
      "text": "123456789012",
      "signatureType": "CellsBarcodeSignatureData"
    },
    {
      "barcodeTypeName": "Code39Standard",
      "text": "123456789012",
      "signatureType": "CellsBarcodeSignatureData"
    }
  ],
  "fileName": "SignedForVerificationAll.xlsx",
  "folder": "cells",
  "code": 200,
  "status": "OK"
}

SDK examples

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.

//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
var configuration = new Configuration
{
AppSid = Sid,
AppKey = Key
};
var apiInstance = new SignatureApi(configuration);
try
{
var searchOptionsData = new CellsSearchBarcodeOptionsData()
{
DocumentPageNumber = 1,
BarcodeTypeName = "Code39Standard",
MatchType = SearchBarcodeOptionsData.MatchTypeEnum.Contains,
Text = "123456789012",
SearchAllPages = true
};
var request = new PostSearchBarcodeRequest
{
Name = "SignedForVerificationAll.xlsx",
SearchOptionsData = searchOptionsData,
Password = null,
Folder = "signed"
};
var response = apiInstance.PostSearchBarcode(request);
Debug.Print("FleName: " + response.FileName);
Debug.Print("Result: " + response.Status);
}
catch (Exception e)
{
Debug.Print("Exception when searching barcode signature: " + e.Message);
}
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
$configuration = new Configuration();
$configuration->setAppSid($sid);
$configuration->setAppKey($key);
$signatureApi = new SignatureApi($configuration);
try {
// set options properties
$options = new \GroupDocs\Signature\Model\PdfSearchBarcodeOptionsData();
$options->setBarcodeTypeName("Code39Standard");
$options->setMatchType("Contains");
$options->setSearchAllPages(true);
$options->setText("123456789012");
$request = new Requests\PostSearchBarcodeRequest("SignedForVerificationAll.pdf",$options,null,"signed");
$response = $signatureApi->postSearchBarcode($request);
echo "File Name: ", $response->getFileName(), "\n";
echo "Result: ", $response->getStatus();
} catch (Exception $e) {
echo "Something went wrong: ", $e->getMessage(), "\n";
PHP_EOL;
}
package Examples;
import com.groupdocs.cloud.signature.client.*;
import com.groupdocs.cloud.signature.model.*;
import com.groupdocs.cloud.signature.model.requests.*;
import com.groupdocs.cloud.signature.api.SignatureApi;
public class Signature_Java_Search_Signature_Barcode {
public static void main(String[] args) {
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
String appSid = "XXX-XXXXXXX-XXXX";
String appKey = "XXXXXXXXXXXXX";
SignatureApi apiInstance = new SignatureApi(appSid, appKey);
try {
CellsSearchBarcodeOptionsData searchOptionsData = new CellsSearchBarcodeOptionsData();
searchOptionsData.setDocumentPageNumber(1);
searchOptionsData.setBarcodeTypeName("Code39Standard");
searchOptionsData.setMatchType(SearchBarcodeOptionsData.MatchTypeEnum.CONTAINS);
searchOptionsData.setText("123456789012");
searchOptionsData.setSearchAllPages(true);
PostSearchBarcodeRequest request = new PostSearchBarcodeRequest();
request.setName("with-overflowed-text.xlsx");
request.setPassword("");
request.setStorage("MyStorage");
request.setSearchOptionsData(searchOptionsData);
SearchDocumentResponse response = apiInstance.postSearchBarcode(request);
System.out.println("FleName: " + response.getFileName());
System.out.println("Status: " + response.getStatus());
} catch (ApiException e) {
System.err.println("Exception when calling SignatureApi#postSearchBarcode");
e.printStackTrace();
}
}
}
# Import module
from groupdocs_signature_cloud.rest import ApiException
from Common_Utilities.Utils import Common_Utilities
from groupdocs_signature_cloud.models.cells_search_barcode_options_data import CellsSearchBarcodeOptionsData
from groupdocs_signature_cloud.models.requests.post_search_barcode_request import PostSearchBarcodeRequest
class Search_Signature_Barcode:
@staticmethod
def Post_Search_Signature_Barcode():
try:
# Getting instance of the API
api = Common_Utilities.Get_SignatureApi_Instance();
fileName = "with-overflowed-text.xlsx"
password = ""
folder = ""
options = CellsSearchBarcodeOptionsData()
# set barcode properties
options.barcode_type_name ="Code39Standard"
options.text = "12345678"
# set match type
options.match_type ="Contains"
#set pages for search
options.document_page_number = 1
request = PostSearchBarcodeRequest(fileName, options, password, folder, Common_Utilities.storage_name)
response = api.post_search_barcode(request)
print("Searched Count: " + str(len(response.signatures)));
except ApiException as e:
print("Exception when calling SignatureApi: {0}".format(e.message))
# Load the gem
require 'groupdocs_signature_cloud'
require 'groupdocs_signature_cloud/models/cells_search_barcode_options_data.rb'
require 'groupdocs_signature_cloud/models/requests/post_barcode_request.rb'
require 'common_utilities/Utils.rb'
class Search_Signature_Barcode
def self.Post_Search_Signature_Barcode()
# Getting instance of the API
api = Common_Utilities.Get_SignatureApi_Instance()
fileName = "with-overflowed-text.xlsx"
password = ""
folder = ""
options = GroupDocsSignatureCloud::CellsSearchBarcodeOptionsData.new()
# set barcode properties
options.barcode_type_name ="Code39Standard"
options.text = "12345678"
# set match type
options.match_type ="Contains"
#set pages for search
options.document_page_number = 1
request = GroupDocsSignatureCloud::PostSearchBarcodeRequest.new(fileName, options, password, folder, $storage_name)
response = api.post_search_barcode(request)
puts("Searched Count: " + ((response.signatures).length).to_s)
end
end

Search Barcode Signature in Document at Provided URL

You can search Barcode Signature for a Document at provided URL using following API.

It retrieves file from specified URL and tries to detect file type when fileName parameter is not specified. It expects search-options-objects object data in request body.

Based on passed Search Options settings proceeds with Document searching, it returns object which contains result of searching process.

Resource

The following GroupDocs.Signature Cloud REST API resource has been used in the example to search Barcode signature in a document at provided URL.

cURL example

curl --request POST \
--url http://api.groupdocs.cloud/v1/signature/barcode/search?url#https%3a%2f%2fwww.dropbox.com%2fs%2fumokluz338w4ng7%2fone-page.docx%3fdl%3d1 \
--header 'authorization: [Access Token]' \
--header 'content-type: application/json' \
--data '{ "BarcodeTypeName" : "Code128",  "MatchType" : "Contains",  "DocumentPageNumber": 1,  "Text": "John Smith",  "SearchAllPages" : true,  "OptionsType" : "WordsSearchBarcodeOptionsData" }'
{
  "fileName": "one-page.docx",
  "folder": "Output",
  "Code": "OK",
  "Status" : "OK",
  "Signatures" : [
    { BarcodeTypeName: "Code128", Text: "John Smith" },
    { BarcodeTypeName: "Code128", Text: "John Smith esq." }
    ]
}

SDK examples

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.

//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
var configuration = new Configuration
{
AppSid = Sid,
AppKey = Key
};
var apiInstance = new SignatureApi(configuration);
try
{
var searchOptionsData = new CellsSearchBarcodeOptionsData()
{
DocumentPageNumber = 1,
BarcodeTypeName = "Code39Standard",
MatchType = SearchBarcodeOptionsData.MatchTypeEnum.Contains,
Text = "123456789012",
SearchAllPages = true
};
var request = new PostSearchBarcodeFromUrlRequest
{
Url = "https://www.dropbox.com/s/o9k7gweapq8k15l/SignedForVerificationAll.xlsx?dl=1",
Password = null,
SearchOptionsData = searchOptionsData
};
var response = apiInstance.PostSearchBarcodeFromUrl(request);
Debug.Print("FleName: " + response.FileName);
Debug.Print("Result: " + response.Status);
}
catch (Exception e)
{
Debug.Print("Exception when searching barcode signature: " + e.Message);
}
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
$configuration = new Configuration();
$configuration->setAppSid($sid);
$configuration->setAppKey($key);
$signatureApi = new SignatureApi($configuration);
try {
// set options properties
$options = new \GroupDocs\Signature\Model\PdfSearchBarcodeOptionsData();
$options->setBarcodeTypeName("Code39Standard");
$options->setMatchType("Contains");
$options->setSearchAllPages(true);
$options->setText("123456789012");
$request = new Requests\PostSearchBarcodeFromUrlRequest("https://www.dropbox.com/s/7yi03ieximjrh1y/SignedForVerificationAll.pdf?dl=1",$options,null,null);
$response = $signatureApi->postSearchBarcodeFromUrl($request);
echo "File Name: ", $response->getFileName(), "\n";
echo "Result: ", $response->getStatus();
} catch (Exception $e) {
echo "Something went wrong: ", $e->getMessage(), "\n";
PHP_EOL;
}
package Examples;
import com.groupdocs.cloud.signature.client.*;
import com.groupdocs.cloud.signature.model.*;
import com.groupdocs.cloud.signature.model.requests.*;
import com.groupdocs.cloud.signature.api.SignatureApi;
public class Signature_Java_Search_Signature_Barcode_URL {
public static void main(String[] args) {
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
String appSid = "XXX-XXXXXXX-XXXX";
String appKey = "XXXXXXXXXXXXX";
SignatureApi apiInstance = new SignatureApi(appSid, appKey);
try {
CellsSearchBarcodeOptionsData searchOptionsData = new CellsSearchBarcodeOptionsData();
searchOptionsData.setDocumentPageNumber(1);
searchOptionsData.setBarcodeTypeName("Code39Standard");
searchOptionsData.setMatchType(SearchBarcodeOptionsData.MatchTypeEnum.CONTAINS);
searchOptionsData.setText("123456789012");
searchOptionsData.setSearchAllPages(true);
PostSearchBarcodeFromUrlRequest request = new PostSearchBarcodeFromUrlRequest();
request.setUrl("https://www.dropbox.com/s/o9k7gweapq8k15l/SignedForVerificationAll.xlsx?dl=1");
request.setPassword("");
request.setStorage("MyStorage");
request.setSearchOptionsData(searchOptionsData);
SearchDocumentResponse response = apiInstance.postSearchBarcodeFromUrl(request);
System.out.println("FleName: " + response.getFileName());
System.out.println("Status: " + response.getStatus());
} catch (ApiException e) {
System.err.println("Exception when calling SignatureApi#postSearchBarcodeFromUrl");
e.printStackTrace();
}
}
}
# Import module
from groupdocs_signature_cloud.rest import ApiException
from Common_Utilities.Utils import Common_Utilities
from groupdocs_signature_cloud.models.cells_search_barcode_options_data import CellsSearchBarcodeOptionsData
from groupdocs_signature_cloud.models.requests.post_search_barcode_from_url_request import PostSearchBarcodeFromUrlRequest
class Search_Signature_Barcode_From_Url:
@staticmethod
def Post_Search_Signature_Barcode_From_Url():
try:
# Getting instance of the API
api = Common_Utilities.Get_SignatureApi_Instance();
Url = "https://www.dropbox.com/s/o9k7gweapq8k15l/SignedForVerificationAll.xlsx?dl=1"
password = ""
options = CellsSearchBarcodeOptionsData()
# set barcode properties
options.barcode_type_name ="Code39Standard"
options.text = "12345678"
# set match type
options.match_type ="Contains"
#set pages for search
options.document_page_number = 1
request = PostSearchBarcodeFromUrlRequest(Url, options, password, Common_Utilities.storage_name)
response = api.post_search_barcode_from_url(request)
print("Searched Count: " + str(len(response.signatures)));
except ApiException as e:
print("Exception when calling SignatureApi: {0}".format(e.message))
# Load the gem
require 'groupdocs_signature_cloud'
require 'groupdocs_signature_cloud/models/cells_search_barcode_options_data.rb'
require 'groupdocs_signature_cloud/models/padding_data.rb'
require 'groupdocs_signature_cloud/models/pages_setup_data.rb'
require 'groupdocs_signature_cloud/models/requests/post_barcode_from_url_request.rb'
require 'groupdocs_signature_cloud/models/color.rb'
require 'common_utilities/Utils.rb'
class Search_Signature_Barcode_From_Url
def self.Post_Search_Signature_Barcode_From_Url()
# Getting instance of the API
api = Common_Utilities.Get_SignatureApi_Instance()
url = "https://www.dropbox.com/s/o9k7gweapq8k15l/SignedForVerificationAll.xlsx?dl=1"
password = ""
options = GroupDocsSignatureCloud::CellsSearchBarcodeOptionsData.new()
# set barcode properties
options.barcode_type_name ="Code39Standard"
options.text = "12345678"
# set match type
options.match_type ="Contains"
#set pages for search
options.document_page_number = 1
request = GroupDocsSignatureCloud::PostSearchBarcodeFromUrlRequest.new(url, options, password, $storage_name)
response = api.post_search_barcode_from_url(request)
puts("Searched Count: " + ((response.signatures).length).to_s)
end
end