ANT tasks that utilize PDFBox features can be found in this package. This is an example of using the PDF2Text task:

<taskdef name="pdf2text" classname="org.pdfbox.ant.PDFToTextTask" classpathref="build.classpath" />
<pdf2text>
  <fileset dir="test">
    <include name="**/*.pdf" />
  </fileset>
</pdf2text>