paruby Posted April 2, 2006 Share Posted April 2, 2006 I know I can have approx 38 lines of text for a 1 page print out. I can keep track of the # of items I print out that are on their own line. Question is, how can I know if an item takes up 2 or more lines?Thanx in advance...Pete Quote Link to comment Share on other sites More sharing options...
txmedic03 Posted April 2, 2006 Share Posted April 2, 2006 You could count the sections based on xx number of characters per line. You could take each line as you have it divided already and then if it is divisable by xx number of characters the result is how many lines it covers. You can use wordwrap to divide the section into lines based on your criteria. If you need some examples, let me know, but for the moment I must head out the door. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted April 3, 2006 Share Posted April 3, 2006 It is incrediably difficult to control any printing from php. PHP is server side and what happens client side is an different story.NOW printing is not the same world-wide I am informed that those in the US don't use the A4 size - predominant in european countries.You absolute best route of atck on this is to use a style sheet. just like anyother style sheet you can create one just for printing by adding the media="print" to the end of the link tag in the head section.Even then you are not guaranteed exactly what you want different printers and different drivers can alter margin sizes (although you can set them in your style sheet), and any number of default settings that you just cannot account for. Quote Link to comment Share on other sites More sharing options...
paruby Posted April 9, 2006 Author Share Posted April 9, 2006 thanx, both suggestions are helpful... One final question, is there a way to force a new page? Quote Link to comment Share on other sites More sharing options...
txmedic03 Posted April 9, 2006 Share Posted April 9, 2006 I am sure there is probably a way, but I honestly don't know. The best thing I can say is to add line feeds/carriage returns. Like ToonMariner said, controlling printing from PHP is tricky. I don't work a lot with printing, so I don't know a whole lot about working with printer output from PHP and because of this there is probably an easy way to do it that I just don't know about. If someone has a quick and easy solution, I'd love to know about it just for kicks and grins. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.