You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Normen Ruhrus <N....@Alphasoft-GmbH.de> on 2003/05/20 16:12:55 UTC
PCL - Postscript Print
Hi there,
has anyone got an example on how to implement PCL and/or Postcript
printing
directly to a printer in a servlet using FOP? CouldnĀ“t find anything
like it.
Thanks in advance for any help
Normen
RE: PCL - Postscript Print
Posted by Torsten Erler <To...@net-linx.com>.
Hi there,
has anyone got an example on how to implement PCL and/or Postcript printing
directly to a printer in a servlet using FOP? CouldnĀ“t find anything like
it.
....Yepp
OutputStream out = null;
//IP-Stream Printing
if( iPPrinting)
{
Socket s = new Socket( printerName, printerPort );
out = s.getOutputStream();
}
//UNC Printing (e.g //printserver/printer)
else
{
out = new FileOutputStream( printerName );
}
PrintWriter writer = new PrintWriter( out );
writer.write( postScriptByteArray );
boolean retValue = writer.checkError() == false;
writer.close();
***
hope that helps
cu Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org