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

API stops working after a page refresh

Community Beginner ,
Oct 02, 2020 Oct 02, 2020

Copy link to clipboard

Copied

I hope someone can help with this. (Please keep in mind that my technical knowledge is limited)

I created this test page:
https://www.posterpresentations.com/research/PI1065/DELETEME/basit-iqbal-php-framework.html

 

The PDF displays properly but after you refresh the page it disapears.... 

I tested is in multople browsers with no luck.

 

Here is the code I use:

 

<div id="adobe-dc-view"></div>
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function(){
var adobeDCView = new AdobeDC.View({clientId: "c0ed52a26e894bb988b9242e11480d7c", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://www.posterpresentations.com/research/PI1065/DELETEME/PHP%20framework.pdf"}},
metaData:{fileName: "PHP Framework"}
}, {defaultViewMode: "FIT_WIDTH", showAnnotationTools: false});
});
</script>

 

Any suggestions?

 

Views

248

Translate

Translate

Report

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
Community Expert ,
Oct 05, 2020 Oct 05, 2020

Copy link to clipboard

Copied

I only see the problem when I clear the browser cache prior to refreshing. When I just refresh, it works. My suggestion is to move the code that loads the preview to the end of your page and wrap it in a document.redy event.

Votes

Translate

Translate

Report

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
Community Beginner ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

LATEST

Thank you. I got it to work. 

Votes

Translate

Translate

Report

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