Based on source code contributed to the original PDFBox project. Copyright (c) 2002-2007, www.pdfbox.org