Printer API
Send a remote image or PDF to the Android system print dialog — Wi-Fi printers, cloud print, or Save-as-PDF, straight from your web app.
The Printer API sends a remote file (image or PDF) to the Android system print dialog, so the user can print it to any configured printer — Wi-Fi, cloud print, or "Save as PDF".
How to Use:
<a href="printitem://?jobName=Invoice%20%23123&printItem=https://example.com/invoice.pdf"> Print invoice </a>
Query Parameters:
Name
Required
Description
printItemyes
Full URL of the file to print (PDF, JPG, PNG, WebP…).
jobNameno
Human-readable job name shown in the print dialog. Defaults to
Print Job.How It Works:
- The app downloads the file from
printIteminto a temporary cache. - If it is an image, the file is printed via
PrintHelper(scaled to fit). - If it is a PDF (or any other document format), it is sent to the Android
PrintManagerwith a proper document adapter. - The temporary file is deleted after the job is queued.
Notes: The target file must be publicly reachable from the device (the URL must resolve). Users can pick Save as PDF in the print dialog to export a copy.