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

MigraDocs two tables one next to another
http://forum.pdfsharp.de/viewtopic.php?f=2&t=820
Page 1 of 1

Author:  Rekreativc [ Fri Jul 31, 2009 1:21 pm ]
Post subject:  MigraDocs two tables one next to another

Hello!

How do I put two tables one next to another instead of one below another? I know tables would fit one next to another, however if I just add them one after another to the current section, they will be rendered one below the other.

Also, how do I change font size for only one section? Currently I adjust the font with this code:

Code:
document.LastSection.LastParagraph.Format.Font.Size = 8;


however it doesn't work. Obviously I'm doing something wrong.

Thank you for your help.

Author:  Thomas Hoevel [ Mon Aug 03, 2009 8:27 am ]
Post subject:  Re: MigraDocs two tables one next to another

Hi!
Rekreativc wrote:
Also, how do I change font size for only one section? Currently I adjust the font with this code:
Code:
document.LastSection.LastParagraph.Format.Font.Size = 8;


You only change the font size for the last paragraph.

One method: change the font size of every paragraph in the section. You can do this when adding the text (I'd recommend this). You could enumerate the paragraphs in the section and change it later.
AddParagraph() returns the new paragraph and allows you to set the font size.

Another method (and I think the better way): create a new style for every section, use that style with every paragraph in the section, and set the font size of this paragraph as you need it.
You can create a style "SmallPrint" and use it in all sections that need it. You can create style "Section001", "Section002", ... if sections may look different.

Two tables side by side: create a table with two cells and place the tables in these cells.

IIRC the trick is adding a textframe to the cell and then adding a table to the textframe.
Table cells won't break over pages - so this will only work if both tables are small enough to fit on one page.

Author:  DaKo [ Mon Feb 28, 2011 12:01 pm ]
Post subject:  Re: MigraDocs two tables one next to another

Solution for nesting tables:
viewtopic.php?f=2&t=361&p=4394#p4394

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