db-schema-visualizer icon indicating copy to clipboard operation
db-schema-visualizer copied to clipboard

Request for SVG Export Feature

Open tlfqjwltn opened this issue 9 months ago • 1 comments

First of all, I want to say that this extension is absolutely fantastic! I truly appreciate the effort put into making it.

I have one feature request: Would it be possible to add an option to download the generated ERD as an SVG file? This would be really helpful for maintaining high-quality diagrams.

Thank you for considering this feature!

tlfqjwltn avatar Mar 07 '25 01:03 tlfqjwltn

You can install the required packages using:

npm install -D prisma-erd-generator @mermaid-js/mermaid-cli puppeteer Then, add the following block to your schema.prisma file. Make sure the output directory exists:

generator erd { provider = "prisma-erd-generator" output = "./generated/erd/ERD.pdf" } After that, run:

npx prisma generate

To change the output format (e.g., pdf, svg, png, etc.), simply update the file extension in the output field.

Ronnie038 avatar May 25 '25 01:05 Ronnie038