xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Egan <patrick.e...@greshamticket.com>
Subject Re: printing an SVG with Batik
Date Thu, 25 Aug 2005 13:36:18 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Irene,<br>
What version of Java are you using. The problem may be related to this
bug, which affects 1.5 and 1.6.<br>
<a class="moz-txt-link-freetext" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6296538">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6296538</a><br>
Patrick<br>
<br>
Irene Heinz wrote:
<blockquote cite="mid2066878034@web.de" type="cite">
  <p>Hi everyone,</p>
  <p>
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tbody>
      <tr>
        <td class="b"><br>
        <br>
        <p><font size="2">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:</font></p>
        <p><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PrintTranscoder
prm = new
PrintTranscoder();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TranscoderInput ti = new TranscoderInput(graphic);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prm.transcode(ti, null);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PrinterJob printerJob = PrinterJob.getPrinterJob();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;! ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
PageFormat pageFormat = printerJob.defaultPage();</font></p>
        <p><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if(printerJob.pageDialog(pageFormat) != pageFormat){<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if(printerJob.printDialog()){<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
printerJob.setPrintable(prm);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
try{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;printerJob.print();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;n!
bsp;&nbsp;&nbsp;&nbsp; catch(Exception e){<br>
&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;System.out.println(e.getMessage());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
else{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.err.println("Print was cancelled");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}</font></p>
        <p><font size="2">What can I do to get the whole image printed?
Am I missing a setting?</font></p>
        </td>
      </tr>
    </tbody>
  </table>
  </p>
  <p>&nbsp;</p>
  <p>Regards, Irene</p>
</blockquote>

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


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message