如何使用ITextSharp,在产生出来的PDF上面画线、正方形、或者是标签?

jojo163 2007-02-06 02:42:04
如题,就是说我用ItextSharp在创建PDF的时候,有些需要在转出的PDF上面的页面上作一些标记性的东西,要如何去实现呢?
...全文
791 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
brucenan999 2007-02-06
  • 打赏
  • 举报
回复
PdfWriter.GetInstance(document, new FileStream("Chap0404.pdf", FileMode.Create));

// step 3: we open the document
document.Open();

// step 4: we add a Graphic to the document
Graphic grx = new Graphic();
// add a rectangle
grx.Rectangle(100, 700, 100, 100);
// add the diagonal
grx.MoveTo(100, 700);
grx.LineTo(200, 800);
// stroke the lines
grx.Stroke();
document.Add(grx);

110,555

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧