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

public final Class ReplaceURLs

extends Object
Class Inheritance
Imports
java.io.File, .IOException, java.util.List, org.apache.pdfbox.Loader, org.apache.pdfbox.pdmodel.PDDocument, .PDPage, org.apache.pdfbox.pdmodel.interactive.action.PDAction, .PDActionURI, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation, .PDAnnotationLink

This is an example of how to replace a URL in a PDF document. This will only replace the URL that the text refers to and not the text itself.
Author
Ben Litchfield

Constructor Summary

AccessConstructor and Description
private
ReplaceURLs()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public static void
main(String[]
Command line arguments.
args
)

This will read in a document and replace all of the urls with http://pdfbox.apache.org.

private static void
usage()

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ReplaceURLsback to summary
private ReplaceURLs()

Constructor.

Method Detail

mainback to summary
public static void main(String[] args) throws IOException

This will read in a document and replace all of the urls with http://pdfbox.apache.org.
see usage() for commandline

Parameters
args:String[]

Command line arguments.

Exceptions
IOException:
If there is an error during the process.
usageback to summary
private static void usage()

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