com.snowtide.pdf.util
Class MergeUtil

java.lang.Object
  extended by com.snowtide.pdf.util.MergeUtil

Deprecated. Merge functionality may be removed in a future PDFTextStream release

public class MergeUtil
extends java.lang.Object

A PDF file merge utility.

This utility supports merging any number of PDF files into a single PDF document. Metadata, annotations, bookmarks, and form data that might be found in the given source PDF files are not transferred to the merged PDF file.

Since:
2.0
Version:
©2004-2012 Snowtide Informatics Systems, Inc.

Method Summary
static void main(java.lang.String[] args)
          Deprecated. Command-line interface to PDF merge functionality.
static void mergeDocuments(java.io.File[] pdfFiles, java.io.File destFile)
          Deprecated. Merges a series of PDF files into a single PDF document, and writes the merged document data to the given file path.
static void mergeDocuments(java.io.File[] pdfFiles, java.io.OutputStream destStream)
          Deprecated. Merges a series of PDF files into a single PDF document, and writes the merged document data to the given OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

mergeDocuments

public static void mergeDocuments(java.io.File[] pdfFiles,
                                  java.io.File destFile)
                           throws java.io.IOException
Deprecated. 
Merges a series of PDF files into a single PDF document, and writes the merged document data to the given file path.

Parameters:
pdfFiles - - an array of File references to the PDF files to be merged, in the order their content should appear in the resulting merged PDF document
destFile - - a File reference where the merged PDF document is written
Throws:
java.io.IOException - - thrown if an error occurs while merging the given list of PDF files
See Also:
mergeDocuments(File[], OutputStream)

mergeDocuments

public static void mergeDocuments(java.io.File[] pdfFiles,
                                  java.io.OutputStream destStream)
                           throws java.io.IOException
Deprecated. 
Merges a series of PDF files into a single PDF document, and writes the merged document data to the given OutputStream.

Parameters:
pdfFiles - - an array of File references to the PDF files to be merged, in the order their content should appear in the resulting merged PDF document
destStream - - an OutputStream to which the merged PDF document data is written
Throws:
java.io.IOException - - thrown if an error occurs while merging the given list of PDF files

main

public static void main(java.lang.String[] args)
Deprecated. 

Command-line interface to PDF merge functionality.

Usage:

java -cp PDFTextStream.jar com.snowtide.pdf.util.MergeUtil [src_pdf1] [src_pdf2] ... [src_pdfN] [dest_path]

Any number of paths to source PDF documents may be passed as arguments to this utility; the last argument provided is assumed to be the desired destination path of the merged PDF file

Example:

java -cp PDFTextStream.jar com.snowtide.pdf.util.MergeUtil ~/folder/report1.pdf ~/index.pdf result.pdf


This will merge the PDF files 'report1.pdf' and 'index.pdf', in that order, and write the result to 'result.pdf' in the current directory.