Solved

php to fit when print in paper

Posted on 2008-10-06
6
710 Views
Last Modified: 2012-05-05
Are there any method to make php print fit in the paper Pdf is the only choiice or have another method
please suggest
0
Comment
Question by:teera
  • 3
  • 2
6 Comments
 
LVL 14

Accepted Solution

by:
ali_kayahan earned 250 total points
ID: 22647981
       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
 

Author Comment

by:teera
ID: 22647990
and it will fit with paper wheter i use Firefox or IE
0
 
LVL 14

Expert Comment

by:ali_kayahan
ID: 22648004
  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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 34

Assisted Solution

by:Beverley Portlock
Beverley Portlock earned 200 total points
ID: 22648016
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
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 22648030
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
 
LVL 14

Assisted Solution

by:ali_kayahan
ali_kayahan earned 250 total points
ID: 22648196
 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now