title: How to use Itext to add an image file into an existing PDF, and declare a unique name for it?
body: <p>In order to find an added image file and replace it with another image file when I read a PDF next time, I want to use Itext to add an image file into an existing PDF, and declare a unique name for it. 
  My code:</p>
  
  <pre><code>    final PdfName key = new PdfName("MY_SIGN_KEY");
      final PdfName val = new PdfName("MY_SIGN_VAL");
  
      Image signImage=Image.getInstance(signPngFile.getAbsolutePath());
      signImage.setAlignment(1);
      signImage.scaleAbsolute(newWidth, newHeight);
      signImage.setAbsolutePosition(200,200);
  
       PdfContentByte over = stamper.getOverContent(1);
       PdfImage stream = new PdfImage(signImage, "", null);
       stream.put(key,val);// a unique name for it.(设置唯一标识符)
  
       //PdfIndirectObject ref=over.getPdfWriter().addToBody(stream);
       //signImage.setDirectReference(ref.getIndirectReference()); 
       over.addImage(signImage);
  </code></pre>