Well, PDF as such doesn't have a "resolution" as we're primarily talking
about a vector graphics format. But of course, as soon as we're talking
about a bitmap (or effects resulting in bitmap generated by Batik) a
resolution becomes important. In FOP we distiguish two resolutions:
- source resolution: Mapping of 1px to a length when interpreting pixel
sizes on the input side (ex. border="solid 1px" in XSL-FO).
- target resolution: The same, but on the output side (meaning the
resolution of the bitmaps that are produced)

Batik doesn't have that distinction AFAIK. Thomas and I once talked
about this. The result was a special setting in the PDFTranscoder:
org.apache.fop.svg.PDFTranscoder.KEY_DEVICE_RESOLUTION
(accepts the resolution in dpi, datatype Float)

With this hint, Batik is tricked into rendering the bitmaps in a higher
resolution. In PDF there's a compensating transformation matrix that
makes sure the size of the output is correct. When working with SVG in a
FO context, FOP's target resolution is automatically used. For Batik,
there's currently no connection between the -dpi flag on the rasterizer.
This whole resolution thing is still a bit unclear to me inside the
Batik context.

BTW, some time ago, I submitted a patch for fixing the output resolution
in the BitmapTranscoder:
http://issues.apache.org/bugzilla/show_bug.cgi?id=44276
Thomas recently fixed something in the same are but my patch is still
open. I'm not sure if the effect is the same or what the status is.
Thomas?

On 09.06.2008 19:01:41 Lars Eirik Rønning wrote:
> Hi.
> I realize this may be an apache fop topic, but because i do use batik as my
> pdf generator i hope you will help me..
> 
> When i try to add a resized image into my svg the problem seems to be that
> the quality is not good enough when rendering the pdf
> 
> When i create my pdf using the batik-rasterizer i have understood that the
> image will be created with dpi 72.
> Does this mean that i need to embed my high res image and then use the scale
> operator to have it output at a greater resolution?
> 
> The -dpi flag when using the batik-rasterizer does not work well when
> generating pdf as i have understood that pdf's do not have any notion of the
> resolution at all..
> 
> I hope you will be able to help me out.
> It does not suffice to have a decent rendering of the image when printing
> from my pdf..




Jeremias Maerki


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

Reply via email to