Wednesday, September 22, 2010

Hide Toolbar of PDF in iTextSharp

Hi,

Toolbar of PDF can Hide by using following line of code:

PdfWriter writer = PdfWriter.GetInstance(document, m);
writer.ViewerPreferences = PdfWriter.HideToolbar;

Toolbar can encrption by using permission using following lin of code:


writer.SetEncryption(true, null, null, PdfWriter.HideToolbar);
writer.SetEncryption(true, null, null, PdfWriter.HideWindowUI);
writer.SetEncryption(true, null, null, PdfWriter.HideMenubar);

Hopefully this would be helpful for all of you.

Thanks

Saqib

Friday, March 5, 2010

Regular Expression

Please post regular expression