@capgo/capacitor-pdf-viewer
Native PDF viewing on iOS (PDFKit), Android (Pdfium), and web with paths, URLs, base64, and inline mode.
Overview
Section titled “Overview”@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.
Core Capabilities
Section titled “Core Capabilities”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.
Public API
Section titled “Public API”| Method | Description |
|---|---|
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. |
getPluginVersion | Get the native or web implementation version marker. |
addListener | Listen for load, pageChange, error, close, and linkTap events. |
Source Of Truth
Section titled “Source Of Truth”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.