ATTACH |
Top Previous Next |
Syntax
attach "filename" | {expr}
Description
This will add the specified file to the output. The file will be added before any other text or data for a given copy is sent to the printer, so this can work as an overlay file, or it can be placed in the output instead of any text or other output, appearing like a stand-alone attachment.
If expr is used, then it should be a valid Business Basic expression that resolves to a string value, which will be interpreted as the file name as each copy prints.
When used as an attachment, assign a copy to the attachment, and use the notext keyword to suppress printing of text, like this:
if copy 1 # the standard format # duplexing? add duplex 1 in this copy text … box … etc… end if
if copy 2 # the attachment attach "/usr/UnForm/attach/attach1.pcl" notext end if
When processing the file, UnForm will remove any printer initialization codes and page ejects from the file.
PCL Attachments An easy way to create an attachment file is to use a Windows workstation and install a PCL5 type printer (not a PCL6 or PCL/XL driver, which will produce the wrong type of format). Set the port for the printer to FILE:. Then create the attachment using any word processor and print to that printer. Windows will ask for a file name, and when printing is complete, the resulting file is suitable for use as an attachment. If your document contains fonts that are not present in the printer you will be using, be sure to modify the print driver to print True Type Fonts as graphics, if possible.
PostScript Attachments PostScript attachments are rendered simply as full page images, meaning the file can either be an EPS file or a JPG file (JPG files are only supported by color printers). UnForm simply prints the image, scaled to the printable region of the page.
PDF Attachments UnForm attaches PDF documents by merging the objects on page one with those of the current page of output. Objects are placed in the exact same position and size as found in the attached document.
UnForm 10.1 supports PDF files up to version 1.4 (introduced with Acrobat 5). Some files that specify a later revision are still compatible, but new a file structure element was added at PDF 1.5 that is not supported by UnForm. Specifically, the unsupported feature is called an Object Stream. Former versions of UnForm did not support Linearized (also known as Optimized or Fast Web View) PDF files, nor files with incremental updates. Version 10.1 now supports these formats.
To create an attachment, use a PDF printer or other method to save a document in PDF format, choosing, if possible, to generate a file compatible with Acrobat 5 or below, or version 1.4 or below. There are many free and commercial tools available to produce PDF files, from Adobe and other vendors. Of note, Microsoft Office supports a "Save As" PDF feature with an Add-in that can be downloaded from Microsoft's web site.
PDF files are often available from third parties or government entities, and many of these are compatible with UnForm. Sometimes these files are designed with unusual page sizes or internal offsets that cause their elements to be in unexpected positions. UnForm is unable to re-position objects, so such files might need to be re-created using a PDF printer or other tool that will realign the objects using normal page dimensions.
Note that the object merging technique can cause issues when a landscape attachment file is designed to perform landscape formatting by rotating a portrait page, as UnForm executes landscape via a landscape page size rather than rotation. The result is a fundamental incompatibility between the two documents. To work around this, consider using UnForm commands to produce the document, or use the image command with a 'page n' option, supported when Ghostscript is available and configured.
Drivers: pcl, pdf, ps |