Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 14 of 14 total
Thread Display and search PDF's on mobile devices
Sat, Mar 22 2025 5:59 PMPermanent Link

erickengelke

Avatar

Eivind wrote:

> I just wraped this one together for testing:

https://www.reachfx.no/pdftest.html

> All good on desktops, but only showing first page on my iPhone

Odd.  I don't have an iPhone, just a iPad.  Both TBrowser and TMedia worked with the iPad, letting me scroll pages.

With my Android phone: TBrowser works correctly, TMedia opens a 3rd party fullscreen PDF browser I believe, both behaviours happened with both the default Android browser and with Chrome.

I would recommend TBrowser for all those environments.

Why your iPhone fails, I cannot say.

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Sat, Mar 22 2025 6:05 PMPermanent Link

erickengelke

Avatar

Eivind wrote:

> https://www.reachfx.no/pdftest.html

ChatGPT says:

Apparently it needs -webkit-overflowscrollling: touch in the style, either in the iframe or in a div holding the iframe.

You can put this into a HTMLlabel so you can easily add the style part.

<div style="overflow: auto; height: 100vh; -webkit-overflow-scrolling: touch;">
 <iframe src="example.pdf" width="100%" height="100%"></iframe>
</div>

You may need to play with that.

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Sun, Mar 23 2025 1:25 PMPermanent Link

Eivind

erickengelke wrote:
ChatGPT says:
Apparently it needs -webkit-overflowscrollling: touch in the style, either in the iframe or in a div holding the iframe.

Yea, after I search various Apple forums it is mentioned several times that embedded PDS will not work and only show the first page. Anyhow, I gave up on it and found several web app devs using google's embedded PDF viewer:

https://drive.google.com/viewerng/viewer?embedded=true&url=pdffile.pdf

Once I started using this, a very nice PDF viewer works like a charm on both Android and iPhone / iPad and you can still host the PDF file at your server. Think I'll stick to that one for now

Br
Eivind
Sun, Mar 23 2025 4:39 PMPermanent Link

erickengelke

Avatar

Eivind wrote:

erickengelke wrote:
>> ChatGPT says:
>>Apparently it needs -webkit-overflowscrollling: touch in the style, either in the iframe or in a div holding the iframe.

> Yea, after I search various Apple forums it is mentioned several times that embedded PDS will
> not work and only show the first page. Anyhow, I gave up on it and found several web app devs
> using google's embedded PDF viewer:

> https://drive.google.com/viewerng/viewer?embedded=true&url=pdffile.pdf

Thanks for sharing.  Yes, that works.  But you do open up to 3rd party hacking opportunities  if you rely on their viewer.  

In my solution, which I coded a few years ago, I gave up on fully-in-app viewing, I decided to call ifIOS funciton to detect iPhones, and then used open() to open the PDF is a new window, and that seemed to work well enough.

I do resent that they don't follow the standards that every other browser and OS adhere to.

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image