@capgo/capacitor-pdf-viewer
Embed native PDF viewing on iOS, Android, and web with paths, URLs, base64, inline mode, and password support
Overview
Section titled “Overview”Embed native PDF viewing on iOS, Android, and web with paths, URLs, base64, inline mode, and password support
Start with open() and the other core methods listed below.
Platform support
Section titled “Platform support”| Platform | Support | Notes |
|---|---|---|
| iOS | Yes | Native |
| Android | Yes | Native |
| Web | No | Guard with Capacitor.getPlatform() |
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.