PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed May 01, 2024 10:58 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Apr 04, 2013 6:55 pm 
Offline

Joined: Thu Apr 04, 2013 6:47 pm
Posts: 1
How to set the left and right indent using pdfsharp. I tried using TrimMargins but all that does was added or take away from the page size. How do I set the pdf so that the left and right indent is set to 0? Thank you.

XSize size = PageSizeConverter.ToSize(PdfSharp.PageSize.Letter);
page.MediaBox = new PdfRectangle(new XPoint(0, 0), new XPoint(size.Width, size.Height));
page.TrimMargins.All = 0;


The right and left indent is still at 1 inch on the pdf using the approve code.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 08, 2013 9:06 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
PDFsharp draws text where you want to have it. There is no way to set indents.

I presume you use MigraDoc. With MigraDoc, every section has a PageSetup object where you specify margins.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

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