xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kerschbaum Michael " <m.kerschb...@pke.at>
Subject AW: Special Printing Problem....
Date Wed, 15 Apr 2009 15:03:53 GMT
Hello,
 
Okay now i understand why the printer prints with high resolution when a
symbol or a line uses a fill-opacity. And with "normal" resolution when
the same svg is used without fill or stroke-opacity. Without that
knowledge it confused me a little.
 
I think you know much more internal things about rendering and Java2d
printing then i does... perhaps you can help me with my problem...
 
I have svg's that were generated from visio / microsoft svg export... i
have no possiblity to change them... not even in code (i tried to remove
the css style in code => fast but output changed => Symbol looks not
like the sould)... The resultion is not the most important point. The
most important point is that the svg must be printed within 60 Seconds
(F3003 Fire law in Austria) in A3 Color ! 
 
So i tried some other things. First was to use a BufferedImage write it
to PNG or GIF and print it. Was okay from the peformance but not very
nice. (would be okay but i thought there must be a better way) I mean
there is a possible trade of resolution against peformance to make it
okay for A3 Format.
 
So then i tried writing a pdf and printing it (With the
pdfTranscoder)... The Problem is, that i need some more information in
the Printed document (Visible Layers, Date, who created that document,
etc...) Don't know how to print that to the PDF File.
 
How would you solve this problem ? Is there an easy way to get the
opacity parts of the svg and replace them with the background, so that
the output would be the same without opacity parts ? Or should I try to
get the best trade of Resolution against this 60 Seconds ? or should i
use pdf and think how to get addional information in it ?! Or ...?

 

________________________________

Von: thomas.deweese@kodak.com [mailto:thomas.deweese@kodak.com] 
Gesendet: Mittwoch, 15. April 2009 15:45
An: batik-users@xmlgraphics.apache.org
Cc: batik-users@xmlgraphics.apache.org
Betreff: Re: Special Printing Problem....



Hi Kerschbaum,

"Kerschbaum Michael " <m.kerschbaum@pke.at> wrote on 04/15/2009 04:36:26
AM:

> When the svg contains a stylesheet with fill-opacity or stroke-opacity
> javas printing with the java.awt.print.Printable is very very slow.
The
> Printing process calls the interface method print about 50 Times befor
> the svg image has finished rendering. When i use the same svg without
> that opacity property in the stylesheets the print method is called
only
> 3 Times and printing is much more faster... (70 Seconds vs. 20 Seconds
> on an A3 Color printer)

   Since most printer languages don't support transparency natively, 
when you use that feature the Java engine needs to rasterize the
document 
and send it as a high resolution bitmap.  It does this in strips to
avoid 
excessive memory consumption (300*10*300*8.5*3 = ~23MB for US Letter). 

> I dont't know why ?! Is there a better way to print the svg ? I mean i
> tried this one as well but the output is not nice because of the size
of
> the image and the A3 Sheet...

   I don't think there is a better way unless you can afford to create 
a high resolution image. 


Mime
View raw message