Hi,
I create fields by using FormEditor
var editor = new FormEditor(doc);
If I want to add FieldType.DateTime instead of text like this
editor.AddField(FieldType.Text, field.RefID, field.PageNumber, (float)field.Rect.LLX, (float)field.Rect.LLY, (float)field.Rect.URX, (float)field.Rect.URY);
I get an error about not supported.
Is there a way to include dateinput fields?
Thx
Christian
@Chris2Stein
Can you please share the complete definition of field object from your code snippet? We need it to test the scenario in our environment and address it accordingly.
You can use your own definitions but tht is what I use at the moment (it ist generated dynamic)
editor.AddField(FieldType.DateTime, “Datum1”, 1, 70.85, 690.14, 82.95, 702.44);
errorAspose.png (33.8 KB)
I found this workaround
workaroundAspose.png (12.9 KB)
But at all I can insert text … during pdf fullfillment and there is no date selection …
@Chris2Stein
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFJAVA-44187
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as PDFJAVA-44187) have been fixed in Aspose.PDF for Java 24.10.
Dear Support team,
I am using .NET 24.10 and the error is still there.
Bug_Aspose.png (34.8 KB)
@Chris2Stein
We have enhanced the library and now the customer can use one of the code snippets:
Document doc = new Document();
doc.getPages().add();
com.aspose.pdf.facades.FormEditor editor = new com.aspose.pdf.facades.FormEditor(doc);
editor.addField(FieldType.DateTime, "Datum1", "Select Date", 1, 100, 700, 165, 720);
editor.addField(FieldType.DateTime, "Datum2", "12/12/2012", 1, 100, 740, 165, 760);
doc.save(dataDir + "output_1.pdf");
Document doc = new Document();
Page page = doc.getPages().add();
DateField dateField = new DateField(page, new Rectangle(100, 700, 165, 720));
dateField.setDateFormat("dd.MM.yyyy");
dateField.setValue("12.12.2012");
doc.getForm().add(dateField);
dateField.init(page);
doc.save(dataDir + "output_2.pdf");
output_1.pdf (27.6 KB)
output_2.pdf (14.7 KB)