请问下用过itextsharp可以实现在已有pdf插入图片吗?
我查了一下资料,都是生成的时候插入图片.
请问下有办法实现在已有的pdf某页上插入图片,求指导了呀,有人知道吗?
------解决方案-------------------- PdfReader reader = new PdfReader(strPdf);
PdfStamper stamper = new PdfStamper(reader, new FileStream(strSavePdf, FileMode.Create));
int nPageNum = reader.NumberOfPages;
PdfReader reader = new PdfReader(strPdf);
PdfStamper stamper = new PdfStamper(reader, new FileStream(strSavePdf, FileMode.Create));
int nPageNum = reader.NumberOfPages;
for (int i = nPageNum - images.Count + 1; i <= nPageNum; i++)
{
PdfContentByte cb = stamper.GetUnderContent(i);
Image im = Image.GetInstance("c:\\1.jpg"]);
cb.Add(im);
}