Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Help with generating a printed page..

Posted on 2005-04-19
6
Medium Priority
?
182 Views
Last Modified: 2010-04-06
=======Where i am at =======
ok i am working on an PHP invoicing system and now i need to generate the dreaded printed page.. i have it this far.. i created an invoice inside of a inline frame with some javascript to resize the frame to match the current browser size.  I then have a print button on that page that prints out the area inside of the iframe.  I also have the page setup using absolute div blocks so that all the content fits accordingly on a 8.5x11 printed page.  

=======Where i am stuck =======
I have never used any of the CSS commands for page breaking.. what i would like is to have the program page break after x many of lines...  the tricky part is some of the lines are comment lines whihc can span multiple lines in height.
0
Comment
Question by:mightofnight
  • 3
  • 2
6 Comments
 
LVL 8

Assisted Solution

by:inq123
inq123 earned 800 total points
ID: 13817405
Hi mightofnight,

Try follow advice from these pages for controlling printing with CSS:

http://www.xml.com/pub/a/2005/01/19/print.html (margin, etc. topics)
http://www.htmlgoodies.com/beyond/css/article.php/3470341 (just usage of page-break-...)

Cheers!
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 13817881
Is the printing being done on an intranet, or across the web?

Cd&
0
 
LVL 2

Author Comment

by:mightofnight
ID: 13817972
intranet, on both linux and windows...

I have thought about seeing if i can find a monospaced (typewriter font) to use then count the characters.. figure out how many characters per line and thus figure out how many lines and then so i know where to place the page breaks.. but thats seams overly complicated..
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:mightofnight
ID: 13818018
oh wait never mind the client will always be windows... my bad... the servers themselves is what will vary
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 1200 total points
ID: 13818097
For something as critical as an invoice you probably do not want to HTML for printing.  Abetter option would be to use a pdf.  If you must keep is HTML then you can use active like like this piece: http://www.meadroid.com/scriptx/index.asp

That is not to say you can't do it with CSS, but if you do, it will tend to be very maintenance intensive.  If your environment is very standardize as to browser OS an printers, you can get the set up right, and force the setup you need on to user workstations, but any cahnge may result in haveing to modify the printlayout.  If you are in a mixed environment you may need to define more than one setup, or settle on a compromise.

If yo go with CSS keep it very loose with large margins especailly the bottom, and if you are trying print tables look at a print friendly page without tables, because table can really mess up the printing.

Cd&
0
 
LVL 2

Author Comment

by:mightofnight
ID: 13818230
hum well i have looked into pdf solutions and it is where i want to go.. my only complaint has been that adobe 6 was always slow in opening.. fortnutally they have addressed this in version 7.. I want to offer a option for the user to chose both pdf and html prining methods..  I belive i have a pretty flexiable solution with output seperated from programming and a very simple css style wil no tables.  I think for simplicity i am just going to limit the comments and make a fixed size...
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

810 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