Skip to main content
Skip table of contents

Example 1 - Place multiple source documents/pages on the same sheet

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

The code to use is shown below. You need to modify the PDF file paths if you want to try it yourself.

The pages in the supplied PDFs are 8.5” x 11”; for other sizes, you may need to adjust MaxWidth and MaxHeight. The first file contains one page and the second contains two pages, so all three fall onto a single output that could hold four pages. The page order may look odd, but it is correct for the default HqnImpose2 settings. See HqnImpose2 tactics for more details.

TEXT
            %!PS
            /mm { 72. mul 25.4 div } bind def
              <<
              /Objective /FillSpace
              /MaxWidth 500 mm
              /MaxHeight 560 mm
            >> /HqnImpose2 /ProcSet findresource /HqnInitImpose get exec
            % separated out into a procedure to make it easier to call multiple times.
            /dopdf {
              1183615869 internaldict /fileType /PDF put
              (r) file dup /PdfFile exch def
              << >> { pdfexec } stopped PdfFile closefile { stop } if
            } bind def
            currentfile 39 string readstring %C%/<path>/0.pdf pop dopdf currentfile 41 string readstring %C%/<path>/1-2.pdf pop dopdf
            %%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.