Skip to content

@capgo/capacitor-pdf-viewer

Embed native PDF viewing on iOS, Android, and web with paths, URLs, base64, inline mode, and password support

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.

PlatformSupportNotes
iOSYesNative
AndroidYesNative
WebNoGuard with Capacitor.getPlatform()
  • 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.