首页 > 解决方案 > Aspose - SVG 生成文件时未正确显示

问题描述

我有以下 SVG 数据:

<?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE svg>
   <svg width="900" height="600" viewBox="-60 -40 240 160" 
      xmlns="http://www.w3.org/2000/svg" 
      xmlns:xlink="http://www.w3.org/1999/xlink">
      <rect x="-60" y="-40" width="100%" height="100%" fill="#fe0000"/>
      <rect x="-60" y="-40" width="50%" height="50%" fill="#000095"/>
      <path id="four_rays" d="M 8,0 L 0,30 L -8,0 L 0,-30 M 0,8 L 30,0 L    0,-8 L 
      -30,0" fill="#fff"/>
      <use xlink:href="#four_rays" transform="rotate(30)"/>
      <use xlink:href="#four_rays" transform="rotate(60)"/>
      <circle r="17" fill="#000095"/>
      <circle r="15" fill="#fff"/>
   </svg>

此图形在 Windows 10 中作为文件打开时可以正常工作,但是当我尝试将此图形加载到生成的 Word (.docx) 文件中时,它显示如下而它应该看起来像这样。我加载到我的 Word (.docx) 文件中的所有其他 SVG 文件(它们也是标志)按应有的方式工作,这是唯一的例外。

有人可以告诉我发生了什么吗?看起来 SVG 数据是相同的。

标签: svgaspose

解决方案


推荐阅读