Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.
↳ enable_image_quality_scores
bool
Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR responses are of poor quality for a given input. Adds additional latency comparable to regular OCR to the process call.
↳ advanced_ocr_options
array
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: -legacy_layout: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
↳ enable_symbol
bool
Includes symbol level OCR information if set to true.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Document Ai V1 Client - Class OcrConfig (2.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.0 (latest)](/php/docs/reference/cloud-document-ai/latest/V1.OcrConfig)\n- [2.2.2](/php/docs/reference/cloud-document-ai/2.2.2/V1.OcrConfig)\n- [2.1.3](/php/docs/reference/cloud-document-ai/2.1.3/V1.OcrConfig)\n- [2.0.0](/php/docs/reference/cloud-document-ai/2.0.0/V1.OcrConfig)\n- [1.14.0](/php/docs/reference/cloud-document-ai/1.14.0/V1.OcrConfig)\n- [1.13.1](/php/docs/reference/cloud-document-ai/1.13.1/V1.OcrConfig)\n- [1.12.2](/php/docs/reference/cloud-document-ai/1.12.2/V1.OcrConfig)\n- [1.9.0](/php/docs/reference/cloud-document-ai/1.9.0/V1.OcrConfig)\n- [1.8.2](/php/docs/reference/cloud-document-ai/1.8.2/V1.OcrConfig)\n- [1.7.0](/php/docs/reference/cloud-document-ai/1.7.0/V1.OcrConfig)\n- [1.6.0](/php/docs/reference/cloud-document-ai/1.6.0/V1.OcrConfig)\n- [1.5.0](/php/docs/reference/cloud-document-ai/1.5.0/V1.OcrConfig)\n- [1.4.0](/php/docs/reference/cloud-document-ai/1.4.0/V1.OcrConfig)\n- [1.3.0](/php/docs/reference/cloud-document-ai/1.3.0/V1.OcrConfig)\n- [1.2.2](/php/docs/reference/cloud-document-ai/1.2.2/V1.OcrConfig)\n- [1.1.1](/php/docs/reference/cloud-document-ai/1.1.1/V1.OcrConfig)\n- [1.0.1](/php/docs/reference/cloud-document-ai/1.0.1/V1.OcrConfig) \nReference documentation and code samples for the Google Cloud Document Ai V1 Client class OcrConfig.\n\nConfig for Document OCR.\n\nGenerated from protobuf message `google.cloud.documentai.v1.OcrConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DocumentAI \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHints\n\nHints for the OCR model.\n\n### hasHints\n\n### clearHints\n\n### setHints\n\nHints for the OCR model.\n\n### getEnableNativePdfParsing\n\nEnables special handling for PDFs with existing text information. Results\nin better text extraction quality in such PDF inputs.\n\n### setEnableNativePdfParsing\n\nEnables special handling for PDFs with existing text information. Results\nin better text extraction quality in such PDF inputs.\n\n### getEnableImageQualityScores\n\nEnables intelligent document quality scores after OCR. Can help with\ndiagnosing why OCR responses are of poor quality for a given input.\n\nAdds additional latency comparable to regular OCR to the process call.\n\n### setEnableImageQualityScores\n\nEnables intelligent document quality scores after OCR. Can help with\ndiagnosing why OCR responses are of poor quality for a given input.\n\nAdds additional latency comparable to regular OCR to the process call.\n\n### getAdvancedOcrOptions\n\nA list of advanced OCR options to further fine-tune OCR behavior. Current\nvalid values are:\n\n- `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm.\n\nCustomers can choose the best suitable layout algorithm based on their\nsituation.\n\n### setAdvancedOcrOptions\n\nA list of advanced OCR options to further fine-tune OCR behavior. Current\nvalid values are:\n\n- `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm.\n\nCustomers can choose the best suitable layout algorithm based on their\nsituation.\n\n### getEnableSymbol\n\nIncludes symbol level OCR information if set to true.\n\n### setEnableSymbol\n\nIncludes symbol level OCR information if set to true.\n\n### getComputeStyleInfo\n\nTurn on font identification model and return font style information.\n\nDeprecated, use\n[PremiumFeatures.compute_style_info](/php/docs/reference/cloud-document-ai/latest/V1.OcrConfig.PremiumFeatures#_Google_Cloud_DocumentAI_V1_OcrConfig_PremiumFeatures__getComputeStyleInfo__)\ninstead.\n\n### setComputeStyleInfo\n\nTurn on font identification model and return font style information.\n\nDeprecated, use\n[PremiumFeatures.compute_style_info](/php/docs/reference/cloud-document-ai/latest/V1.OcrConfig.PremiumFeatures#_Google_Cloud_DocumentAI_V1_OcrConfig_PremiumFeatures__getComputeStyleInfo__)\ninstead.\n\n### getDisableCharacterBoxesDetection\n\nTurn off character box detector in OCR engine. Character box detection is\nenabled by default in OCR 2.0 (and later) processors.\n\n### setDisableCharacterBoxesDetection\n\nTurn off character box detector in OCR engine. Character box detection is\nenabled by default in OCR 2.0 (and later) processors.\n\n### getPremiumFeatures\n\nConfigurations for premium OCR features.\n\n### hasPremiumFeatures\n\n### clearPremiumFeatures\n\n### setPremiumFeatures\n\nConfigurations for premium OCR features."]]