I'm working on a certificate generator for our Learning Management System (LMS) that started with simple HTML templates. The templates have placeholders that get filled in on the backend. However, we've recently been asked to allow clients to customize their own certificates. I've created a proof of concept using the Konva.js library, but I'm stuck on how to save these customizable templates for reuse and how to use them in my .NET backend to generate the actual certificates. While Konva allows exporting the canvas, it outputs a serialized JSON of the nodes, which makes it tricky. How can I effectively convert this canvas data into a PDF?
2 Answers
A headless browser might be a good option for you. You could use the Konva library within a headless browser environment to render the canvas. That way, you can leverage browser capabilities to create your PDF straight from the rendered canvas.
Have you considered using CertFusion? They offer an out-of-the-box solution that can integrate with your application through its API. It might simplify the process for you! Check them out at certfusion.com.
That sounds interesting! So I would basically use the Konva library in the headless browser to render the canvas? I'll look into this approach!