@capgo/capacitor-printer
Overview
Section titled “Overview”@capgo/capacitor-printer opens the native print UI for HTML, PDF, images, base64 payloads, files, iframes, and the current WebView. Use it for receipts, boarding passes, reports, and label printing from field apps without leaving Capacitor.
Platform support
Section titled “Platform support”| Platform | APIs |
|---|---|
| iOS | UIPrintInteractionController |
| Android | PrintManager |
| Web | Browser print dialog (printBase64 and printHtml use blob URLs; printWebView prints the page directly) |
Prefer printFile for large assets. printBase64 decodes in memory and can crash on files above about 5 MB (documented on the method).
Core Capabilities
Section titled “Core Capabilities”printBase64- Presents the printing UI to print files encoded as base64 strings.printFile- Presents the printing UI to print device files.printHtml- Presents the printing UI to print HTML documents.printPdf- Presents the printing UI to print PDF documents.
Public API
Section titled “Public API”| Method | Description |
|---|---|
printBase64 | Presents the printing UI to print files encoded as base64 strings. |
printFile | Presents the printing UI to print device files. |
printHtml | Presents the printing UI to print HTML documents. |
printPdf | Presents the printing UI to print PDF documents. |
printWebView | Presents the printing UI to print web view content. |
getPluginVersion | Get the native Capacitor plugin version. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-printer.
Keep going from @capgo/capacitor-printer
Section titled “Keep going from @capgo/capacitor-printer”If you are using @capgo/capacitor-printer to plan native plugin work, connect it with Using @capgo/capacitor-printer for the native capability in Using @capgo/capacitor-printer, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives.