Solved

php to fit when print in paper

Posted on 2008-10-06
6
718 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to implement server side field validation and display customized error messages to the client.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …

622 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