org.pdfbox.examples.persistence

Class CopyDoc


public class CopyDoc
extends java.lang.Object

This is an example used to copy a documents contents from a source doc to destination doc via an in-memory document representation.
Version:
$Revision: 1.7 $
Author:
Michael Traut

Constructor Summary

CopyDoc()
Constructor.

Method Summary

void
doIt(String in, String out)
This will perform the document copy.
static void
main(String[] args)
This will copy a PDF document.

Constructor Details

CopyDoc

public CopyDoc()
Constructor.

Method Details

doIt

public void doIt(String in,
                 String out)
            throws IOException,
                   COSVisitorException
This will perform the document copy.
Parameters:
in - The filename used for input.
out - The filename used for output.
Throws:
COSVisitorException - If there is an error while copying the document.

main

public static void main(String[] args)
This will copy a PDF document.
see usage() for commandline
Parameters:
args - command line arguments