Created
December 4, 2011 01:55
-
-
Save vscarpenter/1428839 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.pdfbox.util.PDFMergerUtility; | |
import java.io.File; | |
public class PDFCombineTest { | |
public static void main(String[] args) { | |
PDFMergerUtility mergerUtility = new PDFMergerUtility(); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started with Vaadin.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started With Hadoop_0.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started with Kanban for Software Development.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started with BIRT.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started with Git.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started with NoSQL and Data Scalability.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started with Apache Hadoop.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\getting-started-with-fitnesse.pdf")); | |
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\getting-started-with-git.pdf")); | |
mergerUtility.setDestinationFileName("output.pdf"); | |
try { | |
mergerUtility.mergeDocuments(); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment