Skip to main content
Skip table of contents

HqnImage sample code

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

To submit an image file from a PostScript control job, using TIFF as an example:

            /HqnControl /ProcSet findresource /MountLocal get exec (%.%/testfile.tiff) [ /TIFF ]
                /HqnImage /ProcSet findresource /onepassrunimage get exec

This will use the default ImageScaling = /FromImage , and will process the image as a “page” in its own right.

To place an image on a larger page:

              /PageSize [ 400 600 ]
            >> setpagedevice gsave
            150 100 translate 20 rotate 200 350 scale
            /HqnControl /ProcSet findresource /MountLocal get exec (%.%/testfile.tiff) <<
              /ImageScaling /UnitSquare
            >> [ /TIFF ] /HqnImage /ProcSet findresource /onepassrunimage get exec grestore

To amend the default configuration such that images are scaled to fill the width of a 300mm web, and automatically rotated such that the smaller dimension of the image is across the web. The 500m height in ScaleToSize is simply an arbitrary number that is assumed to be large enough that BestFit will always work in this way:

              /ImageScaling /ScaleToWidth
              /BestFit true
              /ScaleToSize [ 300 500000 ] mm2pt
            >> /HqnImage /ProcSet findresource /HqnImageSetImageDefaults get exec

After the defaults have been set in this way the TIFF or other image file can simply be submitted to the RIP and will be scaled and rotated as required.

JavaScript errors detected

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

If this problem persists, please contact our support.