Skip to main content
Participant
June 12, 2024
質問

PDF Embed API error while initializing AdobeDC.View

  • June 12, 2024
  • 返信数 1.
  • 425 ビュー

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 !!

    このトピックへの返信は締め切られました。

    返信数 1

    Participant
    June 12, 2024

    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 !!

    Participant
    June 12, 2024

    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 !!