Xerox DocuPrint Network Printer Series
Decomposition Service and Tools Guide
Version 3.0b July 1998 721P84271
Xerox Corporation
701 S. Aviation Boulevard
El Segundo, CA 90245
©1997, 1998 by Xerox Corporation. All rights reserved.
Copyright protection claimed includes all forms of matters of copyrightable material and information now allowed by statuory or judicial law or hereinafter granted, including without limitation, material generated from the software programs which are displayed on the screen such as icons, screen displays, looks, and so on.
Printed in the United States of America.
Publication number: 721P84271
Xerox® and all Xerox product names mentioned in this publication are trademarks of Xerox Corporation. Products and trademarks of other companies are also acknowledged.
Changes are periodically made to this document. Changes, technical inaccuracies and typographic errors will be corrected in subsequent editions.
Conventions
This guide uses the following conventions:
•
•
All caps and angle brackets — Within procedures, the names of keys are shown in all caps within angle brackets (for example, press <RETURN>).
Angle brackets — Variable information, or the position of a specified argument in the command syntax, appears in angle brackets (for example, List Fonts <Pattern>).
•
•
•
•
•
Bold — Within procedures, text and numbers that you enter are shown in bold (for example, enter privilege operator).
“Enter” — Within procedures, the two-step process of keying in data and pressing <RETURN> (for example, enter y).
Italics — Document and library names are shown in italics (for example, the Xerox DocuPrint Network Printer Series Guide to Submitting Your Jobs from the Client).
Quotes — Keywords you can enter as arguments and paths appear in quotes (for example, “USLetter” and “/var/spool/ data”).
The use of upper and lower case letters used for the names of utilities and tools varies amoung the different environments. Examples follow:
—Within the Windows environment, the convention is to adopt the initial capitalization of tool names such as “XMerge” and “XCat”
—Within the UNIX environment, the convention is to use all lower case letters such as “formmerge”
—Within the DOS environment, there is an eight-character file name limitation and the case does not matter so “formmrg” is used.
Note: Notes are hints that help you perform a task or understand the text.
Caution: Cautions alert you to an action that could damage hardware or software.
Warning: Warnings alert you to conditions that may affect the safety of people.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
iii |
Xerox DocuPrint Network Printer Series
The Xerox DocuPrint Network Printer Series includes the following documents, besides this guide:
Installation Planning Guide
System Overview Guide
Guide to Managing Print Jobs
Guide to Performing Routine Maintenance
Guide to Submitting Jobs from the Client
Guide to Using PDL
Messages Guide
Troubleshooting Guide
Master Index
Printer Controller Commands Quick Reference Card Submitting your Jobs from DOS Quick Reference Card Submitting your Jobs from Macintosh Quick Reference Card Submitting your Jobs from UNIX Quick Reference Card
Submitting your Jobs from Windows 3.1x Quick Reference Card Submitting your Jobs from Windows 95 Quick Reference Card Submitting your Jobs from Windows NT Quick Reference Card Generic MICR Fundamentals Guide (for MICR systems)
iv |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
Table of Contents
|
|
Conventions |
iii |
|
|
|
Xerox DocuPrint Network Printer Series |
iv |
|
|
|
|
|
|
1. |
Overview |
1-1 |
||
|
|
|
|
|
|
|
Why Decomp Service? |
1-1 |
|
|
|
|
|
|
|
|
Application examples |
1-1 |
|
|
|
|
|
|
|
|
|
Print on demand |
1-2 |
|
|
|
|
|
|
|
|
Personalized documents |
1-2 |
|
|
|
|
|
|
|
|
Customized forms |
1-3 |
|
|
|
|
|
|
|
Tools/macros |
1-4 |
|
|
|
|
|
|
|
|
Summary of benefits |
1-5 |
|
|
|
|
|
|
2. |
Installation |
2-1 |
||
|
|
|
|
|
|
|
Windows |
2-1 |
|
|
|
|
|
|
|
|
DOS |
2-2 |
|
|
|
|
|
|
|
|
SunOS/Solaris |
2-2 |
|
|
|
|
||
3. Using virtual printers to save forms |
3-1 |
|||
|
|
|
|
|
|
|
Disposition attribute |
3-1 |
|
|
|
|
|
|
|
|
|
Differences between TIFF/G4 and ByteCode formats |
3-2 |
|
|
|
|
|
|
|
|
Differences between mask and form formats |
3-2 |
|
|
|
|
|
|
|
Example |
3-5 |
|
|
|
|
||
4. Forms, variable data files, and file of files |
4-1 |
|||
|
|
|
|
|
|
|
How to create a form |
4-2 |
|
|
|
|
|
|
|
|
How to create a variable data file |
4-3 |
|
|
|
|
|
|
|
|
|
Microsoft Word 6.0 Mail Merge example |
4-3 |
|
|
|
|
|
|
|
How to create a file of files |
4-7 |
|
|
|
|
|
|
|
|
|
XCat |
4-8 |
|
|
|
|
|
|
|
|
XMerge |
4-9 |
|
|
|
|
|
5. |
Background forms |
5-1 |
||
|
|
|
|
|
|
|
BackgroundForm attribute |
5-1 |
|
|
|
|
|
|
|
|
Example |
5-2 |
|
|
|
|
|
|
|
|
CycleForms |
5-4 |
|
|
|
|
|
|
|
|
|
Values for CycleForms attribute |
5-5 |
|
|
|
|
|
6. |
Client tools |
6-1 |
||
|
|
|
|
|
|
|
Windows |
6-1 |
|
|
|
|
|
|
DECOMPOSITION SERVICE AND TOOLS GUIDE |
v |
TABLE OF CONTENTS
|
Reprint |
6-2 |
|
|
FormMerge |
6-3 |
|
|
|
|
|
|
XMerge |
6-4 |
|
|
|
|
|
|
|
Using XMerge |
6-4 |
|
|
|
|
|
|
XMerge example |
6-4 |
|
|
|
|
|
XCat |
6-6 |
|
|
|
|
|
|
|
Select Paper dialog |
6-7 |
|
|
|
|
|
|
Select Jobs dialog |
6-8 |
|
|
|
|
|
|
Generate PostScript dialog |
6-9 |
|
|
|
|
DOS |
6-10 |
||
|
|
|
|
|
reprint |
6-10 |
|
|
|
|
|
|
formmrg |
6-10 |
|
|
|
|
|
|
xmerge |
6-11 |
|
|
|
|
|
|
|
Using XMerge |
6-11 |
|
|
|
|
|
xcat |
6-12 |
|
|
|
|
|
SunOS/Solaris |
6-14 |
||
|
|
|
|
|
reprint |
6-14 |
|
|
|
|
|
|
formmerge |
6-14 |
|
|
|
|
|
|
xmerge |
6-15 |
|
|
|
|
|
|
|
Using XMerge |
6-15 |
|
|
|
|
|
xcat |
6-16 |
|
|
|
|
|
7. DocuPrint NPS controller commands |
7-1 |
||
|
Create virtual printer |
7-1 |
|
|
|
|
|
|
Change virtual printer |
7-1 |
|
|
|
|
|
|
|
BackgroundForm |
7-2 |
|
|
|
|
|
|
CycleForms |
7-2 |
|
|
|
|
|
|
Disposition |
7-3 |
|
|
|
|
|
Delete form |
7-3 |
|
|
|
|
|
|
Delete virtual printer |
7-4 |
|
|
|
|
|
|
List forms |
7-4 |
|
|
|
|
|
|
List virtual printer |
7-4 |
|
|
|
|
|
|
Print form sample |
7-5 |
|
|
|
|
|
|
Set tray |
7-5 |
|
|
|
|
|
|
Show log |
7-6 |
|
|
|
|
|
|
Show status |
7-7 |
|
|
|
|
|
|
Start virtual printer |
7-7 |
|
|
|
|
|
|
Stop virtual printer |
7-8 |
|
|
|
|
|
vi |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
|
|
|
TABLE OF CONTENTS |
|
8. |
Postscript references/macros |
8-1 |
||
|
|
|
|
|
|
|
run exec |
8-1 |
|
|
|
|
|
|
|
|
|
Example |
8-2 |
|
|
|
|
|
|
|
GetTiff |
8-3 |
|
|
|
|
|
|
|
|
|
Example |
8-4 |
|
|
|
|
|
|
|
Form reference in applications |
8-6 |
|
|
|
|
|
|
|
|
|
Example |
8-6 |
|
|
|
|
|
9. |
TIFF utilities |
9-1 |
||
|
|
|
|
|
|
|
DOS |
9-1 |
|
|
|
|
|
|
|
|
SunOS/Solaris |
9-2 |
|
|
|
|
|
|
|
|
|
getg4 |
9-2 |
|
|
|
||
A. Decomposed form file format |
A-1 |
|||
|
|
|
|
|
|
|
Form files for TIFF/G4 and ByteCode formats |
A-1 |
|
|
|
|
|
|
|
|
|
Form files common to both TIFF/G4 and ByteCode |
A-1 |
|
|
|
|
|
|
|
|
Files created when form is saved as TIFF/G4 |
A-1 |
|
|
|
|
|
|
|
|
Files created when form is saved as ByteCode |
A-2 |
|
|
|
|
|
|
|
Examples |
A-2 |
|
|
|
|
|
|
|
|
|
TIFF/G4 examples |
A-2 |
|
|
|
|
|
|
|
|
ByteCode examples |
A-3 |
|
|
|
||
B. Storage of forms or jobs in a different directory |
B-1 |
|||
|
|
|
|
|
|
|
Example |
B-1 |
|
|
|
|
||
C. Storage of files in /var/spool/data |
C-1 |
|||
|
|
|
|
|
|
|
FTP method |
C-1 |
|
|
|
|
|
|
|
|
NFS method |
C-2 |
|
|
|
|
|
|
D. |
Performance measurements |
D-1 |
||
|
|
|
|
|
|
|
Formulas |
D-1 |
|
|
|
|
|
|
|
|
Measurement methods |
D-2 |
|
|
|
|
|
|
|
|
|
Obtaining rough estimates |
D-2 |
|
|
|
|
|
|
|
|
Calculating throughput |
D-2 |
|
|
|
|
|
|
|
|
Getting a sense of performance improvement through |
|
|
|
|
Decomp Service |
D-2 |
|
|
|
|
|
|
|
Example |
D-3 |
|
|
|
|
|
|
|
|
|
Get rough estimates |
D-3 |
|
|
|
|
|
|
|
|
Get sense of performance improvement |
D-5 |
|
|
|
|
|
E. |
TIFF file format |
E-1 |
||
|
|
|
|
|
|
|
TIFF 6.0 mandatory tags |
E-1 |
|
|
|
|
|
|
|
|
DocuPrint NPS TIFF |
E-1 |
|
|
|
|
|
|
|
|
Examination of tags in TIFF file |
E-2 |
|
|
|
|
|
|
DECOMPOSITION SERVICE AND TOOLS GUIDE |
vii |
TABLE OF CONTENTS
F. Forms backup and restoration |
F-1 |
|
|
Backup forms |
F-1 |
|
|
|
|
Restore forms |
F-1 |
|
|
|
G. Example applications |
G-1 |
|
|
|
|
|
Variable Data PostScript "Address" File example |
G-1 |
Glossary
Index
Image Lift example |
G-3 |
|
|
|
|
Microsoft Word-based Variable Data Merge example |
G-4 |
|
|
|
|
|
Referencing the Static Form |
G-6 |
|
|
|
Print Merge |
G-7 |
|
|
|
|
Sending files to DocuPrint NPS |
G-7 |
|
|
|
|
GLOSSARY-1
INDEX-1
viii |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
|
|
1. |
Overview |
This chapter explains the need for Decomposition Service and provides examples of its many practical applications. The tools and macros are briefly described and the benefits of using Decomposition Service are summarized.
Why Decomp Service?
There are many software applications available on the market today which emit Page Description Language (PDL) files in either PostScript or Hewlett Packard PCL. Sometimes these files can be extremely complex, especially when they include graphics, and the printer may take a long time to decompose (or translate the PDL) and print.
If printing a complex document is a one-time occurrence, nothing can really be done to improve the performance of the printer. However, if the document is to be printed many times and you wish to avoid the time-consuming decomposition that occurs each time, the Xerox Decomposition Service (hereafter referred to as “Decomp Service”) provides the solution.
With Decomp Service, complex documents can be decomposed once and then stored as a “form” on the DocuPrint to be printed very quickly upon demand. These forms usually print at or close to the rated speed of the destination printer and the typical performance improvement is two to five times faster than the original PDL file.
One important capability of Decomp Service is that it can produce forms in industry standard TIFF file format with CCITT/G4 image compression. These TIFF/G4 forms can be manipulated by many popular image editors and reused by other PostScript applications.
Decomp Service also provides several utility tools and macros which allow you to merge variable data with your forms, examine and print TIFF images, and build books.
Application examples
Practical uses for Decomp Service are endless. Decomp Service can help quickly print newsletters, mailers, forms, pricing lists, letters, contracts, surveys, travel maps, certificates, warranties, and so on. These documents can easily be personalized or customized.
The 1996 Olympics used the Xerox DocuPrint NPS network printers and Decomp Service to print more than 18 million documents. These documents displayed a unique watermark graphic for the sport (provided by a decomposed background form) and results for athletic events (provided by a variable data file).
DECOMPOSITION SERVICE AND TOOLS GUIDE |
1-1 |
OVERVIEW
Three application examples follow:
•
•
•
Print on demand
Personalized documents
Customized forms.
Print on demand
With Decomp Service, the demand reprint of a small number of copies is faster because the pages are already in print-ready format. A few additional comments follow:
•
•
In particular, Decomp Service can improve performance for frequently used documents that do not have good single-copy performance.
If the initial decomposition runs at printer speed, there is no performance gain.
A good example is a technical manual with complex graphics that is reprinted in small quantities a few times each week as shown in figure 1-1.
Figure 1-1. Technical manual
Personalized documents
Decomp Service enables the creation of personalized documents which allows you to merge the name of the recipient or personal data onto the document to make it look original.
An example is a benefits booklet which includes the name of the employee and employee number as shown in figure 1-2.
1-2 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
OVERVIEW
Figure 1-2. Benefits booklet
Customized forms
Customized forms can have data specifically directed at a particular customer. These forms generally have a moderate to high amount of personalized data. In addition, different form pages might be used for each individual job.
The forms are stored on the DocuPrint controller by Decomp Service. When you are ready to print, submit a PostScript file with the variable data and a reference to the form(s).
Note: Variable data can be printed on all or some of the form pages.
An example is an insurance quote which has the name of the policy holder and the premium printed on the selected form pages as shown in figure 1-3.
Figure 1-3. Insurance quote
DECOMPOSITION SERVICE AND TOOLS GUIDE |
1-3 |
OVERVIEW
Tools/macros
The following tools are available with Decomp Service:
•
•
•
•
•
FormMerge — Generates a PostScript file to overlay form pages on variable data
GetG4 — Decodes TIFF tags into human readable format and prints the values
Reprint — Generates a PostScript file for printing previously decomposed forms
XCat — Builds a book by generating a PostScript file to concatenate chapters of a book into a single job with optional duplexing and chapter starts
XMerge — Generates a PostScript file to overlay variable data onto some or all of the form pages.
These utilities are available for the PC and Sun platforms but not all of them are supported for all operating systems. Table 1-1 shows which tools are supported by these operating systems.
Table 1-1. |
Tools supported by PC and Sun operating systems |
||||
|
|
|
|
|
|
Utilities |
Windows |
DOS |
SunOS 4.1.3 |
Solaris 2.3 |
|
|
|
|
|
|
|
FormMerge |
X |
X |
X |
X |
|
|
|
|
|
|
|
Reprint |
X |
X |
X |
X |
|
|
|
|
|
|
|
XMerge |
X |
X |
X |
X |
|
|
|
|
|
|
|
XCat |
X |
X |
X |
X |
|
|
|
|
|
|
|
GetG4 |
|
X |
X |
X |
|
|
|
|
|
|
|
Note: Earlier versions included tools for the Macintosh platform and a TiffEdit tool; these are no longer supported.
The Decomp Tools or Windows can be installed on PCs with Windows 3.1x, Windows 95, or Windows NT.
Two macros, which are automatically installed onto the DocuPrint by the DocuPrint NPS base software, are also available for PostScript programmers:
•
•
run exec — Allows a PostScript program to print a form page as a background
GetTiff — Enables a PostScript program to image and print a TIFF.
1-4 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
OVERVIEW
Summary of benefits
To summarize, the primary benefits of Decomp Service are:
•It permits FAST printing!
— Complex forms are already decomposed which saves time
•
•
•
—Client is freed up and network traffic is reduced as smaller amounts of data are sent
—Printer throughput is increased because only variable data has to be decomposed
It is ideal for situations where documents are printed over and over.
It can handle or produce files in industry standard TIFF/G4 format.
It utilizes the DocuPrint NPS printer controller to merge forms and variable data.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
1-5 |
OVERVIEW
1-6 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
|
|
2. |
Installation |
Decomp Service is included with the DocuPrint NPS base software, no separate installation process is required.
The system requirements for Decomp Service follow:
•
•
DocuPrint NPS software version 1.4x or later
Enough disk space on the printer controller to store the needed forms.
There are tools available to facilitate development of Decomposition Service applications. These are installed from diskette on the client workstation: Windows, DOS, SunOS/Solaris. You can also develop Decomp applications without these tools.
Windows
To install Decomp Service for the Windows environment, insert the installation diskette for Windows into the drive and execute “A:\SETUP.” A prompt similar to figure 2-1 is displayed:
Figure 2-1. Decomp Service Install Options screen
The examples are referred to by the help file for each tool which facilitate understanding of how the tool works. The example files occupy approximately 1 megabyte. If you wish to conserve space on your PC, then select the second option “Installation Without Examples.” If you need to examine the examples in the future, you can always re-insert the installation diskette and install the examples by running the “SETUP” executable.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
2-1 |
INSTALLATION
You also have the option to specify a different destination directory where the “Decomp Tools for Windows” are installed. You may accept the default which is “C:\DECOMPn” (“n” is the current release number).
DOS
To install Decomp Service for DOS, create a directory and copy the tools from the diskette. An example follows:
C:\>mkdir DOSDCOMP C:\>cd DOSDCOMP
C:\DOSDCOMP>copy a:*.* A:FORMMRG.EXE A:REPRINT.EXE A:XCAT.EXE A:XMERGE.EOPDXE A:GETG4.EXE
5 file(s) copied
SunOS/Solaris
The UNIX and Solaris versions are in the “tar” format. You may choose to create a different destination directory. An installation example follows:
% su
Password: *******
#mkdir /usr/DecompTools
#cd /usr/DecompTools
#tar -xvf /dev/fd0c
2-2 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
3.Using virtual printers to save
forms
To create forms with Decomp Service, you can define and configure a virtual printer to save the images as forms rather than print them. Enter the following commands in “Administrative” mode on the DocuPrint NPS controller:
PS-Admin> Create Virtual Printer <name>
PS-Admin> Change Virtual Printer <name> disposition <value>
Disposition attribute
The “disposition” attribute indicates that you want to save jobs as forms. The attribute value may be:
•
•
•
•
SaveMaskG4 — This produces a compressed “TIFF/G4” file and treats the white pixels as transparent. It is a commonly used attribute for many applications.
SaveFormG4 — This is similar to the SaveMaskG4 attribute in that it produces a compressed TIFF/G4 file. Use this attribute when your application requires the white pixels to be opaque.
SaveMaskBC — This uses the “ByteCode” compression which prints more quickly than TIFF/G4 because it does not have to rotate, scale, and perform other operations. It treats the white pixels as transparent.
SaveFormBC — This also uses the ByteCode compression and treats the white pixels as opaque.
Before selecting a value, you should understand the differences between TIFF/G4 and ByteCode formats as well as the differences between “Mask” and “Form” formats.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
3-1 |
USING VIRTUAL PRINTERS TO SAVE FORMS
Differences between TIFF/G4 and ByteCode formats
Table 3-1 summarizes the differences between TIFF/G4 and
ByteCode formats:
Table 3-1. Differences between TIFF/G4 and ByteCode formats
|
TIFF/G4 |
|
ByteCode |
|
|
|
|
|
|
• |
An industry-standard format. |
• |
A Xerox proprietary format; not |
|
• |
Portable and editable. |
|
available on systems other than |
|
|
DocuPrint NPS. |
|||
• |
|
|
||
Flexible because of the ability to |
• |
Not portable or editable. |
||
|
employ PostScript image |
|||
|
• |
|
||
|
operators. |
Fast, used for maximum speed; it |
||
• |
Does not work with Background |
|
can often print twice as fast as TIFF |
|
|
files. |
|||
|
Forms. |
|
||
|
• |
Required for Background Forms. |
||
• |
Stored at printer resolution and |
|||
• |
|
|||
|
orientation, producing a printer- |
Better with halftones than TIFF |
||
|
efficient TIFF. |
|
files. |
|
• |
Used where smaller file size is |
|
|
|
|
important. |
|
|
|
|
|
|
|
The primary advantage of TIFF/G4 files is that they are transportable; this means you can use them on non-Xerox printers. They can also be edited using image editor programs such as “Adobe Photoshop” for the PC.
The primary advantages of ByteCode files are that they print much faster than TIFFs and work with background forms.
Caution: The ByteCode compression is proprietary to DocuPrint NPS and will not work on DocuTech or other printers. Therefore, if you need to use the form on another printer in the future, you should retain the original document.
Differences between mask and form formats
Another distinction to make is the use of either “Mask” or “Form” structure. This is for applications where the opacity of the white pixels is an issue. A few concepts to keep in mind follow:
•
•
•
With the Mask format, the white pixels are transparent
With the Form format, the white pixels are opaque
All unwritten pixels are always transparent.
Following is an example that illustrates the differences between the Mask and Form formats. This example starts by examining two forms, one using Mask structure, and the other using Form structure. The example is shown in figure 3-1.
3-2 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
USING VIRTUAL PRINTERS TO SAVE FORMS
Figure 3-1. Form using Mask structure
Figure 3-2. Form using Form structure
Next, examine the variable data to get an idea of how the data is supposed to eventually fit on the form. The variable data is shown in figure 3-3.
Figure 3-3. Variable data
In applications (such as “FormMerge”) where the form is laid on top of data, the transparency or opacity of the form may be an issue. The previous two forms overlaid on top of the variable data are shown in figure 3-4 and figure 3-5.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
3-3 |
USING VIRTUAL PRINTERS TO SAVE FORMS
Figure 3-4. Form using Mask structure with variable data
Figure 3-5. Form using Form structure with variable data
Use either “Mask” or “Form” as appropriate for your situation. The Mask format is used in most circumstances.
In other applications (such as XMerge) where the form is printed first, with any additional or variable data printed on top of it, there is no difference between “mask” and “form” as shown in figure 3-6.
3-4 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
USING VIRTUAL PRINTERS TO SAVE FORMS
Figure 3-6. Variable data merged over the form
In this case, the “Mask” format is recommended because there may be a small increase in performance and a smaller file size.
Note: All files processed by Decomposition Service and stored as print-ready images are generally referred to as “forms.” The word “form” does not indicate whether the file has been saved using a “mask” or as a “form.”
Example
For the purpose of this example, assume that you want to create a form in the commonly used TIFF/G4 and Mask formats. Enter the following commands in “Administrative” mode using the DocuPrint NPS controller to set up a virtual printer:
PS-Admin> Create Virtual Printer decomp_mg4
PS-Admin> Change Virtual Printer decomp_mg4 disposition SaveMaskG4
Note: The name of the virtual printer gives a clue to other printer users that it exists for Decomp Service form creation and that it indicates what formats are involved.
Any document that is submitted to this virtual printer (decomp_mg4) will be saved as a form.
Note: You can also use the lpr method of submitting a job to create a form. In the -C field, use the disposition attribute with one of the values listed earlier. Refer to the Guide to Submitting Jobs from the Client.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
3-5 |
USING VIRTUAL PRINTERS TO SAVE FORMS
3-6 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
4.Forms, variable data files, and
file of files
Many documents have a lot of static content with a smaller amount of variable data. Examples are form letters, invoices, statements, etc. Decomp Service can help make printing these documents more efficient by saving the static content in a print-ready form. Then only the variable data needs to be sent to the printer, along with a means of calling the desired form.
This chapter provides examples of this type of application, and describes how to create the ”form” and the “variable data file”. It also describes how to create a “file of files,” which is used for XMerge and XCat applications.
A master document containing both static and variable data is shown in figure 4-1.
Figure 4-1. Master document
For example, assume that you want to make at least 10 award certificates. Each one is identical except for three items:
•
•
•
The name of the company that is being recognized
The year
The date.
These three variable items should be provided by a variable data file while the rest should be turned into a template or a form.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
4-1 |
FORMS, VARIABLE DATA FILES, AND FILE OF FILES
How to create a form
The steps in this section provide information on creating a form.
Note: This is one example of the procedure you can use. There are some variations. For example, you can use lpr instead of a virtual printer to create a form. You can use PCL instead of PostScript as the basis for the form.
Step 1. Either strip out the variable data or create a document from scratch that does not contain any variable data. A document without variable data is shown in figure 4-2. This document will be the basis for your form.
Figure 4-2. Document without variable data
Step 2. Create a PostScript file from this document by using a PostScript print driver.
Note: In Microsoft Word, you may use “Print To File” with a
PostScript driver.
Step 3. Set up a virtual printer with the desired disposition attribute.
Note: The “Using virtual printers to create forms” chapter covered virtual printers and various disposition attributes in detail.
An example follows:
PS-Admin>create virtual printer decomp_fg4
PS-Admin>change virtual printer decomp_fg4 disposition saveformG4
4-2 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
FORMS, VARIABLE DATA FILES, AND FILE OF FILES
Step 4. Use any job submission method to submit the PostScript file to the new virtual printer (“decomp_fg4”). DocuPrint NPS produces a decomposed form and stores it in the “/var/db/forms” directory.
How to create a variable data file
There are several ways to create a variable data file; for example, you can write a PostScript program. The following example involves no programming and uses the Microsoft Word “Mail Merge” feature and an Excel spreadsheet containing names and other data.
Microsoft Word 6.0 Mail Merge example
The following steps show you how to create a variable data file using the Microsoft Word 6.0 Mail Merge feature.
Step 1. Make a copy of the previous document (which does not have any variable data in it) and insert frames where the incoming variable data should be. A sample document with frames for the variable data is shown in figure 4-3.
Figure 4-3. Document with frames for variable data
Next you will use the Microsoft Mail Merge feature to extract variable data from the Microsoft Excel spreadsheet shown in figure 4-4.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
4-3 |
FORMS, VARIABLE DATA FILES, AND FILE OF FILES
Figure 4-4. Microsoft Excel spreadsheet with variable data
Note: The rating data is not needed in the awards document.
Step 2. Return to your Word document, go to the “Tools” menu, and choose “Mail Merge.” Wait for the “Mail Merge Helper” to appear.
Step 3. From the “Main Document” select “Create”, choose “Form Letters”, and pick the “Active Window.”
Step 4. Configure the “Data Source”:
1.Select “Get Data” and choose “Open Data Source...”
2.Change to the proper directory and change “List File of Types” to Microsoft Excel Worksheet “*.xls.”
3.Specify the spreadsheet file name and click “OK.”
4.When asked if this is OK for the “Entire Spreadsheet”, click “OK.”
5.If prompted with “Word found no merge fields in your main document”, choose “Edit Main Document.”
Step 5. Merge the data with the document:
1.Select “Query Options...”
2.In “Filter Records”, set the first field to “Company” and “Comparison” to “is Not Blank” and click “OK.”
Note: This has the effect of reducing the number of records from 377 to 10 valid entries.
The Mail Merge Helper should now basically look like figure 4-5.
4-4 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
FORMS, VARIABLE DATA FILES, AND FILE OF FILES
Figure 4-5. Mail Merge Helper
Step 6. Close the “Mail Merge Helper” and click inside the frame after the word “recognize”. On the new “Mail Merge toolbar”, click on “Insert Merge Field” and choose “Company.” This inserts “<<Company>>” in the frame.
Step 7. Click inside the frame after the first word “in”. Click again on “Insert Merge Field” and choose “Year.” Then click in the frame after the word “on”, go to the “Insert Merge Field”, choose “Date” and add a period.
Step 8. Finally, format the “<<>>” text inside the frames so that it has the proper font and size. It should look like figure 4-6.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
4-5 |
FORMS, VARIABLE DATA FILES, AND FILE OF FILES
Figure 4-6. Text with proper font and size formats
Note: You may also need to change the “Before Paragraph” spacing to align them with the rest of the text.
Step 9. There are two outer frames which contain static data for the certificate and a ribbon bitmap. Delete them and make the borders for the three inner frames invisible so that it looks like figure 4-7.
Figure 4-7. Three inner frames with invisible borders
Step 10. Execute “Mail Merge” by clicking on the button shown in figure 4-8.
4-6 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |
FORMS, VARIABLE DATA FILES, AND FILE OF FILES
Figure 4-8. Merge button
This button creates a variable data file.
Step 11. When the “Merge” window appears, have it merge to a “New Document” and click on “Merge.” The resulting file should roughly look like the scaled down pages depicted in figure 4-9.
Figure 4-9. Scaled down pages
Step 12. Save the file and then create a PostScript file from this document using a PostScript print driver.
Note: In Microsoft Word, you may use “Print To File” with a
PostScript driver.
The variable data PostScript file can either reside locally on the PC or you may store it on the DocuPrint in “/var/spool/data”.
This variable data file can now be merged with the form that has been stored on your DocuPrint NPS. One way to do this is by using the Background Form capability. Refer to the chapter “Background forms.”
Even though in the example the variable data has only 10 entries, you would perform the same steps even if the data had 100, 1000, or 10,000 entries. By allowing the form to reside on the printer, the documents will print much more quickly than if you merged the form and data on your PC or workstation and then submitted them to the printer.
How to create a file of files
Two Decomp utilities (“XCat” and “XMerge”) use a “file of files” to specify which forms to use, and their sequence.
Note that they require different syntax for listing file names. XCat does not need paths but XMerge does. A file of files is an ASCII file which is normally denoted with an “.fof” extension. It specifies the order of the forms or jobs that are printed.
DECOMPOSITION SERVICE AND TOOLS GUIDE |
4-7 |
FORMS, VARIABLE DATA FILES, AND FILE OF FILES
XCat
There are several ways to create a file of files for XCat. If you know the administrative password for your DocuPrint, you can perform the following steps to improve accuracy. Otherwise, you can create one manually using a simple text editor.
Step 1. Telnet to the DocuPrint NPS controller, enter the “Wizard” mode, and change to the “/var/spool/data” directory as the following example shows:
DocuPrint version: 1.3.13 : Fri Oct 4 16:05:55 PDT 1996
Copyright (C) 1983-1996 by Xerox Corporation. All rights reserved.
PS> Privilege Administrator
Administrator password: *******
PS-admin> Wizard Mode
Entering Wizard Mode, type exit when finished.
vistrorio% cd /var/spool/data
Step 2. You may do a pattern listing, as shown in the following example:
vistrorio% ls -1 tb_*.prn tb_blank.prn
tb_corp.prn tb_cover.prn tb_hcrrp.prn tb_tbrp.prn
Note: The -1 switch is the number one and not the lower case letter “L”, so that each file is separated by a carriage return.
Step 3. Highlight the desired files, go to the “Edit” menu, and invoke “Copy.”
Step 4. Now go to a text editor, paste, do minor editing (to rearrange jobs in the order you want them to appear), and save it with an “.fof” extension. Your file could be named “tb_iediv.fof” which is composed of:
•
•
•
•
•
tb_cover.prn
tb_corp.prn
tb_hcrrp.prn
tb_tbrp.prn
tb_blank.prn
Caution: A space accidently inserted after a filename can be the source of failure so make certain that there are no extraneous space characters that precede or follow any filename in the list.
4-8 |
DECOMPOSITION SERVICE AND TOOLS GUIDE |