Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/02/2017, 22:30
JESUMINISTROSYMAS
(Desactivado)
 
Fecha de Ingreso: septiembre-2008
Ubicación: Maracay edo Aragua Venezuela
Mensajes: 48
Antigüedad: 15 años, 7 meses
Puntos: 3
Pregunta Insertando un SVG en PHP

Saludos cordiales,
chicos tengo el siguiente caso espero que puedan ayudarme:

Poseo un archivo PHP donde tengo incluido una etiqueta SVG

Parte de la etiqueta SVG es:

Código PHP:
    <g
       id
="g4125">
      <
rect
         ry
="10.606602"
         
rx="10.859617"
         
y="243.71503"
         
x="51.147934"
         
height="61.284992"
         
width="693.70422"
         
id="rect4610"
         
style="fill:#ffffff;fill-opacity:1;stroke:none;opacity:1" />
      <
text
         sodipodi
:linespacing="125%"
         
id="NOMBRE PARTICIPANTE"
         
y="282.4874"
         
x="149.45268"
         
style="font-size:27.87268639px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
         
xml:space="preserve"><tspan
           style
="font-size:30px;font-weight:bold;-inkscape-font-specification:Sans Bold"
           
y="282.4874"
           
x="149.45268"
           
id="tspan4614"
           
sodipodi:role="line">PEDRO JOSE PEREZ MIRANDA</tspan></text>
    </
g
Y he hecho esto:

Código PHP:
    <g
       id="g4125">
      <rect
         ry="10.606602"
         rx="10.859617"
         y="243.71503"
         x="51.147934"
         height="61.284992"
         width="693.70422"
         id="rect4610"
         style="fill:#ffffff;fill-opacity:1;stroke:none;opacity:1" />
      <text
         sodipodi:linespacing="125%"
         id="NOMBRE PARTICIPANTE"
         y="282.4874"
         x="149.45268"
         style="font-size:27.87268639px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
         xml:space="preserve"><tspan
           style="font-size:30px;font-weight:bold;-inkscape-font-specification:Sans Bold"
           y="282.4874"
           x="149.45268"
           id="tspan4614"
           sodipodi:role="line"><?PHP echo $nombre?></tspan></text>
    </g>
Pero cuando la variable cambia tambien lo hace la alineacion horizontal del texto.

Mi consulta es, saber si existe la posibilidad de que el nombre que adquiera la variable $nombre la posicion horizontal del SVG se mantenga centrado, no se como tratar el texto como un parrafo, o si alguien tiene una mejor idea estare atento.

Muchas Gracias de Antemano.