Displaying a pdf on a dynamic page using a data base

I’m hoping that someone can cast their eye over the following code and tell me whether they can identify any potential issues. At the moment I have a database that contains a large number of pdf’s. I want my students to be able to click on a ‘link’ (which appears to be working well) which then opens a single pdf on a separate page for them to view. Currently the words ‘Forbidden’ shows on the page designed to host the PDF when this process is followed - There must be a bug somewhere… Without this functionality the site is dead in the water…help!
,
The site is: sine on . org - if you go to ‘The Hub’ in the site menu and click on the link for ‘lesson resources’ you’ll see what I am trying to achieve.

Any help would be appreciated (I’m new to wix and coding),

Many thanks :slight_smile:

In order to display PDFs in an HtmlComponent, you will need a Premium plan. That might be your problem.

Thanks for the reply Yisrael, yes I do have a premium plan for the site so it’s all a bit of a mystery.

@gromit256 Aha - so as I understand it, you are getting the “Forbidden” when you click the download button?

@yisrael-wix Yes that’s right. I just can’t figure out the cause of that. Displaying the PDFs is integral for my students (high school).

To add to my woes, I don’t know what my next steps should be? I really need some help to resolve this issue but where to start is part of the problem.