Skip to content

Conversation

codelove77
Copy link
Contributor

@codelove77 codelove77 commented May 29, 2025

Summary

  • Add PDF sharing support for both iOS and Android mobile apps
  • Enable users to save PDFs from Files app and other sources directly to Karakeep
  • Maintain existing URL and text sharing functionality

Fixes #1495

Changes

  • iOS: Added kUTTypePDF to share extension supported types
  • Android: Added application/pdf MIME type to intent filters
  • Updated share handling logic to process PDF files alongside existing content types

Test plan

  • iOS: Share URL from Safari
  • iOS: Share PDF from Files app
  • iOS: Verify PDF limitation message in Safari
  • Android: Share URL from Chrome
  • Android: Share PDF from Files app
  • Existing text/image sharing continues to work

🤖 Generated with Claude Code

Enable the mobile app to receive PDF files from other apps via the iOS/Android
share sheet. PDFs can now be shared from Files app, email clients, and other
apps that support document sharing.

- Add PDF UTI (com.adobe.pdf) to iOS share extension activation rules
- Add application/pdf to Android intent filters

Known limitation: PDFs viewed in Safari cannot be shared directly as Safari
shares the PDF URL rather than the file itself. Users can share the URL
instead, and Karakeep will fetch the PDF from that URL.

Addresses issue karakeep-app#284 for file attachment support
@codelove77
Copy link
Contributor Author

android-chrome-url-share
android-files-pdf-share
ios-files-pdf-share-with-karakeep
ios-safari-url-share-sheet

@codelove77
Copy link
Contributor Author

Safari limitation example (I hope to explore this later in a follow-up PR):
safari-pdf-limitation

@MohamedBassem MohamedBassem merged commit 5f47340 into karakeep-app:main Jun 1, 2025
@MohamedBassem
Copy link
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PDF sharing support to mobile app
2 participants