You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Irene Heinz <ir...@web.de> on 2005/08/25 13:00:36 UTC
printing an SVG with Batik
Hi everyone,
I realised that printing the whole SVG doesn't work properly, either - it also cuts off something at the left side. It seems that the border settings in the page setting dialog are ignored, if I set the borders to 0, much more of the image is printed. Settings the border with the keys doesn't seem to help. This is my code to print the whole SVG:
PrintTranscoder prm = new PrintTranscoder();
TranscoderInput ti = new TranscoderInput(graphic);
prm.transcode(ti, null);
PrinterJob printerJob = PrinterJob.getPrinterJob();
PageFormat pageFormat = printerJob.defaultPage();
if(printerJob.pageDialog(pageFormat) != pageFormat){
if(printerJob.printDialog()){
printerJob.setPrintable(prm);
try{
printerJob.print();
}
catch(Exception e){
System.out.println(e.getMessage());
}
}
}
else{
System.err.println("Print was cancelled");
}
What can I do to get the whole image printed? Am I missing a setting?
Regards, Irene
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179