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

PDF Embed API url NOT SUPPORT

New Here ,
Dec 08, 2023 Dec 08, 2023

Copy link to clipboard

Copied

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:

heshan34130091y5m6_0-1702031090264.png

Please give me solution for this?

Views

121

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 ,
Dec 08, 2023 Dec 08, 2023

Copy link to clipboard

Copied

LATEST

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.

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