Jump to content

Output to pdf in browser issue


kellyalan

Recommended Posts

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? 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/286660-output-to-pdf-in-browser-issue/
Share on other sites

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.

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.