Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
我将渲染 SVG 与 HTML 分开,并将其作为图像文件包含在 HTML 代码中。
wkhtmltopdf 是一个免费且开源的 html 渲染器,所以也许它适合您。更好的是,它甚至可以默认渲染 SVG。
I'd render the SVG separately from the HTML and include it as an image file from within the HTML code.
wkhtmltopdf is a free and open source html renderer, so maybe it'll work for you. Better yet, it might even render SVG by default.
尝试过 PD4ML 吗?
Tried PD4ML ?
我最终使用了 EVOPDF,到目前为止,它在 SVG 和复杂的 HTML 上运行得很好。
I ended up using EVOPDF, it's been working great so far with SVG's and complex HTML.
我正在寻找同一问题的解决方案,并遇到了 EOpdf!我尝试了演示,它似乎运行良好,尽管它似乎光栅化 SVG 和画布图形?
I was looking for a solution to the same problem and came across EOpdf!. I tried the demo and it seems to work well, although it appears to rasterize SVG and canvas graphics?
wkhtmltopdf 可以使用 SVG 图像从 HTML 生成 PDF。然而,SVG 的格式和嵌入 HTML 的方式有一些要求。请参阅我对问题的回复以获取详细信息。
wkhtmltopdf Can generate PDFs from HTML with SVG images. However there are some requirements to the way SVG should be formatted and embedded in HTML. Please see my response to question to get the details.
wkhtmltopdf 也可以与 SVG 配合使用并且工作完美,但您可能必须以不同的进程运行它,因为它是一个命令行工具。
wkhtmltopdf works with SVG as well and works perfect, but you might have to run it as different process as it is a command line tool.