pdf2svg
- id: 1745411349
- Date: April 23, 2025, 4:30 p.m.
- Author: Donald F. Elger
pdf2svg is a command-line tool for converting vector-based PDFs (like those from LaTeX) into scalable, web-ready SVGs.
use this because it is one of the best tools
install with homebrew
pdf to svg
Create PDF (example for LaTeX) pdflatex mydiagram.tex
Convert PDF to SVG pdf2svg mydiagram.pdf mydiagram.svg
(Optional) Optimize SVG svgo mydiagram.svg
Use standalone package to created a cropped :
\documentclass{standalone}
\usepackage{tikz} % Or any other package you're using
\begin{document}
\begin{tikzpicture}
\draw (0,0) rectangle (3,2);
\node at (1.5,1) {My Diagram};
\end{tikzpicture}
\end{document}