acrofields

PDFBOX acroForm filled but when opened in Acrobat reader values disappears

时光怂恿深爱的人放手 提交于 2021-01-29 12:37:50
问题 I have PDF form, I am trying to fill it with PDFBOX. It works, form is filled and I open with other reader or browser, I can see values, however When I tries to open in Adobe Reader values disappears, I tried every possible way to find out why But values, are not visible. I have template form, that I use and fill data, rename fields, and merge it into other document, and redo that process until all forms are filled up. I am not sure if this related to my code or Adobe reader. Link to PDF form

Adding a PDF fillable form (acrofield) using Apache FOP

旧街凉风 提交于 2020-01-01 15:34:29
问题 I am trying to add a fillable form (so the end-user can insert information into it using acrobat reader and then save it) to a PDF I generate using Apache FOP. I can't seem to find any information on how this is done, if it is possible. Google doesn't give much relevant information, mostly on the fact that it's not possible, but most of that information dates from the early 2000's. Is there a way to add acrofields using FOP? 回答1: (disclosure: I'm a FOP developer, though not very active

Adding a PDF fillable form (acrofield) using Apache FOP

拈花ヽ惹草 提交于 2020-01-01 15:34:04
问题 I am trying to add a fillable form (so the end-user can insert information into it using acrobat reader and then save it) to a PDF I generate using Apache FOP. I can't seem to find any information on how this is done, if it is possible. Google doesn't give much relevant information, mostly on the fact that it's not possible, but most of that information dates from the early 2000's. Is there a way to add acrofields using FOP? 回答1: (disclosure: I'm a FOP developer, though not very active

Set AcroField Text Size to Auto

泄露秘密 提交于 2019-12-19 04:04:51
问题 Using itextsharp , I'm attempting to set the font size of my form's text fields to auto . I'm currently doing something like this: Object d = 0.0; PdfReader reader = new PdfReader(path); byte [] pdf; using (var ms = new MemoryStream()) { PdfStamper stamper = new PdfStamper(reader, ms); AcroFields fields = stamper.AcroFields; foreach (var f in fields.Fields.Keys) { fields.SetFieldProperty(f, "textsize", d, null); } } But I'm getting the following error: System.InvalidCastException: Specified

Set AcroField Text Size to Auto

拥有回忆 提交于 2019-12-19 04:04:05
问题 Using itextsharp , I'm attempting to set the font size of my form's text fields to auto . I'm currently doing something like this: Object d = 0.0; PdfReader reader = new PdfReader(path); byte [] pdf; using (var ms = new MemoryStream()) { PdfStamper stamper = new PdfStamper(reader, ms); AcroFields fields = stamper.AcroFields; foreach (var f in fields.Fields.Keys) { fields.SetFieldProperty(f, "textsize", d, null); } } But I'm getting the following error: System.InvalidCastException: Specified

Fill PDF template acrofield with HTML formatted text using iTextSharp

帅比萌擦擦* 提交于 2019-12-18 17:03:08
问题 I am using iTextSharp to fill in a PDF template. The data I am using is kept in a database and is HTML formatted. My problem is that when I load the AcroField with this text I get it to do the line breaks, but no bold nor italicizing . I have already attempted to use HtmlWorker , but all the examples online show it being used to convert HTML to a PDF but I am trying to set an AcroField in a PDF template. Any help would be appreciated. 回答1: After spending days looking through forums and

PDF hostContainer callback

与世无争的帅哥 提交于 2019-12-18 05:45:10
问题 Following this SO solution here to notify clients of a click event in a PDF document, how is it possible to notify the client when the PDF gets submitted by the client using this.myPDF.submitForm("localhost/Handler.ashx?r=2) function? The PDF File is created inside a user control then rendered into a HTML object: string container = ("<object data='/myfile.pdf' type='application/pdf'></object>"); The JS file attached to the PDF is done like this: var webClient = new WebClient(); string

PDFBox API: How to change font to handle Cyrillic values in an AcroForm field

房东的猫 提交于 2019-12-17 20:56:37
问题 I need help with adding Cyrillic value to a field using the PDFBox API . Here is what I have so far: PDDocument document = PDDocument.load(file); PDDocumentCatalog dc = document.getDocumentCatalog(); PDAcroForm acroForm = dc.getAcroForm(); PDField naziv = acroForm.getField("naziv"); naziv.setValue("Наслов"); // this part right here naziv.setValue("Naslov"); // it works like this It works perfect when my input is in Latin Alphabet. But I need to handle Cyrillic inputs as well. How can I do it?

Change AcroFields order in existing PDF with iText?

人盡茶涼 提交于 2019-12-13 15:13:28
问题 I have a pdf with text form fields at are layered one on top of the other. When I fill the fields via iText and flatten the form, the form field that I had created on top of the other form field is now on the bottom. For instance, I have a text field named "number_field" and that is underneath a second text field that is titled "name_field". When I set the value for those fields via iText (so 10 for number_field and 'John' for name_field), the number_field is now on top of the name_field. How

Can I find bordercolor of a field in PDF using iText?

瘦欲@ 提交于 2019-12-11 11:07:07
问题 Is there anyway of finding the bordercolor of a specific field in my PDF using iText latest version? I could get AcroField.Item, but I dont see an option to get bordercolor from there. 回答1: Please take a look at this PDF: text_fields.pdf. This PDF was created using the TextFields example. The following code snippet was used to set the border of the field with name text_2 : text.setBorderStyle(PdfBorderDictionary.STYLE_SOLID); text.setBorderColor(BaseColor.BLUE); text.setBorderWidth(2); Now