PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Aug 22, 2017 7:06 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Jul 19, 2017 11:11 am 
Offline

Joined: Wed Jul 19, 2017 11:05 am
Posts: 1
Hello,

I'm new to PdfSharp and need a little bit help:

I have a HTML-Formated text coming from a database. This text must be placed in a predefined rectangle (no problem). The text length is variable and it contains one or many words written in bold.
The generated text must contain this bold written words too. How can I do this?

Thanks for help.

Stephan


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 19, 2017 1:43 pm 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2689
Location: Cologne, Germany
Hi!
SteBruBra wrote:
I have a HTML-Formated text coming from a database.
So parse that HTML and draw the text using regular and bold fonts at the appropriate positions.
Use XGraphics.MeasureString to determine the lengths of the words to as you'll have to deal with linebreaks.

MigraDoc might help making things much easier. Use the RenderObject method of DocumentRenderer if you want to try this. Create a Paragraph and add the text using the AddFormattedText method of Paragraph.
You still have parse the HTML.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 7 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:  
Powered by phpBB® Forum Software © phpBB Group