You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@manova.at on 2013/11/25 19:44:25 UTC

please help: rasterizer bug

Dear Batik Team, 

I need your help about a potential bug within the Rasterizer. The following SVG files work perfectly in many SVG Viewers (chrome, safari, Inkscape, etc.), but the Y-Axis labels are positioned too far right when rastered with Batik. 

example files: 
https://www.dropbox.com/s/yr8my0jmaz5772n/sample1.svg
https://www.dropbox.com/s/rok4v4ffhqiiwln/sample2.svg
https://www.dropbox.com/s/e804uzzhvmyjnbu/sample3.svg

To reproduce the bug: 
$java -jar batik-1.7/batik-rasterizer.jar sample1.svg

The truetype fonts are set in the JAVA_FONTS environment variable. 
Full directory: https://www.dropbox.com/sh/38soggrt818hucz/EwNchlQQtJ 

I would really appreciate all help and tipps to solve or circumvent this problem! 

Best Regards, 
Thomas Lohninger 

-------------------------------------------------------------------------------------------------------------
Thomas Lohninger
Softwareentwickler


MANOVA GmbH
Wipplingerstraße 23/23 | 1010 Wien / Vienna | Austria
T +43 1 710 75 35 – 12
F +43 1 710 75 35 – 20
thomas.lohninger@manova.at
www.manova.at
-------------------------------------------------------------------------------------------------------------
UID ATU51814504 | FN 207470d [Handelsgericht Wien / Firmensitz Wien]
VAT ID ATU51814504 | CR No. 207470d [Commercial Court Vienna / Headquarters Vienna]
-------------------------------------------------------------------------------------------------------------
Strategieberatung | Marktforschung & Analyse | WEBMARK | Trainings & Schulungen





Re: please help: rasterizer bug

Posted by Luis Bernardo <lm...@gmail.com>.
Yes, it seems to be a bug.

If you want a workaround... The bug happens if you have more than a 
<tspan> element inside a <text> element. Knowing that you can either 
generate the SVGs so that that doesn't happen, or edit the SVGs and 
manually fix the problem. For instance, for the sample1.svg example, and 
for the first <text> element, the change can be the following:

--- sample1.svg    2014-01-07 20:29:41.000000000 +0000
+++ sample1a.svg    2014-01-07 20:41:24.000000000 +0000
@@ -169,7 +169,9 @@
          <g class="red-y-axis-labels-279">
              <text x="380" y="14.86666666666667" text-anchor="end" 
stroke="none" fill="#60634e" style="text-anchor: end; font-family: 
verdana, arial, 'san serif'; font-size: 12px; font-weight: bold;" 
font-family="Verdana,Arial,San Serif" font-size="12px" 
font-weight="bold" transform="matrix(1,0,0,1,0,0)">
                  <tspan dy="13.17135416666667" x="380">Gesamtanzahl 
Mitarbeiter mit</tspan>
-                <tspan dy="16.799999999999997" 
x="380">tourismusbezogener Ausbildung</tspan>
+            </text>
+            <text x="380" y="14.86666666666667" text-anchor="end" 
stroke="none" fill="#60634e" style="text-anchor: end; font-family: 
verdana, arial, 'san serif'; font-size: 12px; font-weight: bold;" 
font-family="Verdana,Arial,San Serif" font-size="12px" 
font-weight="bold" transform="matrix(1,0,0,1,0,0)">
+                <tspan dy="29.971354166666666" 
x="380">tourismusbezogener Ausbildung</tspan>
              </text>
              <text x="380" y="48.2" text-anchor="end" stroke="none" 
fill="#60634e" style="text-anchor: end; font-family: verdana, arial, 
'san serif'; font-size: 12px; font-weight: bold;" 
font-family="Verdana,Arial,San Serif" font-size="12px" 
font-weight="bold" transform="matrix(1,0,0,1,0,0)">
                  <tspan dy="13.168750000000003" 
x="380">Hochschulabschluss </tspan>


Notice that for the second line you need either to increment the dy (as 
done above) or the y value.

On 1/7/14, 3:04 PM, thomas.lohninger@manova.at wrote:
> Hello again,
>
> I hope my last mail didn’t end up in everyone spam folders. Is there a 
> way to get some help for this problem?
> I also filed a bug for it: 
> https://issues.apache.org/jira/browse/BATIK-1060?filter=-2
>
> Please help me find the error or at least a pointer on where to look at!
>
> Best,
> Tom
>
> On 25 Nov 2013, at 19:44 , thomas.lohninger@manova.at 
> <ma...@manova.at> wrote:
>
>> Dear Batik Team,
>>
>> I need your help about a potential bug within the Rasterizer. The 
>> following SVG files work perfectly in many SVG Viewers (chrome, 
>> safari, Inkscape, etc.), but the Y-Axis labels are positioned too far 
>> right when rastered with Batik.
>>
>> example files:
>> https://www.dropbox.com/s/yr8my0jmaz5772n/sample1.svg
>> https://www.dropbox.com/s/rok4v4ffhqiiwln/sample2.svg
>> https://www.dropbox.com/s/e804uzzhvmyjnbu/sample3.svg
>>
>> To reproduce the bug:
>> $java -jar batik-1.7/batik-rasterizer.jar sample1.svg
>>
>> The truetype fonts are set in the JAVA_FONTS environment variable.
>> Full directory: https://www.dropbox.com/sh/38soggrt818hucz/EwNchlQQtJ
>>
>> I would really appreciate all help and tipps to solve or circumvent 
>> this problem!
>>
>> Best Regards,
>> Thomas Lohninger
>>
>> -------------------------------------------------------------------------------------------------------------
>> *Thomas Lohninger*
>> Softwareentwickler
>>
>>
>> *MANOVA GmbH*
>> Wipplingerstraße 23/23 | 1010 Wien / Vienna | Austria
>> T _+43 1 710 75 35 – 12_
>> F _+43 1 710 75 35 – 20_
>> thomas.lohninger@manova.at <ma...@manova.at>
>> www.manova.at <http://www.manova.at/>
>> -------------------------------------------------------------------------------------------------------------
>> UID ATU51814504 | FN 207470d [Handelsgericht Wien / Firmensitz Wien]
>> VAT ID ATU51814504 | CR No. 207470d [Commercial Court Vienna 
>> / Headquarters Vienna]
>> -------------------------------------------------------------------------------------------------------------
>> Strategieberatung <http://www.manova.at/strategie/> | Marktforschung 
>> & Analyse <http://www.manova.at/studien/> | WEBMARK 
>> <http://www.manova.at/webmark/> | Trainings & Schulungen 
>> <http://www.manova.at/schulungen/>
>>
>>
>>
>>
>
> -------------------------------------------------------------------------------------------------------------
> *Thomas Lohninger*
> Softwareentwickler
>
>
> *MANOVA GmbH*
> Wipplingerstraße 23/23 | 1010 Wien / Vienna | Austria
> T _+43 1 710 75 35 – 12_
> F _+43 1 710 75 35 – 20_
> thomas.lohninger@manova.at <ma...@manova.at>
> www.manova.at <http://www.manova.at/>
> -------------------------------------------------------------------------------------------------------------
> UID ATU51814504 | FN 207470d [Handelsgericht Wien / Firmensitz Wien]
> VAT ID ATU51814504 | CR No. 207470d [Commercial Court Vienna 
> / Headquarters Vienna]
> -------------------------------------------------------------------------------------------------------------
> Strategieberatung <http://www.manova.at/strategie/> | Marktforschung & 
> Analyse <http://www.manova.at/studien/> | WEBMARK 
> <http://www.manova.at/webmark/> | Trainings & Schulungen 
> <http://www.manova.at/schulungen/>
>
>
>
>


Re: please help: rasterizer bug

Posted by th...@manova.at.
Hello again, 

I hope my last mail didn’t end up in everyone spam folders. Is there a way to get some help for this problem? 
I also filed a bug for it: https://issues.apache.org/jira/browse/BATIK-1060?filter=-2 

Please help me find the error or at least a pointer on where to look at! 

Best, 
Tom

On 25 Nov 2013, at 19:44 , thomas.lohninger@manova.at wrote:

> Dear Batik Team, 
> 
> I need your help about a potential bug within the Rasterizer. The following SVG files work perfectly in many SVG Viewers (chrome, safari, Inkscape, etc.), but the Y-Axis labels are positioned too far right when rastered with Batik. 
> 
> example files: 
> https://www.dropbox.com/s/yr8my0jmaz5772n/sample1.svg
> https://www.dropbox.com/s/rok4v4ffhqiiwln/sample2.svg
> https://www.dropbox.com/s/e804uzzhvmyjnbu/sample3.svg
> 
> To reproduce the bug: 
> $java -jar batik-1.7/batik-rasterizer.jar sample1.svg
> 
> The truetype fonts are set in the JAVA_FONTS environment variable. 
> Full directory: https://www.dropbox.com/sh/38soggrt818hucz/EwNchlQQtJ 
> 
> I would really appreciate all help and tipps to solve or circumvent this problem! 
> 
> Best Regards, 
> Thomas Lohninger 
> 
> -------------------------------------------------------------------------------------------------------------
> Thomas Lohninger
> Softwareentwickler
> 
> 
> MANOVA GmbH
> Wipplingerstraße 23/23 | 1010 Wien / Vienna | Austria
> T +43 1 710 75 35 – 12
> F +43 1 710 75 35 – 20
> thomas.lohninger@manova.at
> www.manova.at
> -------------------------------------------------------------------------------------------------------------
> UID ATU51814504 | FN 207470d [Handelsgericht Wien / Firmensitz Wien]
> VAT ID ATU51814504 | CR No. 207470d [Commercial Court Vienna / Headquarters Vienna]
> -------------------------------------------------------------------------------------------------------------
> Strategieberatung | Marktforschung & Analyse | WEBMARK | Trainings & Schulungen
> 
> 
> 
> 

-------------------------------------------------------------------------------------------------------------
Thomas Lohninger
Softwareentwickler


MANOVA GmbH
Wipplingerstraße 23/23 | 1010 Wien / Vienna | Austria
T +43 1 710 75 35 – 12
F +43 1 710 75 35 – 20
thomas.lohninger@manova.at
www.manova.at
-------------------------------------------------------------------------------------------------------------
UID ATU51814504 | FN 207470d [Handelsgericht Wien / Firmensitz Wien]
VAT ID ATU51814504 | CR No. 207470d [Commercial Court Vienna / Headquarters Vienna]
-------------------------------------------------------------------------------------------------------------
Strategieberatung | Marktforschung & Analyse | WEBMARK | Trainings & Schulungen