Results 1 to 10 of 15

Thread: Can't get PDF to show in IFrame

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Beech Hill - a village near Reading in the UK

    Default Can't get PDF to show in IFrame

    I am trying to do a pretty simple thing and ATM it just isn't working.

    Use cWebModalDialog.pkg
    Use cWebPanel.pkg
    Use cWebButton
    Use cWebIFrame.pkg
    Object oViewer is a cWebModalDialog
        Set psCaption to "Viewer"
        Set piMinWidth to 1000
        Set piMinHeight to 800
        Object oMainPanel is a cWebPanel
            Set piColumnCount to 12
            Object oIFrame is a cWebIFrame
                Set piHeight to 700
                Set piColumnSpan to 0
                Set pbFillHeight to True
        Object oBottomPanel is a cWebPanel
            Set peRegion to prBottom
            Set piColumnCount to 12
            Object oCancelButton is a cWebButton
                Set psCaption to "Close"
                Set piColumnSpan to 1
                Set piColumnIndex to 11
                Procedure OnClick
                    Send Cancel
        Procedure PopupTheDialog Handle hReturnObj String sPath
            String sUrl
            Send Popup hReturnObj
            Get DownloadURL of ghoWebResourceManager sPath to sURL
            WebSet psUrl of oIFrame to sURL
    PopupTheDialog is called with the full file-path of a PDF file, which exists (C:\Statements\2015-02-25_2600370051.PDF, if it matters); C:\Statements has been registered as download folder; Get DownloadURL gets a pile of gobbledygook (DfResource/0EM_LYbShFZFjrXdIcn_IMjOjnTCe3WFTXXb5PN_RavG0d1JEj MGewmh_2KsqcbxgGKGnf-BFU9HjG-4P9wmTJTaSZ1-G_Hli126vY1gjva3mBE3c26zcQVn111P31mK0/2015-02-25_2600370051.PDF) into sURL, but when the dialog comes up, the IFrame is blank.

    Can anybody see what I am doing wrong?

    I am looking at that URL in the forum preview and seeing an apparent space character between "...JEj" and "MGew..." which isn't visible in what I pasted into the forum editor... wonder if that is a clue? Nah! I just moved it to a UChar[] and it isn't there - just "...1JEjMGew..." obviously a forum artifact.

    Last edited by Mike Peat; 2-Dec-2019 at 12:25 PM. Reason: an

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts