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

Issue with adobe_dc_view_sdk preview

New Here ,
Aug 16, 2022 Aug 16, 2022

Copy link to clipboard

Copied

Testing the preview on https://www.thacherandrye.com/dinner , https://www.thacherandrye.com/the-shed , https://www.thacherandrye.com/brunch

Sometimes, the file preview is not working and all I can get on the screen is a large white space. Whenever I load the page for the first time, in a browser or incognito window, the file appears on the preview but after reloading or moving to another page with a preview, the file seems to disappear.
I checked for the key being wrong/expired but then it should not have loaded the file even for the first time. I have looked into some community discussions but nothing seems to be helpful.

Below is the Javascript code I am using for the api:
<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>

 

$(document).ready(function() {
        document.addEventListener("adobe_dc_view_sdk.ready", function(){ 
            var adobeDCView = new AdobeDC.View({ clientId: SOME_KEY, divId: $('#adobeDcViewId{Id}').val() });
            adobeDCView.previewFile({
                content: { location: { url: $('#hdnUrl{Id}').val() } },
                metaData: { fileName: $('#hdnFileName{Id}').val()  }
            }, 
	    { 
		showDownloadPDF: $('#hdnRestrictDownload{Id}').val() !== 'true', 
		showPrintPDF: $('#hdnRestrictDownload{Id}').val() !== 'true' 
	    });
        });
});

 

Tech stack: .net framework 5, jQuery 3.6.0


Please Help!
Thanks

TOPICS
.NET SDK , How to , PDF Embed API , PDF Services API

Views

298

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
New Here ,
Aug 16, 2022 Aug 16, 2022

Copy link to clipboard

Copied

PS: No errors in the browser console.

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
Adobe Employee ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

LATEST

Hi, are you the same person who posted here, https://community.adobe.com/t5/document-services-apis-discussions/issue-with-adobe-dc-view-sdk-previ... If so I'll delete this thread.

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