How could I set a PDF preview, on dynamic pages, to show a PDF file uploaded and added to the database ?

Hi,

I’m using a database and dynamic pages to list a selection of documents.
My database contain the followings :

  • Intern file reference
  • Date
  • Type of document
  • Title
  • Description
  • === Uploaded PDF file, usually 1 or 2 pages ===

My dynamic pages are showing

  • Date
  • Type of document
  • Title
  • Description
    And I would like to add a window showing the actual PDF on every dynamic page. I’ve used the “PDF Viewer” app but I don’t see any way to make it work with the dynamic database, meaning that it can only show up the same file on every page …
    Those PDF are short official documents and I can’t just copy/paste the text in a Text frame, I need to keep the exact PDF with it’s exact presentation.

So, is there anyway I could set up a PDF preview to show the specific PDF document corresponding to each dynamic page, using the PDF document listed in my database sheet ?

If not, why is there even an option to put a document in the database ? Only to use a button link ?

In advance, thanks a lot for your help.

I think the only way is to connect the document with a button. When the button is clicked the user will be brought to another window with the PDF.

I have several tutorial videos regarding PDFs …

Feel free to check them out to learn how to display your PDFs dynamically and/or download them …

Thanks for some great examples. I have used the script code and it appears on PC and Ipad but not on a Mobile, what can I do ?.
See PDF-fil

@seniori5700 Hello !

If the mobile browser does not support viewing PDF documents then there is nothing you can do about it. Most mobile browsers force person to download a PDF viewer and/or display PDFs after clicking, etc. It really all depends on the mobile browser.

@code-queen Thanks for the answer. There are codes that can see what mobile is used, as there are some mobiles that can display PDF, eg Iphone x. ?

Regards
Bjarne

@seniori5700

Nope as Nayeli tells you above, mobile browsers will sometimes make you download the file and then open in your own pdf viewer before displaying etc. It is purely down to the mobile device that the user is using.

If you are using a mobile device that can display PDF files like an iPhone, then it will display the PDF file, however other mobile devices will make you download it first like Nayeli has already said.

The only thing that Wix can do is to show certain things on your desktop or mobile devices only through formFactor function, it can’t specifically differentiate between different types/models of mobile phone as well.
https://www.wix.com/corvid/reference/wix-window.html#formFactor
https://support.wix.com/en/article/corvid-writing-code-that-only-runs-on-mobile-devices
https://support.wix.com/en/article/corvid-tutorial-displaying-elements-in-mobile-only

Can you please tell me which element’s id is this “#linkSource”?

You can use this app to display PDF dynamically: PDF: View with 3D Flip Effects | Wix App Market | Wix.com

How to use the widget’s API: Working on Velo with PDF: View with 3D Flip Effects app | Certified Code Help Center