The code is very straightforward, the resulting file cannot be opened in Acrobat Reader, the document is not a valid pdf (there was an error processing the page).
static void Main(string[] args)
{
Stream stream = new FileStream(@“C:\Documents and Settings\Administrator\My Documents\Bosch Crailsheim 20091202.pdf”, FileMode.Open);
Pdf pdf = new Pdf(stream);
pdf.Security = new Security {UserPassword = “1234”};
stream =
new FileStream(
@“C:\Documents and Settings\Administrator\My Documents\Bosch Crailsheim 20091202 secure.pdf”,
FileMode.OpenOrCreate);
//pdf.Save(stream);
pdf.Close();
stream.Close();
}