PDF ot Postscript

Hello,I am trying to convert a PDF to a postscript file.I would like to use the java printing API and a PostScript printer driver.Is there a way to get the printer stream when I do printJob.print();Regards,Tommie.
[255 byte] By [Tommie.Denoblea] at [2007-10-3 9:42:56]
# 1

Found it...

Java implements printing through the Java printing Service.

It is documented at http://java.sun.com/j2se/1.4.2/docs/guide/jps/ (1.4 version).

JPS creates a JobPrinter object. This can delegate its printing to a user class using callback - you need to implement either Printable or Pageable. PdfDecoder uses both so passing an instance of PdfDecoder into a printObject, ensures our code is called by print() method of JobPrint object.

The JobPrint creates a Graphics2D object , passes it to PdfDecoder which draws on it. The JobPrint then converts the Graphics2D into printed output, dependent on the printer type.

JobPrint takes a number of optional attributes one of which allows you to write to file

aset.add(new Destination("file:c:\out.prn"));

Have a look at Destination section at http://java.sun.com/j2se/1.5.0/docs/guide/jps/spec/attributes.fm5.html for some good explanation.

You need to qeury the print services, tell the PrintJob to use a PCL printer and then tell it to output to file.

Tommie.Denoblea at 2007-7-15 4:59:11 > top of Java-index,Security,Cryptography...