PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 02, 2024 9:21 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
PostPosted: Fri Jul 31, 2009 1:21 pm 
Offline

Joined: Fri Jul 10, 2009 6:26 am
Posts: 6
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 03, 2009 8:27 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 28, 2011 12:01 pm 
Offline

Joined: Fri Feb 25, 2011 2:24 pm
Posts: 4
Solution for nesting tables:
viewtopic.php?f=2&t=361&p=4394#p4394


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: Bing [Bot], Google [Bot] and 42 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