PDFsharp & MigraDoc Forum

PDFsharp - A .NET library for processing PDF & MigraDoc - Creating documents on the fly
It is currently Sun Sep 21, 2025 4:32 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  [ 3 posts ] 
Author Message
PostPosted: Thu Nov 21, 2013 4:24 pm 
Offline

Joined: Tue Oct 16, 2012 7:29 am
Posts: 6
Hi in my application it would be nice if I did not want to pass the Paragraph that I want to add some text to all over the place.

I just realized that no overload for AddFormattedText actually accepts a FormattedText object.

Is there a way around this, so I can have my own methods return FormattedText objects?

thanks
/adam


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 21, 2013 5:05 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3135
Location: Cologne, Germany
Hi!

You can use "var ft = new FormattedText()" at one location and "paragraph.Add(ft)" at another place.
Use "ft.Clone()" if you want to add the text more than once.

Add() has overloads for various objects.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 22, 2013 1:37 pm 
Offline

Joined: Tue Oct 16, 2012 7:29 am
Posts: 6
That's great. Exactly what I needed. Thanks!


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 205 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