xfa

How to calculate the checksum in an XFA form

↘锁芯ラ 提交于 2019-12-03 08:33:29
When you save an XFA form (XFA = XML Forms Architecture) using Adobe software, a checksum attribute is added to the form element. This checksum appears to be a SHA-1 digest, but it's unclear as to what is actually fed to the hash. Does anyone have any idea as to how this is generated? This value is needed by Adobe Acrobat to validate what's actually in the form's XML data, but when I create a hash of the XML that is being fed to the form, Adobe Acrobat doesn't accept it. This checksum attribute isn't documented in the XFA specification, so I would really appreciate it, if somebody could:

How to correctly fill in XFA form data using iTextSharp to allow editing and saving result in Acrobat XI

倖福魔咒の 提交于 2019-12-02 09:56:11
I have an application that I'm using the populate a pdf form using iTextSharp. /// <summary> /// Imports XFA Data into a new PDF file. /// </summary> /// <param name="pdfTemplate">A PDF File with an unpopulated form.</param> /// <param name="xmlFormData">XFA form data in XML format.</param> /// <returns>a memorystream containing the new PDF file.</returns> public static void XFAImport(System.IO.Stream pdfTemplate, System.IO.Stream xmlFormData, System.IO.Stream outputStream) { using (iTextSharp.text.pdf.PdfReader reader = new iTextSharp.text.pdf.PdfReader(pdfTemplate)) { using (iTextSharp.text

How to get a list of the fields in an XFA form?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 14:04:25
I am trying to get a simple list of all the fields in my XFA form. I am using this code: private void ListFieldNames() { string pdfTemplate = @"C:\Projects\iTextSharp\SReport.pdf"; MemoryStream m = new MemoryStream(); // title the form this.Text += " - " + pdfTemplate; // create a new PDF reader based on the PDF template document PdfReader pdfReader = new PdfReader(pdfTemplate); PdfStamper pdfStamper = new PdfStamper(pdfReader, m); AcroFields formFields = pdfStamper.AcroFields; AcroFields form = pdfReader.AcroFields; XfaForm xfa = form.Xfa; StringBuilder sb = new StringBuilder(); sb.Append(xfa

How to get a list of the fields in an XFA form?

[亡魂溺海] 提交于 2019-11-28 07:52:38
问题 I am trying to get a simple list of all the fields in my XFA form. I am using this code: private void ListFieldNames() { string pdfTemplate = @"C:\Projects\iTextSharp\SReport.pdf"; MemoryStream m = new MemoryStream(); // title the form this.Text += " - " + pdfTemplate; // create a new PDF reader based on the PDF template document PdfReader pdfReader = new PdfReader(pdfTemplate); PdfStamper pdfStamper = new PdfStamper(pdfReader, m); AcroFields formFields = pdfStamper.AcroFields; AcroFields

How can I flatten a XFA PDF Form using iTextSharp?

ε祈祈猫儿з 提交于 2019-11-27 05:38:56
I assume I need to flatten a XFA form in order to display properly on the UI of an application that uses Nuance's CSDK. When I process it now I get a generic message "Please Wait.... If this message is not eventually replaced..". Looking for some sample iTextSharp code to do this. You didn't insert a code sample to show how you are currently flattening the XFA form. I assume your code looks like this: var reader = new PdfReader(existingFileStream); var stamper = new PdfStamper(reader, newFileStream); var form = stamper.AcroFields; var fieldKeys = form.Fields.Keys; foreach (string fieldKey in