PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 11:01 am

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: Footers in MigraDoc
PostPosted: Wed Sep 05, 2012 10:01 am 
Offline

Joined: Wed Sep 05, 2012 9:53 am
Posts: 2
Hi everyone,

since one week i am using migradoc and so far it seems very cool,
but since 2 days i am trying to solve a problem with my footer. The header works fine, and i do not understand why the footer does not.
I want to Display two paragraphs in the footer section of the document, but however the paragraphs do not appear one below the other, they appear on top of each other?
I do not understand why this happens because the same code for the header works fine.

Here is my code:

Code:
BaseDocument = new Document();
BaseSection = BaseDocument.AddSection();

Paragraph p = BaseSection.Footers.Primary.AddParagraph();
p.Format.Borders.Width = new Unit(1, UnitType.Point);
p.Format.Alignment = ParagraphAlignment.Center;
p.AddText("FOOTER");


Paragraph p1 = BaseSection.Footers.Primary.AddParagraph();
p1.Format.Borders.Width = new Unit(1, UnitType.Point);
p1.Format.Alignment = ParagraphAlignment.Center;
p1.AddText("                FOOTER2");


I hope anyone of you can help me.

Best Regards
Manu


Top
 Profile  
Reply with quote  
 Post subject: Re: Footers in MigraDoc
PostPosted: Wed Sep 05, 2012 12:35 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi!

This could be a bug in MigraDoc. Can you do with a single paragraph by adding a linebreak before adding the contents of the seconds paragraph?
This will not work if you need two paragraphs with two frames (visible borders) around them. But if you don't need frames or if a single frame around both is OK, I'd try that.

You can add TextFrames to the footer, too. This would allow to have two frames.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Footers in MigraDoc
PostPosted: Wed Sep 05, 2012 1:38 pm 
Offline

Joined: Wed Sep 05, 2012 9:53 am
Posts: 2
yes, with linebreak it will work, but i also want to show a footer Image under the paragraphs what will not work i guess.
Thanks for help, i will try it with a TextFrame.


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 399 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