Op 22/02/2011 16:19, Howard Falcon schreef:
Looks like I'm registered.
Yes, but now you've send a mail to 1T3XT (a company) instead of to the
mailing list (the community).
1.Yes I used Acrobat 9 Pro I am using AcroForm.
2.The PDF is selected and we take data from a SQL DB to fill out most
of the fields.The PDF is opened from a .net application and the fields
are filled in on the fly and flattened is set to true.
3.Not really sure what FormFlattening Does sinceI can't find much
information onit.
Ouch, that seriously hurts! Why are you so cruel?
Let me prove that there's very good information on it:
Please go to http://affiliate.manning.com/idevaffiliate.php?id=223_212
Under resources, there's a column "Downloads".
Download "Sample chapter 6" and you'll find out what form flattening does.
(Page 186 the paragraph with the (1) bullet.)
PDFToUse = "~/DocumentFiles/";
PDFToUse += "pci_saq_a.pdf";
stringtemptitle = MID + "_SAQ.PDF";
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("Content-disposition", "attachment; filename="+
temptitle);
PdfReader pdfReader = newPdfReader(Request.MapPath(PDFToUse));
PdfStamper pdfStamper = newPdfStamper(pdfReader, Response.OutputStream);
pdfStamper.FormFlattening = true;
AcroFields pdfForm = pdfStamper.AcroFields;
for(inti = 0; i < formfields.Count; i++)
{
pdfForm.SetField(formfields.GetKey(i), formfields.Get(i));
}
pdfStamper.Close();
The pdf is located on a server and opened with a PDF Reader or PDF Pro
on the local PC.
If I take the PDF that I developed with the form fields I can open it
and edit the fields.If I open it from the server after it is generated
with data then I can not edit the fields.I suspect it is a setting
that I have not made
What is not clear about:
2. you fill it out programmatically using iText (PdfReader/PdfStamper)
and you flatten the form (you remove the interactivity).
Remove the interactivity = make sure you can no longer "edit" the form
fields.
3. you open the PDF that has been filled out and flattened, and as
you've removed the form, people can no longer fill out any fields
(because there are no more fields).
This is consistent with what you're saying: you can no longer fill out
any fields, because there aren't any: you've flattened the form; the
fields are gone.
What is the problem? If you want to keep the fields, form flattening
should be false, not true.
Have you tried removing the line pdfStamper.FormFlattening = true;
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php