Skip to main content
Skip table of contents

Text Inspection

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)

  • For both Master and Sample objects

  • Leverage this parameter to inform the ID of the file you want to inspect.

CODE
{
  "documentId": "your_doc_ID"
}

Preform OCR

  • Defaults to: False

  • Set to true to perform optical character recognition (OCR) when running a text inspection.

  • This feature is particularly useful when one or both files don’t have any live text.

CODE
"performOCR": false

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

  • Defaults to: Default

  • Determines the format and content of the PDF inspection report.

  • Options:

    • default: Includes summary, thumbnails, and annotated report.

    • summaryAnnotated: Includes only the summary and annotated report (no thumbnails).

CODE
"reportType": "default"

Annotated Report Source

  • Defaults to: Sample

  • Source of the annotated report, valid options are master or sample. Will be used only if reportType is summaryAnnotated. master can only be used if the inspection is a compare inspection (master and sample are provided).

CODE
{
      "annotatedReportSource": "sample",
      "reportType": "default"

Inspection Results (API Output)

The official output of this API endpoint will be the Job ID. Use this ID to access all the inspection details described below.

Inspection Result

API Output Example

Report URL

  • Link to the generated PDF inspection report.

  • The content of this report is determined by the reportType parameter.

CODE
"reportUrl": "https://verify-automation-api.globalvision.co/files/automation-report?fileKey=PDF_File_Key"

XFDF Reports

  • Links to XFDF annotation files for both master and sample documents (if available), which can be used for further integration with PDF viewers or automated review systems.

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

    • grid and text detail the text word/expression flagged

    • location -> bounding box and pageNumber specifies the coordinates of the word in the master and sample files

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

  • textDifferencesAmount shows the number of differences found by the text inspection

  • textDifferencesMeta contains the word count for both the Master and Sample files

NONE
"textDifferencesAmount": 7,
"textDifferencesMeta": {
    "master": {
        "wordCount": 238
         },
     "sample": {
        "wordCount": 238
         }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.