Drawing standard HqnImpose2 marks
To view v13.x documentation, go to the top level of the legacy documentation.
This page applies to Harlequin v14.0r0 and later; and to Harlequin Core and Harlequin MultiRIP.
You can define a Marks
array that provides configuration details for pre-defined mark types.
Each value within the Marks
array must be a dictionary, with the following listed keys. (There are additional required and/or optional keys specific to each mark type: see the details of the standard mark types below.)
| Boolean. Defines whether this mark is drawn at the end of every flat. |
| Name. Must match one of the mark types defined in the |
| Real. Define the position on the sheet of the origin of the mark. If |
| Boolean. If |
| Real. Defines the angle by which the mark is rotated. When used with a Prefix that builds on values |
| Procedure (optional). If present, this procedure is executed immediately before the mark is drawn. You might use it to apply a custom rotation to a |
| Procedure (optional). If present this procedure is executed immediately after the mark is drawn. It may be used to clean up global values set by a |
Several mark types require that a color space be specified, usually along with an array of color values. The color space must be specified either as a PostScript or PDF color space array, or as one of the color space names that does not require an array: DeviceGray, DeviceRGB, and DeviceCMYK. In both cases, usage here differs from normal PostScript or PDF usage, in that any tokens that are normally supplied as name objects may be supplied as strings instead. This is to facilitate delivery of configurations in JSON for Harlequin Core.
The values within the color value array must all be numbers. There must be the correct number of items within the color value array for the associated color space, and the values must fall within the appropriate range for that color space.
ControlFile marks
A file is drawn within a rectangle with its lower-left corner at the mark origin, and the width and height defined by MarkWidth and MarkHeight. Positioning within the rectangle may be controlled using AlignX and AlignY. Files may be PostScript (single page only), EPS (including PC-format EPS), PDF, TIFF, or JPEG. If used on pre-separated work then the appropriate separation wrapper must be included within the file, or the appropriate file should be selected in advance (see below). If a ControlFile
mark is used, the flat may not be interpreted in the Executive.
From Harlequin v13.2: If an HqnImpose2 configuration includes any ControlFile marks, either in the Marks array, or in MarkSets, the HqnImage and HqnControl procsets are pre-loaded during the call to HqnInitImpose or HqnInitOverlay. This ensures maximum performance when Harlequin Core configurations are supplied as JSON.
The mark dictionary should contain the following additional keys:
| String source, required. For more information see String or string sources. |
| Name, optional. Defines whether an EPS file or single-page PostScript file is scaled to fit the mark size (other file types are never scaled).
|
| Name, optional. If
|
| Name, optional. If
|
| Real (value in points), optional if ( |
/PageNo | Positive integer, optional, default= |
ControlText marks
A text string is drawn starting at the mark origin (X, Y). The ControlText mark type supports changes such as color, size, or font within the text shown, but does not support alignment and justification controls. The ControlGraphicText mark type supports alignment and justification controls, but the text must all be the same font, size, and color.
The mark dictionary may contain the following additional keys:
| String source, required. The text to be shown. For more information see String or string sources. |
/TextFont | Font name, optional, defaults to /Helvetica but may be amended by codes within Text. |
/TextLeading | Number, optional, defaults to TextSize * 1.2. The leading (space between baselines) to be used if the <n command is used within the Text string. |
/TextSize | Number, optional. The size at which text is shown. Defaults to 12 points, but may be amended by codes within Text. Negative integers may be used to indicate a size in device pixels rather than points, most obviously for microtext; thus -7 would show text with a cap height of 7 pixels. |
Text starts in the All separation (registration color), but may be altered with codes within the Text string, as described below.
For details on the localization of text, including selection of appropriate fonts, see the documentation on HqnLocal
included in the localization kit.
The Harlequin Core SDK cannot be localized.
A number of codes may be included in the text. Some codes are replaced on the fly with appropriate text as the text is imaged, while other codes control the placement, color, and so on of the text. Codes are introduced with an opening angle bracket character ( <
). Codes that take arguments are then immediately followed by that argument, which is terminated by a closing angle bracket character ( >
). Codes that do not require arguments do not include the >
character.
Codes supported as shipped are as follows. Codes are case sensitive (that is, all control codes are lower case; all content codes are upper case or numeric).
Code | Meaning | |
| Include a "<" character in the output text. | |
| The anti-aliasing factor that has been applied ("None" for "1x1", otherwise "2x2", "3x3", and so on) | |
| Draw a solid square in the current color. | |
| The name of the Color Setup selected on the RIP's Page Setup dialog | |
| The name of the output device selected on the RIP's Page Setup dialog. | |
| The encoding of the job file: PostScript, PDF, EPS, TIFF, or JFIF. | |
| The name of the job file (if available), including full path details. If the job arrived through an input plugin other than Spool Folder, this normally shows the input channel name rather than a file name. | |
| Reports the name of the job file in the same way as | |
| The OEM-provided RIP product name | |
| Output resolution in dots per inch | |
| The job name, or "(Untitled)" if no job name has been set | |
| The localized time and date. The localization and date format are set by the operating system control panel. See also | |
| Output resolution in dots per mm. | |
| The flat number within the job. | |
| Information about oversized pages or flats. This draws just a space if pages were not oversized, "(Clipped)" if they were clipped or If you wish to construct the text differently based on whether the file has been scaled or clipped, you can call
| |
| The name of the page setup through which the job was processed | |
| The name of the profile used in the ColorPro setup selected in the page setup through which the job was processed | |
| The serial number of the Harlequin RIP | |
| A list of the separations (colorants) used on the flat; each name is shown in the appropriate color. | |
| Time and date in standard format. See also | |
| The name of the user who created the file, if available. Only shown for PostScript, EPS, and PDF files. For PDF files it is the value of the Author field in the Info dictionary. If you wish to react differently depending on the availability of this information, use the
| |
| Harlequin RIP version | |
| The modification date of the job file, if available. Only available for PostScript, EPS, and PDF files. | |
| OEM-definable text strings. To define the value shown here, set | |
| Screening report. The current screen name is printed. If relevant, the screen frequency is also added. The test | |
| Show imposition setup name. | |
| Show trapping setup name. | |
| Show calibration setup name. | |
| Show tone curve name. | |
| Show actual press name. | |
| Show intended press name. | |
< | Move the text baseline up (positive | |
< | Draw the following text in the colorant named Use | |
< | Draw the following text in font This command explicitly resets the font style selected with | |
< | Kern the following letter away from (positive | |
< | Translate the text XXXX using the | |
< | Execute the arbitrary PostScript fragment Use this option with extreme care. The PostScript fragment may not include the ">" character. | |
< | Draw the following text in text at | |
< | Use encoding. A new encoding vector is installed in the current font. The value of the command must be the name of a standard encoding resource. Changing font resets the encoding to the default encoding for that font. Encoding may only be changed for font types See also This is ignored if a font style has been selected (see | |
< | Set leading. The leading used when a | |
| New line. The current point is moved to the original | |
< | Horizontal tab. The current point is moved This can be used to move the current point to the left as well as to the right, although doing so typically causes text to be overwritten; you must use it with extreme care. | |
<? | If. The value Use the test
If the job was too large, text confirming clipping “(Clipping)” and scaling details “(Scale: The following new procedures may be used in a
| |
| Else. This may only follow a | |
| End if. This may only follow a | |
<# | Print a localized date. If | |
| Use enumerated encoding. The integer value This command is included both to make it easier to switch between multiple encodings; it also allows an appropriate encoding for some parts of the text mark to be decided dynamically. If would be possible, for instance, to bracket a call to the This is ignored if a font style has been selected (see | |
| Use enumerated font. The value This command is included to make it easier to switch between multiple fonts for different parts of a text mark. This command explicitly resets the font style selected with | |
| Select a font style to enable localizable output. The following values for
See the documentation on |
Table: Codes available in ControlText
For example:
<<
/Objective /OneUp
/FilmTop 30
currentglobal true setglobal
/Marks [
<<
/Enabled true
/MarkType /ControlFile
/X 10
/Y -30
/Angle 0
/FileName (%fs%PluginMisc/SlugFile.ps)
>>
<<
/Enabled true
/MarkType /ControlText
/X 50
/Y -20
/Angle 0
/Text (<fCourier><X \(<b1><s6><R<s12><b-1>\) <J <O<L <S)
>>
]
/OEMTextX (SupaDupaGraphix MegaPlot)
5 -1 roll setglobal
>> /HqnImpose2 /ProcSet findresource /HqnInitImpose get exec
A command starting with a hash (#
) character is itself a single character and takes a single-digit argument but does not require a closing angle bracket. For examples, see <#e
n and <#f
n
in Table: Codes available in ControlText (above).
To add a new #
command, include it in the ControlTextTags
dictionary, with an integer key equaling the letter of the command itself plus 256. For example, <#A
would have a key of 321
('A' = 65 + 256). See HqnImpose2 and other calls to page device procedures for details on how to use a CustomImpose2
file to add new dictionary definitions.
Commands may also start with a plus (+
) character, followed by a two-letter command code. These may or may not include an argument; if they do, a closing angle bracket is required to terminate the argument in exactly the same way as for single character commands.
No standard commands of this format are included in the HqnImpose2
procset shipped with the Harlequin RIP at this time, but we recommend that OEMs use this format if they wish to extend the standard command set. To avoid name clashes between commands added by different OEMs we recommend using the first of the two characters of the OEM number plus 33. Thus OEM 0 (GGS) would start commands with !
(for example <+!A
), OEM 9 with *
, and so on.
To add a new +
command, include it in the ControlTextTags
dictionary (with an integer key equal to the value of the first character multiplied by 256, plus the value of the second character).
For example, a command <+AB
might be defined as:
16706 { % ('A' = 65) * 256 + ('B' = 66)
(<+AB command seen) show
} bind
See HqnImpose2 and other calls to page device procedures for details on how to use a CustomImpose2
file to add new dictionary definitions.
To create additional commands, define new keys within the ControlMarks
dictionary. Each key should be the ASCII code for the command character. (For example, use 48
for a zero). The procedure may call ExtractString
to obtain the value of a string argument to a control command, or ExtractNumber
to obtain the value of a numerical command argument.
ControlBarcode marks
A barcode is drawn.
The mark dictionary should not contain MarkWidth
or MarkHeight
keys; the equivalent entries (HorizontalModuleWidth, TargetWidthHeight,
and so on) in the BarcodeConfig
dictionary are used instead.
The mark dictionary must contain the following additional keys:
/Data | Required, string source (see String or string sources). The data to be encoded into the barcode. The number of bytes and allowable characters depend on the symbology to be used. |
/BarcodeConfig | Required, dictionary. See below. |
The value of the /BarcodeConfig
key is a configuration dictionary equivalent to that supplied to the barcode PostScript operator. (For more information see Barcode operator.) It differs only in that the /Input
value supplied in /BarcodeConfig
is ignored (in favor of the value of /Data
in the mark dictionary).
Example use of ControlBarcode
:
<<
/MarkID (QR Code)
/MarkType /ControlBarcode
/X 30.25
/Y 124
/Data (http://FredQBlogs.globalgraphics.com)
/BarcodeConfig <<
/Symbology /qrcode
/Option1 3 % EC level Q
/ColorSpace [
/Separation (PANTONE DS 195-2 C) /DeviceCMYK
{ dup .80 mul exch dup .70 mul exch 0 exch .35 mul } bind
]
/Background [ 0 ]
/Foreground [ 1 ]
/PixelSnapping true
/UnableToPixelSnapBehavior /Error
/TargetWidthHeight [ 57.5 57.5 ]
/MaxWidthHeight [ 72 72 ]
/HeightProportionalToWidth true
/HorizontalAlignment /Center
/VerticalAlignment /Center
>>
>>
ControlCircle marks
Draws a circle, centered on the specified location. The mark dictionary may contain the following additional keys:
| Optional, number. The radius of the circle to be drawn. Default is |
| Optional, number. The rule weight to draw the circle with. Default is |
| Optional, color space (see above). The color space in which the circle should be drawn. The default is |
| Optional, color value as an array. Must be appropriate to the value of |
| Optional, boolean. If |
ControlCross marks
Draws a cross centered on the location specified by X and Y. This is useful if the overlay needs to be registered against a background layer (for example, for hybrid printing, where an overlay is digitally printed on top of a pre-printed shell). The mark dictionary may contain the following additional keys:
| Required, number. The width and height of the cross, in points. |
| Optional, color space (see above). The color space in which the cross should be drawn. The default is |
| Optional, color value as array. The color value must be appropriate for the value of |
| Optional, number. The weight of the rule with which the cross is drawn, in points. Default is 0.25. |
ControlGraphicText marks
A text string is drawn. ControlGraphicText
varies from ControlText
in that:
- No control codes may be included in the string; the whole string is painted in the same font, size, and color.
- The text may optionally be aligned left, right, center, or justified
- The text may be drawn in the same way as the PostScript "show" operator would do so, or may be drawn in outline.
Only horizontally written text from left to right is supported at this time.
The mark dictionary can contain the following additional keys:
| Required in some cases, ignored otherwise; see below. The width of the mark in points. |
| Required. A string source that supplies the text to be displayed. For more information see String or string sources. |
| Optional, positive integer or name, default = |
| Optional, default |
| Optional, default is the default encoding for the selected font. A name source that identifies the encoding that should be applied to the selected font. |
/ | Optional, default= |
| Optional, default |
| Optional, default= |
/ | Optional, default= |
| Optional, default= |
| Optional, default=
|
/ | Optional, default=
|
| Optional, default = |
| Optional, default= |
| Optional, default
|
| Optional, default=
|
| Optional, default= |
| Optional, default= |
ControlRect marks
A rectangle is painted with a fill and/or a stroke.
The mark dictionary must contain the following additional keys:
| The size of the rectangle to paint. |
| The color space and color values to use to fill the rectangle. The presence of The value of |
| The color space and color values to use to draw a stroke around the rectangle. The presence of If |
| The width of the stroke to draw around the rectangle. Must be present if |
ControlRegMark marks
This places a registration mark in the specified position of the flat/film, 2.5 mm in diameter in the lower-left corner of the flat. /X
and /Y
are as described in Drawing standard HqnImpose2 marks.
Draws a registration mark centered on the location specified by X and Y in the All separation.
The mark dictionary must contain the following additional keys:
| Required, number. The width and height of the mark, in points. |
ControlStream marks
Reserved for internal use by HqnLayout
procset. This is primarily intended for internal use by other RIP procsets and is therefore more liable to change. It is similar to ControlFile
, but supplies the PostScript language code to be executed in the form of a string supplied as its /Stream
argument.