posted 13 years ago
iText can do this, somewhat like this:
This code is for iText 2, the API may have changed in iText 5, but should be similar. Instead of "PdfWriter.AllowPrinting" you could use a combination of other options (or none at all, meaning 0), depending on what you want the user to be able to do with the document.