我将.plt文件转换为svg文件并将svg内容编码为c#中的base64字符集,以便在img标记中使用。但是当我尝试在转换为base64字符集后打印通过img标签呈现的svg(使用浏览器打印选项)时,我得到一个纯黑色框的打印。有些人可以在这个问题上帮助我。这是svg -
的示例源<?xml version="1.0" encoding="utf-8"?>
<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:vnet="http://www.example.com/VNET" viewBox="0 0 11892.00 8412.00" width="1189.20" height="841.20" xmlns="http://www.w3.org/2000/svg">
<defs>
<style type="text/css"><![CDATA[
.pen0 {fill:none;stroke:#000000;stroke-width:0.05%}
.pen1 {fill:none;stroke:#3E7899;stroke-width:0.05%}
.pen2 {fill:none;stroke:darkred;stroke-width:0.05%}
.pen3 {fill:none;stroke:deeppink;stroke-width:0.05%}
.pen4 {fill:none;stroke:gold;stroke-width:0.05%}
.pen5 {fill:none;stroke:navy;stroke-width:0.05%}
.pen6 {fill:none;stroke:darkgreen;stroke-width:0.05%}
.pen7 {fill:none;stroke:orchid;stroke-width:0.05%}
.pen8 {fill:none;stroke:darkorange;stroke-width:0.05%}
.pen9 {fill:none;stroke:darkgray;stroke-width:0.05%}
.plot {shape-rendering:auto;}
.hitpoints {fill:none; stroke-width:0.2%}
.hitpoint {}
]]></style>
</defs>
<g id="plot" class="plot">
<g class="pen6">
<path d="M0 0M0 8412V2H11890V8412H0" />
</g>
<g class="pen1">
<path d="M0 8412" />
</g>
<g class="pen6">
<path d="M0 8412" />
</g>
<g class="pen1">
<path d="M0 8412" />
</g>
<g class="pen6">
<path d="M0 8412" />
</g>
<g class="pen1">
<path d="M0 8412" />
</g>
<g class="pen6">
<path d="M0 8412" />
</g>
<g class="pen1">
<path d="M0 8412" />
</g>
<g class="pen6">
<path d="M0 8412M5460 4100l24 0m-24 -1l24 0m-17 -7l9 0m-16 11l0 -18l7 0l-7 1m12 13l0 -7m12 11l0 -18l-7 0l7 1m-19 -25l-1 -2l-4 -3l24 0m-23 1l23 0m0 4l0 -10" />
<path d="M5484 4051m-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454 7540" />
<path d="M5454 7540V7459m0 -32l0 -17m0 -32V7215m0 -32l0 -16m0 -33V6972m0 -33l0 -16m0 -32V6728m0 -32l0 -17m0 -32V6484m0 -32l0 -16m0 -33V6241m0 -33l0 -16m0 -32" />
<path d="M5454 6160V5997m0 -32l0 -17m0 -32V5753m0 -32l0 -16m0 -33V5510m0 -33l0 -16m0 -33V5266m0 -32l0 -17m0 -32V5022m0 -32l0 -16m0 -33V4779m0 -33l0 -16m0 -33" />
<path d="M5454 4697V4535m0 -33l0 -16m0 -32V4291m0 -32l0 -16m0 -33V4048m0 -33l0 -16m0 -33V3804m0 -33l0 -16m0 -32V3560m0 -32l0 -16m0 -33V3317m0 -33l0 -16m0 -33" />
<path d="M5454 3235V3073m0 -33l0 -16m0 -32V2829m0 -32l0 -16m0 -33V2586m0 -33l0 -16m0 -33V2342m0 -33l0 -16m0 -32V2098m0 -32l0 -17m0 -32V1855m0 -33l0 -16m0 -33" />
<path d="M5454 1773V1611m0 -33l0 -16m0 -32V1367m0 -32l0 -17m0 -32V1123m0 -32l0 -16m0 -33V880m0 -33l0 -16m0 -32V636m0 -32l0 -17m0 -32V474" />
</g>
<g class="pen1">
<path d="M5454 474" />
</g>
<g class="pen6">
<path d="M5454 474M2838 7546l0 24m1 -24l14 22m-14 -19l14 21m0 -24l0 24m-18 -24l4 0m11 0l6 0m-21 24l7 0m34 -24l0 7m0 -2l1 -2l2 -3l3 0l5 4l3 0l1 -1l1 -3" />
<path d="M2892 7546m-15 3l2 -1l3 0l5 2m5 -4l0 4l-1 3l-5 6l-1 2l-1 4l0 5m7 -17l-6 6l-1 2l-1 4l0 5m16 -24l0 7m0 -2l1 -2l2 -3l2 0l6 4l2 0" />
<path d="M2912 7550l2 -1l1 -3m-15 3l2 -1l2 0l6 2m5 -4l0 4l-1 3l-5 6l-1 2l-1 4l0 5m7 -17l-6 6l-1 2l-1 4l0 5m26 -21l0 21m1 -24l0 24m0 -24l-13 18" />
<path d="M2920 7564l19 0m-11 6l8 0m15 -24l-3 2l-2 3l-2 6l0 3l2 6l2 3l3 1l3 0l3 -1l2 -3l1 -6l0 -3l-1 -6l-2 -3l-3 -2l-3 0l-2 2l-1 1l-1 2l-1 6" />
<path d="M2946 7557l0 3l1 6l1 2l1 1l2 1m3 0l2 -1l1 -1l1 -2l1 -6l0 -3l-1 -6l-1 -2l-1 -1l-2 -2m20 0l-3 2l-3 3l-1 6l0 3l1 6l3 3l3 1l2 0" />
<path d="M2976 7570l4 -1l2 -3l1 -6l0 -3l-1 -6l-2 -3l-4 -2l-2 0l-2 2l-1 1l-1 2l-2 6l0 3l2 6l1 2l1 1l2 1m2 0l3 -1l1 -1l1 -2l1 -6l0 -3l-1 -6" />
<path d="M2981 7551l-1 -2l-1 -1l-3 -2m21 0l-3 2l-3 3l-1 6l0 3l1 6l3 3l3 1l2 0l4 -1l2 -3l1 -6l0 -3l-1 -6l-2 -3l-4 -2l-2 0l-2 2l-1 1l-2 2l-1 6" />
<path d="M2991 7557l0 3l1 6l2 2l1 1l2 1m2 0l3 -1l1 -1l1 -2l1 -6l0 -3l-1 -6l-1 -2l-1 -1l-3 -2M5454 7540H5374m-32 0l-16 0m-33 0H5133m-33 0l-16 0m-32 0" />
<path d="M5052 7540H4891m-32 0l-16 0m-32 0H4650m-32 0l-16 0m-32 0H4409m-32 0l-16 0m-33 0H4168m-33 0l-16 0m-32 0H3926m-32 0l-16 0m-32 0H3685m-32 0l-16 0m-32 0" />
<path d="M3605 7540H3444m-32 0l-17 0m-32 0H3202m-32 0l-16 0m-32 0H2961m-32 0l-16 0m-32 0H2720m-32 0l-16 0m-32 0H2479m-33 0l-16 0m-32 0H2237m-32 0l-16 0m-32 0" />
<path d="M2157 7540H1996m-32 0l-16 0m-32 0H1755m-32 0l-16 0m-33 0H1514m-33 0l-16 0m-32 0H1272m-32 0l-16 0m-32 0H1031m-32 0l-16 0m-32 0H790m-32 0l-16 0m-33 0" />
<path d="M709 7540H549m-33 0l-16 0m-32 0H388M2838 440l0 24m1 -24l14 21m-14 -19l14 22m0 -24l0 24m-18 -24l4 0m11 0l6 0m-21 24l7 0m40 -24l-4 1l-1 2l0 4l1 2" />
<path d="M2878 449l4 1l4 0l4 -1l1 -2l0 -4l-1 -2l-4 -1l-4 0l-3 1l-1 2l0 4l1 2l3 1m4 0l2 -1l2 -2l0 -4l-2 -2l-2 -1m-4 10l-4 1l-1 1l-1 3l0 4" />
<path d="M2876 459l1 2l1 2l4 1l4 0l4 -1l1 -2l1 -2l0 -4l-1 -3l-1 -1l-4 -1m-4 0l-3 1l-1 1l-1 3l0 4l1 2l1 2l3 1m4 0l2 -1l2 -2l1 -2l0 -4" />
<path d="M2891 455l-1 -3l-2 -1l-2 -1m14 -6l1 1l-1 2l-1 -2l0 -1l1 -2l1 -1l3 -1l5 0l3 1l2 1l1 2l0 3l-1 2l-4 2l-6 2l-2 2l-2 2l-1 3l0 4m10 -24" />
<path d="M2909 440l2 1l1 1l2 2l0 3l-2 2l-3 2l-5 2m-5 8l1 -1l2 0l6 3l3 0l3 -2l1 -1m-13 0l6 4l4 0l2 -1l1 -3l0 -2m7 -18l0 7m0 -3l1 -2" />
<path d="M2923 442l2 -2l2 0l6 3l2 0l1 -1l2 -2m-15 2l2 -1l2 0l6 2m5 -3l0 3l-2 4l-4 5l-1 3l-1 3l0 6m6 -17l-5 5l-1 3l-2 3l0 6m23 -24l-3 1" />
<path d="M2948 441l-2 3l-2 6l0 3l2 6l2 4l3 1l3 0l3 -1l2 -4l1 -6l0 -3l-1 -6l-2 -3l-3 -1l-3 0l-2 1l-1 1l-1 2l-1 6l0 3l1 6l1 2l1 2l2 1" />
<path d="M2951 464m3 0l2 -1l1 -2l1 -2l1 -6l0 -3l-1 -6l-1 -2l-1 -1l-2 -1m20 0l-3 1l-3 3l-1 6l0 3l1 6l3 4l3 1l2 0l4 -1l2 -4l1 -6l0 -3l-1 -6" />
<path d="M2982 444l-2 -3l-4 -1l-2 0l-2 1l-1 1l-1 2l-2 6l0 3l2 6l1 2l1 2l2 1m2 0l3 -1l1 -2l1 -2l1 -6l0 -3l-1 -6l-1 -2l-1 -1l-3 -1m21 0l-3 1" />
<path d="M2994 441l-3 3l-1 6l0 3l1 6l3 4l3 1l2 0l4 -1l2 -4l1 -6l0 -3l-1 -6l-2 -3l-4 -1l-2 0l-2 1l-1 1l-2 2l-1 6l0 3l1 6l2 2l1 2l2 1" />
<path d="M2997 464m2 0l3 -1l1 -2l1 -2l1 -6l0 -3l-1 -6l-1 -2l-1 -1l-3 -1M388 474H468m32 0l16 0m33 0H709m33 0l16 0m32 0H951m32 0l16 0m32 0H1192" />
<path d="M1192 474m32 0l16 0m32 0H1433m32 0l16 0m33 0H1674m33 0l16 0m32 0H1916m32 0l16 0m32 0H2157m32 0l16 0m32 0H2398m32 0l16 0m33 0H2640" />
<path d="M2640 474m32 0l16 0m32 0H2881m32 0l16 0m32 0H3122m32 0l16 0m32 0H3363m32 0l17 0m32 0H3605m32 0l16 0m32 0H3846m32 0l16 0m32 0H4087" />
<path d="M4087 474m32 0l16 0m33 0H4328m33 0l16 0m32 0H4570m32 0l16 0m32 0H4811m32 0l16 0m32 0H5052m32 0l16 0m33 0H5293m33 0l16 0m32 0H5454" />
<path d="M5454 474" />
</g>
</g>
</svg>