17.05.2014 Views

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

egin_pattern( ), shading_pattern( ), shading( ): patterns and shadings must be defined<br />

outside the template, but can be used within the template.<br />

> begin_item( ) and tag option of various functions: structure elements cannot be created<br />

within a template.<br />

> All interactive functions, since these must always be defined on the page where they<br />

should appear in the document, and cannot be generated as part of a template.<br />

Cookbook A full code sample can be found in the Cookbook topic general/repeated_contents.<br />

3.2.5 Referenced Pages from an external PDF Document<br />

Cookbook A full code sample can be found in the Cookbook topic pdfx/starter_pdfx5g.<br />

PDF documents can contain references to pages in external documents: the (scaled or<br />

rotated) reference page is not part of the document, it will be displayed and printed just<br />

like other page content. This can be used to reference re-used graphical contents (e.g.<br />

logos or cover pages) without including the corresponding PDF data. <strong>PDFlib</strong> supports<br />

strong references, i.e. references where the referenced page is identified via internal<br />

metadata. If the referenced page is not available or does not match the expected metadata,<br />

a proxy image will be displayed instead of the referenced page.<br />

Using referenced pages in Acrobat. Although referenced pages (the technical term is<br />

Reference XObjects) have already been specified in PDF 1.4 (i.e. the file format of<br />

Acrobat 5), they require Acrobat 9 or above for proper display and printing. Referenced<br />

pages are a crucial component of PDF/X-5g and PDF/X-5pg. The generated (new) document<br />

is called the container document; the external PDF document with the referenced<br />

page is called the target file.<br />

In order to use referenced pages with Acrobat 9 or X it is important to properly configure<br />

Acrobat as follows:<br />

> Edit, Preferences, General..., Page Display, Show reference XObject targets: set to Always<br />

(the setting Only PDF-X/5 compliant ones doesn’t work due to a bug in Acrobat).<br />

> Edit, Preferences, General..., Page Display, Location of referenced files: enter the name of<br />

the directory where the target files live.<br />

> Edit, Preferences, General..., Security (Enhanced), Privileged Locations, Add Folder Path: add<br />

the name of the directory where the container documents live. This must be done regardless<br />

of the Enable Enhanced Security setting.<br />

The target page, whose file name and page number are specified inside the container<br />

PDF, will be displayed instead of the proxy if all of the following conditions are true:<br />

> The container document is trusted according to Acrobat’s configuration;<br />

> The target file can be found in the specified directory;<br />

> The target file does not require any password and can be opened without errors.<br />

> The page number of the referenced page specified in the container document exists<br />

in the target file.<br />

> PDF/X-5 only: the ID and certain XMP metadata entries in the target must match the<br />

corresponding entries in the container document.<br />

If one or more of these conditions are violated, the proxy will silently be displayed instead<br />

of the target page. Acrobat will not issue any error message.<br />

74 Chapter 3: Creating PDF Documents (Edition for <strong>COM</strong>, .<strong>NET</strong>, and REALbasic)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!