Skip to main content
Skip table of contents

Image data for OPI


This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.

This section is only relevant if you want to pass pre-collected OPI information to the procset. If you are using the procset for on-the-fly replacement of images based on OPI comments in PostScript jobs, or OPI objects in PDF jobs, you can ignore this section completely—the image replacement is automatic as long as /OPInextAction is set to /OPIreplace.

The image data dictionary passed to the HqnOPIimage procedure is based on the OPI version 1.3 or 2.0 data dictionaries defined in the Portable Document Format Reference Manual (version 1.6 [PDF1.6]); for most details of this dictionary, see that document and [OPI1.3] or [OPI2.0].

The following variations from those specifications are included:

An additional item named /Size must be included in the dictionary. This is an array of two integers defining the size of the image, and is typically taken from the %ALDImageDimensions OPI comment. This entry is not included in the PDF specification [PDF1.2], but does appear in [PDF1.3]. /Size is used in all OPI version 1.3 dictionaries seen to date in PDF jobs of version 1.2 and later—the documentation appears to be incomplete. If the "image" is vector rather than raster then Size should be defined in points. 

For example:

TEXT
            <<
              /CropFixed [ 0 0 526 372 ]
              /CropRect [ 0 0 526 372 ]
              /F (McSlap:OPI:lores:bitmap.eps)
              /Overprint false
              /Position [ 159.999 946.644 159.999 1033.96 283.465 1033.96 283.465 946.644 ]
              /Size [ 526 372 ]
              /Type /OPI
              /Version 1.3
            >>

It is also possible to perform DCS-like image replacement using the same OPI dictionary mechanism, but with further variants. For more details on DCS image replacement see QuarkXPress, OPI and DCS and Desktop Color Separation Specification 2.0 [DCS2].

A key named /Hqn_DCS is found in the OPI dictionary. Its value should be 1 or 2, depending on the version of the DCS specification from which the data was derived.

If the data are from DCS version 1 or from a multiple file set in DCS version 2, the /F key in the OPI image data is present for completeness only. Its value is the name of the black separation file (if there is one, otherwise a separation is selected at random). If the data are from a single file DCS version 2 image, the value of the /F key is the name of the full DCS version 2 image file. In some cases this name may have been derived from a %%BeginDocument comment in the original page file, and may therefore not be particularly reliable.

A key /Hqn_F in the OPI image data should be present. Its value should be a dictionary. The keys in the dictionary are the color plates for which DCS comments were found in the file. The values of those keys vary from DCS version 1 to version 2.

Data from DCS1

If the data were derived from DCS version 1 comments, the values are each a subsidiary dictionary containing the following keys:

subFileDetails (DCS1 image data)

The name of the separation file.

subFileChannel (DCS1 image data)

If this optional key is included, it should be a file object opened on the high-resolution separation data.

TEXT
            /Hqn_F <<
              /Black << /subFileDetails (Formats.dcs.K) >>
              /Cyan << /subFileDetails (Formats.dcs.C) >>
              /Magenta << /subFileDetails (Formats.dcs.M) >>
              /Yellow << /subFileDetails (Formats.dcs.Y) >>
            >>

Data from DCS2

If the data were derived from DCS version 2 comments, each value is in turn another dictionary, containing the following keys:

colorName (DCS2 image data)

The name of the separation color for which this high-resolution file is intended.

subFileType (DCS2 image data)

The filetype value from the DCS comment. This is typically /EPS or /EPSF.

subFileLocation (DCS2 image data)

For single file DCS 2.0 this is the byte offset to the beginning of the separation data (the offset value from the DCS comment).

For multiple file DCS 2.0 it is the location from the DCS comment, typically /Local.

subFileDetails (DCS2 image data)

For single file DCS 2.0, this is the length of the separation data (that is, the size value from the DCS comment).

For multiple file DCS 2.0, it is the filename from the DCS comment.

subFileChannel (DCS2 image data)

If this optional key is included, it should be a file object opened on the high-resolution separation data.

Two extra keys are also included in the OPI dictionary for DCS version 2.0 files:

Hqn_Single (DCS2 image data)

A Boolean; true if the DCS data describes a single file format, false for a multiple file format.

Hqn_spotList (DCS2 image data)

A dictionary defining the CMYK equivalents (where known) for spot colors used in the file from which the DCS data were derived. Each key is a color name, each value is an array of four real numbers corresponding to the CMYK components of the spot color. The Hqn_spotList dictionary is only present if spot color equivalent data is available.

For example:

TEXT
              <<
              /CropFixed [ 0 0 526 372 ]
              /CropRect [ 0 0 526 372 ]
              /F (%Mac HD%OPI/Example.dcs.K)
              /Overprint false
              /Position [ 159.999 946.644 159.999 1033.96
                            283.465 1033.96 283.465 946.644 ]
              /Hqn_DCS 2
              /Hqn_F <<
                /Black <<
                  /colorName (Black)
                  /subFileType (EPS)
                  /subFileLocation (Local)
                  /subFileDetails (%Mac HD%OPI/Example.dcs.K)
                >>
                /Red <<
                  /colorName (Red)
                  /subFileType (EPS)
                  /subFileLocation (Local)
                  /subFileDetails (%Mac HD%OPI/Example.dcs.Red)
                >>
              >>
              /Hqn_Single false
              /Hqn_spotList <<
                /Red [ 0 1 0.96 0 ]
              >>
              /Size [ 526 372 ]
              /Type /OPI
              /Version 1.3
            >>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.