无需生成图像即

发布于 2025-01-26 17:46:28 字数 226 浏览 1 评论 0原文

我有遵循的情况。我正在为我的画布使用Fabric.js。我的目标是将画布转换为具有透明背景和向量信息的PDF。向量信息对于打印过程很重要。

我尝试生成画布的JPG/JPEG图片并将其转换为PDF.JS库的PDF,但事实是,JPG/JPEG无法显示透明背景。如果我将画布转换为png文件,则将删除矢量信息。

我不知道如何达到目标。还有其他人知道如何达到目标吗?是否有可能将Fabric.js帆布直接转换为PDF?

i have follow situation. I'm using fabric.js for my canvas. My target is to convert the canvas to a PDF with a transparent background and the vector informations. The vector informations are important for the printing process.

I've tried to generate a jpg/jpeg picture of the canvas and convert it than to a pdf with pdf.js library but the thing is, that jpg/jpeg can't display transparent background. If I convert the canvas to a PNG-File, the vector informations get deleted.

I have no idea how i can reach my target. Have anyone else an idea how i can reach my target? Is there a possibility to convert the fabric.js canvas directly to a pdf ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文