View previous topic :: View next topic |
Author |
Message |
ibbly
Joined: 06 Mar 2007 Posts: 2
|
Posted: Tue Mar 06, 2007 9:50 pm Post subject: Losing formatting/data when valuing a form field |
|
|
I am having the following problem:
All text is converted to 'plain text' when I try to value
my PDF form field. I want the formatting to remain.
Here is the code:
// Open the file
PdfDocument document = PdfReader.Open(Filename,
PdfDocumentOpenMode.Modify);
// Get the root object of all interactive form fields
PdfAcroForm form = document.AcroForm;
// Get all form fields of the whole document
PdfTextField.PdfAcroFieldCollection fields =
form.Fields;
// Value the fields.
PdfTextField t = (PdfTextField)fields
[Field_MMDDYYYY];
t.Text = ClinicDate;
I lose formatting and/or the text does not show up. Can you help? |
|
Back to top |
|
|
ibbly
Joined: 06 Mar 2007 Posts: 2
|
Posted: Thu Mar 08, 2007 12:53 pm Post subject: Workaround |
|
|
As a workaround, I found that I can 'empty' the default text from the form fields, then use XTextFormatter to format up the new text...not as easy as just valuing the fields, but it works great!
Let me know if a solution is found to the original problem.
Thanks |
|
Back to top |
|
|
|