PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Losing formatting/data when valuing a form field

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
ibbly



Joined: 06 Mar 2007
Posts: 2

PostPosted: Tue Mar 06, 2007 9:50 pm    Post subject: Losing formatting/data when valuing a form field Reply with quote

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
View user's profile Send private message
ibbly



Joined: 06 Mar 2007
Posts: 2

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

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! Smile

Let me know if a solution is found to the original problem.

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com