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 David VanderBrooke <VA...@war.wyeth.com> on 2001/06/18 19:24:45 UTC

Printing and the stroke:rgb command

I have been hoping to use SVG for printed reports.  I need clean text and line output to be meet the users expectations.  Batik seems perfect for my use but I ran into a problem.  I used the stroke:rgb(0,0,0) command (which I don't have to use).  It caused the text and lines in the printout to have dithered edges.  The appearance is that of wiggly lines and edges of text.  With Batik 1.0 the effect is smaller than with previous versions but it is still presentt.  When I remove the command, the printing is much better.

Am I doing something wrong?

This file prints with fuzzy edges
====================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
	"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
<svg width="576" height="378">
		<g id="background" >  <!--  style="visibility:inherit" -->
			<rect id="OuterRect" x="10" y="10" width="500" height="300" rx="0" ry="0"
			style="stroke:black;stroke-width:1;fill:white"/>
		<text x="174.4" y="54.6" style="font-family:Times New Roman;
			font-size:12;
			stroke-width:0;
			stroke-opacity:0;
			stroke:rgb(0,0,0);
			fill:black"
			>Date</text>
		<text x="174.4" y="100" style="font-family:Times New Roman;font-size:12;stroke-width:0;stroke-opacity:1;stroke:rgb(0,0,0);
			fill-opacity:1;fill:rgb(0,0,0);opacity:1">Date</text>
		<text x="174.4" y="200" style="font-family:Times New Roman;font-size:12">Date</text>
		</g>
</svg>
=====================================================================

This file prints cleanly.  The only difference is that the stroke:rgb(0,0,0) command is missing
======================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
	"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
<svg width="576" height="378">
		<g id="background" >  <!--  style="visibility:inherit" -->
			<rect id="OuterRect" x="10" y="10" width="500" height="300" rx="0" ry="0"
			style="stroke:black;stroke-width:1;fill:white"/>
		<text x="174.4" y="54.6" style="font-family:Times New Roman;
			font-size:12;
			stroke-width:0;
			stroke-opacity:0;
			fill:black"
			>Date</text>
		<text x="174.4" y="100" style="font-family:Times New Roman;font-size:12;stroke-width:0;stroke-opacity:1;stroke:rgb(0,0,0);
			fill-opacity:1;fill:rgb(0,0,0);opacity:1">Date</text>
		<text x="174.4" y="200" style="font-family:Times New Roman;font-size:12">Date</text>
		</g>
</svg>
=============================================================================


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


Re: Printing and the stroke:rgb command

Posted by Bill Haneman <bi...@sun.com>.
Vincent Hardy wrote:
> 
> David,
> 
> David VanderBrooke wrote:
> >
> > I have been hoping to use SVG for printed reports.  I need clean text and line output to be meet the users expectations.  Batik seems perfect for my use but I ran into a problem.  I used the stroke:rgb(0,0,0) command (which I don't have to use).  It caused the text and lines in the printout to have dithered edges.  The appearance is that of wiggly lines and edges of text.  With Batik 1.0 the effect is smaller than with previous versions but it is still presentt.  When I remove the command, the printing is much better.
> >
> > Am I doing something wrong?
> 
> You are not doing anything wrong. What happens is that the stroked
> text is rasterized before being sent to the printer and that the
> rasterization happens at a resolution that is not high enough.
> What type of printer are you printing to (PostScript?).
> 
> In some printers (being on the move, I could only try with a
> 'virtual' printer, the Acrobat 4.0 PDF writer), you have options that
> let you control image resolution and handling (e.g., compressed or
> not) which are what you need to tweak to get the quality you want.
> 
> Vincent.


I think there is another issue here... in the examples David sent it
looked as though the "stroke" command was specifying a zero-width
stroke.  This apparently was changing the rendering execution path.

Now, if you needed _actual_ outlines on the text that would be the end
of the story, but since this example had "invisible" text strokes it
may be reasonable to tweak the Batik bridge a little so that it
ignores zero-width strokes on text.  

-Bill
-- 
--------------
Bill Haneman
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland

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


Re: Printing and the stroke:rgb command

Posted by Vincent Hardy <vi...@sun.com>.
David,

David VanderBrooke wrote:
> 
> I have been hoping to use SVG for printed reports.  I need clean text and line output to be meet the users expectations.  Batik seems perfect for my use but I ran into a problem.  I used the stroke:rgb(0,0,0) command (which I don't have to use).  It caused the text and lines in the printout to have dithered edges.  The appearance is that of wiggly lines and edges of text.  With Batik 1.0 the effect is smaller than with previous versions but it is still presentt.  When I remove the command, the printing is much better.
> 
> Am I doing something wrong?

You are not doing anything wrong. What happens is that the stroked
text is rasterized before being sent to the printer and that the 
rasterization happens at a resolution that is not high enough.
What type of printer are you printing to (PostScript?).

In some printers (being on the move, I could only try with a 
'virtual' printer, the Acrobat 4.0 PDF writer), you have options that
let you control image resolution and handling (e.g., compressed or
not) which are what you need to tweak to get the quality you want.

Vincent.



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