MigraDoc Footer Position
Asked Answered
E

2

7

I am trying to place an image as the footer of each page, I can move the footer closer to the bottom of the page using:

doc.DefaultPageSetup.FooterDistance = "0cm"

But I cannot seem to find a way to allow a shorter distance from the sides of the page. Is there a way to do this or some kind of "trick" to achieve this.

The only way I can find is by removing the page setup margins, but I need them to hold the page together.

Does anyone know a way around this or some setting I am missing?

Eccles answered 22/10, 2013 at 8:16 Comment(0)
G
2

You can add a TextFrame to the footer (AddTextFrame()) and assign an absolute position to this textframe.

See also:
http://forum.pdfsharp.net/viewtopic.php?p=6928#p6928

Germane answered 22/10, 2013 at 8:48 Comment(2)
Can you share an example please?Eccles
Will be nice if anybody shares the ideas you are interchanging (by telepathy) for those that does not have this skill yet :D:D:DVine
F
0
Document document = new Document();    
Section section = document.AddSection();    
Section.PageSetup.BottomMargin =  "1cm"; // according to data size

Paragraph paragraph = section.Footers.Primary.AddParagraph();     
paragraph.AddText("XYZ ltd");    
paragraph.Format.Alignment = ParagraphAlignment.Center;
Frenum answered 28/8, 2017 at 21:0 Comment(1)
This does not answer the question which is about adding images and reducing the left margin. This code-only answer shows how to draw text with default left and right margins and is not useful in the context of this question.Germane

© 2022 - 2024 — McMap. All rights reserved.