Announcement

  •  » Extensions
  •  » Found solution for scrollable PDF in iOS browsers w. Charlie's Content

#1 2021-01-08 11:48:24

dadoc
Member
2020-06-24
12

Found solution for scrollable PDF in iOS browsers w. Charlie's Content

Hi,
It's a well known issue that embeded PDFs aren't scrollable on iOS devices, and so for all my PDF photo albums, only the first pages from each PDF was displayed using Charlie's content.
I've tried a lot of (non-working) solutions until I found a way using Mozilla's pdf.js: https://github.com/mozilla/pdf.js
After installing it, I modified charlie_acrobat.tpl:

Code:

<!-- /charlie_acrobat.tpl -->
<br />
<div style="height: 100%; width:98%; padding-top: 5px auto 5px auto; margin-top: 10px;">
<iframe width=100% height=1000px src="/path/to/pdfjs/web/viewer.html?file={$SRC_IMG}"></iframe>
</div>
{html_head}
<link rel="stylesheet" type="text/css" href="{$CHARLIES_PATH|@cat:'charlies.css'}"> 
{/html_head}

I know that "height=1000px" isn't very elegant, but I found no other way (I'm not a coder). This works fine in iOS browsers; with the native Piwigo App, however, there are still only the first pages of the PDFs.
Best regards
Martin

Offline

 
  •  » Extensions
  •  » Found solution for scrollable PDF in iOS browsers w. Charlie's Content

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact