10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.2 Importing PDF Pages with PDI (PDF Import Library)Note All functions described in this section require PDFlib+PDI. The PDF import library (PDI) is notcontained in PDFlib or PDFlib Lite. Although PDI is integrated in all precompiled editions ofPDFlib, a license key for PDI (or PPS, which includes PDI) is required.6.2.1 PDI Features and ApplicationsWhen the optional PDI (PDF import) library is attached to PDFlib, pages from existingPDF documents can be imported. PDI contains a parser for the PDF file format, and preparespages from existing PDF documents for easy use with PDFlib. Conceptually, importedPDF pages are treated similarly to imported raster images such as TIFF or PNG:you open a PDF document, choose a page to import, and place it on an output page, applyingany of PDFlib’s transformation functions for translating, scaling, rotating, orskewing the imported page. Imported pages can easily be combined with new contentby using any of PDFlib’s text or graphics functions after placing the imported PDF pageon the output page (think of the imported page as the background for new content). UsingPDFlib and PDI you can easily accomplish the following tasks:> overlay two or more pages from multiple PDF documents (e.g., add stationary to existingdocuments in order to simulate preprinted paper stock);> place PDF ads in existing documents;> clip the visible area of a PDF page in order to get rid of unwanted elements (e.g., cropmarks), or scale pages;> impose multiple pages on a single sheet for printing;> process multiple PDF/X or PDF/A documents to create a new PDF/X or PDF/A file;> copy the PDF/X or PDF/A output intent of a file;> add some text (e.g., headers, footers, stamps, page numbers) or images (e.g., companylogo) to existing PDF pages;> copy all pages from an input document to the output document, and place barcodeson the pages;> use the pCOS interface to query arbitrary properties of a PDF document (see Chapter8, »The pCOS Interface«, page 181).In order to place a PDF background page and populate it with dynamic data (e.g., mailmerge, personalized PDF documents on the Web, form filling) we recommend using PDIalong with PDFlib blocks (see Chapter 10, »Variable Data and Blocks«, page 225).6.2.2 Using PDI Functions with PDFlibCookbook Code samples regarding PDF import issues can be found in the pdf_import category of thePDFlib Cookbook.General considerations. It is important to understand that PDI will only import the actualpage contents, but not any interactive features (such as sound, movies, embeddedfiles, hypertext links, form fields, JavaScript, bookmarks, thumbnails, and notes) whichmay be present in the imported PDF document. These interactive features can be generatedwith the corresponding PDFlib functions. PDFlib blocks will also be ignored whenimporting a page.You can not re-use individual elements of imported pages with other PDFlib functions.For example, re-using fonts from imported documents for some other content is130 Chapter 6: Importing Images and PDF Pages

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

Saved successfully!

Ooh no, something went wrong!