Jump to content


Photo

Output to pdf in browser issue

php pdf output browser

Best Answer kellyalan, 06 March 2014 - 12:42 PM

nevermind! Yes -- found it -- HUGE thanks for the help

Go to the full post


  • Please log in to reply
5 replies to this topic

#1 kellyalan

kellyalan

    Member

  • Members
  • PipPip
  • 17 posts

Posted 02 March 2014 - 12:02 PM

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.manofstee...1ad7ccdcd&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? 

 

 

 

 



#2 ginerjm

ginerjm

    Advanced Member

  • Members
  • PipPipPip
  • 1,562 posts
  • LocationVoorheesville NY

Posted 02 March 2014 - 01:08 PM

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?


JG

PS - If you're posting here you should be using:
        error_reporting(E_ALL | E_NOTICE);
        ini_set('display_errors', '1');

at the top of ALL php code while you develop it!


#3 kellyalan

kellyalan

    Member

  • Members
  • PipPip
  • 17 posts

Posted 03 March 2014 - 12:41 PM

the full pdf is there but what's displayed has decreased so that one must scroll to see the rest of the report



#4 Psycho

Psycho

    Advanced Member

  • Gurus
  • 10,789 posts
  • LocationCanada

Posted 03 March 2014 - 01:09 PM

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, 03 March 2014 - 01:09 PM.

The quality of the responses received is directly proportional to the quality of the question asked.

I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net

#5 kellyalan

kellyalan

    Member

  • Members
  • PipPip
  • 17 posts

Posted 06 March 2014 - 12:26 PM

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://manofsteelesp...p/test-pdf.html

 

here's the "real" page - http://manofsteelesp...1ad7ccdcd&b=pdf

 

Really appreciate your help!



#6 kellyalan

kellyalan

    Member

  • Members
  • PipPip
  • 17 posts

Posted 06 March 2014 - 12:42 PM   Best Answer

nevermind! Yes -- found it -- HUGE thanks for the help






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com