Click to See Complete Forum and Search --> : Can I print text sidewards? + Printing records to A4 + Is it OK to print?


OM2
12-17-2008, 03:05 PM
I want to write a mini application that reads in sales data and produces invoices and labels, I'll be doing this in PHP

In some cases it might be needed to print text sidewards
Is this doable? I assume that's just a case of manipulating CSS?
I'm sure I've seen it done in CSS??

Each sale record will need to be printed as individual invoices
Each invoice needs to be printed on a seperate A4 page
How easy is this? Is it possible to have a Page Break character that tells the printer to print the next content on a new page?
I can't think of anything in CSS that would allow this

Lastly: is it good idea to print from the browser???
I would get rid of the header and footer from being printed
But would there be anything else to consider that would make it a bad idea to use the browser as a report generation + printing mechanism?
(OK... so maybe the last point isn't CSS related... but I thought I'd try asking anyway)

Thanks


OM

felgall
12-17-2008, 04:52 PM
The best way to control exactly how the page is going to look when printed is to create the page as a PDF rather than as HTML. That way you are not subject to any browser setting considerations and can even use specific fonts whether the individual computer has them or not. Take a look at www.fpdf.org for a library of PHP to PDF functions that makes it as easy to create a PDF from PHP as it is to create HTML.

OM2
12-17-2008, 05:01 PM
hmmm i think that sounds like the best solution
it does create the extra step of making user needing to open the pdf: ultimately though... as u say, its the best solution

thanks