Click here to Skip to main content
15,904,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please Guide Me,

How can i create a pdf file that can not be print on printer, using itextsharp dll
Posted
Updated 13-Jul-11 0:52am
v2

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.
 
Share this answer
 
U can use this code to lock the pdf for print.
C#
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
writer.SetEncryption(null, encoding.GetBytes("our cod of lock"), PdfWriter.ALLOW_COPY, PdfWriter.STRENGTH40BITS);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900