Skip to main content
oswald808
Participant
November 22, 2021
Question

Issues embedding PDF api into Squarespace page

  • November 22, 2021
  • 2 replies
  • 1050 views

Hi,

I'm trying to embed the api into my Squarespace site.

 

The PDF is uploaded to the Squarepace server. I've tried every other way of hosting the file, none seem to work. I've spent days trying to make this work - can anyone help?

 

Here's the live page: https://www.self-other.org/who-cares-test

 

I'm using the following code:

 

<div id="adobe-dc-view" style="height: 360px; width: 500px;"></div>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){ 
var adobeDCView = new AdobeDC.View({clientId: "cdb98ffb676e44ac880d48fed629fc00", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "self-other.org/s/Skye_FINAL_CJ_ProofRead.pdf"}},
metaData:{fileName: "Skye_FINAL_CJ_ProofRead.pdf"}
}, {embedMode: "SIZED_CONTAINER"});
});
</script>
    This topic has been closed for replies.

    2 replies

    Legend
    November 22, 2021

    Your page also seems to show a lot of images which might be the files. You really need to describe the results you want, and the results you get, in detail.

    Legend
    November 22, 2021

    The URL of the file is on a different server than the page itself (one has www.)

    This is not a trivial detail, it may mean you get CORS problems.