Skip to content

@capgo/capacitor-pdf-viewer

Native PDF viewing on iOS (PDFKit), Android (Pdfium), and web with paths, URLs, base64, and inline mode.

@capgo/capacitor-pdf-viewer opens PDFs from device paths, HTTPS URLs with custom headers, or base64. You get page navigation, zoom, password-protected documents, fullscreen or inline layout, and load, error, page change, link tap, and close events.

  • open - Open a PDF from a file, path, URL, or base64 source.
  • close - Close the active viewer and remove any overlay.
  • goToPage - Jump to a 1-based page number.
  • setZoom - Set the zoom scale multiplier.
MethodDescription
openOpen a PDF from a file, path, URL, or base64 source.
closeClose the active viewer and remove any overlay.
goToPageJump to a 1-based page number.
setZoomSet the zoom scale multiplier.
getPluginVersionGet the native or web implementation version marker.
addListenerListen for load, pageChange, error, close, and linkTap events.

This reference is synced from src/definitions.ts in capacitor-pdf-viewer.

Keep going from @capgo/capacitor-pdf-viewer

Section titled “Keep going from @capgo/capacitor-pdf-viewer”

If you are using @capgo/capacitor-pdf-viewer in your Capacitor app, connect it with Using @capgo/capacitor-pdf-viewer for the SEO tutorial and related Capgo plugin docs.