Dec 112017
 
Sample postscript files for use with Ghostscript 2.5.
File SAMPLES.ZIP from The Programmer’s Corner in
Category Font Collections
Sample postscript files for use with Ghostscript 2.5.
File Name File Size Zip Size Zip Type
ATAPE.PS 72367 17629 deflated
BARCODE.PS 5869 1134 deflated
BB4GS.DOC 5647 2327 deflated
BB4GS.PS 15476 4402 deflated
BULB.PS 2092 856 deflated
CAL2.PS 9231 2758 deflated
COLORBAR.PS 2690 1094 deflated
COLORTST.PS 9933 3332 deflated
DOCTOR.PS 6047 2384 deflated
ENVELOPE.PS 5228 2121 deflated
GNOGNUS.PS 1986 566 deflated
GRAYBARS.PS 4541 1275 deflated
GROGNUS.PS 1986 566 deflated
LIFETREE.PS 11148 3812 deflated
MYCARD.PS 4390 1564 deflated
NOADA.PS 910 386 deflated
NODRUGS.PS 2079 579 deflated
NODRUNKS.PS 1390 473 deflated
NOMUST.PS 1468 488 deflated
NOSCREEN.PS 37 31 deflated
NOSEX.PS 1436 479 deflated
NOSKULL.PS 1591 535 deflated
NOSLEEP.PS 1222 448 deflated
NOSMILE.PS 1194 446 deflated
NOSMOKE.PS 1676 527 deflated
PALETTE.PS 1656 692 deflated
PARROT.PS 45209 16634 deflated
PHONBOOK.PS 3915 1489 deflated
PURSE.PS 4462 1557 deflated
ROACHES.PS 6114 931 deflated
SHORTWV.PS 36341 8215 deflated
SLIDE.PS 13845 2792 deflated
SPIRAL.PS 1559 545 deflated
SPIRO.PS 571 281 deflated
TALKBELL.PS 38685 5615 deflated
TESTPAGE.PS 4668 1721 deflated
TREE.PS 1930 825 deflated
USE.PS 26786 8216 deflated
VTAPE.PS 6423 2044 deflated

Download File SAMPLES.ZIP Here

Contents of the BB4GS.DOC file



1. General Information
----------------------

BB4GS.PS is a version of Bernie Cosell's %%BoundingBox calculator
(bb.ps, v1.14, part of the bbfig package) which has been specifically
modified to work with Ghostscript, the PostScript interpreter written by
L. Peter Deutsch and distributed by the GNU project.

[Note that a %%BoundingBox line is often extremely useful and possibly
even necessary when including PostScript figures in a document being
prepared with a typesetting program (such as TeX); discussing how to do
this inclusion, however, is beyond the scope of this document, so it
will be assumed that the reader already knows how to use this
%%BoundingBox information once it is obtained. More information can be
obtained in the PostScript Language Reference Manual, for example, or in
the documentation which comes with the program dvips.]

I originally used bb.ps to calculate %%BoundingBox parameters by
prepending it to a file and then sending the whole thing to a Postscript
printer. With the advent of Ghostscript, however, it was no longer
necessary to waste paper, since the file could be previewed and the
%%BoundingBox read directly.

A very small number of changes have been made to bb.ps to make a
version to use with Ghostscript. (In my opinion, this says quite a bit
about the quality of this PostScript interpreter.) Nevertheless, I have
changed the name to bb4gs to make sure there is no confusion with Bernie
Cosell's original version.

The detailed changes are documented in the file itself, but
essentially, they:

1) increased the default font size for easy reading on small screens
(like the PC's).

2) stubbed out the strokepath operator, which to the best of my
knowledge is still not fully implemented in Ghostscript.

3) added a hook so that bb4gs can tell if the %%BoundingBox is to
be displayed on the screen or sent to stdout (more later), so that
in the latter case not more than one copy is sent.

4) (optional) replaced the show operator with print so that
Ghostscript will send the %%BoundingBox to stdout. Currently this
is commented out in bb4gs to allow the option (or not) of
invoking this feature from the command line, but if it is decided
that bb4gs will always be used in this manner the comments can be
removed. (My thanks to Richard Murphey for this
idea.)


In addition to the file bb4gs.ps which does all of the work, there are
some additional files included with it. They are:

bbprint.ps - a file which can be used to replace the show operator with
print so Ghostscript send the %%BoundingBox to stdout.

bbget.bat - a batch file to invoke Ghostscript and send the
%%BoundingBox information to the file bb.out

bbget - a unix shell script to invoke Ghostscript to capture the
%%BoundingBox information and insert it (using sed) in the
proper place in the file. (This script was written by
Richard Murphey .)

noscreen.ps - a file to stub out the setscreen operator, which can
cause `out of memory' errors (VMerror) on PCs. Note that
use of this file doesn't always work, but it has helped on
occasion. It is meant to be invoked on the command line
before the desired file.


2. Use
------

Ghostscript accepts multiple filenames on the command line, so that
the simplest way to invoke bb4gs to find the %%BoundingBox for the file
example.ps is to type:

gs bb4gs.ps example.ps

Ghostscript will first load bb4gs.ps and then run example.ps, displaying
the %%BoundingBox information on the screen when a showpage command is
encountered (if the file example.ps doesn't have a showpage command in
it, however, then it may be necessary to type the showpage manually at
the Ghostscript GS> prompt).

The PC batch file (bbget.bat) and unix shell script (bbget) merely
invoke bbprint.ps first, which redirects Ghostscript output to stdout,
then bb4gs.ps, and then finally the desired file. The batch file sends
the resulting %%BoundingBox information to a file bb.out so that it can
be placed manually in the PostScript file using a text editor, but the
unix shell script calls sed which does the inserting automatically. (It
is possible that such automatic insertion can be accomplished on the PC,
but it didn't seem worth the effort to explore this further.)

These files have been tested on numerous versions of Ghostscript,
starting with version 1.3 and up to the current version 2.4, with no
problems. (The PC versions were tested on both 286 and 386 machines,
and the Unix version were tested on Sun Sparcstation 1s running SunOS
4.1.0.) They have not, however, been tested on all possible types of
*PostScript* files, since there are so many of them available. If an
example is encountered for which bb4gs *doesn't* work, an answer is
probably more likely to be found by posting the problem on the USENET
groups comp.lang.postscript or gnu.ghostscript.bug than by sending the
file to me; I am unfortunately *not* really a PostScript expert (rather,
in our department, I'm merely the best at *faking* it.)

In any event, I hope these PostScript programs are useful. I have
certainly found them to be.


Bill Kath ---------------------------------- [email protected]
Engineering Sciences and Applied Mathematics
McCormick School of Engineering, Northwestern University


 December 11, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)