Hola,
Posiblemente,
Código Java:
Ver originalimport java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import java.util.Locale;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.attribute.HashPrintServiceAttributeSet;
import javax.print.attribute.PrintServiceAttributeSet;
import javax.print.attribute.standard.PrinterName;
....
job.setPrintable(new MyDocPrinter());
PrintServiceAttributeSet attributes = new HashPrintServiceAttributeSet();
PrinterName printerName
= new PrinterName
("Adobe PDF",
Locale.
getDefault()); attributes.add(printerName);
PrintService printers[] = PrintServiceLookup.lookupPrintServices(null, attributes);
try {
if (printers.length == 1)
job.setPrintService(printers[0]);
job.print();
}
Saludos,