PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Aug 02, 2021 5:32 pm

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: Fri Mar 01, 2019 6:34 am 

Joined: Fri Mar 01, 2019 6:27 am
Posts: 1
I created a simple Table and have some 6 columns. Then i added one email address in the last column.
As the email address is longer the text overlap the cells and go outside.

Anyone help to solve this issue by wrapping the text or someway?

My Code:

         row = table.AddRow();
         row.Format.Alignment = ParagraphAlignment.Center;
         row.Cells[4].AddParagraph("Email: ");
         row.Cells[4].Format.Font.Bold = false;
         row.Cells[4].Format.Alignment = ParagraphAlignment.Left;
         row.Cells[4].VerticalAlignment = VerticalAlignment.Top;
         row.Cells[5].Format.Font.Bold = false;
         row.Cells[5].Format.Alignment = ParagraphAlignment.Left;
         row.Cells[5].VerticalAlignment = VerticalAlignment.Top;

Reply with quote  
PostPosted: Fri Mar 01, 2019 9:41 am 
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 655
Location: CCAA

Modify the e-mail address and insert soft hyphens or zero-width non-joiners at locations where you allow the address to split.
"@", "_" and "." are good candidates for pretty linebreaks, but you can simply insert a zero-width non-joiner after every character if you do not care where the linebreak occurs.

Best regards
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)

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: No registered users and 25 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