openzim / nautilus

Turns a collection of documents into a browsable ZIM file
GNU General Public License v3.0
19 stars 14 forks source link

Unable to read all PDF pages on iOS FF (with Kiwix Serve) #71

Closed kelson42 closed 3 months ago

kelson42 commented 3 months ago

I can display any PDF first page:

image

… but when I swap down, nothing happens… I’m stuck at the first page.

Remark: not problem with Kiwix iOS.

rgaudin commented 3 months ago

It's an issue with the in-browser (Webkit for iOS) PDF reader that doesn't exposes those controls in the kiwix-serve iframe. It works as expected on the /content/ endpoint.

Might be worth investigating an upstream (libkiwix) bug but I think it's reasonnable to fix here with target="blank" as well.

rgaudin commented 3 months ago

After some investigation, it appears to be a limitation of Webkit's bundled PDF viewer. Internally, the browser replaces the PDF with an <img /> tag containing the first page.

73 might include an actual reader (PDF.js) and download links.

In the mean time, let's open all resources on new tabs (target blank) as this has been recommended anyway.