PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 09, 2024 8:18 am

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: Mon Jun 06, 2011 2:18 pm 
Offline

Joined: Mon Jun 06, 2011 2:00 pm
Posts: 2
Hi guys,

Please tell me how to set the page with in migra doc. In my code the table is generating dynamically. I mean the X-axis is generating dynamically so i need to define the page width. please check the attachment to get a clear view.


Attachments:
report.JPG
report.JPG [ 250.78 KiB | Viewed 5164 times ]
report.JPG
report.JPG [ 250.78 KiB | Viewed 5164 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 06, 2011 3:46 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
MigraDoc's PageSetup allows you to set PageWidth and PageHeight.
So just calculate the Width you need.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 06, 2011 5:04 pm 
Offline

Joined: Mon Jun 06, 2011 2:00 pm
Posts: 2
Thomas Hoevel wrote:
MigraDoc's PageSetup allows you to set PageWidth and PageHeight.
So just calculate the Width you need.


can u please tell me the code to set the page width & page height for migra doc?

please give one example. i need it badly...


Thanks in advance


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 07, 2011 8:02 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Here's a snippet from the Hello World sample where I added two lines to set the page size:
Code:
// Create a new MigraDoc document
Document document = new Document();

// Add a section to the document
Section section = document.AddSection();

section.PageSetup.PageHeight = "297mm";
section.PageSetup.PageWidth = "42cm";


Hello World sample:
http://www.pdfsharp.net/wiki/MigraDocHe ... ample.ashx

_________________
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 41 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