I recently wrote a PDF resolution library and an editing Library (C ++/C), and finally found that the image was inserted into the PDF, and the image displayed in the PDF was overwritten by the original content. You can use Adobe to create a file to check whether any exceptions have been found. Therefore, if you want to use itextsharp to insert an image for testing, you can find that most of the information written on the internet is inserting an image when generating a PDF file. Search for information: inserting an image into a known PDF file.CodeAs follows:
Pdfreader reader = new pdfreader ("C :\\ 8.pdf"); pdfstamper Stamper = new pdfstamper (reader, new filestream (" C: \ 18.pdf", filemode. create); image Mm = image. getinstance ("C :\\ 2.png"); mm. setabsoluteposition (0,100); mm. scaleabsolute (154,154); // mm. setdpi () contentbyte under = Stamper. getovercontent (1); under. addimage (mm); Stamper. close (); reader. close ();