Top Description Constructors Methods
org.apache.pdfbox.examples.pdmodel

public Class CreatePortableCollection

extends Object
Class Inheritance
Imports
java.io.ByteArrayInputStream, .IOException, java.nio.charset.StandardCharsets, java.util.ArrayList, .GregorianCalendar, .HashMap, .List, .Map, org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.pdmodel.PDDocument, .PDDocumentNameDictionary, .PDEmbeddedFilesNameTreeNode, .PDPage, .PDPageContentStream, .PageMode, org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification, .PDEmbeddedFile, org.apache.pdfbox.pdmodel.font.PDType1Font, .Standard14Fonts.FontName

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. It uses the COS methods because there are not any PD classes yet. If you want to help, we'd need PDCollection, PDCollectionField, PDCollectionSort and PDCollectionItem.
Author
Tilman Hausherr

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
doIt(String
The file to write the PDF to.
file
)

Create a portable collection PDF with two files.

public static void
main(String[]
Command line arguments.
args
)

This will create a portable collection PDF.

private void
usage()

This will print out a message telling how to use this example.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CreatePortableCollectionback to summary
private CreatePortableCollection()

Constructor.

Method Detail

doItback to summary
public void doIt(String file) throws IOException

Create a portable collection PDF with two files.

Parameters
file:String

The file to write the PDF to.

Exceptions
IOException:
If there is an error writing the data.
mainback to summary
public static void main(String[] args) throws IOException

This will create a portable collection PDF.
see usage() for commandline

Parameters
args:String[]

Command line arguments.

usageback to summary
private void usage()

This will print out a message telling how to use this example.