PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Apr 23, 2024 4:03 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
PostPosted: Wed Aug 03, 2016 3:53 pm 
Offline

Joined: Tue Jul 26, 2016 5:07 pm
Posts: 32
I was using below code to generate the paragraph in the attachment:

Code:
paragraph = document.LastSection.AddParagraph();
paragraph.AddFormattedText("First Name: ", TextFormat.Bold);
paragraph.AddText(appEx[0].Forename);
//paragraph.AddTab();
paragraph.AddFormattedText(" Last Name: ", TextFormat.Bold);
paragraph.AddText(appEx[0].Surname);
//paragraph.AddTab();
paragraph.AddFormattedText(" Date of Birth: ", TextFormat.Bold);
paragraph.AddText(appEx[0].DateOfBirth.ToString("MMM dd, yyyy"));


In order to create more space between the elements, I added the now commented out lines.
The result was as in the first attachment: that there were new lines inserted into the paragraph instead.
The second attachment shows the original paragraph that needs more space before Last Name and Date of Birth.

How can I increase space w/o breaking the line?

Thank you!


Attachments:
Capture.JPG
Capture.JPG [ 11.42 KiB | Viewed 4614 times ]
Capture.JPG
Capture.JPG [ 10.04 KiB | Viewed 4614 times ]
Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 03, 2016 4:21 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 916
Location: CCAA
Hi!

You don't show the code that defines the tab stops.

Sharing an MDDDL file might help.
http://pdfsharp.net/wiki/MigraDocDDL.ashx


You can add non-breaking spaces to increase the space. Or use a table.

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 03, 2016 5:26 pm 
Offline

Joined: Tue Jul 26, 2016 5:07 pm
Posts: 32
I already used a table and that should be fine.
Was not adding any specific tab stops previously, this paragraph was in plain Normal style.


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 222 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group