0

Below is the svg

<svg width="220" height="330" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 330">
<g transform="translate(96,0)">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="193" height="370" preserveAspectRatio="none" x="12.4844" y="-42.5" viewBox="0 0 15 27">
        <g transform="translate(0, 0) scale(1,1)">
            <text text-anchor="middle" uuid="a1f8607b-7dd2-4cd0-89b0-c09610e1702f" stroke-linecap="round" stroke-linejoin="round" y="15" stroke="rgb(255,0,0)" stroke-width="0" fill="rgb(0,0,0)" ng-if="text.type=='text'" ng-style="{'font-family':text.font,'letter-spacing':text.space.value/2,'text-shadow':'4px 4px' + text.shadowColor}" font-size="24px" style="font-family: Arial; letter-spacing: 0px;" class="">
                <tspan x="50%" class="text_tspans" y="0" dy="22"> A </tspan>
            </text>
        </g>
    </svg>
</g>
<g transform="translate(18,0)">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="36" height="66" preserveAspectRatio="none" x="89" y="190" viewBox="0 0 16 27">
        <g transform="translate(0, 0) scale(1,1)">
            <text text-anchor="middle" uuid="bf336f6e-1187-485d-8e4d-2e81cbe649bf" stroke-linecap="round" stroke-linejoin="round" y="15" stroke="rgb(255,0,0)" stroke-width="0" fill="rgb(0,0,0)" ng-if="text.type=='text'" ng-style="{'font-family':text.font,'letter-spacing':text.space.value/2,'text-shadow':'4px 4px' + text.shadowColor}" font-size="24px" style="font-family: Arial; letter-spacing: 0px;" class="">
                <tspan x="50%" class="text_tspans" y="0" dy="22"> B </tspan>
            </text>
        </g>
    </svg>
</g>
<g transform="translate(15.5,0)">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="31" height="53" preserveAspectRatio="none" x="92.5" y="-11" viewBox="0 0 17 27">
        <g transform="translate(0, 0) scale(1,1)">
            <text text-anchor="middle" uuid="1be15796-ee94-468b-8c5a-0034d08071fd" stroke-linecap="round" stroke-linejoin="round" y="15" stroke="rgb(255,0,0)" stroke-width="0" fill="rgb(0,0,0)" ng-if="text.type=='text'" ng-style="{'font-family':text.font,'letter-spacing':text.space.value/2,'text-shadow':'4px 4px' + text.shadowColor}" font-size="24px" style="font-family: Arial; letter-spacing: 0px;" class="">
                <tspan x="50%" class="text_tspans" y="0" dy="22"> C </tspan>
            </text>
        </g>
    </svg>
</g>
<g transform="translate(19.5,0)">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="39" height="66" preserveAspectRatio="none" x="171" y="97" viewBox="0 0 17 27">
        <g transform="translate(0, 0) scale(1,1)">
            <text text-anchor="middle" uuid="9313b2c9-3329-4f94-8d77-08501ac2b46d" stroke-linecap="round" stroke-linejoin="round" y="15" stroke="rgb(255,0,0)" stroke-width="0" fill="rgb(0,0,0)" ng-if="text.type=='text'" ng-style="{'font-family':text.font,'letter-spacing':text.space.value/2,'text-shadow':'4px 4px' + text.shadowColor}" font-size="24px" style="font-family: Arial; letter-spacing: 0px;" class="">
                <tspan x="50%" class="text_tspans" y="0" dy="22"> D </tspan>
            </text>
        </g>
    </svg>
</g>
<g transform="translate(15,0)">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="30" height="55" preserveAspectRatio="none" x="2" y="108" viewBox="0 0 16 27">
        <g transform="translate(0, 0) scale(1,1)">
            <text text-anchor="middle" uuid="9692a0ca-4e96-4e9e-8c34-b13e7a1357de" stroke-linecap="round" stroke-linejoin="round" y="15" stroke="rgb(255,0,0)" stroke-width="0" fill="rgb(0,0,0)" ng-if="text.type=='text'" ng-style="{'font-family':text.font,'letter-spacing':text.space.value/2,'text-shadow':'4px 4px' + text.shadowColor}" font-size="24px" style="font-family: Arial; letter-spacing: 0px;" class="">
                <tspan x="50%" class="text_tspans" y="0" dy="22"> E </tspan>
            </text>
        </g>
    </svg>
</g>
<g transform="rotate(0,107.48,134.5) translate(23.5,0)">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="47.04" height="56" preserveAspectRatio="none" x="83.98" y="106.5" viewBox="0 0 23 27">
        <g transform="translate(0, 0) scale(1,1)">
            <text text-anchor="middle" uuid="4345edda-f9ae-4eaa-8498-fca84506e89b" stroke-linecap="round" stroke-linejoin="round" y="15" stroke="rgb(255,0,0)" stroke-width="0" fill="rgb(0,0,0)" ng-if="text.type=='text'" ng-style="{'font-family':text.font,'letter-spacing':text.space.value/2,'text-shadow':'4px 4px' + text.shadowColor}" font-size="24px" style="font-family: Arial; letter-spacing: 0px;" class="">
                <tspan x="50%" textLength="0"               dlengthAdjust="spacingAndGlyphs" y="0" dy="22" class="text_tspans">/-\</tspan>
            </text>
        </g>
    </svg>
</g>
</svg>

SVG code pasted here will be properly working on InkScape rather than any browser.

Now the issue is that when we convert image on CentOS7 using inkscape latest version "0.91 r13725 (Nov 5 2016)" using the command inkscape -z -e 1.png -w 480 -h 570 1.svg we get the following image

SVG Output

But when we convert it on CentOS6 using inkscape version 0.47 r22583 (Jul 29 2015) using the same command as above

CentOS 6 SVG Output

Can anyone please tell what the issue is? Have tried all the alternates, every work around to fix it. But unable to do it so far.

Kind Regards

Ali Naqvi
  • 118
  • 2
  • 2
  • 12

1 Answers1

0

Now the issue is that when we convert image on CentOS7 using inkscape latest version "0.91 r13725 (Nov 5 2016)"... we get the following image

But when we convert it on CentOS6 using inkscape version 0.47 r22583 (Jul 29 2015) using the same command as above

You're using two completely different versions of software and getting different results. This is ... not unexpected.

If you want exactly the same results, try using exactly the same version of software on the two machines. This might require you installing the version you want yourself.

Community
  • 1
  • 1
Danack
  • 24,939
  • 16
  • 90
  • 122
  • I already know this is the issue. But how can I overcome this? Isn't there something that I can change in SVG code to get standardized output? That it should show the same results whether the version is different or not. – Ali Naqvi Jan 31 '17 at 12:54
  • "try using exactly the same version of software on the two machines. This might require you installing the version you want yourself." – Danack Jan 31 '17 at 13:18
  • No that's not a option to install the version locally we will need to downgrade to CentOS6 as I have mentioned before. – Ali Naqvi Jan 31 '17 at 16:29
  • We need to change the above given SVG into standardized SVG so it can run on any machine, platform or version and give the same output no matter what. – Ali Naqvi Feb 01 '17 at 05:05