|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.examples.pdmodel.AddImageToPDF
public class AddImageToPDF
This is an example that creates a reads a document and adds an image to it.. The example is taken from the pdf file format specification.
Constructor Summary | |
---|---|
AddImageToPDF()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AddImageToPDF()
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |