Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramView (Read 3646 times)
himaheshh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 10th, 2009
DiagramView
Jul 10th, 2009 at 12:14am
Print Post  
Hi,

I am using the the Winforms diagram view and with the limited space in the screen we are facing some usability issues especially when the diagram is of multiple levels.

Currently it is in the Portait form. I would request your help on the following,
1. How to change them to the landscape form
2. While printing them in the A3 paper, how to fit them in one page with the max possible size?

Thank you.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: DiagramView
Reply #1 - Jul 10th, 2009 at 7:01am
Print Post  
Hi,

Try the following code for printing:

Code
Select All
PrintDocument doc = new PrintDocument();

doc.DefaultPageSettings.Landscape = true;
diagramView1.PrintOptions.ScaleToPage(doc);

diagramView1.Print(doc); 


I hope this helps,
Meppy
  
Back to top
 
IP Logged
 
himaheshh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 10th, 2009
Re: DiagramView
Reply #2 - Jul 16th, 2009 at 8:40am
Print Post  
Hi Meppy,

Thanks for your time. I tried this code and it didnt do anything. Am i missing something?

Regards
Mahesh
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: DiagramView
Reply #3 - Jul 17th, 2009 at 5:50am
Print Post  
Hi,

The above code prints the diagram using the default printer and the specified settings. You need to have an installed printer in order for the code to work. Additionally, you need to have at least one item in the diagram. Are those conditions satisfied?

Regards,
Meppy
  
Back to top
 
IP Logged
 
himaheshh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 10th, 2009
Re: DiagramView
Reply #4 - Jul 22nd, 2009 at 2:27am
Print Post  
Hello Meppy,

Yes all those conditions are satisfied and here is the code that I have. I am bit doubtul about the PrintDocument Class, can you please have a look and advise?

System.Drawing.Printing.PrintDocument doc = new System.Drawing.Printing.PrintDocument();            
           doc.DefaultPageSettings.Landscape = true;
           diagramView1.PrintOptions.ScaleToPage(doc);
           diagramView1.Print(doc);
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView
Reply #5 - Jul 22nd, 2009 at 6:52am
Print Post  
Does "it didnt do anything" mean it didn't print at all, or it printed in portrait mode?
  
Back to top
 
IP Logged
 
himaheshh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 10th, 2009
Re: DiagramView
Reply #6 - Jul 22nd, 2009 at 10:12am
Print Post  
It didnt print at all.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView
Reply #7 - Jul 22nd, 2009 at 11:49am
Print Post  
Set a breakpoint on the Print line and run until the breakpoint hits - does doc.PrinterSettings.PrinterName show the name of the default printer?
  
Back to top
 
IP Logged
 
himaheshh
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jul 10th, 2009
Re: DiagramView
Reply #8 - Jul 23rd, 2009 at 1:50am
Print Post  
Yes it is.

Here is the value in the PrintSetting.

{[PrinterSettings \\NNORSOGFPS001\NNSOW3B7PRBLK Copies=1 Collate=False Duplex=Vertical FromPage=0 LandscapeAngle=90 MaximumCopies=999 OutputPort= ToPage=0]}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramView
Reply #9 - Jul 23rd, 2009 at 7:06am
Print Post  
It's a network printer? You might have to log into the server first for the printer to be accessible. You might also check if there isn't a pending print job shown in the printer settings window. Sometimes a jobs just freezes when a user tries to cancel it, and then you must delete it from the jobs queue.

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