appendFile

Syntax: appendFile document, fileName [, ... , autoAppend ]

The appendFile command appends one or more text or graphics files to the current "frame" of a document object. If no current frame exists in your document, the PrintOMatic Xtra will attempt to create a "default" frame for you, which is the width and height of the page, minus the current margins.

For details on how to use the autoAppend parameter, please see the for the append command.

The following file formats are supported by appendFile. The actual format of the file will be auto-detected by the appendFile command.


file type    notes
_________________________________________________________________

plain text   Normal ASCII format text, with or 
             without DOS line-feed characters

styled text  (Macintosh only) Macintosh ASCII text 
             file with a 'styl' resource, such as 
             files created by SimpleText

EPS          Encapsulated PostScript file, with or 
             without a preview image

PICT         Macintosh PICT format file (only raster 
             PICT files supported on Windows)

BMP          (Windows only) BMP files of any 
             bit depth

Notes on Printing EPS Files

You should avoid using EPS files if you want your printing code to work reliably with all types of printers. Many, many popular printers attached to Macintosh and Windows PC's DO NOT support PostScript printing. The output that PrintOMatic generates on these types of printers can vary from low-resolution bitmaps to placeholder boxes to nothing at all.

Assuming you decide not to heed this warning, here are some tips that may improve your success.

Many applications that generate EPS files allow you to create files in "ASCII" or "binary" format. PrintOMatic prints ASCII format PostScript files MUCH more reliably than binary files. Under some conditions, PrintOMatic will print binary PostScript files just fine. However, certain types of printer connections work very poorly with binary PostScript. Specifically, serial printers that use XON/XOFF flow control often mistake binary data for flow control codes, and will seriously garble or crash your print job.

Some types of PostScript files, notably those generated by using the "print to disk" feature of the LaserWriter driver, don't contain "bounding box" information. PrintOMatic needs bounding box information to determine the size of a PostScript image for placement on the page, and will generate an error if this information can't be found.

You can manually add bounding box information to PostScript files using a text editing program. Insert the following line of text into the file somewhere between the !%PS-Adobe-3.0 and %%EndComments lines at the beginning of the file, substituting the width and height of the page (in points) for the 'x' and 'y' values:

%%BoundingBox: 0 0 x y

Finally, keep in mind that PostScript is a programming language with a broad set of features, some of which are supported differently by different printers. This makes EPS files MUCH more prone to printing errors and incompatibilities than other file formats, such as PICT or BMP. This is another good reason to avoid using EPS files if at all possible.