PDFlib 8 Windows COM/.NET Tutorial
PDFlib 8 Windows COM/.NET Tutorial
PDFlib 8 Windows COM/.NET Tutorial
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
10.4.2 Generating PDF/A-conforming Output<br />
Cookbook Code samples for generating PDF/A can be found in the pdfa category of the <strong>PDFlib</strong> Cookbook.<br />
Creating PDF/A-conforming output with <strong>PDFlib</strong> is achieved by the following means:<br />
> <strong>PDFlib</strong> will automatically take care of several formal settings for PDF/A, such as PDF<br />
version number and PDF/A conformance keys.<br />
> The <strong>PDFlib</strong> client program must explicitly use certain function calls and options as<br />
detailed in Table 10.6.<br />
> The <strong>PDFlib</strong> client program must refrain from using certain function calls and option<br />
settings as detailed in Table 10.7.<br />
> Additional rules apply when importing pages from existing PDF/A-conforming documents<br />
(see Section 10.4.3, »Importing PDF/A Documents with PDI«, page 264).<br />
If the <strong>PDFlib</strong> client program obeys to these rules, valid PDF/A output is guaranteed. If<br />
<strong>PDFlib</strong> detects a violation of the PDF/A creation rules it will throw an exception which<br />
must be handled by the application. No PDF output will be created in case of an error.<br />
Required operations for PDF/A-1b. Table 10.6 lists all operations required to generate<br />
PDF/A-conforming output. The items apply to both PDF/A conformance levels unless<br />
otherwise noted. Not calling one of the required functions while in PDF/A mode will<br />
trigger an exception.<br />
Table 10.6 Operations which must be applied for PDF/A-1 level A and B conformance<br />
item<br />
conformance level<br />
output condition<br />
(output intent)<br />
fonts<br />
grayscale color<br />
RGB color<br />
CMYK color<br />
<strong>PDFlib</strong> function and option requirements for PDF/A conformance<br />
The pdfa option in begin_document( ) must be set to the required PDF/A conformance level, i.e.<br />
one of PDF/A-1a:2005 or PDF/A-1b:2005.<br />
load_iccprofile( ) with usage=outputintent or process_pdi( ) with action=copyoutputintent<br />
(but not both methods) must be called immediately after begin_document( ) if any of the devicedependent<br />
colors spaces Gray, RGB, or CMYK is used in the document. If an output intent is used,<br />
an ICC profile must be embedded (unlike PDF/X, unembedded standard output conditions are not<br />
sufficient in PDF/A). Use the embedprofile option of load_iccprofile( ) to embed a profile for a<br />
standard output condition.<br />
The embedding option of load_font( ) (and other functions which accept this option) must be<br />
true. Note that embedding is also required for the PDF core fonts. The only exception to the embedding<br />
requirements applies to fonts which are exclusively used for invisible text (mainly useful<br />
for OCR results. This can be controlled with the optimizeinvisible option.<br />
Grayscale images and setcolor( ) with a gray color space can only be used if the output condition<br />
is a grayscale, RGB, or CMYK device, or if the defaultgray option in begin_page_ext( ) has been<br />
set.<br />
RGB images and setcolor( ) with an RGB color space can only be used if the output condition is an<br />
RGB device, or the defaultrgb option in begin_page_ext( ) has been set.<br />
CMYK images and setcolor( ) with a CMYK color space can only be used if the output condition is<br />
a CMYK device, or the defaultcmyk option in begin_page_ext( ) has been set.<br />
Prohibited and restricted operations. Table 10.7 lists all operations which are prohibited<br />
when generating PDF/A-conforming output. The items apply to both PDF/A conformance<br />
levels unless otherwise noted. Calling one of the prohibited functions while<br />
in PDF/A mode will trigger an exception. Similarly, if an imported PDF document does<br />
not comform to the current PDF/A output level, the corresponding PDI call will fail.<br />
10.4 PDF/A for Archiving 261