Jump to content

Printing - # lines used?


paruby

Recommended Posts

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.
Link to comment
https://forums.phpfreaks.com/topic/6411-printing-lines-used/#findComment-23270
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/6411-printing-lines-used/#findComment-23319
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/6411-printing-lines-used/#findComment-25154
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.