Jump to content

Output to pdf in browser issue


kellyalan
Go to solution Solved by 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
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.

Edited by Psycho
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.