HTML SVG - 是否可以将 <svg> 导入 Adob​​e Illustrator 进行修改?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30387978/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 11:31:20  来源:igfitidea点击:

HTML SVG - Is it possible to import a <svg> into Adobe Illustrator to modify it?

htmlsvg

提问by QoP

As the title says, how can I modify a svg in Adobe Illustrator?

正如标题所说,如何在 Adob​​e Illustrator 中修改 svg?

For example, I got this

例如,我得到了这个

<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="595.28px" height="841.89px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
<text transform="matrix(1 0 0 1 225 321)" font-family="'MyriadPro-Regular'" font-size="12">This a TEST!</text>
<path fill="none" d="M177,246c0,92.859,77.824,168,174,168"/>
<path fill="none" d="M357,246c0,161.398-105.555,292-236,292"/>
<path fill="none" d="M288,414c0,113.311-23.252,205-51.987,205"/>
<rect x="93" y="383" fill="none" width="364" height="147"/>
<g>
    <rect x="167" y="272" fill="none" width="216" height="244.5"/>
</g>
<rect x="476" y="428" fill="none" width="216" height="244.5"/>
<rect x="121" y="230" fill="none" width="403" height="231"/>
<rect x="179" y="158" fill="none" width="362" height="454.25"/>
<rect x="73" y="230" fill="none" width="294" height="184"/>
<rect x="371" y="516.5" fill="none" width="12" height="13.5"/>
<rect x="167" y="143" fill="none" width="221" height="387"/>
</svg>

(It doesn't contain anything, its just a random svg).

(它不包含任何内容,它只是一个随机的 svg)。

Do I have to download it as .svg first? And how can I download it as .svg?

我必须先将其下载为 .svg 吗?我如何将其下载为 .svg?

回答by ray hatfield

Paste it into a text file named whatever.svg and open that file in Illustrator.

将其粘贴到名为whatever.svg 的文本文件中,然后在Illustrator 中打开该文件。

回答by revilodesign.de

Create a .html document

创建 .html 文档

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
 <head profile="http://gmpg.org/xfn/11">
 </head>
 <body>
  <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="595.28px" height="841.89px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
   <text transform="matrix(1 0 0 1 225 321)" font-family="'MyriadPro-Regular'" font-size="12">This a TEST!</text>
   <path fill="none" d="M177,246c0,92.859,77.824,168,174,168"/>
   <path fill="none" d="M357,246c0,161.398-105.555,292-236,292"/>
   <path fill="none" d="M288,414c0,113.311-23.252,205-51.987,205"/>
   <rect x="93" y="383" fill="none" width="364" height="147"/>
   <g>
    <rect x="167" y="272" fill="none" width="216" height="244.5"/>
   </g>
   <rect x="476" y="428" fill="none" width="216" height="244.5"/>
   <rect x="121" y="230" fill="none" width="403" height="231"/>
   <rect x="179" y="158" fill="none" width="362" height="454.25"/>
   <rect x="73" y="230" fill="none" width="294" height="184"/>
   <rect x="371" y="516.5" fill="none" width="12" height="13.5"/>
   <rect x="167" y="143" fill="none" width="221" height="387"/>
  </svg>
 </body>
</html>

Open this in the Browser. Open print and press "save as .pdf"

在浏览器中打开它。打开打印并按“另存为 .pdf”

Now you can open this in Illustrator.

现在您可以在 Illustrator 中打开它。

Example

例子