Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to use the print preview with paper settings etc. (Read 1970 times)
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
How to use the print preview with paper settings etc.
Aug 26th, 2018 at 6:44pm
Print Post  
I would like to use the print preview. Unfortunately I can't find a way to edit the paper size and orientation in the preview.

Is there a possibility of an extended print preview in which the user can possibly make these specifications?

Thank you very much,

Dirk
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: How to use the print preview with paper settings etc.
Reply #1 - Aug 27th, 2018 at 12:05pm
Print Post  
Hi,

You can use the PrintPreviewEx method on DiagramView. It opens a form which also has scaling and orientation buttons. You can see it in the Demo sample provided with the Diagramming package.

To allow users to edit the size of the page, you can use the standard .NET PageSetupDialog (it offers orientation change too), and use the setting from there with the default or extended print preview dialog.

Code
Select All
PageSetupDialog pageSetup = new PageSetupDialog();
pageSetup.Document = new System.Drawing.Printing.PrintDocument();
pageSetup.Document.DocumentName =  "Diagram";
// Show the dialog to allow users to select page size / orientation.
pageSetup.ShowDialog(this);
// Show the extended print preview dialog with the diagram object.
_diagramView.PrintPreviewEx(pageSetup.Document); 



Regards,
Lyubo
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: How to use the print preview with paper settings etc.
Reply #2 - Sep 10th, 2018 at 3:56pm
Print Post  
Thanks a lot! It works.

Dirk
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint