Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Page Print Options (Read 2248 times)
benm
YaBB Newbies
*
Offline


I <3 MindFusion

Posts: 32
Location: CA
Joined: Dec 10th, 2008
Page Print Options
Jan 7th, 2009 at 2:51am
Print Post  
Hello,

Is there a way to set page options, such as orientation and scale for the DocumentPaginator?

Thanks,
Ben
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Page Print Options
Reply #1 - Jan 7th, 2009 at 10:34am
Print Post  
Hi,

You can print in landscape like this:

Code
Select All
PrintTicket pt = new PrintTicket();
pt.PageOrientation = PageOrientation.Landscape;

PrintDocumentImageableArea ia = null;
XpsDocumentWriter w = PrintQueue.CreateXpsDocumentWriter(ref ia);
if (w != null)
{
	DiagramPaginator dp = (DiagramPaginator)diagram.DocumentPaginator;
	dp.PageSize = new Size(ia.MediaSizeHeight, ia.MediaSizeWidth);
	w.Write(dp, pt);
}
 



It seems the DiagramPaginator applies the Diagram.ZoomFactor as a scale transform, so you might change its value temporarily before printing.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint