Hi! Working on a project using itextsharp and vb.net where I want to produce
a partially filled out PDF with editable forms and the option to sign with a
digital signature. I had it working just fine until last week when I started
getting an error when trying to save the final document in Adobe Reader. The
message says: "The document could not be saved. There was a problem reading
this document (26). " I have a template PDF with forms and extended features
enabled which I want to make an editable copy of with some of the forms
filled out with data from database. The idea is to be able to take the
pre-filled document out on a laptop to be filled out completely and signed
offline. The problem seems to occur as soon as I open the document with
PdfStamper, set the value of a field and then close the document, using the
code below. I even tried it with a blank PDF with just one field called
"test" and still get the same error. ' -- Dim reader As PdfReader = New
PdfReader(sDocTemplate) Dim stamper As New PdfStamper(reader, New
FileStream(sOutputFile, FileMode.Append))
stamper.AcroFields.SetField("test", "hello") stamper.Close() ' -- When I
open the produced PDF there is a small window saying something about the
document being damaged and repaired, then it opens and everything seems
fine. The forms contain the proper data and everything, but when trying to
save it the mentioned error message is displayed. As I said, it was working
fine right up until this error appeared out of the blue. I haven't updated
any relevant software that I know of and I think I've eliminated all sources
of error right down to itextsharp when testing with a blank pdf. Any ideas
of what could be wrong would be highly appreciated! / Fredrik
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
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/