target/printtarg

Summary

Create a PostScript (PS), Embedded PostScript (EPS) or Tagged Image File Format (TIFF) file containing profile test patch values, ready for printing.

Usage Summary

printtarg [options] basename
 -v              Verbose mode
 -i 20 | 22 | 41 | 51 | SS | i1 | CM Select target instrument (default DTP41)
                 20 = DTP20, 22 = DTP22, 41 = DTP41, 51 = DTP51, SS = SpectroScan,
                 i1 = i1Pro, CM = ColorMunki

 -a scale        Scale patch and spacer size by factor (e.g. 0.857 or 1.5 etc.)
 -A scale        Scale spacer size by additional factor (e.g. 0.857 or 1.5 etc.)
 -h              Use hexagon patches for SS, double density for CM
 -r              Don't randomize patch location
 -s              Create a scan image recognition (.cht) file
 -S              Same as -s, but don't generate wide orientation strip.
 -c              Force colored spacers
 -b              Force B&W spacers
 -n              Force no spacers
 -f              Create PostScript DeviceN Color fallback
 -w g|r|s|n      White colorspace encoding DeviceGray (def), DeviceRGB, Separation or DeviceN
 -k g|c|s|n      Black colorspace encoding DeviceGray (def), DeviceCMYK, Separation or DeviceN
 -o k|n          CMY colorspace encoding DefiveCMYK (def), inverted DeviceRGB or DeviceN
 -e              Output EPS compatible file
 -t [res]        Output 8 bit TIFF raster file, optional res DPI (default 200)
 -T [res]        Output 16 bit TIFF raster file, optional res DPI (default 200)
 -C              Don't use TIFF compression
 -N              Use TIFF alpha N channels more than 4
 -D              Dither 8 bit TIFF values down from 16 bit
 -Q nbits        Quantize test values to fit in nbits
 -K file.cal     Apply printer calibration to patch values and include in .ti2
 -I file.cal     Include calibration in .ti2 (but don't apply it)
 -R rsnum        Use given random start number
 -x pattern      Use given strip indexing pattern (Default = "A-Z, A-Z")
 -y pattern      Use given patch indexing pattern (Default = "0-9,@-9,@-9;1-999")
 -m margin       Set a page margin in mm (default 6.0 mm)
 -M margin       Set a page margin in mm and include it in TIFF
 -P              Don't limit strip length
 -L              Suppress any left paper clip border
 -p size         Select page size from:
                    A4       [210.0 x 297.0 mm]
                    A4R      [297.0 x 210.0 mm]
                    A3       [297.0 x 420.0 mm] (default)
                    A2       [420.0 x 594.0 mm]
                    Letter   [215.9 x 279.4 mm]
                    LetterR  [279.4 x 215.9 mm]
                    Legal    [215.9 x 355.6 mm]
                    4x6      [101.6 x 152.4 mm]
                    11x17    [279.4 x 431.8 mm]
 -p WWWxHHH      Custom size, WWW mm wide by HHH mm high

  basename        Base name for input(.ti1), output(.ti2) and output(.ps/.eps/.tif)

Usage Details and Discussion

printtarg is used to generate a PostScript or TIFF print file from device test values in a .ti1 file. It output both a PostScript/EPS/TIFF file, and a .ti2 file containing the device test values together with the layout information needed to identify the patch location. This module can also generate the image recognition templates needed to read the print targets in using a scanner.

The -v flag turns on verbose mode. Prints information about how many patches there are in a row, how many patches in a set,  and how many pages will be generated. Good for figuring out what the magic number of patches should be for a particular page size.

The -i parameter should be used to tell printtarg which instrument it should lay the patches out for. Each instrument has a slightly different requirement, and will lead to a different number of patches ending up on a particular page size. For a generic type of chart, try SS.

-a, -A: Normally, printtarg prints test patches that are the minimum size that can be reliably and accurately read by the instrument.  For some media, it might be desirable to use test patches that are larger than this minimum (e.g. if the media has poor registration, gets physically distorted in the print production process, or if it has a coarse screen, and there are few samples per patch), and the -a flag should be given an argument greater than 1.0 to increase the patch length, patch width, and spacer size between patches, if it is appropriate for the type of instrument. A value of 1.5 would make the patch 50% larger for instance. For the strip reading instruments the patch is made longer, the strip spacing remaining the same, while for XY scanning instruments, both the width and height will be increased. If a value less than 1.0 is given as an argument, then the patches will be made smaller. For instance, using the SpectroScan instrument it is possible to reduce the test patches to 6mm rather than the default 7mm by supplying an argument of 0.857. Note that this make lining up of the scan head very critical, and increases the amount of bleed through from adjacent squares. For an instrument that needs color spacers between patches, -a scale also scales the spacer length. For some situations, this may be insufficient, and the  -A scale option can be used to additionally scale the spacer length.
Note that the for the DTP20 only -a values of 1.0, 1.08, 1.54, 1.92, 2.0 and that the patch width will be made no smaller than its length.

Normally, printtarg creates a regular grid of test patches, but for instruments that support arbitrary X, Y addressing (such as the SpectroScan). For the SpectroScan it can also create a chart using regular hexagonal patches, allowing more patches to be fitted into a single sheet if the -h flag is used.  For the ColorMunki instrument, -h doubles the normal number of patches is printed by halving the row width. The patches are also staggered to improve the detection of a poor scan.

Normally, printtarg randomizes the patch locations, which helps strip reading instruments detect patch boundaries and the direction the strip was read in, as well as being able to detect incorrect strips being fed into strip reading instruments, and also assists in randomizing any systematic printing errors introduced into the test chart due to print engine unevenness, inkjet banding, or printing press ink key settings etc. The -r flag turns this off, and lays the test squares out in the order the values appear in, in the .ti1 file. Note that if you turn this off you probably want to disable bi-directional strip reading in instruments such as the i1pro.

The -s flag does two things. One is that it causes printtarg to output a chart recognition file (.cht) so that scanin can recognize the chart, and convert rasterized patches into patch values, and the second is that is expands the size of the leading row of patches by 50%, to help make sure that each sheet can be oriented correctly by scanin. If -S is used rather than -s, then the recognition chart will be created, but the leading row will be the same size as all the other rows.

For strip reading instruments, the contrast with the spacers is important in ensuring that a reading will be successful. Normally printtarg ensures this by printing optimally contrasting colored spacers between each measurement patch. The -c flag is therefore the default behaviour. If the -b flag is used, then contrasting neutral colored spacers will be used, but these generally work less reliably than colored spacers. The -n flag will cause spacers to be omitted, which may still work with smaller numbers of test values when the patch selection is randomized, but won't work successfully when a large number of test points is being used (>200), or when the patches are not randomized in location.

-f: When creating a test chart for more than CMYK inks, a PostScript file normally contains color settings that use the PostScript level 3 "Device N" color specifications. Such color specifications have a "fallback" color, for PostScript interpreters that don't handle Device N specifications. Such fallback colors are normally set to a grayscale estimate of the patch color, so that it is possible to tell if the PostScript interpreter is not rendering the Device N values correctly. The -f flag, causes the fallback color to be a color estimate of the Device N test patch color, which is useful for diagnostic purposes.

The -e flag gives EPS output, rather than PostScript, allowing the charts to be included in other applications. Because EPS disallows the showpage command, multiple EPS files will result for a multi-page test chart, each one having a two digit number sequence in it's name, so if the input file name is chart, then file chart.ti1 will be read, and file chart.ti2 written, together with chart.eps if there is only one page, or chart_01.eps, chart_02.eps, etc. if there is more than one page.

-t [res], -T [res] The -t flag gives TIFF raster output rather than PostScript, allowing the charts to be printed to systems that do not accept PostScript input. Because few systems understand multi-page TIFF files, multiple TIFF files will result for a multi-page test chart, each one having a two digit number sequence in it's name, so if the input file name is chart, then file chart.ti1 will be read, and file chart.ti2 written, together with chart.eps if there is only one page, or chart_01.tif, chart_02.tif, etc. if there is more than one page. By default the resolution of the chart will be 100 Dots Per Inch (DPI), but this can be changed by providing an optional DPI argument after the -t or -T flag. If the -t flag is used, than an 8 bit per component TIFF file will be created. If the -T flag is used, then a 16 bit per component TIFF file will be created.

-C: Normally the TIFF files created will be compressed using LZW compression to save space. Some systems may not support this compression, so it can be disabled by using the -C flag.

-N: When creating TIFF files with more than 4 colorants, the normal Separated mode is used. Some systems don't cope well with extra colorants presented in this manner, and the -N flag causes all the channels greater than 4 to be labelled as "Alpha" channels, which may be more palatable.

-D: When creating TIFF files with 8 bit output, dither the values to give effective 16 bit precision. Note this is applied after any quantization of the test values (see -Q). Note that this might interfere (i.e. give alias/moire patterns) in printed output if the printer uses screening that happens to clash. Note also that dithering is effectively linearly interpolating between the 8 bit values using spatial averaging, and that therefore the device response may also be a linear interpolation between its 8 bit output values, adding no effective extra precision to the device measurement.

-Q: Normally the target device values are floating point numbers that may get rounded and quantized in the process of printing them or reproducing them on the printing or display device. If some of this quantization can be accounted for, it may improve the accuracy of the resulting profile, and the Q parameter allows this quantization to be specified. The parameter is the number of binary digits (bits) that the device values should be quantized to. In many systems the right value would be 8 bits. Note that if 8 bit TIFF output is selected (-t) without dithering (no -D) that the values will by default be quantized to 8 bits, and that if 16 bit TIFF output is selected (-T) or 8 bit TIFF with dithering (-D) that the values will by default be quantized to 16 bits.

The -K file.cal parameter specifies a printer calibration file created by printcal, and the supplied calibration curves will be applied to the test patch values. This allows profiling of a printing system that doesn't natively support calibration. The calibration curves will also be included in the resulting .ti2 file, so that they can be passed through to .ti3 file and ICC profile, to allow accurate computation of ink limits.

The -I file.cal parameter specifies a printer calibration file created by printcal, and the calibration curves will be included in the included in the resulting .ti2 file, so that they can be passed through to .ti3 file and ICC profile, to allow accurate computation of ink limits. The calibration is not applied to the test patch values, but is assumed to be applied somewhere else in the printing workflow when printing the profile test chart.

The -R parameter allows setting the random layout seed. Normally the seed is chosen at random, but sometimes it is useful to be able to generate a chart with the same layout, so a specific seed can be specified this way. The seed (ID) used to generate a chart is recorded in the .ti2 file, and is also in the label printed on the right hand side of each chart.

The -x parameter allows specifying the labelling sequence used for strips (e.g. the X axis of the chart). By default this will be a character sequence A, B, C .. Z. AA, AB, AC .. ZZ, but this can be changed by specifying an alternate labelling sequence pattern. The pattern specifies the labelling sequence as follows: First comes the definition of the symbols for each digit location, least significant to most significant, each digit separated by the ',' character. Note that space is a valid character. The number of definitions declares the maximum number of digits. For example, for a 2 digit numerical sequence: "0123456789, 123456789" would define 0..99 with the most significant digit suppressed when it is 0 (because it uses a space rather than 0). Ranges can be used for brevity: "0-9, 1-9". As a special case, the '@' character can be used to instead of '0' to indicate suppression of the leading zero: "0-9,@-9". Leading ' ' characters in the resulting generated sequence are omitted. Optionally following this and delimited by a ';' character, are the definitions of valid segments of the index sequence. For instance, to define the index range to be 1..19, 30..39 one could use the pattern "0-9, 1-9;1-19,30-39". Of course most of the time an alphabetic sequence will be wanted, to distinguish it from the numerical sequence used to number the patches in a strip. For a sequence A, B, C .. AA, AB, AC etc. (the default used in Argyll), the following patter would be used: "A-Z, A-Z". For a some ECI2002R charts that skip columns Y and Z, and use a leading numeric digits for addressing strips over 26, the following might be used: "A-Z, 2-9;A-X,2A-9Z".

The -y parameter allows specifying the labelling sequence used for patches (e.g. the Y axis of the chart). By default this will be a number sequence 1, 2, ..10, 11, ... 999, but this can be changed by specifying an alternate labelling sequence pattern. See the above description for the labelling sequence encoding.

NOTE that the pattern chosen for the X and Y axes of the chart must be distinguishable, e.g. if they are both numbers or both letters then reading the chart will fail.

The -w parameter changes how a white colorspace test chart (ie. Additive Grey monochrome) will be represented in the Postscript or TIFF output. The default is to use the DeviceGray representation (-wg), but Device RGB can also be used, where the R, G &B values are all set to the same value (-wr), a White separation color can be specified (-ws), or a DeviceN White color can be used (-wn).

The -k parameter changes how a black colorspace test chart (ie. Subtractive Grey monochrome ) will be represented in the Postscript or TIFF output. The default is to use the DeviceGray representation (-kg), but Device CMYK can also be used, where the CMY values are zero, and just the K channel is used (-kc), a Black separation color can be specified (-ks), or a DeviceN Black color can be used (-kn).

The -o parameter changes how a CMY colorspace test chart will be represented in the Postscript or TIFF output. The default is to use the DeviceCMYK representation (-ok) where the K value is always zero, or inverted Device RGB (-or), or as a 3 channel DeviceN colorsoace can be used (-on).

The -m parameter sets the page margin for all sides. If the printer has print margins larger than the default assumed by printtarg, then critical parts of the test chart may be cropped or scaled, and not printed properly. Increasing the margin from the default of 6 mm to 10 or 15 mm, may alleviate this problem. (Note that the number of patches per page may be reduced as a consequence.) Decreasing the margin below 6 mm may be possible for printers that have smaller or no margins, increasing the number of patches possible on each page. A TIFF chart raster will be the size of the paper minus the margin, so that it can be placed on a page that size without cropping or inadvertent scaling.

The -M parameter sets the page margin for all sides the same as -m, but for a TIFF chart the margin will be included in the raster, meaning that the TIFF will have to be printed  right to the edge of the paper, or on paper larger than the raster size. (Having the raster be the full page size may be useful in certain situations.)
 
The -P flag disables any normal limiting of strip length that would normally be imposed due to guide or instrument limitations. There is still an upper limit of around 500 patches or 2Meters though. Note that if you generate a strip larger than the instrument can cope with, it may be unable to read the strip.

The -L flag suppresses the left margin that is added for instruments that have a paper holder that has a clip to hold the chart in place, while it is being read. (Currently this is only the Eye-One Pro).

The -p parameter specifies the paper size. The size can either be one of the default sizes, or can be specified in millimeters. Limitations of the instrument may limit the maximum number of patches in a strip. For SpectroScan, a size of  A4 or Letter (or smaller) should be used. Useful combinations of number of patches and paper size are listed here. The printed parts of the chart will be the size of paper minus the page margin. A TIFF chart will be the size of the paper minus the margin, so that it can be placed on a page that size without cropping or inadvertent scaling, but also see the -M flag.

basename is the base file name of the .ti1 file that contains the device values to be put on the test chart. printtarg will output a basename.ps or one or more basename_NN.eps or basename_NN.tif files files that should be printed on the devices, as well as a basename.ti2 file that contains both the device test point values, and the location of the corresponding patch on the test chart. If the -s or -S flag was specified, then  one or more basename_NN.cht files will also be generated.

GSview or GhostView are good programs to use to check what the PostScript or EPS file will look like, without actually printing it out. Alternatively, use the TIFF raster output for non-PostScript printers.