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 Mork0075 <mo...@googlemail.com> on 2007/08/28 17:01:34 UTC

Nested SVG question

Hello,

i would like to create a label with a barcode in it. I have defined a
template for the label with placeholders. Another method of my system
creates a barcode, also as svg string.

It looks like something like that:
<svg>
	<text>$placeholder$</text>
</svg>

after the combining of the two svg string, it looks like:

<svg>
<text><svg>Barcode</svg></text>
</svg>

The problem is, that i cant see the barcode in the visualized file. I
used Inkscape to visualize it and also Batik PDF transformation.

If i cut the barcode svg string out of the combined string, i can see
the barcode, but it doenst work together.

I attached the combinded file, please seach for the second <svg in the
file, there is where the barcode starts.

What am i doing wrong?

Thanks in advance

Re: Nested SVG question

Posted by Mork0075 <mo...@googlemail.com>.
Thats a good idea, i'll give it a try :)

thomas.deweese@kodak.com schrieb:
> Hi Mork,
> 
> Mork0075 <mo...@googlemail.com> wrote on 08/28/2007 01:01:12 PM:
> 
>> Is there any possibility to position the <g> element graphically?
> 
>    You can fairly easily 'move' the 'x' & 'y' from the text element
> to the transform attribute of a 'g':
>         <text x="<xxx>" y="<yyy>" [...]>....</text>
> Becomes
>         <g transform="translate(<xxx>, <yyy>)">....</g>
> 
>  
>> The advantage of the "text approach" was, that i could draw the 
> dimensions
>> with InkScape, this is a lot more comfortable than the manual way with
>> try and error.
> 
>    It's also possible that if you just 'group' two elements (at the 
> origin)
> in InkScape and then drag the group around it will create the transform
> attribute for you.
>  
>> Thomas Behr schrieb:
>>> Hi Mork0075,
>>>
>>> Mork0075 wrote:
>>>> Thanks a lot for your suggestion.
>>>>
>>>> As you can see, i'am very new to SVG. I chosed the text node to 
> position
>>>> the embedded svg in a simple way. Which element would you suggest for
>>>> the wrapping?
>>> Use a <g> element with a descriptive id ...
>>>
>>>> My idea was to include the placeholder for the barcode within a 
> wrapping
>>>> element, which i can position during the design process of the label
>>>> template, so i dont have to worry about the position of the generated
>>>> barcode. (because its position is determined trough the wrapping 
> element)
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Nested SVG question

Posted by th...@kodak.com.
Hi Mork,

Mork0075 <mo...@googlemail.com> wrote on 08/28/2007 01:01:12 PM:

> Is there any possibility to position the <g> element graphically?

   You can fairly easily 'move' the 'x' & 'y' from the text element
to the transform attribute of a 'g':
        <text x="<xxx>" y="<yyy>" [...]>....</text>
Becomes
        <g transform="translate(<xxx>, <yyy>)">....</g>

 
> The advantage of the "text approach" was, that i could draw the 
dimensions
> with InkScape, this is a lot more comfortable than the manual way with
> try and error.

   It's also possible that if you just 'group' two elements (at the 
origin)
in InkScape and then drag the group around it will create the transform
attribute for you.
 
> Thomas Behr schrieb:
> > Hi Mork0075,
> > 
> > Mork0075 wrote:
> >> Thanks a lot for your suggestion.
> >>
> >> As you can see, i'am very new to SVG. I chosed the text node to 
position
> >> the embedded svg in a simple way. Which element would you suggest for
> >> the wrapping?
> > 
> > Use a <g> element with a descriptive id ...
> > 
> >>
> >> My idea was to include the placeholder for the barcode within a 
wrapping
> >> element, which i can position during the design process of the label
> >> template, so i dont have to worry about the position of the generated
> >> barcode. (because its position is determined trough the wrapping 
element)
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Nested SVG question

Posted by Mork0075 <mo...@googlemail.com>.
Thank you.

Is there any possibility to position the <g> element graphically? The
advantage of the "text approach" was, that i could draw the dimensions
with InkScape, this is a lot more comfortable than the manual way with
try and error.

Thomas Behr schrieb:
> Hi Mork0075,
> 
> Mork0075 wrote:
>> Thanks a lot for your suggestion.
>>
>> As you can see, i'am very new to SVG. I chosed the text node to position
>> the embedded svg in a simple way. Which element would you suggest for
>> the wrapping?
> 
> Use a <g> element with a descriptive id ...
> 
>>
>> My idea was to include the placeholder for the barcode within a wrapping
>> element, which i can position during the design process of the label
>> template, so i dont have to worry about the position of the generated
>> barcode. (because its position is determined trough the wrapping element)
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Nested SVG question

Posted by Thomas Behr <th...@yworks.com>.
Hi Mork0075,

Mork0075 wrote:
> Thanks a lot for your suggestion.
> 
> As you can see, i'am very new to SVG. I chosed the text node to position
> the embedded svg in a simple way. Which element would you suggest for
> the wrapping?

Use a <g> element with a descriptive id ...

> 
> My idea was to include the placeholder for the barcode within a wrapping
> element, which i can position during the design process of the label
> template, so i dont have to worry about the position of the generated
> barcode. (because its position is determined trough the wrapping element)

-- 
Thomas Behr
yWorks GmbH
Vor dem Kreuzberg 28
72070 Tuebingen, Germany
Tel.:  +49 7071 9709050
Fax.:  +49 7071 9709051


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Nested SVG question

Posted by Mork0075 <mo...@googlemail.com>.
Thanks a lot for your suggestion.

As you can see, i'am very new to SVG. I chosed the text node to position
the embedded svg in a simple way. Which element would you suggest for
the wrapping?

My idea was to include the placeholder for the barcode within a wrapping
element, which i can position during the design process of the label
template, so i dont have to worry about the position of the generated
barcode. (because its position is determined trough the wrapping element)

Steffen Jacobs schrieb:
> Mork0075 wrote:
>> Hello,
>>
>> i would like to create a label with a barcode in it. I have defined a
>> template for the label with placeholders. Another method of my system
>> creates a barcode, also as svg string.
>>
>> It looks like something like that:
>> <svg>
>> 	<text>$placeholder$</text>
>> </svg>
>>
>> after the combining of the two svg string, it looks like:
>>
>> <svg>
>> <text><svg>Barcode</svg></text>
>> </svg>
>>
>> The problem is, that i cant see the barcode in the visualized file. I
>> used Inkscape to visualize it and also Batik PDF transformation.
>>
>> If i cut the barcode svg string out of the combined string, i can see
>> the barcode, but it doenst work together.
>>
>> I attached the combinded file, please seach for the second <svg in the
>> file, there is where the barcode starts.
>>
>> What am i doing wrong?
>>   
> You should not embed your graphical content in a text node. If you
> remove the text/tspan stuff, it should work fine.
> 
>> Thanks in advance
>>   
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Nested SVG question

Posted by Steffen Jacobs <sj...@informatik.uni-kiel.de>.
Mork0075 wrote:
> Hello,
>
> i would like to create a label with a barcode in it. I have defined a
> template for the label with placeholders. Another method of my system
> creates a barcode, also as svg string.
>
> It looks like something like that:
> <svg>
> 	<text>$placeholder$</text>
> </svg>
>
> after the combining of the two svg string, it looks like:
>
> <svg>
> <text><svg>Barcode</svg></text>
> </svg>
>
> The problem is, that i cant see the barcode in the visualized file. I
> used Inkscape to visualize it and also Batik PDF transformation.
>
> If i cut the barcode svg string out of the combined string, i can see
> the barcode, but it doenst work together.
>
> I attached the combinded file, please seach for the second <svg in the
> file, there is where the barcode starts.
>
> What am i doing wrong?
>   
You should not embed your graphical content in a text node. If you
remove the text/tspan stuff, it should work fine.

> Thanks in advance
>   
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org