Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
What is Google Cloud Print?
Most print systems require specific drivers for each printer. Finding drivers can be a chore, and one driver doesn't work for all operating systems. Google Cloud Print can be described concisely as "driverless printing".
- GCP printers describe themselves with JSON-encoded data structures.
- Clients submit print jobs with JSON-encoded data structures; payloads are PDF, Postscript or PWG Raster.
Printers and clients can communicate in two different ways, each with pros and cons.
Printers that communicate via the GCP backend service require an Internet connection to function:
- The GCP cloud service manages printers, print jobs and sharing.
- must have explicit permission granted by the printer owner, in order to discover printers and submit jobs.
- submit print jobs with an HTTPS request.
- submit print jobs from anywhere that has an Internet connection.
Three network connections are created by the printer:
|server DNS name||port||protocol||function|
||443||HTTPS||authenticate with OAuth 2.0|
||443||HTTPS||register with, receive print jobs from GCP backend|
||443||TLS-encapsulated XMPP||receive print job notifications|
Clients create one network connection to https://www.google.com/cloudprint to discover printers and create print jobs.
Local mode is a lot like AirPrint. Printers that communicate locally are great for homes and small companies:
- discover printers when they are on the same subnet (connect to an access point where the printer lives)
- forget printers when they are not on the same subnet (disconnect from the access point)
- print by communicating directly with the printer
- manage their own print queues, pushing back on clients as needed
- announce their presence to all clients within the local subnet
- have an HTTP server to provide detailed self-description, and to accept print jobs
- requires that the network policy, or WiFi access point, not isolate the printer from the client. Some access points call this "isolation mode".
- requires that the network policy allow multicast for mDNS discovery
- most depend on the GCP backend to handle print job processing, like format conversion (PDF to PWG Raster) and content adjustments (margin adjustments, fit-to-page, collation, ordering). These printers may require Internet access, or may provide more features when an Internet connection is available.
Two network connections are created by the printer:
|mDNS + DNS-SD||5353, multicast||announce presence to the local subnet|
|HTTP||arbitrary port, listen||HTTP server provides detailed self-description, receives print jobs|