I just found the “problem”.
I am using that tax form called “tax_form_1040a.pdf” that comes with the pdf_forms example.
I use this code to test:
var some_field = "abc";
var some_other_field = "efg";
field_values = new Array()
field_values[0] = 'f1-1=abc' //+ some_field;
field_values[1] = 'f1-2=efg' //+ some_other_field;
var pdf_form = pdf_formular // PDF is stored in a blob
var result = plugins.pdf_output.convertPDFFormToPDFDocument(pdf_form, field_values);
var file = plugins.file.showFileSaveDialog(dateiname);
var success = plugins.file.writeFile(file, result)
This works great! But when I change these two lines to
field_values[0] = 'f1-1=' + 'abc'
field_values[1] = 'f1-2=' + 'efg'
it doesn’t !?!
Now I finally tried
field_values[0] = ('f1-1=' + 'askdjh').toString()
field_values[1] = ('f1-2=' + 'asdads').toString()
and guess what? That works!
So something seems to go wrong with datatypes here… I am fine now, but I would consider this a bug.
Thanks
Patrick