小编Min*_*her的帖子

使用iText7将图像添加到现有的PDF文件中

我想使用iText7将图像添加到现有PDF文件中的特定位置。
在使用iTextSharp的另一个项目中,代码非常简单:

iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(new Uri(fullPathSignature));
// Set img size and location on page
//-------------------------------------
// item.Width, item.Height
img.ScaleAbsolute(120, 62);

// left: item.X bottom: item.Y
img.SetAbsolutePosition(25, 25);
//-------------------------------------

//Add it to page 1 of the document,
PdfContentByte cb = stamper.GetOverContent(1);
cb.AddImage(img);
Run Code Online (Sandbox Code Playgroud)

但是我找不到使用iText7的正确方法。
我有一个PdfReader和PdfWriter,但是在iText7中哪里可以找到PdfStamper?
也许有另一种方法可以将图像添加到iText7中的现有PDF文件中?
(我不能在当前项目中使用iTextSharp)

c# pdf itext7

2
推荐指数
1
解决办法
3632
查看次数

标签 统计

c# ×1

itext7 ×1

pdf ×1