View a PDF on the website

All Quick 'n Easy Web Builder support issues that are not covered in the forums below.
Post Reply
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

View a PDF on the website

Post by alex4orly »

I use PDF documents, some one page, some more pages.
On that same website, it is strange - some of the PDF documents show up, others are prompting me to download, then view them from the Download folder.

It is the same website, the same browser

What can I do for all PDF's to show, rather than download which is not friendly at all.

I know, this is NOT a WB question, but hope that someone here can help

Thanks
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: View a PDF on the website

Post by Pablo »

The behavior of PDFs is controlled by the browser and user preferences.

But this may be helpful:
https://www.quickandeasywebbuilder.com/ ... =1&t=46061
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

Re: View a PDF on the website

Post by alex4orly »

Ok, I created a sample page here:
squadron-125.org.il/page5.html

1)But, when you click the link, instead of just showing the document, it prompts to click to read it, what for is that?

2)Also, is there a way to have the page show a different pdf, by calling it with another pdf link?

Thanks
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: View a PDF on the website

Post by Pablo »

The behavior of PDFs is controlled by the browser and user preferences.
As a web designer you have no control over this. The user is in control over this.
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

Re: View a PDF on the website

Post by alex4orly »

How is the user in control over this, visitors to the site keep asking me

Fact is, that on that same website (and also on others)
The same machine
The same browser
The same "User preferences"

Some pdf's are showing as expected, some are not
I am suspecting something to do with the page structure? But what can it be?

Thanks again
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: View a PDF on the website

Post by Pablo »

The user can configure how PDFs are displayed by the browser. In their browser or system settings they can configure if the file is download or viewed directly in the browser.
This is browser specific.
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

Re: View a PDF on the website

Post by alex4orly »

But,

The "User" is me at this point
I have NOT specified anything in my browser
The browser is all the time the same browser
It is all on the same website

The only difference is the pdf itself, or here are two examples :

https://drive.google.com/viewerng/viewe ... f/bugi.pdf
The above is working with the "Google" help, makes it slow to load

This one however is a call to the same page directly and instead of showing the file, it downloads it
https://squadron-125.org.il/mypdf/bugi.pdf

To see the difference, you have to try it on a mobile phone

Cheers
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: View a PDF on the website

Post by Pablo »

Did you try the PDFObject extension?
https://www.quickandeasywebbuilder.com/ ... =1&t=46061
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

Re: View a PDF on the website

Post by alex4orly »

Yes, I tried : https://squadron-125.org.il/page5.html

But,
1) Have a look at the link - it shows only a small view, I made it in preview to show the whole page
2) It doesn't work on my tablet, or my mobile - it prompts me to open, but the button doesn't do anything

Maybe the item 1 above is connected to the problem in item 2?

So, what else can I try?

Thanks
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: View a PDF on the website

Post by Pablo »

I'm sorry, in that case I do not know what else to try.
But as previously mentioned, the behavior of PDF is implemented in the browser.

Note: I am not sure if the PDFObject script can be used in a layout grid, so you can try to place it outside the grid.
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

Re: View a PDF on the website

Post by alex4orly »

I took a basic example from the project originator and did this example, no layout grid
https://squadron-125.org.il/objectpdftest.html

It works OK on the desktop, but on my mobile phone - the page is empty, the same on my Android tablet
The script (you can see the source page) has a fallback to pdf.js - but it seems this is not doing much

Thanks
User avatar
Pablo
Site Admin
Posts: 3918
Joined: Mon Feb 13, 2006 7:00 am
Location: Europe
Contact:

Re: View a PDF on the website

Post by Pablo »

The website of PDF Object states that mobile browsers do not support embedded PDF:
https://pdfobject.com/#browser-support

So, if even this developer (who dedicated a lot of time to this) cannot make it work then I am not sure if it's possible.
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

Re: View a PDF on the website

Post by alex4orly »

OK, I found a good solutio, it works fine on my Android tablet and my mobile phone

https://squadron-125.org.il/embedpdf.html

Just using the ADOBE API

Thanks again
mexman
Posts: 547
Joined: Mon Feb 11, 2013 11:33 am
Location: Puebla/Mexico

Re: View a PDF on the website

Post by mexman »

Hi Alex.... your link is not working for me
Regards
Michael
alex4orly
Posts: 321
Joined: Thu Jul 23, 2020 9:34 am

Re: View a PDF on the website

Post by alex4orly »

Hello Michael,

Of course not, it was just a test page for Pablo which has been cleared since.

But, try this one now : https://squadron-125.org.il/adobepdf.ht ... ochure.pdf

If you need any help, just ask

Cheers
Alex
Post Reply