public class AddImageToPDF
extends java.lang.Object
Constructor and Description |
---|
AddImageToPDF() |
Modifier and Type | Method and Description |
---|---|
void |
createPDFFromImage(java.lang.String inputFile,
java.lang.String image,
java.lang.String outputFile)
Add an image to an existing PDF document.
|
static void |
main(java.lang.String[] args)
This will load a PDF document and add a single image on it.
|
public void createPDFFromImage(java.lang.String inputFile, java.lang.String image, java.lang.String outputFile) throws java.io.IOException, COSVisitorException
inputFile
- The input PDF to add the image to.image
- The filename of the image to put in the PDF.outputFile
- The file to write to the pdf to.java.io.IOException
- If there is an error writing the data.COSVisitorException
- If there is an error writing the PDF.public static void main(java.lang.String[] args)
args
- Command line arguments.