PdfViewer loads PDF but does not display

Posted by: paineb on 30 December 2019, 3:58 pm EST

    • Post Options:
    • Link

    Posted 30 December 2019, 3:58 pm EST

    Hello,

    I want to purchase docuemtns-pdf for a client ASPA however we are having issues getting the pdf view to display a pdf on an html page. The viewer loads (can see the pages etc.) however there is no content… just a light grey area yet all the viewer buttons render and appear to work. We pulled the code straight from your demo. Its being loaded in an html page as follows:

    GC Viewer Demo | PDF Plugin
  • Posted 1 January 2020, 5:47 am EST - Updated 29 September 2022, 11:15 pm EST

  • Posted 2 January 2020, 12:41 am EST

    Hi,

    The issue is because the PDFViewer host element’s height and width is not defined which causes the issue. Once the Width or height is defined, the content will be available.

    Please refer to the following code snippet for reference:

      <form id="form1" runat="server" >
            <div >
                <div id="root" style="height:98vh;width:1920px;"></div>
            </div>
        </form>
    

    Hope it helps!

    Regards,

    Manish Gupta

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels