PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Apr 28, 2024 12:07 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: Tue Apr 13, 2010 9:05 am 
Offline

Joined: Tue Apr 13, 2010 8:40 am
Posts: 2
Hello,

I'd like to have a footer which contains the page index information (e.g. page x of y) and the company information.
Additionally I want the two lines of texts to have different styles. Therefore I figured I would need two separate paragraphs.

// Create footer
Paragraph paragraphOne = section.Footers.Primary.AddParagraph();
paragraphOne.AddText("Seite ");
paragraphOne.AddPageField();
paragraphOne.AddText("/");
paragraphOne.AddNumPagesField();
paragraph.Style = "Style1";
Paragraph paragraphTwo = section.Footers.Primary.AddParagraph();
paragraphTwo.AddText("MyCompany · MyStreet 00 · 0000 MySpace · MyCountry");
paragraphTwo.Style = "Style2";

section.Footers.FirstPage.Add(paragraphOne.Clone());
section.Footers.FirstPage.Add(paragraphTwo.Clone());

My two paragraphs always overlap. I tried to set a spacebefore parameter on the second paragraph but that didn't work out as expected.
As a workaround I also tried to add a LineBreak to the end of the first paragraph.. no good result either.

Any idea why my two paragraphs won't be shown one after the other? I'd be really grateful for some piece of advice :-)


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 13, 2010 9:56 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
venenum wrote:
Any idea why my two paragraphs won't be shown one after the other?

No idea.

But a solution:
viewtopic.php?p=3002#p3002

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