> -----Original Message-----
> From: Shan Kajendran [mailto:[EMAIL PROTECTED]
>
>
> Q2) When converting the SVG into PDF, the Batik is uncompressing the
> image data and creating the PDF with that raw data.  So it is increasing
> the PDF's size by many times.  For example 8 kb SVG converted to 1.8 meg
> PDF.
>
> Any idea to compress the images in the output pdf when converting the
> SVG into PDF.
>
> Q3)
> When converting SVG to PDF, the  Tiff-CMYK and JPEG-CMYK are not
> supported by Batik/FOP.
>
>
> I had one SVG which is containing an image as I shown below.
>
> ------------------------------------------------------------------------
> ----------------------------------------------
> <g transform="matrix(0.0000 -108.0025 -95.0422 0.0000 560.9800
> 563.2600)">
>
> <image height="1" width="1" xlink:href="someCMYK.jpg" />
>
> </g>
>
> ------------------------------------------------------------------------
> ----------------------------------------------
>

Keep in mind that:

FOP has its own native support for JPEG, so you do not need to use SVG
unless you need some of SVG's special effects.
If you really do need SVG, Batik uses FOP's PDF Transcoder to create the
PDF. The contained image would thus indeed be decompressed and inserted as a
rasterized PDF graphic. To avoid this, I believe you could rasterize a new
image out of the SVG and insert this into an XSL-FO via
<fo:external-graphic...>

> If I open this SVG in any SVG Viewer I can't see this image because SVG
> spec is not supporting CMYK colour modal. That's fine.
>
> But if I convert this SVG to PDF it should create a PDF with this image
> in it. But batik/FOP failed to do so.
>

Hmmm. I guess that's because the PDF Transcoder would somehow expect SVG
input to be in a colour-model supported by the spec...?

So, in short, try this:

java -jar batik-rasterizer.jar -m image/jpeg -q <quality> vertright.svg
(check batik's docs for the quality-parameter)

Then create an XSL-FO and insert:

<fo:external-graphic src="some/path/vertright.jpg" />

Then render the XSL-FO through FOP.


Hope this helps.

Greetz,


Andreas Delmelle


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

Reply via email to