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:34 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Jan 11, 2015 1:49 pm 
Offline

Joined: Sun Jan 11, 2015 1:47 pm
Posts: 2
Hello fellow programmers :)

I am trying to create a pdf using MigraDoc. So far so good.
But since i need to print a lot of data, space is precious...

I See that the left margin and the right margin by default (i copied the invoice sample code, and working from there) is 4cm. How can i programmatically reduce it accordingly?

Thanks a lot for your help


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 11, 2015 8:02 pm 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 343
Hi!
fsiskakis wrote:
How can i programmatically reduce it accordingly?
Set document.LastSection.PageSetup.LeftIndent and .RightIndent as you need it.

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 11, 2015 8:39 pm 
Offline

Joined: Sun Jan 11, 2015 1:47 pm
Posts: 2
Hello.

The LastSection is always null.
When shall i set these values? Can you give me a small example?

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 12, 2015 9:40 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
fsiskakis wrote:
The LastSection is always null.
Create a section before setting the margins.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 53 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