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

Where can I store pdfs that I want to use with Adobe PDF Embed API?

New Here ,
Nov 05, 2022 Nov 05, 2022

I added the demo script below to my site with my client ID and it pulls in the pdf sample file as expected (URL in red).  I then added my own pfd URL and it fails to work.  I get a "File preview not available, please reload to try again" error. Here's the pdf I was trying to display:  https://medpower.com/s/himycasstatesubmissionfilecreation.pdf

Do I have to save the source PDF files in a special way or on a special website before I can pull them in using the PDF Embed API? I don't understand why the demo URL works, but mine does not.  Any help you can provide is greatly apprecaited!

 

 

<div id="adobe-dc-view" style="width: 800px;"></div>
<p>
<script src="https://documentservices.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: "XXXXXXXXXXXXXX", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://documentservices.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf"}},
metaData:{fileName: "Bodea Brochure.pdf"}
}, {embedMode: "IN_LINE"});
});
</script>
</p>

TOPICS
Acrobat SDK and JavaScript
9.1K
Translate
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 ,
Nov 05, 2022 Nov 05, 2022

I meant to include the code I tried using.  Here's the code I used that substitutes our pdf URL:

<div id="adobe-dc-view" style="width: 800px;"></div>
<p>
<script src="https://documentservices.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: "304002c69695484aa99865059b94aa87", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content:{location: {url: "https://medpower.com/s/himycasstatesubmissionfilecreation.pdf"}},
metaData:{fileName: "himycasstatesubmissionfilecreation.pdf"}
}, {embedMode: "IN_LINE"});
});
</script>
</p>

Translate
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
Community Expert ,
Nov 06, 2022 Nov 06, 2022
LATEST
Translate
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