12.4 Previewing Blocks in Acrobat 357
12.4 Previewing Blocks in Acrobat
Note You can try the Preview feature with the block_template.pdf document in the PDFlib distribu-
tion. The required resources (e.g. font and image) are also included in the distribution.
PDFlib Blocks will be processed by PPS where the Block filling process can be customized
regarding the data sources (e.g. text from a database, image files on disk) as well as visu-
al and interactive aspects of the generated documents. This process is detailed in Sec-
tion 12.5, »Filling Blocks with PPS«, page 362.
However, the Block Plugin contains an integrated version of PPS which can be used
to generate Preview versions of the filled Blocks interactively in Acrobat without any
programming. Although this Preview feature cannot offer the same flexibility as cus-
tom programming, it provides a quick overview of Block filling results. The Block Pre-
view can be used for improving the position and size of Blocks as well as for checking
the Block properties (e.g. font name and size). You can change the Blocks and create a
new Preview until you are satisfied with the results shown in the Preview. Previews can
be generated for the current page or the whole document.
The Preview will always be shown in a new PDF document. The original document
(which contains the Blocks) will not be modified by generating a Preview. You can save
or discard the generated Preview documents according to your requirements.
Default Block contents. Since the server-side data sources (e.g. a database) for the text,
image, vector graphics or PDF contents of a Block are not available in the Plugin, the Pre-
view feature always uses the Block’s default contents, i.e. the values specified in the
defaulttext, defaultimage, defaultpdf, or defaultgraphics properties. Usually, a sample data
set will be used as default data which is representative for the real Block contents used
with PPS. Blocks without any default contents are ignored when generating the Preview,
as well as Blocks with Status=ignoredefault.
The default properties are empty for new Blocks. Before using the Preview feature
you must fill the defaulttext, defaultimage, defaultpdf, or defaultgraphics properties (de-
pending on the Block type) in the Default contents property group, or supply suitable
values for the options of the same name in the Advanced PPS options... dialog.
Note Entering default text for symbolic fonts can be a bit tricky; see »Using symbolic fonts for de-
fault text«, page 360, for details.
Generating Block Previews. You can create Block Previews with one of the following
>By clicking the PDFlib Block Preview icon
which you can locate as follows:
Acrobat DC: click Tools, Advanced Editing.
Acrobat X/XI: in the Tools, Advanced Editing pane. If Acrobat does not display this tool-
bar you can enable it via View, Tools, Advanced Editing.
Acrobat 9: in the Advanced Editing toolbar. If Acrobat does not display this toolbar
you can enable it via View, Toolbars, Advanced Editing.
>Via the menu item PDFlib Blocks, Preview, Generate Preview.
>If the Block tool is active you can right-click outside of any Block to bring up a con-
text menu with the entries Generate Preview and Preview Configuration.