Skip to main content
Skip table of contents

Example 2 - Flow pages through multiple different imposition layouts

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

The basic process is to set up a layout and then flow pages through it.

For an example use case where the first sheet has two pages and the second sheet has four, you would call HqnImpose2, probably using the /PassThrough Objective, then call pdfexec (or, better still, pdfexecid) with a PageRange listing the pages you want to place. You would do the same again (set up the layout and call pdfexec(id)) for the back.

With the following example code, you need to amend the path to whatever PDF file you want to use with it. This example uses the NxN Objective for simplicity, but you could use any of the other Objectives to define the layout. Although you need to know how many pages are required to fill it, so NxN or PassThrough are most likely to be useful.

You should not use save /restore around each:


TEXT
            %!PS
            /Context (%C%/<path>/24pp.pdf)(r) file <<>> pdfopen def
            /HqnInitImpose /HqnImpose2 /ProcSet findresource /HqnInitImpose get def
            <<
            /Objective /NxN
            /PagesAcross 2
            /PagesUp 1
            /Tactic /BookWise
            >> HqnInitImpose
            Context << /PageRange [ [ 1 2 ] ] >> pdfexecid
            <<
            /Objective /NxN
            /PagesAcross 2
            /PagesUp 2
            /Tactic /BookWise
            >> HqnInitImpose
            Context << /PageRange [ [ 3 6 ] ] >> pdfexecid
            %%EOF

where <path> is your choice.

JavaScript errors detected

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

If this problem persists, please contact our support.