Skip to content

@capgo/capacitor-printer

Capacitor plugin for printing documents, HTML, PDFs, images and web views.

@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.

PlatformAPIs
iOSUIPrintInteractionController
AndroidPrintManager
WebBrowser 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).

  • 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.
MethodDescription
printBase64Presents the printing UI to print files encoded as base64 strings.
printFilePresents the printing UI to print device files.
printHtmlPresents the printing UI to print HTML documents.
printPdfPresents the printing UI to print PDF documents.
printWebViewPresents the printing UI to print web view content.
getPluginVersionGet the native Capacitor plugin version.

This reference is synced from src/definitions.ts in 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.