Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Issues embedding PDF api into Squarespace page

Community Beginner ,
Nov 22, 2021 Nov 22, 2021

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>
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2021 Nov 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2021 Nov 22, 2021
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources