PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 2:16 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Nov 04, 2013 4:08 pm 
Offline

Joined: Mon Nov 04, 2013 4:03 pm
Posts: 3
Hi,

I want to migrate my iTextSharp code to MigraDoc because of licensing problems.
It’s pretty easy to create simple text PDFs using MigraDoc, but creating a table (what I want to achieve) does not work for me like it should.
I tried to follow the tutorial at http://www.pdfsharp.net/wiki/Invoice-sample.ashx, but I don’t really understand how that works.

The result I want looks like this:
http://cl.ly/SIBJ

That’s what it looks like right now:
http://cl.ly/SHnf

It would be really nice to get some help on this!

Cheers


Last edited by zuum on Tue Nov 05, 2013 9:36 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 04, 2013 5:54 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Hi!

VB.Net is not my area of expertise.

Sometimes a picture says more than 1000 words, but I'm afraid your screen shots don't help me understand what you need.

So if you would say how you want to improve what you already have, it would be easier to give you help.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 04, 2013 8:47 pm 
Offline

Joined: Mon Nov 04, 2013 4:03 pm
Posts: 3
Thomas Hoevel wrote:
Hi!

VB.Net is not my area of expertise.

Sometimes a picture says more than 1000 words, but I'm afraid your screen shots don't help me understand what you need.

So if you would say how you want to improve what you already have, it would be easier to give you help.


Hey,

I want the header and the table to look like in the first picture.
How can I set the margin of the table and how can I expand it to 100% of the page’s width?

img 1 http://cl.ly/SIlK
img 2 http://cl.ly/SJ87


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 05, 2013 9:28 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
This is not HTML, you cannot set the table to 100%.

You set the width for each column. Make sure the sum is "100%".
In our application we use a helper routine that creates tables. We specify the width of each column and a flag showing which columns can be adjusted - the table will always have a with of 100% (which will be 16cm, 17cm, or 18cm depending on the page margins).
If you know page size and margins, you may not need such a helper.

You can set the left position of the table. Use table.Rows.LeftIndent.

You should create a style for the header row where you specify font, size, and bold. Create another style for body rows. Assign the correct style to each row.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 05, 2013 9:36 am 
Offline

Joined: Mon Nov 04, 2013 4:03 pm
Posts: 3
ok. thanks :)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 32 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