{"_id":"@baravak/svgexport","name":"@baravak/svgexport","dist-tags":{"latest":"0.4.1"},"versions":{"0.4.1":{"name":"@baravak/svgexport","version":"0.4.1","description":"Node.js module and command-line tool for exporting SVG to PNG and JPEG.","author":{"name":"Ali Shakiba"},"contributors":[{"name":"Michael Heerklotz"}],"keywords":["svg","export","rasterize","converter","png","jpeg","jpg","cli","command line","inkscape","illustrator","coreldraw"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/baravak/svgexport.git"},"dependencies":{"async":"^3.2.4","puppeteer":"^15.4.0"},"main":"index.js","bin":{"svgexport":"bin/index.js"},"bugs":{"url":"https://github.com/shakiba/svgexport/issues"},"homepage":"https://github.com/shakiba/svgexport#readme","directories":{"test":"test"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"gitHead":"999e26ca05b5739b0f3cf508752390678f29f9a1","_id":"@baravak/svgexport@0.4.1","_nodeVersion":"18.6.0","_npmVersion":"8.13.2","dist":{"integrity":"sha512-Wi2lGKtgCAAzXfLjKj5Rf2nNBGVw56g5m+nwUJK0UujqA9HLJuuZhy/CQfUk4ybS5QF97svPeYnj98Tf3Vr/6g==","shasum":"9945c43570d79aaf4892dbd35304f71014c42e58","tarball":"https://registry.npmjs.org/@baravak/svgexport/-/svgexport-0.4.1.tgz","fileCount":39,"unpackedSize":142476,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4OKPFX2Lqg5fMPatqcqEWZLqzPc84L0+fA600EdBwXgIhAOUbocM0s73vyYtxHZxS3c19g8co8MnHMTESjIbvalno"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2yiYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoq+w//VqPb6hVNFdyAtmQKsfLCRi062PU6u5z540le8U2BCmXGVrR9\r\n8H09PE/hjha11HgNfz317K0m6bOzRAZup/30Ag8CRk/qO5Cl9RY3q7vMPCbw\r\nuu+JufG0SM+QMcBMgej1eKbSdnaAuE4K33Imkll2gDTgt53+PwC7tqKRaS65\r\nDEeNQzbE3iLcpUaGpKOKEl3dpprkIyg825zZWxEuIVq2oQRcXhaHZBJHRN85\r\nj9gPPz4Fx9UsjhXAahMnRqmQ6mkVBp9SyJ6iGoyQy3Qik96rowBtWvc27UnJ\r\n4Y5x+HQXVBBJ9J3JVeHPrH2sATN3qZ72UM7jCKdaKMJFuw5kvKyCKDyf61Ur\r\n9++1vUXjDQ3J6Sfw0iuWVqZ2Xo47nzVxr+ZVyLH9PeBGDGTivDRQkNUvxMT6\r\n2U2zmx+wJ53P0lFl2mG3cVf1NM+7S/2FVsXuoaSjxPtHlkbRi628hm1eMwl/\r\nRNPePdAhyOydxt2KgFtxacnyX45osadIdDcCb2JevDCVW0lPhfRzIWXDv3Jl\r\n4uurr966HnB6n0pZrzVNVIxU2rwWmVp+xG9kp+BBUOLiwprxgxNpNm9LPqFX\r\nGt9ii3CNDnrLn4dUMJXRoSWlzuCugx0+yL6jw/ar3pCkNTZieSrrCgfWRUwv\r\nVbainRe7k8OPtTNIbFQINZzGSOUmZBIxBYo=\r\n=u74q\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"baravak","email":"itb.baravak@gmail.com"},"maintainers":[{"name":"baravak","email":"itb.baravak@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/svgexport_0.4.1_1658529944127_0.9613231930586035"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-22T22:45:44.057Z","0.4.1":"2022-07-22T22:45:44.375Z","modified":"2022-07-22T22:45:44.496Z"},"maintainers":[{"name":"baravak","email":"itb.baravak@gmail.com"}],"description":"Node.js module and command-line tool for exporting SVG to PNG and JPEG.","homepage":"https://github.com/shakiba/svgexport#readme","keywords":["svg","export","rasterize","converter","png","jpeg","jpg","cli","command line","inkscape","illustrator","coreldraw"],"repository":{"type":"git","url":"git+https://github.com/baravak/svgexport.git"},"contributors":[{"name":"Michael Heerklotz"}],"author":{"name":"Ali Shakiba"},"bugs":{"url":"https://github.com/shakiba/svgexport/issues"},"license":"MIT","readme":"# svgexport\n\nsvgexport is a Node.js module and command-line tool for exporting SVG files to PNG and JPEG, it uses Puppeteer for rendering SVG files.\n\n### Command Line\n\n#### Installation\n```\nnpm install svgexport -g\n```\n\n#### Installation Issues\nYou might encounter an error while installing because of a puppeteer issue documented here\n[puppeteer/puppeteer#367](https://github.com/puppeteer/puppeteer/issues/367)\n\nTo circumvent this, you will need the following command\n```\nsudo npm install -g svgexport --unsafe-perm=true\n```\n\n#### Usage\n```usage\nsvgexport <input file> <output file> <options>\nsvgexport <datafile>\n\n<options>        [<format>] [<quality>] [<input viewbox>] [<output size>] [<resize mode>] [<styles>]\n\n<format>         png|jpeg|jpg\n                 If not specified, it will be inferred from output file extension or defaults to \"png\".\n\n<quality>        1%-100%\n\n<input viewbox>  <left>:<top>:<width>:<height>|<width>:<height>\n                 If input viewbox is not specified it will be inferred from input file.\n\n<output size>    <scale>x|<width>:<height>|<width>:|:<height>\n                 If output size is specified as width:height, <viewbox mode> is used.\n\n<viewbox mode>   crop|pad\n                 Crop (slice) or pad (extend) input to match output aspect ratio, default mode is \"crop\".\n\n<datafile>       Path of a JSON file with following content:\n                 [ {\n                   \"input\" : [\"<input file>\", \"<option>\", \"<option>\", ...],\n                   \"output\": [ [\"<output file>\", \"<option>\", \"<option>\", ...] ]\n                 }, ...]\n                 Input file options are merged with and overridden by output file options.\n                 Instead of a JSON file, a Node module which exports same content can be provided.\n```\n\n#### Examples\n\nScale 1.5x proportionally:\n```\nsvgexport input.svg output.png 1.5x\n```\n\nScale proportionally to set output width to 32px:\n```\nsvgexport input.svg output.png 32:\n```\n\nScale proportionally and pad output to set output width:height to 32px:54px:\n```\nsvgexport input.svg output.png pad 32:54\n```\n\nExport `-1:-1:24:24` (`left:top:width:height`) of input.svg to output.png:\n```\nsvgexport input.svg output.png -1:-1:24:24 1x\n```\n\nSet output JPEG quality:\n```\nsvgexport input.svg output.jpg 80%\n```\n\nUse a CSS to style input SVG:\n```\nsvgexport input.svg output.jpg \"svg{background:silver;}\"\n```\n\nBy default, Puppeteer has a page load timeout of 30 seconds. This might not be\nenough for large SVG files. If you want to change the page timeout, set the\n`SVGEXPORT_TIMEOUT` environment variable to the desired number of seconds.\n```bash\n// One minute timeout\nSVGEXPORT_TIMEOUT=60 svgexport input.svg output.png\n```\n\n### Node.js Module\n\n#### Installation\n```\nnpm install svgexport --save\n```\n\n#### Usage\n\n```javascript\nvar svgexport = require('svgexport');\n\nsvgexport.render(datafile, callback);\n```\n`datafile` can be an object, an array of objects or a JSON file path, see command line usage for its format.\n\n### Contributors\n\nsvgexport was migrated from PhantomJS to Puppeteer by [Michael Heerklotz](https://github.com/MichaelHeerklotz).\n\n### License\n\nCopyright (c) 2016 Ali Shakiba\nAvailable under the MIT license\n\n*Keywords: svg, export, rasterize, converter, png, jpeg, jpg, cli, command-line, inkscape, illustrator, coreldraw*\n","readmeFilename":"README.md"}