Skip to main content
Participating Frequently
November 17, 2020
Answered

File Preview error

  • November 17, 2020
  • 2 replies
  • 1635 views

The demo works fine. But when I try to use PDF Embed API to place my own PDF, I get a File Preview error. I see other posts on this forum with the same problem but can't find an answer. I appreciate any feedback. Thanks.

 

<!DOCTYPE html>
<html>
<head>
<title>Adobe Document Services PDF Embed API 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: "ba22b551b7624c22b6dc4f87a7ab2701", divId: "adobe-dc-view"});
adobeDCView.previewFile(
{
content: {location: {url:"https://bearessentialnews.com/images/StemRocksAdSep20.pdf"}},
metaData: {fileName: "StemRocksAdSep20.pdf"}
});
});
</script>
</body>
</html>

    This topic has been closed for replies.
    Correct answer luciann4679568

    FYI, this got solved by recreating the credentials directly at https://console.adobe.io/projects

    This thread can be closed.

    2 replies

    luciann4679568Correct answer
    Adobe Employee
    November 17, 2020

    FYI, this got solved by recreating the credentials directly at https://console.adobe.io/projects

    This thread can be closed.

    Adobe Employee
    November 17, 2020

    Hi, thanks for using PDF Embed API. 

    Would it be possible to share the link to the hosted website where you see the issue?

    Also, do you see any error in the browser console panel? If yes, please share a screenshot of the error message so we can debug.

    Thanks.

     

    Participating Frequently
    November 17, 2020

    Hi Sumona, thank you so much for helping. Here is the link: 

    https://bearessentialnews.com/images/index.html

     

    When I set up the PDF Embed API, I tried to make sure this domain is allowed.