PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 01, 2024 11:25 pm

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: Mon May 02, 2011 3:20 pm 
Offline

Joined: Wed Apr 13, 2011 6:39 pm
Posts: 21
Hi ho,

the LeftPadding-Property is the space between border and contents of a cell, right?
If I add two tables to a section and use different LeftPadding-Values for the tables the result is, that the tables are not flush to each other. The left margin from these two tables have not the same value, if you look at the printed PDF.

My problem with that is, that I use the LeftPadding-Property in most of the tables,
but if I want to put a image or a table into one cell the padding is annoying.
So I set the LeftPadding-Property to 0.
Therefore the left margin of my PDF-file isn't a flat line anymore.

Thankful for a hint
Reiner


Top
 Profile  
Reply with quote  
PostPosted: Tue May 03, 2011 7:26 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Moin!

MigraDoc does it like Word does it: a PDF document should look like the RTF document if you create both with MigraDoc.

And the text in the tables has the same alignment as the text outside the tables, the border of the tables are drawn to the left of the left margin.

If you use different paddings on one page, the text will be aligned, but the borders won't be.

So don't use table left padding. Setting ParagraphFormat.LeftIndent of the text in the table should have a similar effect.
Or add thin, empty columns to your text tables to get the same "padding" effect.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue May 03, 2011 8:29 am 
Offline

Joined: Wed Apr 13, 2011 6:39 pm
Posts: 21
Ja, moin ;-)

Thank you for the explanation and the quick support job you are doing.

Is this the time to put an entry onto the wishlist 'what about an innerPadding for the Cell-Objekt'?
In conjunction with nested tables I think you cannot use LeftPadding other than zero.
So I should look up for 'nested tables' in the wishlist first :-)


Your given workaround with ParagraphFormat.LeftIndent works fine for me.
I put in the Styles:
Styles("Normal").ParagraphFormat.LeftIndent = Unit.FromCentimeter(0.1)


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] and 31 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