public class AddImageToPDF extends Object
| Constructor and Description |
|---|
AddImageToPDF() |
| Modifier and Type | Method and Description |
|---|---|
void |
createPDFFromImage(String inputFile,
String imagePath,
String outputFile)
Add an image to an existing PDF document.
|
static void |
main(String[] args)
This will load a PDF document and add a single image on it.
|
public void createPDFFromImage(String inputFile, String imagePath, String outputFile) throws IOException
inputFile - The input PDF to add the image to.imagePath - The filename of the image to put in the PDF.outputFile - The file to write to the pdf to.IOException - If there is an error writing the data.public static void main(String[] args) throws IOException
args - Command line arguments.IOExceptionCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.