Skip to main content
Participant
July 26, 2022
Question

api pdf > File preview not available, please reload to try again.

  • July 26, 2022
  • 0 replies
  • 340 views

Hello PDF Embed API File preview work for a day and dince that I've got File preview not available, please reload to try again.

The page is https://luvilor.fr/catalogue-en-ligne.html

The code is

<script src="https://documentcloud.adobe.com/view-sdk/main.js"></script>
        <script type="text/javascript">
           /*
Copyright 2019 Adobe
All Rights Reserved.

NOTICE: Adobe permits you to use, modify, and distribute this file in
accordance with the terms of the Adobe license agreement accompanying
it. If you have received this file from a source other than Adobe,
then your use, modification, or distribution of it requires the prior
written permission of Adobe.
*/

/* Pass the embed mode option here */
var viewerConfig = {
    showAnnotationTools: false,
    enableFormFilling: true,
    showLeftHandPanel: true,
    showDownloadPDF: false,
    showPrintPDF: false,
    showPageControls: true,
    dockPageControls: true,
    defaultViewMode: "FIT_PAGE", /* Allowed possible values are "FIT_PAGE", "FIT_WIDTH" or "". */
};

/* Wait for Adobe Document Services PDF Embed API 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: "b981667bfa0b4349b4be4a3b9903616a",
        /* Pass the div id in which PDF should be rendered */
        divId: "adobe-dc-view",
    });

    /* 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: "httpS://www.luvilor.fr/catalogue/catalogue-luvilor-juillet-2022-sans-prix.pdf",
                /*
                If the file URL requires some additional headers, then it can be passed as follows:-
                header: [
                    {
                        key: "<HEADER_KEY>",
                        value: "<HEADER_VALUE>",
                    }
                ]
                */
            },
        },
        /* Pass meta data of file */
        metaData: {
            /* file name */
            fileName: "catalogue-luvilor-juillet-2022-sans-prix.pdf"
        }
    }, viewerConfig);
});

</script>
Can someone help me to let appear the pdf on the website without error please?

Thank you

 

    This topic has been closed for replies.