Skip to content

Feature: Export to PDF & SVG #38

Description

@Pranav00076

Description:
We currently support exporting the canvas to a PNG. We should extend this to support vector formats (SVG) and PDFs for better print quality.

How to Implement:

  1. SVG Export: Use Fabric's built-in canvas.toSVG() method. Create a Blob from the SVG string (new Blob([svg], {type: 'image/svg+xml'})) and trigger a download via a hidden <a> tag.
  2. PDF Export: You can use a library like jspdf. Convert the canvas to an image (or parse the SVG) and insert it into a PDF document using jspdf's API.
  3. UI Updates: Change the export button to a dropdown menu with PNG, SVG, and PDF options.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions