Question
How to Allow Adobe Sign Combined PDF document URL to load in PDF Embed API(DC View SDK)
Hi,
I am trying to embed a PDF using PDF Embed API. The PDF URL is generated using "combinedDocument/url" Adobe Sign API. When loading this URL using PDF previewer, I'm getting a CORS error as shown below.
Access to XMLHttpRequest at 'https://adobesign.com/document/cp/document.pdf' from origin 'https://google.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This is my View SDK PDF Preview Code.
previewFile(divId: string, viewerConfig: any) {
const config: any = {
clientId: 'CLIENT_ID',
};
if (divId) { config.divId = divId;}
this.adobeDCView = new window.AdobeDC.View(config);
const previewFilePromise = this.adobeDCView.previewFile({
content: {
location: {
url: 'https://documentcloud.adobe.com/view-sdk-demo/PDFs/Bodea Brochure.pdf',
},
},
metaData: {
fileName: 'Bodea Brochure.pdf',
}
}, viewerConfig);
return previewFilePromise;
}
Since the PDF resource is Adobe sign, how to allow my website to access PDF from Adobe Sign Secure URL.
Thanks!!
