views:

14

answers:

0

Hi,

I've written a programm in java for printing images, barcodes and text .. now i've been asked wether i can spool the data to an file too .. is it possible to do this? (for example convert the simpledoc to jpg or so)

DocPrintJob job = pebble.createPrintJob(); 
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new PrinterResolution(300, 300, ResolutionSyntax.DPI));
aset.add(new MediaPrintableArea(0, 0, 54, 85,MediaPrintableArea.MM));

aset.add(MyMediaSizeName.myMediaSize);

Doc myDoc = new SimpleDoc(new CardPrintable(c), myFlavor, attrs);

try {
   job.print(myDoc, aset);
} catch (PrintException e) {
   logger.error("PebblePrinter - evolisPrint - " + e.toString());
}