Benjamin Scott wrote:

>   Anything else will be a hack, and not a pretty one.
>
>   However, "anything else" is almost always what you have to do, since forms
> are designed by pencil pushers, not written by programmers.
>
>   But I suspect you have already realized all that.  I just figured your
> misery might appreciate some company.  :-)

Company greatly appreciated.

> > (This is what the programmer does by hand. It takes him a week or several
> > for each printer. He manually aligns each field's position and fonts by
> > handwriting PCL.)
>
>   Sounds like you got yourself a "Real Programmer" there.  ;-)

Ayup. Sort of. All his code is Clipper (DOS). So it's dbase code to write raw PCL.
Ponder DOS device drivers written in dbase.

> > I'm trying to get the original PageMaker 6.5 document from which the PDF
> > was generated with Adobe Distiller.
>
>   We discovered that getting the source to a government form usually takes
> something like an Act of Congress.  In some cases, literally.

Discovering that. At least I have other folk to wade through that mess for me.
(Thank the gods.)

> > Even better would be getting the original author (HUD) to distill it as a
> > fillable PDF form.
>
>   Now, that would make sense.  And we're dealing with the government.  I think
> Mark Twain said it best: "Now, suppose you were a Congressman.  And suppose
> you were an idiot.  But I repeat myself."

Total agreement there.

> > 2) Parse the PDF.
>   That would be a truly impressive hack, if you can do it!  :-)

Actually had to do this somewhat for another project related to workers' comp
injury reports. Might be able to adapt, but the PDF was revisable format, not
final. We had the original documents in some cases and could fill in the
placeholders. So it was easier.

> > 3) Convert & Edit the Postscript.
>  This is basically a variation on your #2 option.  See my response to your #2
> option.  :-)

If the Postscript was more legible this wouln't be too bad (I read Postscript
fairly well - I like Forth), but machine generated stuff through a conversion has
proven to be challenging. A Postscript editor like Illustrator might work. I have
to give it a shot.

> > 4) Programmatic Overlay.
>
>   We honestly found this presented the least amount of pain over time.
>
>   (1) You take your form in whatever format it is given, and generate some
> kind of usable bitmap graphic from it.  (The program on this project used a
> Microsoft Windows Metafile, 'cause it was a Windoze program.)
>
>   (2) You create or borrow a specification language which says where on the
> bitmap the fields are to print out.  These days, I'm thinking XML.  (The
> program on this project used something based on Windoze .INI files... same
> reason.)
>
>   (3) You write a GUI program which throws the bitmap from (1) up on the
> screen, and lets you add/edit/remove field specifiers.  The end result is a
> specification conforming to (2).
>
>   (4) You write a program which takes the bitmap from (1), the specification
> from (3), and a data set, and outputs the end result for printing.
>
>   This creates a flexible, permanent solution.  You can adapt to new source
> form formats (the input to (1) above) by changing your graphics conversion
> filter.  You can adapt to revisions of the source form easily using the
> program from (3) above.
>
>   Yes, this is a lot of work up-front.  However, we found the overhead of
> maintaining ad-hoc solutions (like the one you are currently stuck with) paid
> for the initial development costs over time.

That was my feeling as well. I have to work with a DOS application at present, but
the principles are the same. The form filler/printer will be a Linux app, but I
may have to port to DOS. I'm going to try running the custom app under DOSEMU
somehow invoking the Linux app - that should be interesting. The programmer
recommends Windows 2000 for running his DOS app, as it is more stable than Windows
9x! So PIII-600s with 256 MB RAM are being thrown at a DOS application to make it
run stable in a Windows environment. (It runs fine under DOS, just not so well
under in a DOS box under Windows.)

>   It occurs to me that someone else may already have done this, and released
> the source.  A 'net search might prove productive.
>
>   May the Source be With You!  :-)

Good point. A cursory look didn't turn up anything, but I haven't done a good
search.

--
Dan Jenkins ([EMAIL PROTECTED])
Rastech Inc., Bedford, NH, USA, 1-603-627-0443
*** Technical Support for over a Quarter Century

begin:vcard 
n:Jenkins;Dan
tel;fax:1-603-627-7513
tel;work:1-603-627-0443
x-mozilla-html:TRUE
url:http://www.rastech.com
org:Rastech Inc.
adr:;;21 Curtis Lane;Bedford;NH;03110;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Technical Director
fn:Dan Jenkins
end:vcard

S/MIME Cryptographic Signature

Reply via email to