Hi Jeremias,

This is perfect. Setting dpi now works as I would expect it to.

Many, many thanks,

Martin Polley


On Jan 8, 2008 11:06 PM, Jeremias Maerki <[EMAIL PROTECTED]> wrote:
> I see. When I tried something I stumbled over the same thing I noticed
> once before: Increasing the resolution for any ImageTranscoder
> descendent does not have any effect on the number of pixels of the image
> generated, although the resolution is correctly saved in the generated
> PNG file. The attached patch made against Batik Trunk, however, should
> fix this problem. But it's not well tested and could have unwanted
> side-effects.
>
> On the rasterizer, you can use the "-dpi" parameter to set a different
> resolution. If you use the Transcoder API, that would be the
> SVGAbstractTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER key.
>
> Increasing the resolution will increase the number of pixels but not the
> image's natural size. But browsers generally ignore the resolution
> setting so this should actually help you. Well, at least I hope so.
>
>
> On 07.01.2008 17:11:36 Martin Polley wrote:
> > Hi Jeremias,
> >
> > I guess my original post was a little lacking in clarity :)
> >
> > I produce two kinds of documentation deliverable from the same source files
> > (and using the same SVGs) -- PDF and XHTML. In the PDFs, the SVGs are indeed
> > passed through, so they are embedded as vector images, with zoomability,
> > etc.
> >
> > But for XHTML, I need the SVGs to be rasterized as PNGs. (Most readers in my
> > company only have IE without an SVG plugin.) This is where my problem lies,
> > as currently, the text in the PNGs is too small. If I make the SVG image
> > bigger, it will not fit onto the page in the PDF version.
> >
> > Any ideas?
> >
> > Thanks,
> >
> > --
> > Martin Polley
> > Technical Communicator
> > +972 52 3864280
> > <http://capcloud.com/>
> >
> >
> > On Jan 7, 2008 5:43 PM, Jeremias Maerki <[EMAIL PROTECTED]> wrote:
> >
> > > How are the PDFs generated? If they are generated by Apache FOP you
> > > should try if you cannot just pass through the SVG in which case they
> > > are embedded as vector images. That way you can zoom in all the way you
> > > want without making the images any bigger. Just a thought.
> > >
> > > On 06.01.2008 11:09:14 Martin Polley wrote:
> > > > Hi there,
> > > >
> > > > I have a set of images that I am rasterizing using Batik. (The SVG
> > > > images are referenced by DITA XML documents that are processed using
> > > > the DITA Open Toolkit with a plugin that calls Batik to rasterize the
> > > > SVGs (using the Rasterizer Ant task).)
> > > >
> > > > My problem is that several images are large flowcharts. When I
> > > > rasterize them at their current size, the text is too small to read. I
> > > > could simply increase the size of the SVG images, but the same XML
> > > > sources (and SVG files) are also used to create a PDF version of the
> > > > document. If I make the images any bigger, they will not fit on the
> > > > PDF page. (In PDF, it does not matter that they are small--readers can
> > > > just zoom in.)
> > > >
> > > > Is there anything I can do (in terms of Batik parameters) to increase
> > > > the size of my images?
> > > >
> > > > I don't mind increasing the size of all my images by the same amount
> > > > (though this is not ideal). The only thing I have tried that changes
> > > > the size of the rasterized images is to explicitly specify width, but
> > > > then all my images (even the smallest ones) come out at the same
> > > > width. I have tried changing the DPI parameter, but this has no effect
> > > > on the size of the rasterized images.
> > > >
> > > > The only other approach I can think of would be to apply an XSLT
> > > > transform to the SVGs before they get rasterized, but I think this is
> > > > a little beyond my meager XSLT skills.
> > > >
> > > > Thanks in advance,
> > > >
> > > > --
> > > > Martin Polley
> > > > Technical Communicator
> > > > +972 52 3864280
> > > > <http://capcloud.com/>
> > > >
>
>
>
> Jeremias Maerki
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to