PDF Embed API error while initializing AdobeDC.View
Copy link to clipboard
Copied
A wired issue is comming in one of our applicaton.
When we initialize AdobeDC.View we are getting an iFrame error.
var adobeDCView = new AdobeDC.View({
clientId: "95c21d7a16f446babca99abd2d935508"
});
And here is the error
I am loading viewer.js corerctly
<script type="text/javascript" src="https://acrobatservices.adobe.com/view-sdk/viewer.js"></script>
export function showPDF() {
if (window.AdobeDC) displayPDF2(pdfData,filename,client);
else document.addEventListener("adobe_dc_view_sdk.ready",
() => displayPDF2(pdfData,filename,client));
}
export function displayPDF2() {
const viewerConfig = {
embedMode: "LIGHT_BOX",
showDownloadPDF: true,
showPrintPDF: true,
showThumbnails: true,
showBookmarks: true,
defaultViewMode: "FIT_WIDTH",
exitPDFViewerType: "CLOSE"
};
console.log(1);
var adobeDCView = new AdobeDC.View({
clientId: "95c21d7a16f446babca99abd2d935508"
});
// Rest of the code removed.
}
Ideally i expected something like this to happen right after calling AdobeDV.View
Any idea why I am getting the iFrame error ?
Thanks in advance !!
Copy link to clipboard
Copied
Please do not look in to this right now. Looks like one of our component is interacting with PDF Embed Api. We are isolating the issue. I will come back with the results !!
Copy link to clipboard
Copied
Hello all,
Just ignore this case. Looks like it was because of a double navigation that we were having. Fixed it and viewer startes working !!

