Re: [SLUG] [PIG] Writing checks from PHP

From: Ian C. Blenke (icblenke@nks.net)
Date: Thu Apr 27 2006 - 15:41:39 EDT


Paul M Foster wrote:

> Kwan Lowe wrote:
>
>>> Okay, here's (what I consider) an interesting programming problem. The
>>> idea would be to generate a check in your browser screen, and be
>>> able to
>>> print the screen and get a check on your own check forms (8-1/2x11).
>>> The
>>> screen would look just like your check, except for your company name,
>>> MICR printing, etc. Everything exactly where it would be when you print
>>> it on your checks (from NEBS or whoever).
>>>
>>> PHP is the language of choice here. But PHP has no ability to place
>>> screen objects at a certain position on the screen. Most likely, you'd
>>> have to have everything surrounded by the <PRE> tag, so it should print
>>> exactly what you want where you want it (assuming Courier or some
>>> similar font).
>>>
>>> Here's the other snag: the screen coordinates (line and column) for
>>> each
>>> part of the check (payee, date, etc.) are in a PostgreSQL database.
>>> This
>>> is so the user can configure the check depending on who he bought his
>>> checks from.
>>>
>>> I'm working on this myself, but since we've got programmers wanting to
>>> geek out, I thought I'd give everyone else a shot. Might be
>>> interesting.
>>>
>>
>> One option you may consider is to form the images in Postscript then
>> do a pstopnm
>> for preview. If OK, then pstopdf the image and send it. There are
>> some php/ps
>> modules available also:
>>
>> ttp://us2.php.net/ps
>>
>>
>
> Here's the problem with that. The pages are served up on a separate
> machine on the LAN. So the best way is to either generate a page which
> can be directly printed, or create a file which can by printed by the
> client (my machine). The printer directly connected to the web server
> is an old dot matrix, but the checks must print on my laser at my desk.

The problem with any Rasterized image is printing it. Programmatically
generating PDF is probably the most common solution to this problem, as
it is vector and should render properly to print.

There are numerous PDF libraries out there for just about every
programming language.

That'd be the direction I would go with this.

 - Ian C. Blenke <ian@blenke.com> http://ian.blenke.com/

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:04:32 EDT