标签:.net etl cheng 项目 net llb lib creat elf
1、CPechkin
http://files.cnblogs.com/files/Idus/PdfDemo.z02.zip
需要把z01.zip、z02.zip后缀去掉
GlobalConfig config = new GlobalConfig();
SimplePechkin pechkin = new SimplePechkin(config);
ObjectConfig objectConfig = new ObjectConfig();
objectConfig.SetPrintBackground(true)
.SetLoadImages(true)
.SetAffectPageCounts(true)
.SetPageUri("http://www.baidu.com");//此处替换为你的uri
byte[] bytePDF = pechkin.Convert(objectConfig);//此处亦支持html字符串
File.WriteAllBytes("D:\\PDFName.pdf", bytePDF);
SynchronizedPechkin sc = new SynchronizedPechkin(new GlobalConfig().SetMargins(new Margins(100, 100, 100, 100)));
IList<Uri> uris = new List<Uri> {
new Uri(@"http://www.baidu.com"),
new Uri(@"http://www.baidu.com")
};
byte[] buf = sc.Convert(uris);
string fn = Path.GetTempFileName() + ".pdf";
FileStream fs = new FileStream(fn, FileMode.Create);
fs.Write(buf, 0, buf.Length);
fs.Close();
2、ITextSharp
http://www.cnblogs.com/zuochengsi-9/p/5483808.html
标签:.net etl cheng 项目 net llb lib creat elf
原文地址:http://www.cnblogs.com/Idus/p/7157675.html