Text Inspection
π API Reference: https://verify-automation.globalvision.co/reference/createtextjob
This feature compares the textual content of provided files at the Unicode character level, enabling precise identification of differences to ensure content accuracy and consistency across versions.
Inspection Features (API Input)
You can leverage any of the features below to prepare your inspection:
Feature | API Parameter Example |
Document ID (required) |
CODE
{
"documentId": "your_doc_ID"
}
|
Preform OCR | |
Layers Visibility For both Master and Sample objects By default, all layers are visible. Configures which layers in a document are visible during the inspection process. This is especially relevant for files that contain multiple or complex layers, such as PDF or design files.
|
CODE
"layersVisibility": [
{
"name": "layer1",
"visible": false
},
{
"name": "layer2",
"visible": false
}
]
|
Shape to Selected Layer For both Master and Sample objects Defines an object for cropping the inspection region based on a selected layer's shape. All visible layers within this area will be included in the inspection, allowing you to focus the analysis on specific zones of interest.
|
CODE
"shapeTo": {
"selectedLayerName": "layer1"
}
|
PDF Box Type For both Master and Sample objects Sets the PDF box used to crop the document for inspection. Options are: CropBox , MediaBox , BleedBox , TrimBox , and ArtBox . Choosing the appropriate box helps focus the inspection on the desired content area and can improve accuracy by excluding irrelevant margins or marks.
|
CODE
"pdfBoxType": "CropBox"
|
Report Type |
CODE
"reportType": "default"
|
Annotated Report Source |
CODE
{
"annotatedReportSource": "sample",
"reportType": "default"
|
Inspection Results (API Output)
Inspection Result | API Output Example |
---|
Report URL |
CODE
"reportUrl": "https://verify-automation-api.globalvision.co/files/automation-report?fileKey=PDF_File_Key"
|
XFDF Reports |
CODE
"xfdfReports": {
"master": https://verify-automation-api.globalvision.co/files/automation-report?fileKey=XFDF_File_key,
"sample": "https://verify-automation-api.globalvision.co/files/automation-report?fileKey=XFDF_File_key"
{
|
Text Differences Individual Differences Every difference found by the text inspection will be shown with the following info: Indexes (Index and diffIndex ) to individually identify each difference differenceType specifies the type of text difference found
Info for both the Master and Sample objects
|
NONE
{
"differenceType": "Change",
"index": 0,
"master": {
"grid": "500mg",
"location": {
"boundingBox": {
"bottom": 399.03,
"left": 292.148,
"right": 317.873,
"top": 391.361
},
"pageNumber": 1
},
"text": "500mg"
},
"sample": {
"grid": "500ml",
"location": {
"boundingBox": {
"bottom": 399.03,
"left": 292.148,
"right": 315.483,
"top": 391.361
},
"pageNumber": 1
},
"text": "500ml"
},
"diffIndex": 1
}
|
Text Inspection Summary |
NONE
"textDifferencesAmount": 7,
"textDifferencesMeta": {
"master": {
"wordCount": 238
},
"sample": {
"wordCount": 238
}
}
|