• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 722
  • Last Modified:

php to fit when print in paper

Are there any method to make php print fit in the paper Pdf is the only choiice or have another method
please suggest
0
teera
Asked:
teera
  • 3
  • 2
3 Solutions
 
Ali KayahanFull Stack DeveloperCommented:
       By changing the media type of your css file you can make special adjusments for print, just add one more css file in addition to your current css and set media as print..

<link rel="stylesheet" href="my_print_css_file.css" type="text/css" media="print" />
0
 
teeraAuthor Commented:
and it will fit with paper wheter i use Firefox or IE
0
 
Ali KayahanFull Stack DeveloperCommented:
  I just mean that , you can specify a special CSS file just for prints by this way ;

   <link rel="stylesheet" href="my_print_css_file.css" type="text/css" media="print" />

  So if there is some kind of outfit , than you can adjust it on the CSS file that you wrote for print, and it wont effect the browser behaviour...
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Beverley PortlockCommented:
It depends how important accuracy of layout is. If you need the layout to be exact then PDF is the only way. CSS is not good enough (yet!)
0
 
Beverley PortlockCommented:
Another point that springs to mind is that the browsers often add "headers" and "footers" and these cannot be turned off by CSS, so you will get URLs, dates, times, page numbers etc across the tops and bottoms of the print outs.
0
 
Ali KayahanFull Stack DeveloperCommented:
 So you should give a try to CSS , and if the result is not good enough than we may try to use a kind of pdf class..
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now