poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Me Myself and I <stargate7thsym...@live.co.uk>
Subject Printing HSSFSheet code question from my example.
Date Sun, 17 Oct 2010 06:40:57 GMT

/*
If there is an HSSFSheet excel spreadsheet I want to
go to real world paper from my printer, may I
proceed roughly as follows to get my what one would expect?
*/

public class MyHSSFSheet  extends HSSFSheet  implements javax.print.Doc //<-----   HSSFSheet
final removed, reflection/recode.
{
//...
}

public class MyPrintService implements javax.print.PrintService
{
//...
}

MyPrintService printService = new MyPrintService();

DocPrintJob printJob = printService.createPrintJob();




public class MyListener implements PrintJobListener
{
//...
}
printJob.addPrintJobListener(new MyListener(//?..);

MyHWPFSheet spreadSheet = new .... ;

javax.print.event.PrintEvent printEvent = new javax.print.event.PrintEvent(spreadSheet); 
 //call this.

//Will this last code line here start printing, [Windows, Printer, Software Driver and Network
all  permitting?]
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message