PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

MigraDoc Layout
http://forum.pdfsharp.de/viewtopic.php?f=2&t=808
Page 1 of 1

Author:  sfvaleriano [ Mon Jul 27, 2009 2:25 pm ]
Post subject:  MigraDoc Layout

In Attached files, tree image this is legend:

Legend Picture 1:
A: MigraDoc.DefaultPageSetup.TopMargin
B: MigraDoc.DefaultPageSetup.LeftMargin
C: MigraDoc.DefaultPageSetup.BottomMargin
D: MigraDoc.DefaultPageSetup.RightMargin
E: MigraDoc.DefaultPageSetup.PageHeight
F: MigraDoc.DefaultPageSetup.PageWidth

G: MigraDoc.Section.PageSetup.TopMargin (=Header height?)
H: MigraDoc.Section.PageSetup.LeftMargin
J: MigraDoc.Section.PageSetup.BottomMargin (=Footer height?)
K: MigraDoc.Section.PageSetup.RightMargin
L: MigraDoc.Section.PageSetup.PageHeight
M: MigraDoc.Section.PageSetup.PageWidth





Leggend picture 2:
(HEADER)
H: Shape Height
W: Shape width

A: Top.Position (relative page?)
B: Top.Position (relative Margin?)
C: Left.Position (relative page?)
D: Left.Position (relative Margin?)

How do values Left.ShapePosition and Top.ShapePosition
influence its Left.Postion and Top.Potion?

(FOOTER)
H': Shape Height
W': Shape width

A': ?
B': ?
C': ?
D': ?

How to interpret the images 1 and 2 to get 3?

Valeriano

Attachments:
File comment: Picture 3: Goal
Picture 3.jpg
Picture 3.jpg [ 50.86 KiB | Viewed 10429 times ]
File comment: Picture 2
Picture 2.jpg
Picture 2.jpg [ 54.24 KiB | Viewed 10429 times ]
File comment: Picture 1
Picture 1.jpg
Picture 1.jpg [ 59.06 KiB | Viewed 10429 times ]

Author:  Thomas Hoevel [ Tue Jul 28, 2009 9:19 am ]
Post subject:  Re: MigraDoc Layout

sfvaleriano wrote:
How do values Left.ShapePosition and Top.ShapePosition
influence its Left.Postion and Top.Potion?


Here's a snippet from the Invoice sample:
Code:
image.RelativeVertical = RelativeVertical.Line;
image.RelativeHorizontal = RelativeHorizontal.Margin;
image.Top = ShapePosition.Top;
image.Left = ShapePosition.Right;
image.WrapFormat.Style = WrapStyle.Through;


Positions can be relative to page border or page margin.
Vertical position can be relative to current line or paragraph.
Horizontal position can be relative to character or column.
Much like anchored images in Word.

Sorry, but your diagrams contain too many variables. I won't solve all equations for you.

Author:  sfvaleriano [ Tue Jul 28, 2009 9:30 am ]
Post subject:  Re: MigraDoc Layout

OK,

but I have not found help anywhere
and I think that a discussion on how to handle margins and positions could be useful.

then, last question: How to handle margins and positions of shape in to footer (Picture 2)

thanks,
Valeriano

Author:  Thomas Hoevel [ Tue Jul 28, 2009 9:55 am ]
Post subject:  Re: MigraDoc Layout

If you specify absolute positions relative to page border or margin (e. g. A' or B'), the shape will be drawn at that position.

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