PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 6:17 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Migradoc Measure String
PostPosted: Thu May 27, 2010 10:33 am 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
Hi,

I am using Mogradoc for writing text onto the page but need to know if a line of text has dropped onto two lines.

I notice that PDFsharp has a MeasureString option, but cannot seem to find an equivalent for use in Migradoc.

Using PDFSharp at this point is not really an option.

Please can you help?

Regards


Top
 Profile  
Reply with quote  
PostPosted: Thu May 27, 2010 12:42 pm 
Offline

Joined: Thu Apr 22, 2010 10:25 am
Posts: 14
If it makes it easier, it is possible to get the height of a border, or paragraph?

Code:
                           paragraph = bulletTextFrame.AddParagraph
                            ft = paragraph.AddFormattedText("My Text Here")
                            setParaFont(paragraph, pdfContent.styleID, pdfStyleList)

                            paragraph.Format.Borders.Color = Colors.Gold


The border gets drawn, so I assume there must be a way to return the height of the border?

I just need to know if the "My Text Here" has gone onto two lines, so either the height of that paragraph, or the position of the next paragraph.

Any ideas?

Regards


Top
 Profile  
Reply with quote  
PostPosted: Thu May 27, 2010 1:14 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
foxwoodDesign wrote:
I just need to know if the "My Text Here" has gone onto two lines, so either the height of that paragraph, or the position of the next paragraph.
Any ideas?

That information is currently internal. But since it's Open Source ...

viewtopic.php?p=2478#p2478
viewtopic.php?p=1960#p1960

_________________
Regards
Thomas Hoevel
PDFsharp Team


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: Google [Bot] and 71 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