Browser-based Google Document AI Enterprise OCR for scanned PDFs. Supports synchronous OCR for smaller files and batch OCR via Cloud Storage for larger files, then rebuilds a searchable PDF with an invisible text layer.
This page uses OAuth 2.0 redirect flow with no popup window. It requests a cloud-platform access token and calls Google APIs directly from the browser.
Important: true multilingual searchable PDF generation in the browser needs a Unicode-capable font. This page therefore loads a remote CJK font at runtime for overlay text.
Bucket setup: batch mode requires Cloud Storage CORS that allows qaocr2.pages.dev to send authenticated PUT/POST/GET/OPTIONS requests.
Rotation: Enterprise OCR supports rotation correction for extraction. This page separately tries to rotate the final output visually using the page orientation metadata.
https://qaocr2.pages.dev to Authorized JavaScript origins for this OAuth web client.https://qaocr2.pages.dev in Authorized redirect URIs.qaocr_ocrbuckets.Suggested bucket CORS example for direct SPA uploads/downloads:
[
{
"origin": ["https://qaocr2.pages.dev"],
"method": ["GET", "HEAD", "PUT", "POST", "OPTIONS"],
"responseHeader": [
"Authorization",
"Content-Type",
"Content-Length",
"Content-Range",
"X-Upload-Content-Type",
"X-Upload-Content-Length",
"x-goog-resumable",
"x-goog-meta-*"
],
"maxAgeSeconds": 3600
}
]