xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Irene Heinz <irene.he...@web.de>
Subject FW: Re: Re: printing an SVG with Batik
Date Mon, 29 Aug 2005 13:58:39 GMT


I am really at loss in the moment with this printing function... Has really nobody any tip
for me? I am already thinking about saving the svg as a jpg, and then printing it, but as
I am working in an applet, I'd have to do it on the fly.

If anybody has a suggestion, please tell me!

Irene

 


Irene Heinz <irene.heinz@web.de> schrieb am 26.08.05 09:21:48:




Hi Patrick,

thanks for your answer. I am using Java 1.5.01, and I could reproduce this error, but for
two reasons I don't think it is related: 


1. When I use the default printing values, the pageFormat before and after the printing dialog
match. So at least when I use the default values, I should get a decent printout.
2. The margin on the right side on the printout is exactly the sum of the right margin and
left margin set in the page dialog.

Especially the second point makes me think that the values are read in correctly. I tried
it on two different printers (laser and ink jet) and got the same results. Has anybody any
ideas what I could do? Can anybody reproduce the problem?

Regards, Irene

 


Patrick Egan <patrick.egan@greshamticket.com> schrieb am 25.08.05 15:45:08:



Hi Irene,
What version of Java are you using. The problem may be related to this bug, which affects
1.5 and 1.6.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6296538
Patrick

Irene Heinz wrote: 
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();
 &n! bsp; 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{
 pri! nterJob.print();
 }
 &n! bsp; 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

Important - This e-mail and the information that it contains may be
confidential, legally privileged and protected by law. Access by the
intended recipient only is authorised. Any liability (in negligence or
otherwise) arising from any third party acting, or refraining from acting,
on any information contained in this e-mail is hereby excluded. If you are
not the intended recipient, please notify the sender immediately and do not
disclose the contents to any other person, use it for any purpose, or store
or copy the information in any medium. Copyright in this e-mail and
attachments created by us belongs to the author and
also asserts the right to be identified as such and object to any misuse.





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 
 
 





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 
 
 


Mime
View raw message