Hello Franck, on WinNT you can directly send PostScript to a printer with something like this:
byte[] psByteArray = ... produced from FOP, a PostScript byte Array.... File printerFile = new File("\\\\<ntservername>\\<printername>"); FileOutputStream os = new FileOutputStream(file); os.write(psByteArray); os.close(); Actually we are currently exactly doing this. Your printer has to be PostScript capable. On Unix maybe one has just to open the printer queue, don't know. PDF Printing directly to a printer works only if the printer knows how to interpret pdf (sure an expensive printer, don't know which supports this currently) or you will have to convert PDF to PostScript with some tool. Hope this helps, greetings, Patrick Dipl. Inform. Patrick Chaumette T-Systems ITS GmbH Service Prozesse Retail Hausanschrift: Fasanenweg 9, 70771 Leinfelden-Echterdingen Postanschrift: Postfach 100258, 70746 Leinfelden-Echterdingen Telefon: (0711)972-2437 Telefax: (0711)972-1949 E-Mail: [EMAIL PROTECTED] Internet: http://www.t-systems.de > -----Ursprüngliche Nachricht----- > Von: MARTIN Franck [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 16. Mai 2002 09:50 > An: [EMAIL PROTECTED] > Betreff: Open and print pdf files > > > Hi all, > > Fop is cool but once i have successfully created my pdf file > it would be > nice to open and print it. Does anyone know of a platform independent > way to open a pdf file. So far the only way i have found is platform > dependent ( for NT : Runtime.getRuntime().exec("cmd /c start > "+txtPdf.getText()); ). I was thinking that if java provided a way to > display an active http link it would be easy to open a pdf > file via the > default web browser. What do you think? > > Does anyone know how to send either ps or pdf directly to the printer > (or via a print dialog)? > > Thank you for your help > > Franck > > >