You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Mark Claassen <ma...@donnell.com> on 2001/02/09 22:33:25 UTC

Rasterizing

I created a simple SVG file that basically just printed some characters to
the screen in a standard font.  When I printed it to a printer, the font was
rasterized.

We have been trying to find a way (in Java) to view and print overlays (like
invoices and such) and SVG seems to be the perfect solution.  We could
create an SVG image of the form (lines, boxes, a logo, and text), modify it
dynamically to add the items being invoiced (text) and then the image could
be viewed or printed.  Perfect.

However, it seems that batik does something that rasterizes even simple
fonts.  Currently, Java2D uses printer fonts when it prints unaltered fonts
and fonts scaled evenly in the x and y direction.  (The restriction that
fonts are rasterized when the x and y scale are different should be lifted
in Merlin.)

I am just starting to investigate SVG (so I may have had an error in my test
case), but it looks like we could get exactly what we need using this
format; Crisp, clean lines and text along with small printer spool files.

My question for the group is this:  There seems have been a lot of work by
many groups to get the view part of SVG to work efficiently and look great,
but has much attention been paid to the printer side of it?  I realize that
SVG will do far more than printer control codes can handle, but a basic
image (lines, text, boxes, and maybe a (raster) logo in the corner) should
be able to be printed efficiently.   Any feedback would be appreciated.

Thank you for your time,
Mark



---------------------
Mark Claassen
Donnell Systems, Inc.
300 S. St. Louis Blvd. Ste. 203
South Bend, IN 46617
E-mail: mailto:mark.claassen@donnell.com
Voice: (219)232-3784
Fax: (219)232-4014


RE: Rasterizing

Posted by Mark Claassen <ma...@donnell.com>.
Thank you both for your replies.  It is great to hear that this issue is
being addressed.  I have not had a great deal of experience with the 2D API
so I am not sure how much help I can be, but if there is something I can do
to help the cause along, please let me know.

Thanks again,
Mark

> -----Original Message-----
> From: Bill.Haneman@ireland.sun.com [mailto:Bill.Haneman@ireland.sun.com]
> Sent: Sunday, February 11, 2001 10:24 AM
> To: batik-dev@xml.apache.org
> Subject: Re: Rasterizing
>
>
> > Mark Claassen wrote:
> > >
> > > I created a simple SVG file that basically just printed some
> characters to
> > > the screen in a standard font.  When I printed it to a
> printer, the font was
> > > rasterized.
>
>  <snip>
>
> > > I am just starting to investigate SVG (so I may have had an
> error in my test
> > > case), but it looks like we could get exactly what we need using this
> > > format; Crisp, clean lines and text along with small printer
> spool files.
> > >
> > > My question for the group is this:  There seems have been a
> lot of work by
> > > many groups to get the view part of SVG to work efficiently
> and look great,
> > > but has much attention been paid to the printer side of it?
> I realize that
> > > SVG will do far more than printer control codes can handle,
> but a basic
> > > image (lines, text, boxes, and maybe a (raster) logo in the
> corner) should
> > > be able to be printed efficiently.   Any feedback would be
> appreciated.
> > >
> > > Thank you for your time,
> > > Mark
> > >
>
> Hi Mark:
>
> The short answer to your second question is, no, not much time has been
> spent on printing (yet) - though as you see from  Vincent's email it
> is an area we are targeting.  I wrote the initial printing support code
> you
> have tried - as an example only.  As you discovered, it uses the Java2
> print
> api only *after* the BufferedImage object has been created.  The good
> news
> is that it should not be too difficult to get better results - Vincent
> is working on a standalone printing module (I think), and in order to
> get better printing results from the viewer, all that should be required
> is that the rendering into the Printable object's Graphics2D context
> occur higher up in the rendering chain (before the final rasterization).
>
> In the most straightforward cases the output will still be rasterized
> if filters and certain other modifiers are applied to the text, but
> vector graphics and non-rasterized text should be obtainable in the
> absence
> of image and filter operations.
>
> -Bill
>
> ---------
> Bill Haneman
> Sun Microsystems Ireland
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org
>


Re: Rasterizing

Posted by Bill Haneman <bi...@ireland.sun.com>.
> Mark Claassen wrote:
> >
> > I created a simple SVG file that basically just printed some characters to
> > the screen in a standard font.  When I printed it to a printer, the font was
> > rasterized.

 <snip>

> > I am just starting to investigate SVG (so I may have had an error in my test
> > case), but it looks like we could get exactly what we need using this
> > format; Crisp, clean lines and text along with small printer spool files.
> >
> > My question for the group is this:  There seems have been a lot of work by
> > many groups to get the view part of SVG to work efficiently and look great,
> > but has much attention been paid to the printer side of it?  I realize that
> > SVG will do far more than printer control codes can handle, but a basic
> > image (lines, text, boxes, and maybe a (raster) logo in the corner) should
> > be able to be printed efficiently.   Any feedback would be appreciated.
> >
> > Thank you for your time,
> > Mark
> >

Hi Mark:

The short answer to your second question is, no, not much time has been
spent on printing (yet) - though as you see from  Vincent's email it
is an area we are targeting.  I wrote the initial printing support code
you
have tried - as an example only.  As you discovered, it uses the Java2
print
api only *after* the BufferedImage object has been created.  The good
news
is that it should not be too difficult to get better results - Vincent
is working on a standalone printing module (I think), and in order to
get better printing results from the viewer, all that should be required
is that the rendering into the Printable object's Graphics2D context
occur higher up in the rendering chain (before the final rasterization).

In the most straightforward cases the output will still be rasterized
if filters and certain other modifiers are applied to the text, but
vector graphics and non-rasterized text should be obtainable in the
absence
of image and filter operations.  

-Bill

---------
Bill Haneman
Sun Microsystems Ireland

Re: Rasterizing

Posted by Vincent Hardy <vh...@eng.sun.com>.
Mark,

The SVG viewer prints the rasterized image that the viewer uses 
internally. I am working on an example of how to print an SVG document
but I am not quite yet. I will send it early next week.

V.

Mark Claassen wrote:
> 
> I created a simple SVG file that basically just printed some characters to
> the screen in a standard font.  When I printed it to a printer, the font was
> rasterized.
> 
> We have been trying to find a way (in Java) to view and print overlays (like
> invoices and such) and SVG seems to be the perfect solution.  We could
> create an SVG image of the form (lines, boxes, a logo, and text), modify it
> dynamically to add the items being invoiced (text) and then the image could
> be viewed or printed.  Perfect.
> 
> However, it seems that batik does something that rasterizes even simple
> fonts.  Currently, Java2D uses printer fonts when it prints unaltered fonts
> and fonts scaled evenly in the x and y direction.  (The restriction that
> fonts are rasterized when the x and y scale are different should be lifted
> in Merlin.)
> 
> I am just starting to investigate SVG (so I may have had an error in my test
> case), but it looks like we could get exactly what we need using this
> format; Crisp, clean lines and text along with small printer spool files.
> 
> My question for the group is this:  There seems have been a lot of work by
> many groups to get the view part of SVG to work efficiently and look great,
> but has much attention been paid to the printer side of it?  I realize that
> SVG will do far more than printer control codes can handle, but a basic
> image (lines, text, boxes, and maybe a (raster) logo in the corner) should
> be able to be printed efficiently.   Any feedback would be appreciated.
> 
> Thank you for your time,
> Mark
> 
> ---------------------
> Mark Claassen
> Donnell Systems, Inc.
> 300 S. St. Louis Blvd. Ste. 203
> South Bend, IN 46617
> E-mail: mailto:mark.claassen@donnell.com
> Voice: (219)232-3784
> Fax: (219)232-4014
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org