12.5 Filling Blocks with PPS 365
>The page can be placed directly with PDF_fit_pdi_page( ).
>The page can be placed indirectly in a table cell with PDF_fit_table( ).
>The page can be placed as contents of a another PDF Block with PDF_fill_pdfblock( ).
The third method, i.e. filling a PDF Block with another page containing Blocks, allows
nested Block containers. This allows simple implementations of interesting use cases.
For example, you can implement both imposition and personalization with a two-step
Block filling process:
>The first-level Block container page contains several large PDF Blocks which indicate
the major areas on the paper to be printed on. The arrangement of PDF Blocks re-
flects the intended post-processing of the paper (e.g. folding or cutting).
>Each of the first-level PDF Blocks is then filled with a second-level container PDF
page which contains Text, Image, PDF, or Graphics Blocks to be filled with variable
text for personalization.
With this method Block containers can be nested. Although Block nesting works to an
arbitrary level, a nesting level of three or more will only rarely be required.
The second-level Block containers (e.g. a template page for a letter) may be identical
or different for each imposed page. If they are identical the Blocks on the letter template
must be filled before placing the letter template itself in the next first-level Block since
PPS always uses the location of the most recent placement of the template page.
Cookbook A full code sample can be found in the Cookbook topic blocks/nested_blocks.
Block coordinates. The Rectangle coordinates of a Block refer to the PDF default coor-
dinate system. When the page containing the Block is placed on the output page with
PPS, several positioning and scaling options can be supplied to PDF_fit_pdi_page( ).
These options are taken into account when the Block is being processed. This makes it
possible to place a template page on the output page multiply, every time filling its
Blocks with data. For example, a business card template may be placed four times on an
imposition sheet. The Block functions will take care of the coordinate system transfor-
mations, and correctly place the text for all Blocks in all invocations of the page. The
only requirement is that the client must place the page and then process all Blocks on
the placed page. Then the page can be placed again at a different location on the output
page, followed by more Block processing operations referring to the new position, and
The Block Plugin displays the Block coordinates differently from what is stored in
the PDF file. The plugin uses Acrobat’s convention which has the coordinate origin in
the upper left corner of the page, while the internal coordinates (those stored in the
Block) use PDF’s convention of having the origin at the lower left corner of the page. The
coordinate display in the Properties dialog is also subject to the units specified in Acro-
bat (see »Block size and position«, page 347).
Spot colors in Block properties. To use a separation (spot) color in a Block property you
can click the »...« button which will present a list of all HKS and Pantone spot colors.
These color names are built into PPS (see Section 3.4.1, »Color Management with ICC Pro-
files«, page 82) and can be used without further preparations. For custom spot colors an
alternate color can be defined in the Block Plugin. If no alternate color is specified in the
Block properties, the custom spot color must have been defined earlier in the PPS appli-