Highlighted

SVG Text and TSpans Import

New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

Hello all, 

I'm having issues with AI importing a SVG file.

I need to preserve the original texts and tspans after importing a svg file. 

 

A file was created by exporting an AI document into a SVG file (SVG 1.0).  The option "Preserver AI capabilities" is checked off, because the SVG is later modified by a different system. 

Once the modified SVG is imported, the texts and tspans are all messed up in a very inconsistent manner. 

 

There is a simple way to reproduce the issue doing the following steps:

1 - Create a sample file, write a text that breaks to different lines 

2 - Export ai file to SVG.

 

 

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1920px" height="1080px" viewBox="0 0 1920 1080" enable-background="new 0 0 1920 1080" xml:space="preserve">
<text id="Lorem_ipsum_dolor_sit_amet_consectetur" transform="matrix(1 0 0 1 421.4561 260.877)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="24px">Lorem ipsum</tspan><tspan x="0" y="28.8" font-family="'ArialMT'" font-size="24px">dolor sit</tspan><tspan x="0" y="57.6" font-family="'ArialMT'" font-size="24px">amet consectetur</tspan></text>
</svg>

 

 

3. close and open the exported  SVG. No need to modify the SVG. 

4. Export the file again as another SVG file (file #2)

The tspans are gone and now all became texts. 

 

 

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="1920px" height="1080px" viewBox="0 0 1920 1080" enable-background="new 0 0 1920 1080" xml:space="preserve">
<text transform="matrix(1 0 0 1 421.4561 260.877)" font-family="'ArialMT'" font-size="24px">Lorem ipsum</text>
<text transform="matrix(1 0 0 1 421.4561 289.677)" font-family="'ArialMT'" font-size="24px">dolor sit</text>
<text transform="matrix(1 0 0 1 421.4561 318.477)" font-family="'ArialMT'" font-size="24px">amet consectetur</text>
</svg>

 

 
Is there anything I can do to solve this issue? The TSPANs are key for the system that is consumming. 
Thank you in advance
 
Adobe Community Professional
Correct answer by Monika Gause | Adobe Community Professional

SVG is not suitable for roundtripping in Illustrator.

You need to redesign your workflow, because this way it just won't work.

TOPICS
Bug, Import and export, Third party plugins

Views

56

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

SVG Text and TSpans Import

New Here ,
Sep 08, 2020

Copy link to clipboard

Copied

Hello all, 

I'm having issues with AI importing a SVG file.

I need to preserve the original texts and tspans after importing a svg file. 

 

A file was created by exporting an AI document into a SVG file (SVG 1.0).  The option "Preserver AI capabilities" is checked off, because the SVG is later modified by a different system. 

Once the modified SVG is imported, the texts and tspans are all messed up in a very inconsistent manner. 

 

There is a simple way to reproduce the issue doing the following steps:

1 - Create a sample file, write a text that breaks to different lines 

2 - Export ai file to SVG.

 

 

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1920px" height="1080px" viewBox="0 0 1920 1080" enable-background="new 0 0 1920 1080" xml:space="preserve">
<text id="Lorem_ipsum_dolor_sit_amet_consectetur" transform="matrix(1 0 0 1 421.4561 260.877)"><tspan x="0" y="0" font-family="'ArialMT'" font-size="24px">Lorem ipsum</tspan><tspan x="0" y="28.8" font-family="'ArialMT'" font-size="24px">dolor sit</tspan><tspan x="0" y="57.6" font-family="'ArialMT'" font-size="24px">amet consectetur</tspan></text>
</svg>

 

 

3. close and open the exported  SVG. No need to modify the SVG. 

4. Export the file again as another SVG file (file #2)

The tspans are gone and now all became texts. 

 

 

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="1920px" height="1080px" viewBox="0 0 1920 1080" enable-background="new 0 0 1920 1080" xml:space="preserve">
<text transform="matrix(1 0 0 1 421.4561 260.877)" font-family="'ArialMT'" font-size="24px">Lorem ipsum</text>
<text transform="matrix(1 0 0 1 421.4561 289.677)" font-family="'ArialMT'" font-size="24px">dolor sit</text>
<text transform="matrix(1 0 0 1 421.4561 318.477)" font-family="'ArialMT'" font-size="24px">amet consectetur</text>
</svg>

 

 
Is there anything I can do to solve this issue? The TSPANs are key for the system that is consumming. 
Thank you in advance
 
Adobe Community Professional
Correct answer by Monika Gause | Adobe Community Professional

SVG is not suitable for roundtripping in Illustrator.

You need to redesign your workflow, because this way it just won't work.

TOPICS
Bug, Import and export, Third party plugins

Views

57

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 08, 2020 0
Adobe Community Professional ,
Sep 08, 2020

Copy link to clipboard

Copied

SVG is not suitable for roundtripping in Illustrator.

You need to redesign your workflow, because this way it just won't work.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 08, 2020 1
New Here ,
Sep 09, 2020

Copy link to clipboard

Copied

Thank you. I agree with you. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 09, 2020 0
Resources