PDFlib
PDFlib

Block Handling and PPS

block_below_contents

Fill PDFlib blocks so that they are placed below the imported page.

business_cards

Output an imported PDF page several times, with its blocks being filled with different personalized data.

duplicate_block

Duplicate a PDFlib block to any number of pages.

fill_converted_formfields

Output an imported PDF page with its blocks being filled with different personalized data.

linked_textblocks

Link multiple Textflow blocks

mail_merge

Output an imported PDF page several times, with its blocks being filled with different personalized data.

override_block_rectangle

Fill some blocks of an imported PDF page while changing the rectangle coordinates.

query_block_color

Query the background color of blocks.

query_block_properties

Import a PDF page containing blocks, and query various block properties.

starter_block

Import a PDF page containing blocks, and process all blocks.

Color

colorAll_for_cropmarks

Create crop marks which will be visible on all color separations, using the special color "All".

color_gradient

Fill some area or text with a smooth transition from one color to another.

iccprofile_to_image

Assign an ICC profile to an image.

spot_color

Define and use several spot colors.

starter_color

Demonstrate the basic use of supported color spaces.

web_colornames

View a list of all cross-browser colors including the color name and hexadecimal color value as well as the corresponding RGB color values used in PDFlib.

Document Interchange

control_nexpress_trays

For NexPress digital color printing machines, create some special kind of annotations to control the input tray.

embed_xmp

Embed custom XMP metadata in a document.

import_xmp_from_pdf

Retrieve the XMP metadata from an imported document and write all document-level XMP metadata to the output PDF.

starter_tagged

Create document with structure information for reflow and accessibility.

tagged_pdf_with_textflow

Create a Tagged PDF containing a Textflow with appropriate structure elements over several pages

Fonts and Encodings

artificial_fontstyles

Create bold or italic text if you don't have a suitable font.

barcode_font

Output text in a barcode font.

character_references

Demonstrate the usefulness of character references, using a suitable font.

escape_sequences

Use escape sequences in text lines to output octal or hexadecimal values.

font_info

Get various properties of a font such as font name, font style, or encoding.

font_metrics_info

Get various font related metrics such as the ascender or descender.

font_resources

Configure font resources and search for fonts.

glyph_availability

Check the availability of glyphs in a font.

glyph_replacement

Show the effects of glyph substitution in case of glyphs missing in the font.

simulated_fontstyles

Create simulated italic or bold text output.

starter_type3font

Create a simple Type 3 font from vector data.

type3_bitmaptext

Create a simple Type 3 font from image data.

type3_rasterlogo

Create a Type 3 font which contains a single logo derived from an image.

type3_subsetting

Demonstrate Type 3 font definition, use, and subsetting.

type3_turkish_character

Create a Type 3 font by cloning another font and adding a further glyph

type3_vectorlogo

Create a Type 3 font which contains a single logo derived from a vector based PDF page.

General Programming

error_handling

Demonstrate different strategies with respect to exception handling.

function_scopes

Explain the concept of scopes of the PDFlib API.

initial_view

Define the initial viewing properties for a document, such as zoom, page number, navigation tab, or title bar.

license_key

Apply your PDFlib license key using various methods to get rid of the demo stamp.

metric_topdown_coordinates

Output text using metric coordinates in a topdown coordinate system.

permission_settings

Change the permission settings so that only commenting the PDF is allowed.

repeated_contents

Create contents which are used identically on multiple pages, such as fixed headers or footers.

starter_basic

Create some simple text, vector graphics and image output.

starter_pvf

Create a PVF file which holds an image or PDF, and import the data from the PVF file.

Graphics

arrows

Create an arrow using different methods.

dashed_lines

Create some dash patterns to be used as line styles.

fill_pattern

Define some hatching patterns and use them to fill arbitrary shapes.

fill_rules

Define some overlapping vector graphics and fill them using various methods.

hierarchical_layers

Define a layer hierarchy using the parent and child options.

layers_and_bookmarks

Define two layers and hide or show them via bookmarks.

overprinting_text

Create text which will overprint other page contents instead of knocking it out.

rounded_rectangle

Create some rectangle with the corners being rounded.

stamp_on_print_layer

Place a stamp on a layer which is only visible upon printing.

starter_graphics

Create some basic examples of vector graphics.

starter_layer

Define several layers, output images and text into them and define particular layers to be visible when opening the document.

transparent_graphics

Create some transparent graphics objects.

Images

add_opi_info

Attach OPI information to an image.

align_text_at_image

Align text at an image.

center_image_on_card

Place an image on an imported PDF card.

display_image_partially

Display an image partially.

frame_around_image

Draw a frame around an image.

image_dimensions

Get the dimensions of an image for various purposes.

image_from_url

Read an image from an URL and place it in a PDF document.

image_mask

Place an image with a mask applied to it.

image_rounded_corners

Place an image with rounded corners.

integrated_clipping_path

Place an image with its integrated clipping path being applied to it.

multi_page_tiff

Convert an input TIFF image containing one or more frames to PDF.

starter_image

Load and place an image using various options for scaling and positioning.

tiling_pattern

Define a tiling pattern containing an image and use it to cover the page background with tiles.

transparent_images

Create transparent images.

Interactive Elements

acrobat_menu_items

Upon opening the page, create a full list of all menu item names in Acrobat.

form_and_layers

Define two layers for English or German contents and hide or show them via form field buttons.

form_checkbox

Create four form fields of type "checkbox".

form_combobox

Create a form field of type "combobox" for choosing an item from a list or changing an existing item.

form_listbox

Create a form field of type "listbox" for choosing an item from a list.

form_multiline_textfield

Create a form field of type "textfield" for entering multiline text.

form_pushbutton

Create two form fields of type "pushbutton" for executing the "Print" and "Save As" commands.

form_radiobutton

Create a field group with three form fields of type "radiobutton".

form_tab_order

Define the position of each form field in the tab order, i.e. when the user presses the "Tab" key.

form_textfield_fill_with_js

Fill a form text field with a value using JavaScript.

form_textfield_height

Determine the height of a form field of type "textfield" with respect to the font size and vice versa.

form_textfield_input_check

Check if the date entered in a form field of type "textfield" has been formatted correctly.

form_textfield_input_format

Format the data entered in a form field of type "textfield" according to the rules defined.

form_textfield_layout

Specify the layout of a form field of type "textfield" for displaying a date.

form_triggers_js_actions

Demonstrate all possibilities to trigger a JavaScript action from a form field.

link_annotations

On images and text lines, create links to open PDF files or Web pages, or to execute a JavaScript.

movie_annotations

Demonstrate the use of a movie annotation in PDF.

nested_bookmarks

Create bookmarks which are nested in several levels.

triggers_for_javascript_actions

Demonstrate all possibilities to trigger a JavaScript action (except of form fields).

Multimedia

starter_3d

Create a 3D model and load it into a U3D annotation.

Pagination

crop_page

Crop an A4 page to an A5 page.

reverse_page_order

Create pages in reverse page order.

insert_toc

Create some pages, assign labels to them and insert a table of contents at the beginning of the document.

page_sizes

Create some pages with various page sizes.

page_x_of_y

Create a running footer "Page x of y" on each page of the document.

PDF Flavors

images_to_pdfa

Convert grayscale, CMYK or RGB image files in TIFF or JPEG formats to PDF/A-1b, taking care of color space issues.

import_pdfa

Import an existing PDF/A-1b document and output it as PDF/A-1b.

import_pdfx

Import an existing PDF/X-3 document and output it as PDF/X-3.

pdfa_extension_schema

Demonstrate the use of an XMP extension schema as defined in PDF/A-1.

pdf_extension_schema_with_type

Demonstrate the use of a complex XMP extension schema as defined in PDF/A-1.

starter_pdfa

Create a PDF/A-compliant output.

starter_pdfx

Create a PDF/X-compliant output.

text_to_pdfa

Output text conforming to PDF/A-1b, taking care of color space and font issues.

transparent_stamp_for_pdfa

Apply a transparent stamp to an existing PDF/A document while maintaining PDF/A conformance.

PDF Import

clone_page_boxes

Clone the ArtBox, TrimBox, BleedBox, CropBox, and MediaBox entries of an imported PDF page.

crop_imported_pages

Crop the pages of an existing PDF document.

import_in_reverse_order

Read the pages of an input PDF document and output them in reverse order.

import_pages_into_layers

Import two pages and output them on two layers on the same page.

starter_pdfmerge

Merge pages from multiple PDF documents.

starter_pcos

Dump information from an existing PDF document.

rotate_pages

Rotate the pages of an existing PDF document.

stamp_pages

Place a stamp on the pages of an existing PDF document.

pdfimpose

Import all pages from one more existing PDFs, and place c x r pages on each sheet of the output PDF (imposition).

scale_down_imported_pages

Place A4 pages from an imported PDF as A5 pages in the output document.

pdfmerge_with_adjusted_
pdfversion

Merge multiple PDF documents with the output PDF having as version number the maximum of the PDF version numbers of all imported documents.

PDF on the Web Server

starter_webform

Create a linearized PDF which is encrypted and contains some form fields.

Tables

table_row_height

Define the height of the rows in a table.

nested_tables

Place a sub-table in one table cell.

fit_formfield_into_cell

Fit a form field into a table cell, e.g. to create a pushbutton in the cell.

colorize_cells

Provide some table cells with a colored background.

mixed_table_contents

Demonstrate how to place various kinds of contents in table cells spanning one or more columns or rows.

spread_oversized_table

Output a table on 2 x m pages as it is needed to fit it completely.

starter_table

Create table which may span multiple pages.

table_contact_sheet

Create a contact sheet with photos and their labels.

table_invoice

Create an invoice using the table feature.

table_rotated_text

Create a table containing rotated text.

table_schedule

Create a weekly booking plan for the meeting rooms of a company.

table_timesheet

Create a monthly time sheet for the working hours of an employee.

vertical_text_alignment

Demonstrate the vertical alignment of text lines and Textflows in a table cell.

Text Output

create_interactive_index

In a Textflow define some terms to be indexed and create a sorted index from the indexed terms.

vertical_alignment_in_fitbox

Control the vertical alignment of text in the fitbox.

keep_lines_together

Control the lines kept together on the page.

drop_caps

Create an initial drop cap at the beginning of some text.

distance_between_paragraphs

Control the distance between adjacent paragraphs.

avoid_linebreaking

Create a Textflow and define various options for line breaking.

bulleted_list

Output numbered and bulleted lists.

current_text_position

Demonstrate how the current text position can be used to output simple text, text lines, or Textflows next to one another.

dot_leaders_with_tabs

Use leaders to fill the space defined by tabs between left-aligned and right-aligned text, such as in a table of contents.

fill_polygons_with_text

Define arbitrary polygons to be filled with text.

footnotes_in_text

Create footnotes (superscript text) in a Textflow provided with links to jump to the footnote text.

image_as_text_fill_color

Create outline text and fill the interior of the glyphs with an image.

invisible_text

Output invisible text on top of an image.

leaders_in_textline

Use dot leaders to fill the space between text and a page number such as in a table of contents.

numbered_list

Output numbered lists with the numbers left- or right-aligned.

process_utf8

Read text in the UTF-8 format and output it.

rotated_text

Create text output which does not run  horizontally, but at some angle.

simple_stamp

Create a stamp across the page which runs diagonally from one edge to the other.

starter_textflow

Create multi-column text output which may span multiple pages.

starter_textline

Demonstrate various options for placing a text line.

tabstops_in_text

Create a simple multi-column layout using tab stops.

text_as_clipping_path

Output text filled with an image.

text_on_color

Place a text line and a Textflow on a colored background.

transparent_text

Create some transparent text.

underlined_text

Create underlined text.

weblink_in_text

Create a Textflow and integrate colorized Web links in the text.

wrap_text_around_images

Place images within a Textflow.

wrap_text_around_polygons

Use arbitrary polygons as wrapping shapes for text to wrap around.