• 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 Got error

New Here ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

Hello comunity i am just create a PDF Embed API for embeded api but when i try to run the code come a error which is : File preview error > File preview not available, please reload to try again.  I Try all posible ways But Not work .

Resister Domain With : cdnlottery.s3.eu-central-003.backblazeb2.com

 

Please suggest me how to fix it

 

Code is 

<!--Get the samples from https://www.adobe.com/go/pdfembedapi_samples-->
<!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/viewer.js"></script>
 <script type="text/javascript">
    document.addEventListener("adobe_dc_view_sdk.ready", function()
    {
        var adobeDCView = new AdobeDC.View({clientId: "myClientID", divId: "adobe-dc-view"});
        adobeDCView.previewFile(
       {
          content:   {location: {url: "https://cdnlottery.s3.eu-central-003.backblazeb2.com/pdf/MN180822.pdf"}},
          metaData: {fileName: "MN160822.PDF"}
       });
    });
 </script>
</body>
</html>
TOPICS
PDF Embed API

Views

697

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 ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

I tried your PDF in our online demo and it worked fine there. Do you see any error messages in your browser console? Is this avaiable online where I can see?

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
New Here ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

But Unfortunetly not work for me please cheack at : https://provider.mlmhut.com/pdftest/next.html

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
Adobe Employee ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

LATEST

It's a CORS issue. You can see it in the browser console:

 

Access to XMLHttpRequest at 'https://cdnlottery.s3.eu-central-003.backblazeb2.com/pdf/MN180822.pdf' from origin 'https://provider.mlmhut.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

The server that hosts the PDF file needs to allow for remote loading of the resource. 

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