Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Posts
    311
    Thanks
    17
    Thanked 0 Times in 0 Posts

    PDF won't display in iframe

    Hey All, and season's greatings!

    I have a page in a php based web app (Sugar CRM) which contains a number of hidden divs which unhide conditionally, and would like to add a div
    containing an Iframe with a source of Untitled.pdf.

    While the following snippet tests fine all by itself in test.html, when added to the intended.html the iframe returns only PDF code garbage.

    Has anyone experienced / is there a good explanation / soultion for this?

    PHP Code:
    <div id="review_report_div" style="visibility:visible; width: 700px; height:700px; position:absolute; z-index:100" >
        <
    iframe name="review_report_frame" id="review_report_frame"
            
    src="data/inspection_pdfs/Untitled.pdf" 
            
    width="100%"style="height:100em" ></iframe>
    </
    div

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Location
    UK
    Posts
    151
    Thanks
    9
    Thanked 2 Times in 2 Posts
    i tried this and it worked fine for me

    Code:
    <div id="review_report_div" style="visibility:visible; width: 700px; height:700px; position:absolute; z-index:100" >
        <iframe name="review_report_frame" id="review_report_frame"
            src="random.pdf" 
            width="100&#37;"style="height:100em" ></iframe>
    </div>
    try putting the whole path to the file see if tht makes a difference


  •  

    Posting Permissions

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