spire.pdf 3.9.360 新支持打印指定的 pdf 页面-人生就是博尊龙凯时

spire.pdf 3.9.360 新支持打印指定的 pdf 页面-人生就是博尊龙凯时

   |    028-81705109    |       |    微信扫一扫    |       |   

spire.pdf 3.9.360 新支持打印指定的 pdf 页面

我们很高兴地通知大家,spire.pdf 3.9.360正式发布了。这次更新我们添加了pdf打印指定页面,公布了属性图层的名字,还新支持可以通过搜索文本返回当前行的文本等修功能,同时,我们对打印,pdf图层以及安全设置的代码做了一些调整。 我们还修复了pdf转xps出现的问题,图片转pdf以及压缩pdf文档中的图片等bugs。具体更新内容如下:

新功能:

pdfdocument doc = new pdfdocument();
doc.loadfromfile(filename);
doc.printsettings.selectsomepages(new int[]{2,4});
doc.print();
string name = doc.layers[0].name;
signature.signtextalignment=signtextalignment.right;
pdfdocument doc = new pdfdocument();
doc.loadfromfile("alcontrol - edf.pdf");
pdfpagebase page =doc.pages[0];
simpletextextractionstrategy strategy = new simpletextextractionstrategy();
string text=page.extracttext(strategy);
filestream fs =new filestream("alcontrol - edf.txt",filemode.create);
streamwriter sw =new streamwriter(fs);
sw.writer(text);
sw.flush();
sw.close();

调整:

pdfdocument doc = new pdfdocument(filepath   "sample.pdf");
//change print settings you want
doc.printsettings.landscape = true;
doc.print();
//add layer
pdflayer layer = doc.layers.addlayer("red line", pdfvisibility.on);
pdfcanvas pca = layer.creategraphics(doc.pages[0].canvas);
pca.drawline(new pdfpen(pdfbrushes.red, 1), new pointf(0, 100), new pointf(100, 100));
layer = doc.layers.addlayer("blue line");
pdfcanvas pcb = layer.creategraphics(doc.pages[0].canvas);
pcb.drawline(new pdfpen(pdfbrushes.blue, 1), new pointf(0, 150), new pointf(100, 150));
//remove the layer by name
doc.layers.removelayer(("red line");
//encrypt
doc.security.encrypt("userpassword", "ownerpassword", spire.pdf.security.pdfpermissionsflags.editcontent, spire.pdf.security.pdfencryptionkeysize.key256bit);
//verify owner password.
doc.security.verifyownerpassword();

问题修复:


获取最新版的 spire.pdf 3.9.360,请点击:

http://www.e-iceblue.cn/downloads/spire-pdf-net.html

网站地图