KPDF can hand the current PDF off to any installed app that handles PDF content — for example, Adobe Acrobat or the system Files app. CallDocumentation Index
Fetch the complete documentation index at: https://mahmoud-b28887f9.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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 asuggestedFileName to control the name the receiving app sees:
Observing state
CollectexternalOpenState to keep your UI in sync with the flow:
Full pattern with state observation
KPdfExternalOpenState variants
| State | When it occurs | What it carries | Suggested UI reaction |
|---|---|---|---|
Idle | No open in progress | — | No indicator |
Exporting | SDK is serialising the PDF bytes | — | Show a progress indicator |
AwaitingExternalApp | Platform app chooser is open | requestId, suggestedFileName, mimeType | Tell the user to pick an app |
Success | External app received the file | requestId, suggestedFileName, mimeType, location? | Dismiss the indicator |
Cancelled | User dismissed the app chooser | requestId, suggestedFileName, mimeType | Restore previous UI silently |
Error | Export or handoff failed | reason, suggestedFileName?, mimeType? | Show an error message |