Copy link to clipboard
Copied
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>
FYI, this got solved by recreating the credentials directly at https://console.adobe.io/projects
This thread can be closed.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
FYI, this got solved by recreating the credentials directly at https://console.adobe.io/projects
This thread can be closed.