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

Community Beginner ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

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:

r002_0-1590767189790.png

 

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.

Views

135

Likes

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 ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

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.

Likes

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 ,
May 29, 2020 May 29, 2020

Copy link to clipboard

Copied

LATEST

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

r002_0-1590769948099.png

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!

Likes

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