Streaming live at 10am (PST)

Displaying a pdf in browser

Has anyone figured out how to get a pdf to display fully on a page. Not as a link to the pdf but I want the have a landing page of just the pdf. I would love for this to be able to a collection page as well.


Here is my site Read-Only: https://preview.webflow.com/preview/benefitsbylegalshield?utm_source=benefitsbylegalshield&preview=7c1801942a0827bbc7404a1f2a80b2a1

2 Likes

Hello @carsonthetford

Is this the pdf? > https://uploads-ssl.webflow.com/5bbcd57ae857d63d720ad7a4/5c11270dea9a850187108f61_LegalShield-2017-SOC3-Report.pdf

Piter :webflow_heart:

No I haven’t received the pdfs yet, but it will be an ongoing upload. I want to be able to create pages of any pdf that comes along the client requests. It would be in the Policies collection.

1 Like

Okey, The client wants pages with pdfs, not an actual pages? Here’s something I’ve found > https://pdfobject.com/static/

Here’s another > https://pdfobject.com/

Piter :webflow_heart:

Thanks @PiterDimitrov this looks like a good option but may require some more work with the embed on their end. Any ideas for something that would only require the client to upload the pdf?

1 Like

@PiterDimitrov That actually is the solution! I used the static option with the embed code that page provides.<embed src="../pdf/sample-3pp.pdf#page=2" type="application/pdf" width="100%" height="100%">

Thank you! I inserted the Upload Field in place of the src.

1 Like

@PiterDimitrov or anyone, I have a snag with this solution. I can’t get it to be responsive with the doc. I’ve tried wrapping it with a div, I’ve tried making it fill the whole page but I can’t get it to be responsive.

I had an issue, where I couldn’t get the height to work when set to 100%, so I just set it to a fixed px height. Final code below.

<object data='[PDF LINK]' 
    type='application/pdf' 
    width='100%' 
    height='670px'><p>This browser does not support inline PDFs. Please download the PDF to view it: <a href="[PDF LINK]">Download PDF</a></p></object>

Hi can anyone elaborate on why this only works with PDFs hosted using Webflow?