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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Malaysia
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Print in A4 Format for Any Sizes of Pages

    Hi all, I am using PHP to pull results from MySQL databases, i.e. I will have an output page that shows a table with all rows and columns.

    The problem with this is that if your results page is huge and you use the Internet Explorer print, it will print out exactly the size you see on your browser...so half of the page of results will not be printed if I choose A4 size (while the whole page of results can only be seen in A3 or so...)

    Is there anyway of making a PHP function such that you can resize whatever sizes of tables into A4 format? Any references will be of great help, thanks!

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do you mean the table is too wide or too tall/long?

    If it's too wide, then just set the width of the table to however many pixels an A4 page is.

    If it's too tall/long, then you may want to use page breaks. However, if you can't control the results from being too huge, then you're sort of out of luck here..

    Another option could be to use headers to open this results page in Word (if your audience will be using IE for sure)... if that helps any.

    Sadiq.

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Malaysia
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your suggestion. I think you're right, there is no luck in trying this "print A4" idea. I have searched through many sources and also no luck. The only way now is too restrict the table size to A4 format.

    I have another idea though. Since PHP can generate image on the fly, maybe I can try this method too.


  •  

    Posting Permissions

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