1829907 Members
2831 Online
109993 Solutions
New Discussion

Fancy Printing

 
SOLVED
Go to solution
Doug Dell
Advisor

Fancy Printing

Hello,

I am looking for a package which can take plain text and convert it to fancy output with boxes, different fonts, colors,
and possibly logos. I need it for several unix platforms including Sun and HP and also I would like to run the same package on W2K or NT. Any ideas?


Thanks in Advance, Doug
14 REPLIES 14
Eugen Cocalea
Respected Contributor

Re: Fancy Printing

Hi,

Try Latex

http://www.latex-project.org

E.
To Live Is To Learn
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Fancy Printing

Hi Doug:

My weapon of choice would be a product called 'UnForm'. http://www.unform.com

I warn you that this is not is WYSIWIG, GUI-based forms builder product but is rather a
text-based programming product. The idea is rather simple, Unforms examines the incoming data looking for regular expressions. When it finds something it recognizes (e.g. MYREPORT at column 3 line 7), it applies a set of 'rules' to the output. You can move output from anywhere to anywhere, apply colors, dulpex, fonts, graphics ...

All of the rules can be contained in one file; if not match is found, stdin is simply echoed to stdout. It is very easy to integrate into lp. It is really only geared toward's PCL printers but you can also producr HTML and PDF output. I will say that building forms is tedious but because there is an underlying BASIC interpreter, one can do virtually anything. You have variables, access to external files, environment variables, command line args, and arrays. The BASIC syntax tends to drive me crazy and I would love to give the person who wrote the parser yacc/lex lessons but it does work. And yes, it runs on HP, Solaris, WinNT, and Win2K.

The good news is that you can download a fully funcional 30-day trial version. If you find that you like the product, I can give you a few functions and techniques that I've found to be useful.

Regards, Clay
If it ain't broke, I can fix that.
Andreas D. Skjervold
Honored Contributor

Re: Fancy Printing

Hi
We use a2ps (ascii to postscript) to do formatting.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Bill McNAMARA_1
Honored Contributor

Re: Fancy Printing

what's wrong with html output aka netscape composer/browser?

Later,
Bill
It works for me (tm)
Doug Dell
Advisor

Re: Fancy Printing

Thanks everyone for your responses. I forgot to mention that in addition to Laserjet output , we also need to be able to fax the same output. We use vsifax now. We don't need any HTML or PDF output just printers and faxes.

Doug
A. Clay Stephenson
Acclaimed Contributor

Re: Fancy Printing

Hi again Doug:

My answer is still the same - UnForm. Our ERP system outputs plain text and the same code can send output to an HP printer, to the FAX server, or to email. VsiFax understands PCL input and it can then in turn fax the output or email it. All of this simply looks like a spooljob to the application. In fact, the same UnForm rules file does all three outputs and simply does some minor branching. For example, a printed form might be allowed to duplex but a fax would not. The interface file simply sets and exports some environment variables to tell the rules file that this is a color printer, this is a fax, this printer can duplex, ... . If you do need to fax and print output, you do need to be aware that the font set that VsiFax supports is limited. You simply have to make sure that you don't use any fonts in your rules files that are not
supported by VsiFax PCL files.

Hope this helps, Clay
If it ain't broke, I can fix that.
Doug Dell
Advisor

Re: Fancy Printing

Hello again:

Thanks everyone for your quick responses. This is great! It looks like A. Clay's suggestion of UnForm is the best fit for us. I downloaded the trial version and it looks good. A. Clay, the manual mentions something about run-time slots. How many of those do I need to buy? One for each simultaneous print/fax job?

Thanks again, Doug
A. Clay Stephenson
Acclaimed Contributor

Re: Fancy Printing

Hi Doug:

That depends. On UNIX platforms (I don't know what the Windows versions do), UnForm is actually invoked from a shell script. It first queries the actual executable to determine if a license is available. If so, the the job is processed; if not, then the job is retried a configurable number of times with a configurable delay between each attempt. In our case, I purchased 3 run-times for each of our production servers. Unform is heavily used
and I have not seen a problem printing jobs all over the world with 3 run-times, 5 retries, and 15 second delays between attempts.
The good news is that the additional run-times are quite cheap but I feel very sure that only a few will be actually needed. In fact, knowing what I know now. I would probably only purchase 2 run times and up the retry count. Remember, the license is not tied up for the time required to actually PRINT the document but rather the time required for UnForm to process the document before submitting to the print queue.

I hope I've been somewhat clear, Clay
If it ain't broke, I can fix that.
Doug Dell
Advisor

Re: Fancy Printing

Perfect! Just what I needed to know. You mentioned giving me some tips. Can you do that, please?

Doug
A. Clay Stephenson
Acclaimed Contributor

Re: Fancy Printing

Hi Doug:

It's probably way too early to give you much help; it would only confuse you. I would say study the examples very carefully and start simple. The first one I did was very complex and that was a big mistake. I would code it completely differently now.

There are basically two approaches. 1) You are modifying output that you cannot change. 2) You are modifying output for which you have the source. Case 1 is covered pretty well by the supplied examples. Case 2 might be handled like this:

Each form should have a unique ID like 'CEMBOL' located in a fixed place. That makes spotting the kind of report very easy. After that string has done it's job, you can issue an erase command. We don't need it.
I actually like for the application programmer
to surround each field with C1~|Widget (Blue) |~. My convention is to use those two characters 'C1' as a tag. It identifies to me, what this element really is. Remember, all I know is that this is plain text. I also use the '~|' and '|~' pairs to delimit each field. I can then capture everything between those two delimiters and assign them to a variable. The applications programer gives me a list of what each field (tag) is.

Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Fancy Printing

Hi again:

One last point, in addition to the User Manual be sure to download the 'Programming in UnForm' manual. This is the manual which includes the Business Basic. You will need this when your programming starts getting more advanced. One thing that is not explained. All the functions can have an option ERR=lineref clause. This basically does a goto lineref when the function detects a run-time error (e.g. file not found). All the examples use a numeric lineref (goto 4500) but that does NOT work when Business Basic runs under UnForm. lineref must be a label (e.g. 'bugout:' with ERR=bugout). That drove me crazy because I was doing just like the book said and was getting syntax errors.

Clay
If it ain't broke, I can fix that.
Doug Dell
Advisor

Re: Fancy Printing


Hey Clay, you won't believe this. I phoned the company that makes UnForm. I asked for some reference sites and your name came up. Is that cool or what?

Thanks for all your help.

Doug
A. Clay Stephenson
Acclaimed Contributor

Re: Fancy Printing

Wow! Does that mean my check from them is in the mail? For some reason, the guys at UnForm cringe when someone asks about the product and I always tell a potential customer "It's the least evil option I've found."

If it ain't broke, I can fix that.
Shawn Filliol
New Member

Re: Fancy Printing

You could also use a product called Planet Press Suite. It works similarly to Unforms but it comes with a nice graphical editor to design the form.

http://www.objectiflune.com

You can easily set it up to capture the ASCII/UNICODE data, merge with the selected form (based on conditions in the data stream) and output to printer, fax, e-mail, PDF???

We've successfully implemented this with a customer running SCO and it's been working very nicely.
Whether you think you can or think you can't, you're right. -- Henry Ford