Skip to main content
kevind55123760
Participant
August 25, 2020
Question

So Confused with PDF HTML Embed for Website - Help Please :)

  • August 25, 2020
  • 1 reply
  • 2242 views

Wanting to embed HTML code for PDF into website. 

 

Can do Google Docs, but trying to figure out Adobe.

 

Got the API set up and credentials for our website.

 

BUT - we don't see a way to upload a document in adobe.io - and we don't see any different options where our PDFs exist that are already uploaded in the document cloud.

 

Can anybody clarify how to take a document from the document cloud and use the API to generate the embed code? 

 

Very confused - Thanks!!

    This topic has been closed for replies.

    1 reply

    Joel Geraci
    Community Expert
    Community Expert
    August 25, 2020

    Can anybody clarify how to take a document from the document cloud and use the API to generate the embed code? 

     

    You can't. Embed API needs either a direct link to the PDF or a Promise the resolves to a ByteArray for the file to be displayed. The Adobe Document Cloud provides neither. The link to a PDF in DC is not a direct link to a PDF, it is a link to a PDF viewing experience much like Embed API itself.

    However, if you need to host your files on something other than your own web site, you can store your files in Dropbox and use Embed API to display them. You can see that in action at this CodePen.

     

    kevind55123760
    Participant
    August 25, 2020

    Thank you - so can we use the Embed API to embed on our website? Confused still.

    Joel Geraci
    Community Expert
    Community Expert
    August 25, 2020

    Yes - Embed API is a client-side JavaScript that you can use from any web site to present PDF files in a way that overrides the default browser experience. That way, the view of the PDF and its behavior will be consistent across browsers, operating systems, and devices.

    If you are already using Document Cloud to share PDF files, you don't really need Embed API. If you'd rather host your PDF files on your own servers, you can use Embed API to control the experience.