- 博客(0)
- 资源 (7)
空空如也
pdf文件加水印源代码
给pdf文件加水印。源代码有详解。主要代码:
PdfReader pdfReader = new PdfReader(inputPath);
int numberOfPages = pdfReader.NumberOfPages;
FileStream outputStream = new FileStream(outputPath, FileMode.Create);
PdfStamper pdfStamper = new PdfStamper(pdfReader, outputStream);
PdfContentByte waterMarkContent;
string watermarkimagepath = watermarkPath;
iTextSharp.text.Image image = iTextSharp.text.Image.GetInstance(watermarkimagepath);
image.SetAbsolutePosition(250, 675);
image.ScaleAbsoluteHeight(50);
image.ScaleAbsoluteWidth(50);
waterMarkContent = pdfStamper.GetUnderContent(1);
waterMarkContent.AddImage(image);
pdfStamper.Close();
pdfReader.Close();
System.IO.File.Delete(inputPath);
System.IO.File.Move(outputPath, inputPath);
System.IO.File.Delete(outputPath);
2011-03-08
微信公共平台开发代码
实现关注自动回复和根据用户回复的内容自动回复。
测试了的,完全可以用。
先注册个微信公告平台帐号,取得token和url
建个网站项目 把代码复制进去 把token换下。
然后扫描微信 关注测试
2014-04-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人