kellyalan Posted March 2, 2014 Share Posted March 2, 2014 Hello and thanks in advance for any advice until recently, when our pdf was displayed in the browser, the whole pdf showed up - now (within the past 2-3 months) only about 1/3 of it shows Here's the page http://www.manofsteelesports.com/nonjphp/report.php?sid=128&a=d728d31d84495231a61b35d1ad7ccdcd&b=pdf I've looked at this in both Chrome and IE the php statement we're using in the PHP file that converts the HTML to pdf is $pdf->Output(); //Outputs on browser screen Any ideas on why this is happening and how to fix it? Quote Link to comment https://forums.phpfreaks.com/topic/286660-output-to-pdf-in-browser-issue/ Share on other sites More sharing options...
ginerjm Posted March 2, 2014 Share Posted March 2, 2014 When you say only so much shows up, do you mean the rest is completely unavailable, or that the size of the image has increase so that one must scroll to view the full contents? Quote Link to comment https://forums.phpfreaks.com/topic/286660-output-to-pdf-in-browser-issue/#findComment-1471263 Share on other sites More sharing options...
kellyalan Posted March 3, 2014 Author Share Posted March 3, 2014 the full pdf is there but what's displayed has decreased so that one must scroll to see the rest of the report Quote Link to comment https://forums.phpfreaks.com/topic/286660-output-to-pdf-in-browser-issue/#findComment-1471342 Share on other sites More sharing options...
Psycho Posted March 3, 2014 Share Posted March 3, 2014 (edited) I think you are talking about the fact that the embedded object is only taking up a small portion of the vertical space. I don't quite understand it either, but here is a fix. 1) Add the following to the BODY tag: style="overflow:hidden; height:100%;" 2) Add the following to the EMBED tag: style="position: absolute;" I tested it with your page and it worked for me. Of course, you could also just put these properties int he appropriate style sheet as well. Edited March 3, 2014 by Psycho Quote Link to comment https://forums.phpfreaks.com/topic/286660-output-to-pdf-in-browser-issue/#findComment-1471343 Share on other sites More sharing options...
kellyalan Posted March 6, 2014 Author Share Posted March 6, 2014 Thanks for the reply -- I tested it also by adding these to a test html page and uploading it -- however, do you have any advice as to how to find the original file that brings this report together to display it in the browser? I've downloaded the entire file, searched for embed and body - nothing is coming up. Isn't there one file that brings all of the pieces together? For example - here's the test page http://manofsteelesports.com/nonjphp/test-pdf.html here's the "real" page - http://manofsteelesports.com/nonjphp/report.php?sid=128&a=d728d31d84495231a61b35d1ad7ccdcd&b=pdf Really appreciate your help! Quote Link to comment https://forums.phpfreaks.com/topic/286660-output-to-pdf-in-browser-issue/#findComment-1471657 Share on other sites More sharing options...
Solution kellyalan Posted March 6, 2014 Author Solution Share Posted March 6, 2014 nevermind! Yes -- found it -- HUGE thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/286660-output-to-pdf-in-browser-issue/#findComment-1471659 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.