Page 1 of 1

Create SVG file with editable text

Posted: 2017-10-12T13:40:03-07:00
by DanielB
Hi all!

I am developing a script whose goal is to process a CSV file and generate an SVG image with color text from the text read in that CSV file. For this I am using "convert" and Pango Markup Language to color the text read from the CSV file.

On this way I get an EPS file which I then convert to PDF using epstopdf, and then convert to SVG using pdf2svg. The problem I am encountering here is that each block of text is not editable. Perhaps this happens because of the intermediate transformations. I'm not sure.

Does anyone know of any way to generate an SVG image with editable text with imagemagick or using some other process that can be automated with a script?

Thanks in advance.

Kind regards,
Daniel

Re: Create SVG file with editable text

Posted: 2017-10-12T13:58:37-07:00
by snibgo
wrote:... to generate an SVG image with editable text with imagemagick...
No, that can't be done. IM processes raster images, so your final image won't have editable text, but pixels.

SVG is a text format that represents vector. Inkscape is a good place to start. Create a simple example graphically, save it as plain SVG, and look at the SVG. You script can generate similar text, or can even edit the SVG from Inkscape.

Re: Create SVG file with editable text

Posted: 2017-10-13T07:07:46-07:00
by DanielB
Hi, snibgo.
snibgo wrote: 2017-10-12T13:58:37-07:00
wrote:... to generate an SVG image with editable text with imagemagick...
No, that can't be done. IM processes raster images, so your final image won't have editable text, but pixels.

SVG is a text format that represents vector. Inkscape is a good place to start. Create a simple example graphically, save it as plain SVG, and look at the SVG. You script can generate similar text, or can even edit the SVG from Inkscape.
Thanks for the recommendation. I've been able to accomplish what I was needing with a Python library for SVG file creation and also reading some of O'Reilly's "SVG Essentials".

Thanks for your time.

Kind regards,
Daniel

Re: Create SVG file with editable text

Posted: 2017-10-13T10:23:28-07:00
by snibgo
Good stuff. See also the SVG 1.1 standard, which contains many simple examples.

Re: Create SVG file with editable text

Posted: 2017-10-15T12:07:56-07:00
by DanielB
Hi, snibgo.
snibgo wrote: 2017-10-13T10:23:28-07:00 Good stuff. See also the SVG 1.1 standard, which contains many simple examples.
Yes, that is another reference that, although I still have not read yet, I was also taking it into account.

Thanks for your help.

Kind regards,
Daniel