Skip to main content
Participating Frequently
October 29, 2020
Question

Gerring File preview Error

  • October 29, 2020
  • 1 reply
  • 2162 views

Getting the error "File preview Error" File preview not available, please reload to try again.

    This topic has been closed for replies.

    1 reply

    Joel Geraci
    Community Expert
    October 29, 2020

    Can you share your code? The dialog doesn't provide enough information to diagnose the issue.

    Participating Frequently
    October 29, 2020

    Hi find the below code. This was working fine some days back, There is no change since it was working.

    $.getScript("https://documentcloud.adobe.com/view-sdk/main.js", function () {
    var viewerConfig = {
    showAnnotationTools: false,
    enableFormFilling: false,
    showLeftHandPanel: true,
    showDownloadPDF: true,
    showPrintPDF: true,
    showPageControls: true,
    dockPageControls: true,
    defaultViewMode: "", /* Allowed possible values are "FIT_PAGE", "FIT_WIDTH" or "". */
    };

    var ids = {
    "st-prev-www.gepower.com": "61d3e4e8c8414c18ab503e069393145b",
    "st-gaspower.portal.ge.com": "fabf91fe9c9343bb92f9b12ce4dc0cdc",
    "prev-www.gepower.com": "372b3ea823ba48ad9f15518d428b9a38",
    "gaspower.portal.ge.com": "815531dec4ea49839d7d45e5b8b7e3c4"
    };

    /* Wait for Adobe Document Cloud View SDK to be ready */
    document.addEventListener("adobe_dc_view_sdk.ready", function () {
    /* Initialize the AdobeDC View object */
    var adobeDCView = new AdobeDC.View({
    /* Pass your registered client id */
    clientId: ids[location.hostname],
    /* Pass the div id in which PDF should be rendered */
    divId: "pdf_modal",
    });

    /* Invoke the file preview API on Adobe DC View object */
    adobeDCView.previewFile({
    /* Pass information on how to access the file */
    content: {
    /* Location of file where it is hosted */
    location: {
    url: $('.pdf_btn').data('pdfpath'),
    },
    },
    /* Pass meta data of file */
    metaData: {
    /* file name */
    fileName: $('.pdf_name').data('pdfname')
    }
    }, viewerConfig);
    });
    });

    Participating Frequently
    November 6, 2020

    Hi 

     

    It did wrok for sometime and then from yesterday its onwards its giving same error.

     

    Subhendu


    Hi

    I figured out there some special charecters which was causing this error.

     

    Thanks a lot for the help. Really appriciated.

     

    Subhendu