Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If PDF viewer is not enabled PDFs are downloaded instead #1177

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

veloman-yunkan
Copy link
Collaborator

Chrome on Android doesn't support displaying PDF documents inline so an attempt to load a PDF into the Kiwix viewer iframe fails in a way that may be confusing to the users. In such situations it is better to offer to the users to download the PDF file so that they can view it with a dedicated application. Making the link to open in a new tab/window achieves exactly that effect.

Fixes kiwix/kiwix-tools#670

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.47%. Comparing base (5da88c0) to head (b6ce647).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1177   +/-   ##
=======================================
  Coverage   41.47%   41.47%           
=======================================
  Files          59       59           
  Lines        4272     4272           
  Branches     2336     2336           
=======================================
  Hits         1772     1772           
  Misses       1002     1002           
  Partials     1498     1498           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Chrome on Android doesn't support displaying PDF documents inline so an
attempt to load a PDF into the Kiwix viewer iframe fails in a way that
may be confusing to the users. In such situations it is better to offer
to the users to download the PDF file so that they can view it with a
dedicated application. Making the clicked PDF link to open in a new
tab/window achieves exactly that effect.
@veloman-yunkan veloman-yunkan force-pushed the handling_of_pdf_links_under_chrome_on_android branch from b90752a to b6ce647 Compare February 3, 2025 15:00
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.

Unable to read PDF files from Kiwix-serve
1 participant