README file for BBFig V1.4 [95-10-13] 

Introduction:

BBFig is a utility which computes the BoundingBox of a PostScript drawing.  It optionally insert this information into the header of the file.  Well-behaved single-page PostScript files may often be converted into an EPS (Encapsulated PostScript) file by the addition of just this line.

This information is required for EPS files as a comment of the form, for example:
%%BoundingBox: 10 10 300 500
The bounding box comment can be added easily to a PostScript file with the editor included with BBFig.
(For details about %%BoundingBox, see Apendices G and H of the PostScript Red Book: PostScript Language Reference Manual, 2-nd ed. Addison-Wesley, ISBN 0-201-18127-4.)
BBFig is also an improved Yap (Yet Another Previewer for PostScript) by Ali Ozer.  A number of bugs in Yap have been fixed.

Use BBFig only for a single page document (just in case you don't know that already).

Usage:

[1] Open PS files with the Document > Open menu option.  Or, you can Command-drag-and-drop a PS file icon into the BBFig icon (running or on the Dock) from Workspace File Viewer or from NeXT Mail.app.  You may have mutiple PS files open at the same time.

Click ON the Compute BBox switch if you want BBFig to find the BoundingBox information.

[2] Press Execute to execute the contents of the selected window.  The rendered page is displayed in the output window, with the bounding box indicated by a dashed rectangle (If there is no "showpage" operator in the EPS file, the dashed rectangle will not appear).  There's only one output window, whose PostScript rendering area can be resized through the Preferences panel.   If there are any PostScript errors, the first error is reported in the title bar of the output window.  If there are no errors in the execution of  the PS code, then the time needed for imaging the PS code will be reported instead.   The computed BoundingBox is stuffed into a field just below the scroll view containing the PS code.

[3] If  BBFig fails to find the correct BoundingBox information, use the mouse to set the rubber-banding rectangle to the desired region in the output window.   Upon release of the mouse button, the manually determined BoundingBox values will be set in the BBox field of the source document.

[4] To insert %%BoundingBox comment, position the text cursor at the desired insertion point, and press Insert button next to the field containing the line.  For convenience, The EPS version comment "%!PS-Adobe...." and the bounding box comment may be inserted at the top of the document by pressing Both button.

[5] Save the PS file by Document > Save menu option.  If you wish to change the filename from *.ps to *.eps, use Save As.

If you change the font in a BBFig Document window, the same font will be used for BBFig windows used after that point. The font will also be written out to your defaults database to be used the next time you launch BBFig.

BBFig can paste PostScript from the pasteboard.  This can come in handy when debugging programs that write PostScript on the pasteboard. The Paste menu command will first check the pasteboard for PostScript data, then for text data.

Preferences Options:

Compute Bounding Box switch controls whether the bounding box information is computed.  BBFig will revert to Yap when you turn off the check mark.

Grid switch turns on or off the point grid displayed in the PostScript output window.  The grid may be useful when BBFig fails to determine the bounding box correctly, or when you want to adjust it manually.

Blue BG lays down a blue background before executing the PS code.  I use this to colorize a B/W drawing for use in a slide, where I use a dark colored background and whitish colors for strokes and fills.  Otherwise, white objects will not be visible.

Bounding Box Margin is used to expand the bounding box slightly larger than the limits of the actual drawing.  If no margin is given, importing applications may sometimes clip the graphics too closely.  The bounding box specification will be expanded by the number of points specified by this slider.  This setting will be saved in your default database.  All other settings below are temporary and apply only as long as you keep the BBFig running.

Bugs:

BBFig is a NeXTstep version of bbfig by Bernie Cosell.  The ability of BBFig to figure out the bounding box information is the same as that of the original bbfig.   With the current version, it may fail on many PS files.

Be careful with Print menu item.  It will print the PS code, not the graphics.  This is a feature inherited from Yap.app.

Acknowledgements:

BBFig is just an extended version of Yap found in
/NextDeveloper/Examples/Yap, which contains the source files for Yap.   I have incorporated a PD utility bbfig by Bernie Cosell  [cosell@bbn.com] into Yap via pswrap.  As new improved versions of bbfig become available, they may be incorporated easily thanks to pswrap.  BBFig.psw is the module which contains Bernie's code.

Send comments, bug reports to Izumi Ohzawa,
izumi@pinoko.berkeley.edu