通过itextsharp阻止pdf文件的打印 [英] Block Printing of pdf file through itextsharp

查看:138
本文介绍了通过itextsharp阻止pdf文件的打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请引导我,

我如何使用itextsharp dll

Please Guide Me,

How can i create a pdf file that can not be print on printer, using itextsharp dll

推荐答案

创建无法在打印机上打印的pdf文件,我认为您是在谈论制作无法打印的安全PDF.但这只是没有用.我有很多无法通过Adobe打印的PDF,但是如果您在浏览器(即chrome或任何其他浏览器)中将其打开并打印,它将可以使用.因此,我建议您放弃这个想法.
I think you are talking about making a secured PDF which cannot be printed. But that is just useless. I have many PDF which cannot be printed through adobe, but if you open it in browser (i.e. chrome or any) and print it, it will work. So, I would suggest to leave the idea.


U可以使用此代码锁定pdf进行打印.
U can use this code to lock the pdf for print.
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
writer.SetEncryption(null, encoding.GetBytes("our cod of lock"), PdfWriter.ALLOW_COPY, PdfWriter.STRENGTH40BITS);


这篇关于通过itextsharp阻止pdf文件的打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆