Creating a virtual printer in Java

I would like to create a virtual printer using Java so that when printing a file (using Word or something else) the Java printer is listed as a valid printer. My goal is to get an object formatted for the printer, which programs (Word, etc.) are sent directly to the printer. I do not know if this is possible. This seemed like a more logical solution to this question:

Printing multiple file types using java

Any ideas? I heard that this is only possible using C or C ++, but I do not know for sure.

+3
source share
3 answers

Java implements the LPD implementation. You can then manually create a printer in Windows that uses the LPR protocol to print to the specified LPD. This captures the result as a stream of bytes, which can then be manipulated further.

+5
source
+3
source

Redmon

You can use RedMon to print output to a Java program. Together with the standard postscript driver, this will give you Postscript that can be read and processed after your Java program.

The RedMon port monitor redirects a special printer port to the program. RedMon is commonly used with Ghostscript and a non-PostScript printer to emulate a PostScript printer.

RedMon can be used with any program that accepts data by standard input.

0
source

All Articles