Re: Pre-printed forms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----- From: "Man-wai Chang" <toylet.toylet@xxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, September 14, 2006 1:35 PM
Subject:  Pre-printed forms



How do you guys and gals use PHP+HTML+CSS to print a report to
preprinted forms with precision?

if the report is to be printed at client side, how do you do it? Via
networked printer?


To start with, I would avoid pre-printed forms it at all possible. The best option is to design the 'pre-printed' part as a pdf file and then add the variable parts and print the whole in plain white paper or with a continuous security background.

PDF is the best solution either way, but anyhow, there are technical and mechanical problems. If the printers are single-sheet and they are all the same mode, it is relatively easy, a few trials will get everything going fine.

If they are different models, each model has different printable areas so the setup for one is not useful in the next. You will either have to have a table of settings for each printer model or a separate CSS for each model and a table of printers with which printer is what model and use the table settings or the customized CSS for that model.

Also, with HTML + CSS printing, you have the problem that browsers reserve a space for header and footer on each page and that is not standardized so the printing area, as defined by the printer model, will be further reduced in different degrees by the browser.

Another alternative is to have a print trial page available so that if the client changes printer or notices it is printing off key, they can print the trial page which won't contain actual data but a grid that the client can use to align the following printouts. Much like one of those forms ink-jet printers print when you change cartridges, you would have to provide a scale relative to some visible line in the pre-printed so that the user enters the two grid values that best fit the form, you store them in the profile for that client/printer combination and use it on further printouts.

If the printer to be used are dot-matrix, such as if the form has to be printed with carbon copies, then you have the further problem that Windows programs would switch the printer to graphics mode, which slows them to a crawl. Most pre-printed forms are designed for standard pitches of 6 or 8 lines per inch. Graphics environments let you get out of that grid, but it slows everything. Using the normal print mode of the printer makes everything easier since the forms are designed for the printer pitch so once you get the first line going, all the rest of the page follows. Unfortunately there is no way, from a normal application in a graphics environment such as Windows, to use a purely character by character printer, unless you do an ActiveX control and communicate with the printer via the serial port.

Many alternatives, no easy solution (except for droping the pre-printed forms)

Satyam

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux