Skip to content

feat: add PDF mime type to enable native file selection#1664

Open
GabrielBaiano wants to merge 1 commit intojohnfactotum:gtk4from
GabrielBaiano:feature/enable-pdf-viewing
Open

feat: add PDF mime type to enable native file selection#1664
GabrielBaiano wants to merge 1 commit intojohnfactotum:gtk4from
GabrielBaiano:feature/enable-pdf-viewing

Conversation

@GabrielBaiano
Copy link
Copy Markdown
Contributor

Description

This PR enables PDF files to be recognized and selected naturally within Foliate, and ensures the application is associated with PDF files at the system level.

Changes:

  • src/app.js: Added application/pdf to the Gtk.FileFilter in the "Open" and "Add" dialogs. This allows users to browse and select PDF files directly from the internal file chooser.
  • data/com.github.johnfactotum.Foliate.desktop.in: Added application/pdf to the MimeType field, so desktop environments can suggest Foliate as a PDF viewer.

Motivation and Context

Foliate already supports rendering PDFs via PDF.js, but they were missing from the file filters and were not registered in the desktop entry. This change synchronizes the app's internal logic and system metadata with its actual capabilities.

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.

1 participant