Skip to main content
Participant
December 8, 2023
Question

PDF Embed API url NOT SUPPORT

  • December 8, 2023
  • 1 reply
  • 423 views

This is  my url "https://assets.layupcloud.com/uploads/ks/documents/5abeaaad4ca131d6b30e444712d4df25.pdf"

This code:

<!--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">
var viewerConfig = {
showAnnotationTools: false,
enableFormFilling: false,
showDownloadPDF: false,
showPrintPDF: false,
showZoomControl: true,
defaultViewMode: "", /* Allowed possible values are "FIT_PAGE", "FIT_WIDTH", "TWO_COLUMN", "TWO_COLUMN_FIT_PAGE" or "". */
};
document.addEventListener("adobe_dc_view_sdk.ready", function()
{

var adobeDCView = new AdobeDC.View({clientId: "client_ID", divId: "adobe-dc-view"});
adobeDCView.previewFile(
{
content: {location: {url: "https://assets.layupcloud.com/uploads/ks/documents/5abeaaad4ca131d6b30e444712d4df25.pdf"}},
metaData: {fileName: "5abeaaad4ca131d6b30e444712d4df25.pdf"}
}, viewerConfig);
});
</script>
</body>
</html>

Error msg:

Please give me solution for this?

    This topic has been closed for replies.

    1 reply

    Raymond Camden
    Community Manager
    Community Manager
    December 8, 2023

    It's a CORS error. You need to specify your CORS header on layupcloud.com to allow for Embed to be able to read the PDF at that URL.