[comp.lang.postscript] BoundingBox, PageBoundingBox and Groff

ebm@corvair.almaden.ibm.com (Eli Messinger) (08/02/90)

I am trying to include some PostScript figures in a groff document.

The figures were created using MacDraw, then shipped to a Unix system and
run through macps (which prepends the appropriate headers).

The problem is that neither the original Macintosh PostScript, nor the
output of macps has numbers of the BoundingBox line (which is apparently
needed by Groff).

What I do have are:

    %%BoundingBox: ? ? ? ?
    %%PageBoundingBox: 125 130 2425 3170

as well as a line:

    T T -130 -125 3170 2425 100 300 300 1 F F F F T T T psu

Is there some way to derive the actual BoundingBox from these numbers?
--
    "You are an idiot if you think my idea is stupid."

	                  -- Joe Kaufman, alt.rock-n-roll, July 26, 1990

zben@umd5.umd.edu (Ben Cranston) (08/03/90)

In article <1869@ks.UUCP> ebm@corvair.almaden.ibm.com (Eli Messinger) writes:

> I am trying to include some PostScript figures in a groff document.
> The figures were created using MacDraw, then shipped to a Unix system and
> run through macps (which prepends the appropriate headers).

I've had much better luck using MacDraw to save the drawing as a PICT file,
using a program (I believe called DrawOver that came with Adobe Illustrator)
to convert from PICT format to AI format, then using an awk-based approach
to convert the AI file into vanilla postscript.  My awk does NOT currently
output a BoundingBox comment but it would be trivial to add since it DOES
alter the picture coordinates to center it on an 8.5 x 11 page (also it
automatically goes to landscape if it "makes sense").  Should be three or
four lines of code to output a BoundingBox and a few more lines to make the
rest of the "Encapsulated Postscript" requirements.

Drop me a line if you would like the awk script.

-- 

Ben Cranston <zben@umd2.umd.edu>
Warm and Fuzzy Networking Group, Egregious State University
My cat is named "Perpetually Hungry Autonomous Carbon Unit"; I call him "Sam".

haleden@newsigi.colorado.edu (Hal Eden) (08/03/90)

> I am trying to include some PostScript figures in a groff document.
> The figures were created using MacDraw, then shipped to a Unix system and
> run through macps (which prepends the appropriate headers).

we use Canvas (which can read MacDraw format) and then canvas separator
to create EPs files with bounding box information.


hal
haleden@boulder.colorado.edu