Skip to main content
Google Cloud
Documentation Technology areas
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
Cross-product tools
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
Related sites
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
/
  • English
  • Deutsch
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português – Brasil
  • 中文 – 简体
  • 日本語
  • 한국어
Console Sign in
  • Pub/Sub
Overview Guides Reference Samples Resources
Contact Us Start free
Google Cloud
  • Documentation
    • Overview
    • Guides
    • Reference
    • Samples
    • Resources
  • Technology areas
    • More
  • Cross-product tools
    • More
  • Related sites
    • More
  • Console
  • Contact Us
  • Start free
  • Discover
  • Product overview
  • Choose Pub/Sub or Cloud Managed Service for Apache Kafka
  • Choose Pub/Sub or Cloud Tasks
  • Pub/Sub architectural overview
  • Pub/Sub reliability
  • Pub/Sub Lite documentation
  • Get started
  • Pub/Sub service overview
  • Publish and subscribe with client libraries
  • Publish and subscribe with the gcloud CLI
  • Publish and subscribe with the console
  • Secure and control access
  • Authenticate to Pub/Sub
  • Access control for Pub/Sub
  • Configure message encryption
  • Configure message storage policies
  • Publish messages
  • Publish message overview
  • Create a topic
    • Standard topic
    • Amazon Kinesis Data Streams import topic
    • Cloud Storage import topic
    • Azure Event Hubs import topic
    • Amazon Managed Streaming for Apache Kafka (MSK) import topic
    • Confluent Cloud import topic
  • Manage topics
    • Change topic type
    • Delete topics
    • List topics
  • Publish messages
  • Configure publishing options
    • Compress messages
    • Retry requests
    • Flow control
    • Concurrency control
    • Batch messaging
  • Use schemas
    • Schema overview
    • Create a schema
    • Associate a schema with a topic
    • Publish messages to a topic with a schema
    • Manage schemas
      • Commit a schema revision
      • Delete a schema
      • Delete a schema revision
      • List schemas
      • List revisions of a schema
      • Roll back a schema revision
      • View schema details
      • Validate a schema definition
      • Validate a message for a schema
  • Best practices for publishing
  • Receive messages
  • Subscription overview
  • Choose a subscription type
  • How subscriptions work
    • Pull subscriptions
    • Push subscriptions
    • BigQuery subscriptions
    • Cloud Storage subscriptions
  • Create a subscription
    • Pull subscription
    • Push subscription
    • BigQuery subscription
    • Cloud Storage subscription
  • Manage subscriptions
    • Change subscription type
    • List subscriptions
    • Detatch a subscription from a topic
    • Delete subscriptions
  • Configure delivery options
    • Flow control
    • Handle message failures
    • Replay and purge messages
    • Lease management
    • Order messages
    • Filter messages
    • Validate schemas
    • Exactly-once delivery
    • Concurrency control
    • Authentication for push subscriptions
    • Payload unwrapping
  • Best practices for subscribing
  • Monitor and audit
  • Monitor Pub/Sub in Cloud Monitoring
  • Monitor topics within Pub/Sub
  • Monitor subscriptions within Pub/Sub
  • View Pub/Sub audit logs
  • View Pub/Sub reports with labels
  • Use OpenTelemetry tracing
  • Best practices for metrics in scaling
  • Build Pub/Sub systems
  • Build a one-to-many Pub/Sub system
  • Replay messages with seek
  • Migrate from Kafka to Pub/Sub
  • Test and integrate
  • Test locally with Pub/Sub emulator
  • Connect Pub/Sub to Apache Kafka
  • Pub/Sub in Spring applications
  • Pub/Sub with Cloud Run
  • Integrate Pub/Sub with Cloud Functions
    • Pub/Sub triggers in Cloud Functions
    • Optical Character Recognition (OCR)
  • Integrate Pub/Sub with Dataflow
    • Stream from Pub/Sub to Cloud Storage with Dataflow
    • Stream from Pub/Sub to BigQuery
    • Stream with Pub/Sub and Dataflow
    • Stream logs to Splunk using Pub/Sub and Dataflow
  • Work with messages in App Engine
  • Stream Pub/Sub messages over WebSockets
  • Troubleshoot
  • General troubleshooting
  • Troubleshooting with audit logs
  • Troubleshoot topics
    • Troubleshoot standard topics
    • Troubleshoot import topics
      • Use platform logs to troubleshoot import topics
      • Troubleshoot Amazon Kinesis Data Streams import topics
      • Troubleshoot Cloud Storage import topics
      • Troubleshoot Azure Events Hub import topics
      • Troubleshoot Amazon MSK import topics
      • Troubleshoot Confluent Cloud import topics
  • Troubleshoot subscriptions
    • Troubleshoot pull subscriptions
    • Troubleshoot push subscriptions
    • Troubleshoot push payload unwrapping
    • Troubleshoot BigQuery subscriptions
    • Troubleshoot Cloud Storage subscriptions
  • Troubleshoot with GCPDiag
    • Troubleshoot pull subscriptions with GCPDiag
  • Code samples
  • Pub/Sub code samples
  • AI and ML
  • Application development
  • Application hosting
  • Compute
  • Data analytics and pipelines
  • Databases
  • Distributed, hybrid, and multicloud
  • Generative AI
  • Industry solutions
  • Networking
  • Observability and monitoring
  • Security
  • Storage
  • Access and resources management
  • Costs and usage management
  • Google Cloud SDK, languages, frameworks, and tools
  • Infrastructure as code
  • Migration
  • Google Cloud Home
  • Free Trial and Free Tier
  • Architecture Center
  • Blog
  • Contact Sales
  • Google Cloud Developer Center
  • Google Developer Center
  • Google Cloud Marketplace
  • Google Cloud Marketplace Documentation
  • Google Cloud Skills Boost
  • Google Cloud Solution Center
  • Google Cloud Support
  • Google Cloud Tech Youtube Channel
  • Home
  • Pub/Sub
  • Documentation
  • Guides

Pub/Sub Optical Character Recognition (OCR) tutorial
Stay organized with collections Save and categorize content based on your preferences.

Learn how to perform optical character recognition (OCR) on Google Cloud Platform by using Pub/Sub and various other Google Cloud services.

To learn how to combine these services, see Optical Character Recognition (OCR) Tutorial (2nd gen).

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-04-17 UTC.

  • Why Google

    • Choosing Google Cloud
    • Trust and security
    • Modern Infrastructure Cloud
    • Multicloud
    • Global infrastructure
    • Customers and case studies
    • Analyst reports
    • Whitepapers
  • Products and pricing

    • See all products
    • See all solutions
    • Google Cloud for Startups
    • Google Cloud Marketplace
    • Google Cloud pricing
    • Contact sales
  • Support

    • Google Cloud Community
    • Support
    • Release Notes
    • System status
  • Resources

    • GitHub
    • Getting Started with Google Cloud
    • Google Cloud documentation
    • Code samples
    • Cloud Architecture Center
    • Training and Certification
    • Developer Center
  • Engage

    • Blog
    • Events
    • X (Twitter)
    • Google Cloud on YouTube
    • Google Cloud Tech on YouTube
    • Become a Partner
    • Google Cloud Affiliate Program
    • Press Corner
  • About Google
  • Privacy
  • Site terms
  • Google Cloud terms
  • Manage cookies
  • Our third decade of climate action: join us
  • Sign up for the Google Cloud newsletter Subscribe
  • English
  • Deutsch
  • Español – América Latina
  • Français
  • Indonesia
  • Italiano
  • Português – Brasil
  • 中文 – 简体
  • 日本語
  • 한국어