【发布时间】:2011-10-06 01:04:25
【问题描述】:
我正在使用 0.6.3 版的 svglib 和 reportlab 2.5。 我在 Inkscape 中创建了测试 svg;放一张jpeg,嵌入base64。
当我进入代码时,jpeg 在 svglib 中生成,但它从未出现在 pdf 中。
矢量形状可以正常工作并显示,但缺少 jpeg。我在终端(svg2pdf)中使用基本命令进行测试。
有人遇到过类似的问题吗?
编辑: SVG 代码,根据要求:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="744"
height="1052"
id="svg2"
version="1.1">
<defs
id="defs4" />
<rect width="1000" height="1000"
style="fill:rgb(0,0,255);stroke-width:1;
stroke:rgb(0,0,0)"/>
<image
y="378"
x="282"
id="image2993"
xlink:href="data:image/jpeg;base64,/9j/4AAQSk... snip snip .../9k="
height="307"
width="186" />
</svg>
【问题讨论】: