Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ToPage not working on print (Read 3092 times)
Nic
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Feb 18th, 2015
ToPage not working on print
Oct 20th, 2015 at 5:58pm
Print Post  
doc.PrinterSettings = printDialog1.PrinterSettings;
diagramView1.PrintOptions.ToDiagramPage = doc.PrinterSettings.ToPage;

I use these two instructions to assign the To and From pages as selected by the user from the PrintDialog, and when I breakpoint it I do see both of these numbers being correctly assigned, but the print output takes the From page and prints everything from there to the end. It doesn't seem to matter if the From page and To page are different or the same number, it always prints all pages starting at From page.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ToPage not working on print
Reply #1 - Oct 21st, 2015 at 1:49pm
Print Post  
ToDiagramPage and FromDiagramPage properties specify index of DiagramPage objects in DiagramDocument.Pages collection and are considered only by TabbedDiagramView. A DiagramPage could itself cover more than one printed pages.

The DiagramView class from this build should now print to page specified via PrintDocument.PrintSettings.ToPage:

https://mindfusion.eu/_beta/print_topage.zip

Code
Select All
doc.PrinterSettings.FromPage = 2;
doc.PrinterSettings.ToPage = 3;
doc.PrinterSettings.PrintRange = PrintRange.SomePages;
view.Print(doc); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Nic
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Feb 18th, 2015
Re: ToPage not working on print
Reply #2 - Oct 22nd, 2015 at 1:48am
Print Post  
Yup worked just fine.

Also a reminder to anyone else that has solutions like these, remember to unblock the zip file in the Windows properties or Visual Studio will fail to compile with any of the libraries.

Either that or use the Stream utility from Microsoft to do it: https://technet.microsoft.com/en-us/sysinternals/bb897440.aspx?f=255&MSPPError=-
2147217396
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint