To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=82785
Issue #|82785
Summary|AcroForm fieldnames not correct, "." --> #2E
Component|Word processor
Version|OOo 2.3
Platform|PC
URL|
OS/Version|Linux
Status|UNCONFIRMED
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|save-export
Assigned to|mru
Reported by|perjensen63
------- Additional comments from [EMAIL PROTECTED] Fri Oct 19 13:55:54 +0000
2007 -------
When exporting a Writer dokument with formfields to pdf, the formfield names are
not correct when pdf file is read by iText.
I assign fieldname like this:
sender.firma
sender.person
sender.addr1
...
When I open the AcroForm with iText and reads back the fieldnames they look like
this:
afsender#2Efirma: Text
afsender#2Ecity: Text
afsender#2Eaddr2: Text
awbno: Pushbutton
afsender#2Ezip: Text
afsender#2Eaddr1: Text
afsender#2Eperson: Text
See testprogram below:
If I create a pdf file with the same fieldnames in Acrobat 4, the fieldnames are
read correctly by the testprogram.
The Writer document was produced on Ubuntu Gutsy with delivered OOo.
Test program which produces this output:
---
package com.irsmail.pcic.test.pdf;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import junit.framework.TestCase;
import com.ibatis.common.resources.Resources;
import com.lowagie.text.pdf.AcroFields;
import com.lowagie.text.pdf.PdfReader;
/**
* @author pj
*
*/
public class TestAcroForm extends TestCase {
public void testOpenAcroForm() {
try {
InputStream iStream = Resources
.getResourceAsStream("com/irsmail/pcic/test/pdf/test-awb-med-felter.pdf");
PdfReader reader = new PdfReader(iStream);
AcroFields form = reader.getAcroFields();
HashMap fields = form.getFields();
String key;
for (Iterator i = fields.keySet().iterator();
i.hasNext();) {
key = (String) i.next();
System.out.print(key + ": ");
switch (form.getFieldType(key)) {
case AcroFields.FIELD_TYPE_CHECKBOX:
System.out.println("Checkbox");
break;
case AcroFields.FIELD_TYPE_COMBO:
System.out.println("Combobox");
break;
case AcroFields.FIELD_TYPE_LIST:
System.out.println("List");
break;
case AcroFields.FIELD_TYPE_NONE:
System.out.println("None");
break;
case AcroFields.FIELD_TYPE_PUSHBUTTON:
System.out.println("Pushbutton");
break;
case AcroFields.FIELD_TYPE_RADIOBUTTON:
System.out.println("Radiobutton");
break;
case AcroFields.FIELD_TYPE_SIGNATURE:
System.out.println("Signature");
break;
case AcroFields.FIELD_TYPE_TEXT:
System.out.println("Text");
break;
default:
System.out.println("?");
}
}
} catch (Exception e) {
e.printStackTrace(System.out);
}
}
}
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]