saveToSVG()函数
同一个文件在不同的系统环境中存在不同的运行结果
- Code: Select all
byte[] svgByte = ppt.getSlides().get(slide_num).saveToSVG();
String svgStr = new String(svgByte, StandardCharsets.UTF_8);
log.info("s第{}页vg信息\t{}",slide_num,svgStr);
在windows 11系统中运行结果是
- Code: Select all
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="main2" width="1280" height="720">
<g transform="matrix(1.333333 0 0 1.333333 0 0)">
<path stroke="none" fill="#333f50" fill-rule="evenodd" d="M0 0L960 0L960 540L0 540z" transform="matrix(1 0 0 1 0 0)" />
<path stroke="none" fill="#ffc000" fill-rule="evenodd" d="M42.01629 49.23126L280.5559 49.23126L280.5559 92.73126L42.01629 92.73126z" transform="matrix(1 0 0 1 0 0)" />
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="0.5483246" y="28.52813">ADD</text>
<text style="fill:#ffffff;font-family:Times New Roman;font-weight:bold;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21629 52.83126)" x="45.34911" y="28.52813"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="50.77489" y="28.52813">YOUR</text>
<text style="fill:#ffffff;font-family:Times New Roman;font-weight:bold;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21629 52.83126)" x="108.6538" y="28.52813"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="114.0796" y="28.52813">TITLE</text>
<text style="fill:#ffffff;font-family:Times New Roman;font-weight:bold;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21629 52.83126)" x="166.0991" y="28.52813"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="171.5249" y="28.52813">HERE</text>
<path stroke="none" fill="#ffc000" fill-rule="evenodd" d="M42.01638 106.5596L165.1272 106.5596L165.1272 150.0596L42.01638 150.0596z" transform="matrix(1 0 0 1 0 0)" />
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21638 110.1596)" x="3.232391" y="28.52813">ADD</text>
<text style="fill:#ffffff;font-family:Times New Roman;font-weight:bold;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21638 110.1596)" x="48.03317" y="28.52813"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21638 110.1596)" x="53.45895" y="28.52813">TITLE</text>
</g>
</svg>
在centOs环境中,运行结果是
- Code: Select all
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="main17" width="1280" height="720">
<g transform="matrix(1.333333 0 0 1.333333 0 0)">
<path stroke="none" fill="#333f50" fill-rule="evenodd" d="M0 0L960 0L960 540L0 540z" transform="matrix(1 0 0 1 0 0)" />
<path stroke="none" fill="#ffc000" fill-rule="evenodd" d="M42.01629 49.23126L280.5559 49.23126L280.5559 92.73126L42.01629 92.73126z" transform="matrix(1 0 0 1 0 0)" />
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="0.5483246" y="25.35001">ADD</text>
<text style="fill:#ffffff;font-family:Liberation Sans;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21629 52.83126)" x="45.34911" y="25.35001"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="50.77489" y="25.35001">YOUR</text>
<text style="fill:#ffffff;font-family:Liberation Sans;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21629 52.83126)" x="108.6538" y="25.35001"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="114.0796" y="25.35001">TITLE</text>
<text style="fill:#ffffff;font-family:Liberation Sans;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21629 52.83126)" x="166.0991" y="25.35001"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21629 52.83126)" x="171.5249" y="25.35001">HERE</text>
<path stroke="none" fill="#ffc000" fill-rule="evenodd" d="M42.01638 106.5596L165.1272 106.5596L165.1272 150.0596L42.01638 150.0596z" transform="matrix(1 0 0 1 0 0)" />
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21638 110.1596)" x="3.232391" y="25.35001">ADD</text>
<text style="fill:#ffffff;font-family:Liberation Sans;" font-size="24" xml:space="preserve" transform="matrix(1 0 0 1 49.21638 110.1596)" x="48.03317" y="25.35001"> </text>
<text style="fill:#ffffff;font-family:Calibri;font-weight:bold;" font-size="24" transform="matrix(1 0 0 1 49.21638 110.1596)" x="53.45895" y="25.35001">TITLE</text>
</g>
</svg>