You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Dvorák Zdenek <zd...@csas.cz> on 2001/12/13 10:39:42 UTC
RE: Send a document directly to a printer
Hi Echevarría,
this looks like the program fails on FileOutputStream out = new
FileOutputStream(printer);
from API:
<file:///C:/Data/zdv/lze%20smazat/jdk1.2.2/docs/api/java/io/FileNotFoundExce
ption.html> FileNotFoundException - if the file exists but is a directory
rather than a regular file, does not exist but cannot be created, or cannot
be opened for any other reason
Try first to save the output to a regular file on the disk in order to
eliminate the FOP fault.
regards Zdenek
-----Original Message-----
From: Gorka Echevarría [mailto:gechevarria@bilbomatica.es]
Sent: Sunday, November 18, 2001 10:19 AM
To: Lista-FOP
Subject: Send a document directly to a printer
Hi,
Can anybody say me how can I send a document directly to a printer?
I have tried the following code to render the document to a printer using
"Driver.RENDER_PCL", but it doesn´t work (i get the exception
"file.io.FileNotFoundException")
String printer ="////ntsrv_200//prn1";
FileOutputStream out = new FileOutputStream(printer);
Driver driver = new Driver(input.getInputSource(),out);
driver.setRenderer(Driver.RENDER_PCL);
driver.run();
out.close();
Thanks in advance
--------------------------------------------
Gorka Echevarría Vélez
BILBOMÁTICA, S.A.
gechevarria@bilbomatica.es <ma...@bilbomatica.es>
--------------------------------------------