{"id":20873974,"url":"https://github.com/dbtek/express-svg-convert","last_synced_at":"2026-05-03T18:35:51.512Z","repository":{"id":71682861,"uuid":"77460368","full_name":"dbtek/express-svg-convert","owner":"dbtek","description":"Straightforward svg convert api built on express.","archived":false,"fork":false,"pushed_at":"2022-12-07T17:43:02.000Z","size":899,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-12T21:35:30.134Z","etag":null,"topics":["api","converter","express","js","node","svg"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbtek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-27T14:14:29.000Z","updated_at":"2021-12-12T08:11:54.000Z","dependencies_parsed_at":"2023-05-29T10:45:29.207Z","dependency_job_id":null,"html_url":"https://github.com/dbtek/express-svg-convert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dbtek/express-svg-convert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtek%2Fexpress-svg-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtek%2Fexpress-svg-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtek%2Fexpress-svg-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtek%2Fexpress-svg-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbtek","download_url":"https://codeload.github.com/dbtek/express-svg-convert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbtek%2Fexpress-svg-convert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32580155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","converter","express","js","node","svg"],"created_at":"2024-11-18T06:28:37.983Z","updated_at":"2026-05-03T18:35:51.507Z","avatar_url":"https://github.com/dbtek.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"express-svg-convert\n===\n\nA straightforward express server that converts multipart/form-data svg files to pdf or png files.\nUses [librsvg](https://npmjs.com/package/librsvg), [express](https://npmjs.com/package/express), [express-fileupload](https://npmjs.com/package/express-fileupload).\n\n## Run with Docker\n```bash\n$ docker run -p 8001:8001 -e SVG_CONVERT_API_KEY=\"secret-api-key\" --name svgconverter -it dbtek/express-svg-convert\n```\n\n## Development\n\n### Prerequisites\nOn macOs:\n```bash\n$ brew install cairo librsvg\n```\n\n### Install\n- Download or clone repo.\n- cd into downloaded \u0026 extracted folder\n```bash\n$ npm install\n```\n\n### Run\n```bash\n$ node .\n# or\n$ npm start\n```\n\n#### Exposed end points\n\n- `/sample` : Converts bundled sample.svg\n- `/api/convert`: Convert api.\n\n### Params\n\nSupported params are: format, scale.\n\u003e `http://localhost:8081/api/convert?format=[png|pdf]\u0026scale=[number]`\n\n#### Custom Port\n\n```bash\n$ export SVG_CONVERT_PORT=8001\n```\n\n#### Api Key\n```bash\n$ export SVG_CONVERT_API_KEY=secret-api-key\n```\n\n### Usage\n\nSample usage in browser:\n```js\nvar svg = `\n  \u003csvg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" width=\"500\" height=\"500\" id=\"svg2\" version=\"1.1\" inkscape:version=\"0.48.2 r9819\" sodipodi:docname=\"ANCHOR_030deg.svg\"\u003e\n  \u003cdefs id=\"defs4\"/\u003e\n  \u003cmetadata id=\"metadata7\"\u003e\n    \u003crdf:RDF\u003e\n      \u003ccc:Work rdf:about=\"\"\u003e\n        \u003cdc:format\u003eimage/svg+xml\u003c/dc:format\u003e\n        \u003cdc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/\u003e\n        \u003cdc:title/\u003e\n      \u003c/cc:Work\u003e\n    \u003c/rdf:RDF\u003e\n  \u003c/metadata\u003e\n  \u003cg inkscape:groupmode=\"layer\" id=\"layer2\" inkscape:label=\"svg\" style=\"display:inline\"\u003e\n    \u003cg id=\"g4148\" transform=\"matrix(0.8660254,0.5,-0.5,0.8660254,198.83494,-98.834071)\"\u003e\n      \u003cpath inkscape:connector-curvature=\"0\" id=\"path4146\" d=\"m 216.69031,428.60519 37.56364,37.11654 37.62715,-37.11654 z\" style=\"fill:#000000;fill-opacity:1;stroke:none\"/\u003e\n      \u003cg id=\"g3997-5\" style=\"fill:#000000;fill-opacity:1;display:inline\" transform=\"matrix(-0.27230081,-0.96221217,0.96221217,-0.27230081,-31.837141,377.40848)\"\u003e\n        \u003cg style=\"fill:#000000;fill-opacity:1\" transform=\"translate(-7.1896451,-7.7450857)\" id=\"g4038\"\u003e\n          \u003cpath sodipodi:nodetypes=\"cccc\" inkscape:transform-center-y=\"7.4710586\" inkscape:transform-center-x=\"-30.393694\" inkscape:connector-curvature=\"0\" id=\"path3873-2-11-2\" d=\"M 0.34683933,196.22343 86.019047,143.2924 -4.5583417,99.279254 z\" style=\"fill:#000000;fill-opacity:1;stroke:none;display:inline\"/\u003e\n        \u003c/g\u003e\n      \u003c/g\u003e\n      \u003cpath sodipodi:nodetypes=\"cc\" inkscape:connector-curvature=\"0\" id=\"path3932\" d=\"m 109.50577,362.10026 c 14.7661,48.80394 69.61713,70.0632 129.77994,70.0632\" style=\"fill:none;stroke:#000000;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none\"/\u003e\n      \u003cpath inkscape:connector-curvature=\"0\" id=\"path3805\" d=\"m 254.28571,133.61514 0,287.13077\" style=\"fill:none;stroke:#000000;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none\"/\u003e\n      \u003cpath transform=\"matrix(0.55555556,0,0,0.51282051,190.39682,74.093383)\" d=\"m 151,87 c 0,21.53911 -16.11775,39 -36,39 -19.882251,0 -36,-17.46089 -36,-39 0,-21.539105 16.117749,-39 36,-39 19.88225,0 36,17.460895 36,39 z\" sodipodi:ry=\"39\" sodipodi:rx=\"36\" sodipodi:cy=\"87\" sodipodi:cx=\"115\" id=\"path3807\" style=\"fill:#000000;fill-opacity:1;stroke:none\" sodipodi:type=\"arc\"/\u003e\n      \u003cpath transform=\"matrix(1.042638,0,0,0.96243498,134.38234,-2.5580401)\" d=\"m 151,87 c 0,21.53911 -16.11775,39 -36,39 -19.882251,0 -36,-17.46089 -36,-39 0,-21.539105 16.117749,-39 36,-39 19.88225,0 36,17.460895 36,39 z\" sodipodi:ry=\"39\" sodipodi:rx=\"36\" sodipodi:cy=\"87\" sodipodi:cx=\"115\" id=\"path3807-4\" style=\"fill:none;stroke:#000000;stroke-width:19.96537781;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none\" sodipodi:type=\"arc\"/\u003e\n      \u003cpath inkscape:connector-curvature=\"0\" id=\"path3805-8\" d=\"m 333.53068,185.52121 -158.48994,0\" style=\"fill:none;stroke:#000000;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none\"/\u003e\n      \u003cg id=\"g3997-5-1\" style=\"fill:#000000;fill-opacity:1;display:inline\" transform=\"matrix(0.27230081,-0.96221217,-0.96221217,-0.27230081,540.40856,377.40848)\"\u003e\n        \u003cg style=\"fill:#000000;fill-opacity:1\" transform=\"translate(-7.1896451,-7.7450857)\" id=\"g4038-4\"\u003e\n          \u003cpath sodipodi:nodetypes=\"cccc\" inkscape:transform-center-y=\"7.4710586\" inkscape:transform-center-x=\"-30.393694\" inkscape:connector-curvature=\"0\" id=\"path3873-2-11-2-2\" d=\"M 0.34683933,196.22343 86.019047,143.2924 -4.5583417,99.279254 z\" style=\"fill:#000000;fill-opacity:1;stroke:none;display:inline\"/\u003e\n        \u003c/g\u003e\n      \u003c/g\u003e\n      \u003cpath sodipodi:nodetypes=\"cc\" inkscape:connector-curvature=\"0\" id=\"path3932-3\" d=\"m 399.06565,362.10026 c -14.7661,48.80394 -69.61713,70.0632 -129.77994,70.0632\" style=\"fill:none;stroke:#000000;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none\"/\u003e\n    \u003c/g\u003e\n  \u003c/g\u003e\n\u003c/svg\u003e`\n\nvar formData = new FormData()\nformData.append('svg', new Blob([svg]))\n\nfetch(':secret-api-key@http://localhost:8081/api/convert', {\n  method: 'POST',\n  body: formData\n})\n.then(data =\u003e {\n  console.log(data)\n})\n.catch(err =\u003e console.log(err))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbtek%2Fexpress-svg-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbtek%2Fexpress-svg-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbtek%2Fexpress-svg-convert/lists"}