title: How add an image to an existing pdf file from a location and should save back to same location?
body: <p>How add an image to an existing pdf file from a location,
   and should save back to same location, I have used following code but it generates a new pdf with existing jpeg. But how to deal with existing pdf file and save resultant pdf image?</p>
  
  <pre><code> import java.io.*;
   import com.lowagie.text.*;
   import com.lowagie.text.pdf.*;
  
   public class imagesPDF
   {
   public static void main(String arg[])throws Exception
   {
     Document document=new Document();
     PdfWriter.getInstance(document,new FileOutputStream("imagesPDF.pdf"));
     document.open();
     Image image = Image.getInstance ("devi.jpg");
     document.add(new Paragraph("textdata"));
     document.add(image);
     document.close();
   }
   }
  </code></pre>