Future Idea: PDFs #41
Replies: 9 comments 7 replies
-
|
On the contrary, I truly appreciate ideas and discussions about this tool! I'm working on a plugin system and I think the PDF download would be great use case |
Beta Was this translation helpful? Give feedback.
-
|
I was about to open a discussion for the same thing, can't wait to check after it is implemented |
Beta Was this translation helpful? Give feedback.
-
|
如果支持导出 pdf,希望能支持良好的分页功能 |
Beta Was this translation helpful? Give feedback.
-
|
***@***.***的自动回复邮件。已收到您的邮件!
|
Beta Was this translation helpful? Give feedback.
-
|
Quick implement for anyone that needs, https://ekoopmans.github.io/html2pdf.js/#worker-api
html2PDF([
document.querySelector('body')
], {
margin: {
top: 30,
right: 10,
bottom: 30,
left: 10,
},
html2canvas: {
scrollY: 0,
scrollX: 0,
},
success(pdf) {
pdf.save()
}
})
});``` |
Beta Was this translation helpful? Give feedback.
-
|
Hi everyone, I’m currently using jsPDF + Paged.js + Snapdom for PDF generation. The workflow is: first, I use Paged.js to paginate the content, then Snapdom to capture each page as an image, and finally feed those images into jsPDF. On some low-end devices, like Redmi 7A, generating one PDF page takes around 5 seconds — so for a 10-page document, it could take about 50 seconds. On modern devices, though, the process is much faster. Overall, the results are quite good, and the implementation is relatively simple. I’ve summarized the whole approach in this blog post: https://zhelin.me/post/8f412a886b1dffcb/#%E4%BA%94%E5%A6%82%E4%BD%95%E7%BB%93%E5%90%88-jspdf-%E7%94%9F%E6%88%90-pdf Hope this helps anyone looking for a straightforward PDF generation solution! |
Beta Was this translation helpful? Give feedback.
-
|
***@***.***的自动回复邮件。已收到您的邮件!
|
Beta Was this translation helpful? Give feedback.
-
|
@ZhelinCheng I believe you ucan use the new plugin system to create a custom exporter like |
Beta Was this translation helpful? Give feedback.
-
|
***@***.***的自动回复邮件。已收到您的邮件!
|
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Sorry let me know if I'm spamming but I was thinking it wouldn't be a big leap to allow download as PDF from SVG.
Maybe if you wanted to add Discussions to repo?
https://pdfkit.org/examples/browserify/browser.html
https://artskydj.github.io/jsPDF/docs/module-svg.html
https://github.com/yWorks/svg2pdf.js?tab=readme-ov-file
Would be happy to work on this feature if it seemed a good idea.
Beta Was this translation helpful? Give feedback.
All reactions