Yes, you can define jPDFProcess functions as ANT tasks, and process PDF documents from your ANT processes or workflows.

Following is an implementation of two sample ANT tasks:

  1. an ant task to convert a PDF page to an image
  2. an task to apply a digital signature to a PDF
  3. it is very easy to add an ant task for any of the PDF functions supported by jPDFProcess: create PDF, print PDF, convert PDF to images, merge PDF form data, add watermark, flatten comments or fields, assemble, linearize, extract content, encrypt.  Email us if you need help.

jpdfprocess-ant.jar

To use the ANT task defined in this sample, you will have to include the task definition in your ant file:

<taskdef name="PDFToImage" classname="jPDFProcessSamples.ant.PDFToImage" classpath="jpdfprocess-ant.jar;jPDFProcess.jar" />
<taskdef name="SignPDF" classname="jPDFProcessSamples.ant.SignPDF" classpath="jpdfprocess-ant.jar;jPDFProcess.jar;bcpkix-jdk14-147.jar;bcprov-jdk14-147.jar" />

and then you can use the tasks as follows:

 <PDFToImage InputFile="input.pdf" OutputFile="input_01.png" Format="png" />
<SignPDF Inputfile="input.pdf" OutputFile="input_signed.pdf" KeystoreFile="keystore.pfx" KeystorePassword="store_pwd" KeyAlias="key_alias" KeyPassword="store_pwd" />