KPDF can hand the current PDF off to any installed app that handles PDF content — for example, Adobe Acrobat or the system Files app. Call openInExternalApp() to start the flow. The SDK exports the file and triggers the platform’s app-chooser or sends it directly to the default PDF handler. Observe externalOpenState if you want to react to success or failure.
Basic usage
openInExternalApp() is an alias for requestOpenInExternalApp(). Both accept the same parameters — use whichever reads more clearly at your call site.
Suggesting a file name
Pass a suggestedFileName to control the name the receiving app sees:
Observing state
Collect externalOpenState to keep your UI in sync with the flow:
Full pattern with state observation
KPdfExternalOpenState variants
If no PDF viewer is installed on the device, the platform will report an error. Handle KPdfExternalOpenState.Error and show a message that guides the user to install a PDF app.