i can not print the chart directly as jasper report doesnt support this data
type. So in JFreeChart we export the chart as svg, so that we can embed this
svg to jasper report. Also this Jasper report i am exporting as a PDF file.
This PDF file is one generated by client. So we can not tell him to use
acrobat features for reducing the file size. And he wants the reduced file
size when generated.


Andreas Neumann wrote:
> 
> ok, from your example it looks like you are not printing vector data, 
> but raster data. The interesting part (the chart) seems to be encoded in 
> a raster. Then, depending on the output resolution, the PDF can 
> therefore get quite large. That does not necessarily mean that the 
> vector version would be smaller. It really depends on the data density. 
> However, if the data is in raster anyway it would be probably better to 
> bypass Batik and print directly to PDF?
> 
> Also, PDF has different compression options. Your file might get much 
> smaller if you use a different compression scheme. If you own Acrobat 
> you can try the "reduce filesize" option. Other tools might have similar 
> options.
> 
> Andreas
> 
> Namrata wrote:
>> The size of each chart is approximately 20k. And the SVG contains the
>> following :
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
>> 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
>> <svg xmlns:xlink="http://www.w3.org/1999/xlink"; style="fill-opacity:1;
>> color-rendering:auto; color-interpolation:auto; text-rendering:auto;
>> stroke:black; stroke-linecap:square; stroke-miterlimit:10;
>> shape-rendering:auto; stroke-opacity:1; fill:black;
>> stroke-dasharray:none;
>> font-weight:normal; stroke-width:1; font-family:&apos;sansserif&apos;;
>> font-style:normal; stroke-linejoin:miter; font-size:12;
>> stroke-dashoffset:0;
>> image-rendering:auto;" xmlns="http://www.w3.org/2000/svg";>
>>   <!--Generated by the Batik Graphics2D SVG Generator-->
>>   <defs id="genericDefs" />
>>   <g>
>>     <defs id="defs1">
>>       <clipPath clipPathUnits="userSpaceOnUse" id="clipPath1">
>>         <path d="M0 0 L300 0 L300 74 L0 74 L0 0 Z" />
>>       </clipPath>
>>     </defs>
>>     <g style="fill:white; shape-rendering:crispEdges; stroke:white;">
>>       <rect x="0" y="0" width="300" style="clip-path:url(#clipPath1);
>> stroke:none;" height="74" />
>>       <image x="0" y="0" width="300"
>> xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAABKCAAAAAAkzDZaAAAArUlEQVR42u3b0QnA
>> IAwFQFM6WEbvZukKWlBKuPcv6kGEoEYNmc2FABYsWLBgwUIACxYsWLBgIYAFCxYs
>> WLAQzOdeHxJd9l4HsMazfx95Yg5l6MyCBQuWwIIFCxas1onq1/Nt6yFj/TFbdOkN
>> Sxk6s2DBgiWwYMGCBatzvlyF5YF15R+xwkcnZQgLFixYsBDAggULFixYCGDBggUL
>> FiwEsGDBggULFgJYsGDB6pkXsW8ME1/TAacAAAAASUVORK5CYII="
>> style="clip-path:url(#clipPath1);" height="74" preserveAspectRatio="none"
>> />
>>     </g>
>>   </g>
>> </svg>
>>
>> Namrata.
>>
>>
>> Namrata wrote:
>>   
>>> I have exported the JFreeChart as SVG using batik. And that JFreeChart
>>> is
>>> embedded in a Jasper Report. But when i export the report as PDF the
>>> size
>>> of the PDF file is too much becuase of the size of the charts. So can
>>> anyone help me with how to reduce the size of SVG containing the chart?
>>> Please reply as soon as possible.
>>>
>>>     
>>
>>   
> 
> 
> -- 
> --
> ----------------------------------------------
> Andreas Neumann
> Institute of Cartography
> ETH Zurich
> Wolfgang-Paulistrasse 15
> CH-8093  Zurich, Switzerland
> 
> Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
> e-mail: [EMAIL PROTECTED]
> www: http://www.carto.net/neumann/
> SVG.Open: http://www.svgopen.org/
> Carto.net: http://www.carto.net/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Reducing-the-size-of-SVG-file-tf3679961.html#a10318960
Sent from the Batik - Users mailing list archive at Nabble.com.


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

Reply via email to