go-pdf2svg is a Go package for convert PDF to SVG and use for Web and Easy to use it. SVG is best for high quality for web.
This package required inkscape
# apt install inkscape # debian, Ubuntu
# dnf install inkscape # Fedora, Redhat
package main
import (
"log"
c "github.com/fajrulaulia/go-pdf2svg"
)
func main() {
err := c.Exporter("DirOfFilePDF.pdf", "newSvgFile")
if err != nil {
log.Fatal(err)
return
}
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.