[comp.lang.postscript] Richard and his many up print program

csbg@its63b.ed.ac.uk (Bruce) (02/05/88)

richard@gryphon.CTS.COM (Richard Sexton) writes:
> Alright.  I'm sick of seeing those "where can I get the include
> files printed two columns to a page" postings.
> 
> Here is a program that splits text into any number of columns
> and produces a postscript file, suitable for framing.
> 
> It handles any font, any size, you can specify # of lines
> per page, all that good stuff.
> 
> It probably isn't as good as the one Clayton Cramer announced
> in comp.newprod, but it's free.
> 
> This is not a great example of intelli... inteli... intael.. real
> swift PostScript programming, but it works.
> 
> ======== snip snip snip =================== snippity snip snip ===========
> 
> [Program deleted]

Unfortunately, the end of the program seems to have been swallowed by some
line munching beast as it came to us over the net. Please post it again
Richard as I'm sure that a lot of people (most of them resource managers)
would be very happy to have a copy of the full working program.

The state of the end of the program on our machine was as follows:

>    fprintf (out, "\nshowpage\n");
> 
>    fprintf (out, "%sPage %d %d\n", pp, page_nbr - 1, page_nbr);
>    i
> 

Bruce Gilmour              ! "You'll never be a Shakespearean actor, Spock!"
Comp Sci Department        ! "But I know that I can do it."
James Clerk Maxwell Bldg   ! "OK then, let's hear some Hamlet!"
The King's Buildings       ! "To be or not to be -
University of Edinburgh    !                       that is illogical Captain"
Edinburgh                  !           - Spitting Image (Central TV)

tj@gpu.utcs.toronto.edu (Terry Jones) (02/08/88)

Not to be too much of a downer on this one, but I was delighted to see this
come across the net and quickly ported it to MS DOS to print text files
on a PC to a PS printer. I used Turbo C.

No problems compiling. Some in execution.
First was file names. He adds .ps to the name and this results in some
bad msdos names like fred.dat.ps!!! so I made it CHANGE the extension
to .ps. 

The comments at the beginning indicate that it is conforming PostScript
and is thus reversible and it seems to fail when reversed by Adobe
transcript here. I didn't look to see where it fails this, I just
changed the first comment to NOT say PS-Adobe-1.0. Also the
first comment started with %% which our spooler doesn't recognize since it
wants %! to tell it that it is PostScript! (I was testing output on Unix
so from the true PC environment these aren't a problem but others will
run into this and I want it the same in all my environments!)

One major problem was the handling of special PostScript characters
%/\[]{}<>()
The author only chose to handle the () characters so I added the others.

Options are handled in a strange fashion in my opinion. Options
must be placed after the filename? 

Just thought I would pass on my findings.
tj

richard@gryphon.CTS.COM (Richard Sexton) (02/11/88)

... and you'll have the fixed version shortly. Couple of days.


-- 
               "It's too dark to put my legs in my munitions"
                          richard@gryphon.CTS.COM 
   {ihnp4!scgvaxd!cadovax, rutgers!marque, codas!ddsw1} gryphon!richard