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

Embeded API

New Here ,
Feb 12, 2024 Feb 12, 2024

Copy link to clipboard

Copied

I am not having success getting my PDF to display using the pdfembedapi sample.  I changed <YOUR CLIENT ID> to my is and the url to my link and I just get a grey box with no text.

 

When I simple connect to the url from a browser it displays fine.

 

<!--Get the samples from https://www.adobe.com/go/pdfembedapi_samples-->
<!DOCTYPE html>
<html>
<head>
<title>Adobe Acrobat 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://acrobatservices.adobe.com/view-sdk/viewer.js"></script>
<script type="text/javascript">
document.addEventListener("adobe_dc_view_sdk.ready", function()
{
var adobeDCView = new AdobeDC.View({clientId: "3bc1b2f94f054af88da8cade3c6d2214", divId: "adobe-dc-view"});
adobeDCView.previewFile(
{
content: {location: {url: "https://grcloud.com/apps/kilwins_store/mcards/menu_card_0995.pdf"}},
metaData: {fileName: "Menu Card.pdf"}
});
});
</script>
</body>
</html>

Views

52

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 ,
Feb 12, 2024 Feb 12, 2024

Copy link to clipboard

Copied

LATEST

If you open your browser dev tools, you will see there is a CORS error with the PDF. You have to change your CORS setting on the PDF, on _that_ web server (grcloud) to allow for remote sites to access the content.

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