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

public Class AddMessageToEachPage

extends Object
Class Inheritance
Imports
java.awt.Color, java.io.File, .IOException, org.apache.pdfbox.Loader, org.apache.pdfbox.pdmodel.PDDocument, .PDPage, .PDPageContentStream, .PDPageContentStream.AppendMode, org.apache.pdfbox.pdmodel.common.PDRectangle, org.apache.pdfbox.pdmodel.font.PDFont, .PDType1Font, .Standard14Fonts.FontName, org.apache.pdfbox.util.Matrix

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

Constructor Summary

AccessConstructor and Description
public
AddMessageToEachPage()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
doIt(String
The file to write the PDF to.
file
,
String
The message to write in the file.
message
,
String
The resulting PDF.
outfile
)

create the second sample document from the PDF file format specification.

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

This will create a hello world PDF document.

private void
usage()

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AddMessageToEachPageback to summary
public AddMessageToEachPage()

Constructor.

Method Detail

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

create the second sample document from the PDF file format specification.

Parameters
file:String

The file to write the PDF to.

message:String

The message to write in the file.

outfile:String

The resulting PDF.

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 hello world PDF document.
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.