PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Sun Jul 13, 2025 8:10 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules

Also see our new Tailored Support & Services site.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Mar 06, 2007 9:50 pm 
Offline

Joined: Tue Mar 06, 2007 9:48 pm
Posts: 2
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?


Top
 Profile  
Reply with quote  
 Post subject: Workaround
PostPosted: Thu Mar 08, 2007 12:53 pm 
Offline

Joined: Tue Mar 06, 2007 9:48 pm
Posts: 2
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


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 29, 2010 1:43 pm 
Offline

Joined: Mon Mar 29, 2010 1:25 pm
Posts: 1
Hi,
I have been looking high and low for a solution to the same problem. Values that are assigned to fields are viewable (Either in Highlight fields mode or when editing the individual fields) when the document is saved and opened with adobe reader.
But wne printed fields are all blank.

I can see that you have found a workaround by
ibbly wrote:
'empty' the default text from the form fields, then use XTextFormatter to format up the new text


Could you be a bit more speciffic, code please :D

Thanks!


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 05, 2013 2:15 am 
Offline

Joined: Wed Jun 05, 2013 2:12 am
Posts: 1
you can see the value of the fields in acrobat

I suppose it's too much to ask for some documentation?

what are the properties etc of PdfCheckBoxField?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group