Skip to main content
Participating Frequently
May 29, 2020
Question

Sample from Quick Start Guide not working on my local machine.

  • May 29, 2020
  • 1 reply
  • 358 views

I am following the quick start guide here:
https://www.adobe.com/devnet-docs/dcsdk_io/viewSDK/index.html#copy-it-run-it

 

My code looks like (exactly copy/pasted from the example, except with my clientId):

<!--Get the samples from https://www.adobe.com/go/dcviewsdk_samples-->
<!DOCTYPE html>
<html>
<head>
 <title>Adobe Document Cloud View SDK Sample</title>
 <meta charset="utf-8"/>
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
 <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body style="margin: 0px">
 <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: "43b7fe695ddb49899bd5d90f222f5b7c", divId: "adobe-dc-view"});
        adobeDCView.previewFile(
       {
          content:   {location: {url: "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
          metaData: {fileName: "Bodea Brochure.pdf"}
       });
    });
 </script>
</body>
</html>

 

But when I run this on my localmachine (http://localhost:2000/static/dc.html), I am simply seeing a blank page:

 

Am I missing something?  Please advise; thank you!

PS. Note: I am positive I have internet connectivity on my computer and am able to access the underlying "https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf" separately with no issues.

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    May 29, 2020

    Hi, Thanks for pointing this out. 
    There is a quotation mark is missing after src= in the following line

     

    <script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>

     

    I hope this will help you. We will update the documentation soon.

    r002Author
    Participating Frequently
    May 29, 2020

    Yes, I literally copy and pasted from the Quick Start guide:

    I suggest fixing the guide bc it'll cause confusion for new users!  After I inserted the missing double-quote, this sample now succssfully runs for me.  Thank you for your help!