Top Description Classes
module pdfbox.examples

Package org.apache.pdfbox.examples.pdmodel


These examples show how to use the classes in the PDModel package.

Class Summary

Modifier and TypeClass and Description
public class
AddAnnotations

Add annotations to pages of a PDF document.

public class
AddImageToPDF

This is an example that creates a reads a document and adds an image to it..

public class
AddJavascript

This is an example of how to set some javascript in the document.

public class
AddMessageToEachPage

This is an example of how to add a message to every page in a pdf document.

public class
AddMetadataFromDocInfo

This is an example on how to add metadata to a document.

public class
public class
CreateBlankPDF

Create a blank PDF and write the contents to a file.

public class
CreateBookmarks

This is an example on how to add bookmarks to a PDF document.

public class
CreateGradientShadingPDF

This example creates a PDF with type 2 (axial) and type 3 (radial) shadings with a type 2 (exponential) function, and a type 4 (gouraud triangle shading) without function.

public class
CreateLandscapePDF

This is an example of how to create a page with a landscape orientation.

public class
CreatePageLabels

Create a 3-page PDF with the page labels "RO III", "RO IV", "1".

public class
CreatePatternsPDF

This is an example of how to create a page that uses patterns to paint areas.

public class
CreatePDFA

Creates a simple PDF/A document.

public class
CreatePortableCollection

This is an example on how to create a portable collection PDF, as described in the PDF 1.7 specification in chapter 12.3.5.

public class
CreateSeparationColorBox

This example shows how to use a separation color / spot color.

public class
EmbeddedFiles

This is an example that creates a simple document and embeds a file into it..

public class
EmbeddedFonts

An example of using an embedded TrueType font with Unicode text.

public class
EmbeddedMultipleFonts

Output a text without knowing which font is the right one.

public class
public class
ExtractEmbeddedFiles

This is an example on how to extract all embedded files from a PDF document.

public class
ExtractMetadata

This is an example on how to extract metadata from a PDF document.

public class
ExtractTTFFonts

This will extract all true type-fonts of a pdf.

public class
GoToSecondBookmarkOnOpen

This is an example on how to an action to go to the second page when the PDF is opened.

public class
HelloWorld

Creates a "Hello World" PDF using the built-in Helvetica font.

public class
HelloWorldTTF

Creates a simple document with a TrueType font.

public class
HelloWorldType1

Creates a simple document with a Type 1 font (.pfb).

public class
ImageToPDF

Creates a PDF document from an image.

public class
PrintBookmarks

This is an example on how to access the bookmarks that are part of a pdf document.

public class
PrintDocumentMetaData

This is an example on how to get a documents metadata information.

public class
PrintURLs

This is an example of how to access a URL in a PDF document.

public class
RemoveFirstPage

This is an example on how to remove pages from a PDF document.

public class
ReplaceURLs

This is an example of how to replace a URL in a PDF document.

public class
RubberStamp

This is an example on how to add annotations to pages of a PDF document.

public class
RubberStampWithImage

This is an example on how to add a rubber stamp annotation with an image to pages of a PDF document.

public class
ShowColorBoxes

Creates a simple document.

public class
ShowTextWithPositioning

This example shows how to justify a string using the showTextWithPositioning method.

public class
SuperimposePage

Example to show superimposing a PDF page onto another PDF.

public class
UsingTextMatrix

This is an example of how to use a text matrix.