PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Footers in MigraDoc
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2129
Page 1 of 1

Author:  mbleimuth [ Wed Sep 05, 2012 10:01 am ]
Post subject:  Footers in MigraDoc

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

Author:  Thomas Hoevel [ Wed Sep 05, 2012 12:35 pm ]
Post subject:  Re: Footers in MigraDoc

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.

Author:  mbleimuth [ Wed Sep 05, 2012 1:38 pm ]
Post subject:  Re: Footers in MigraDoc

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/