{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudmersive/json-schema/cloudmersive-pdf-to-lines-with-location-result-schema.json",
  "title": "PdfToLinesWithLocationResult",
  "description": "Response from an OCR to lines with location operation.  Includes the confience rating and converted text result, along with the locations of the lines in the pages.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudmersive-pdfocr-api-openapi.yml#/components/schemas/PdfToLinesWithLocationResult",
  "type": "object",
  "properties": {
    "Successful": {
      "description": "True if successful, false otherwise",
      "type": "boolean"
    },
    "OcrPages": {
      "description": "OCR results for each page",
      "type": "array",
      "items": {
        "$ref": "#/$defs/OcrPageResultWithLinesWithLocation"
      }
    }
  },
  "$defs": {
    "OcrLineElement": {
      "description": "A contiguous line of text in an OCR document",
      "type": "object",
      "properties": {
        "LineText": {
          "description": "Text of the line",
          "type": "string"
        },
        "Words": {
          "description": "Word objects in the line",
          "type": "array",
          "items": {
            "$ref": "#/$defs/OcrWordElement"
          }
        }
      }
    },
    "OcrPageResultWithLinesWithLocation": {
      "description": "OCR results of a page, including lines of text and their location",
      "type": "object",
      "properties": {
        "PageNumber": {
          "format": "int32",
          "description": "Page number of the page that was OCR-ed, starting with 1 for the first page in the PDF file",
          "type": "integer"
        },
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "Lines": {
          "description": "Word elements in the image",
          "type": "array",
          "items": {
            "$ref": "#/$defs/OcrLineElement"
          }
        }
      }
    },
    "OcrWordElement": {
      "description": "A single word in an OCR document",
      "type": "object",
      "properties": {
        "WordText": {
          "description": "Text of the word",
          "type": "string"
        },
        "LineNumber": {
          "format": "int32",
          "description": "Line number of the word",
          "type": "integer"
        },
        "WordNumber": {
          "format": "int32",
          "description": "Index of the word in the line",
          "type": "integer"
        },
        "XLeft": {
          "format": "int32",
          "description": "X location of the left edge of the word in pixels",
          "type": "integer"
        },
        "YTop": {
          "format": "int32",
          "description": "Y location of the top edge of the word in pixels",
          "type": "integer"
        },
        "Width": {
          "format": "int32",
          "description": "Width of the word in pixels",
          "type": "integer"
        },
        "Height": {
          "format": "int32",
          "description": "Height of the word in pixels",
          "type": "integer"
        },
        "ConfidenceLevel": {
          "format": "double",
          "description": "Confidence level of the machine learning result; possible values are 0.0 (lowest accuracy) - 1.0 (highest accuracy)",
          "type": "number"
        },
        "BlockNumber": {
          "format": "int32",
          "description": "Index of the containing block",
          "type": "integer"
        },
        "ParagraphNumber": {
          "format": "int32",
          "description": "Index of the containing paragraph",
          "type": "integer"
        },
        "PageNumber": {
          "format": "int32",
          "description": "Index of the containing page",
          "type": "integer"
        }
      }
    }
  }
}