The code I used to reproduce the case is this, included in a c# project with
reference to itextSharp:

string pdfTemplate = @"D:\scheda.pdf";
            string newFile = @"D:\scheda_2.pdf";

            PdfReader pdfReader = new PdfReader(pdfTemplate);
            PdfStamper pdfStamper = new PdfStamper(pdfReader, new
FileStream(newFile, FileMode.Create));
            //PdfStamper pdfStamper = new PdfStamper(pdfReader, new
FileStream(pdfTemplate, FileMode.Open));
            AcroFields pdfFormFields = pdfStamper.AcroFields;

            pdfFormFields.SetField("nome
http://itext-general.2136553.n4.nabble.com/file/n2237575/scheda.pdf
scheda.pdf ", "Try with iTextSharp");

            // flatten the form to remove editting options, set it to false
            // to leave the form open to subsequent manual edits
            pdfStamper.FormFlattening = false;

            // close the pdf
            pdfStamper.Close();

I also included the pdf of the try. The resulting pdf (scheda_2.pdf) is no
longer modificable.
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Extended-Features-don-t-work-in-ITextSharp-tp2237320p2237575.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to