Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Printing more than one diagram at once (Read 1849 times)
Jan Meyer
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 23
Joined: Feb 26th, 2012
Printing more than one diagram at once
Jun 21st, 2012 at 8:49am
Print Post  
I would like to print more than one diagram at once. Therefore, I implemented something like this:
DiagramView printerView = new DiagramView();
for(Diagram dia : myListOfDiagrams){
  printerView.setDiagram(dia);
  printerView.print(myDefaultPageFormat, null);
}

This would work well, but appearing the printer dialog is a problem. Is there a way to invoke something like DiagramView.print(...) silently?

Regards,
Jan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Printing more than one diagram at once
Reply #1 - Jun 21st, 2012 at 1:38pm
Print Post  
The dialog won't show if you specify the printer name when calling print:

Code
Select All
PrinterJob printJob = PrinterJob.getPrinterJob();
if (printJob.printDialog())
{
	DiagramView printerView = new DiagramView();
	for(Diagram dia : myListOfDiagrams)
	{
		printerView.setDiagram(dia);
		printerView.print(myDefaultPageFormat, printJob.getPrintService().getName());
	}
} 



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