{"_id":"@alexssmusica/pdf-to-printer","_rev":"2-07be956335460151b071b64409554186","name":"@alexssmusica/pdf-to-printer","dist-tags":{"latest":"5.6.2"},"versions":{"5.6.0":{"name":"@alexssmusica/pdf-to-printer","version":"5.6.0","keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","windows"],"license":"MIT","_id":"@alexssmusica/pdf-to-printer@5.6.0","maintainers":[{"name":"alexssmusica","email":"alexssmusica@gmail.com"}],"homepage":"https://github.com/Alexssmusica/pdf-to-printer#readme","bugs":{"url":"https://github.com/Alexssmusica/pdf-to-printer/issues"},"dist":{"shasum":"2903aaa671338cf4862d947397795e15cecf29b5","tarball":"https://registry.npmjs.org/@alexssmusica/pdf-to-printer/-/pdf-to-printer-5.6.0.tgz","fileCount":13,"integrity":"sha512-UYT4KU9ejs80hds1C4OCYtO3ByF/lE8xkEj5QUWcckCiPFoxRRFepRwDUf1DgdBIZxjQj71HBgH47JkrGEYC/A==","signatures":[{"sig":"MEUCIDFMPcDenC0754fPM8KOujElGY8WZKuwbzm3CQFUPn7NAiEAim+s5XbpBeoxlvP4BZrLF5IRUsPcltM227k2Ar2HBAk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12677983},"main":"dist/bundle.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"dist/index.d.ts","gitHead":"b1e1e0776634489d6ba6bc28072e2325510880f0","scripts":{"lint":"prettier --write .","test":"jest","build":"webpack --config webpack.production.config.js","prepare":"npm run lint && npm run test && npm run build"},"_npmUser":{"name":"alexssmusica","email":"alexssmusica@gmail.com"},"repository":{"url":"git+https://github.com/Alexssmusica/pdf-to-printer.git","type":"git"},"_npmVersion":"8.19.4","description":"A utility for printing PDFs and images from Node.js and Electron.","directories":{},"lint-staged":{"src/**/*.{js,ts,json,md}":["prettier --write"]},"_nodeVersion":"16.20.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","husky":"^8.0.3","ts-jest":"^29.0.5","webpack":"^5.58.2","prettier":"2.8.4","jest-mock":"^29.1.2","ts-loader":"^9.2.6","@babel/cli":"7.21.0","babel-jest":"^29.2.2","typescript":"^4.9.4","@babel/core":"7.20.12","@types/jest":"^29.2.6","@types/node":"^18.6.3","lint-staged":"^13.0.0","webpack-cli":"^5.0.0","@babel/preset-env":"7.20.2","copy-webpack-plugin":"^11.0.0","clean-webpack-plugin":"4.0.0","@babel/preset-typescript":"^7.15.0"},"_npmOperationalInternal":{"tmp":"tmp/pdf-to-printer_5.6.0_1687265542574_0.00815529587002195","host":"s3://npm-registry-packages"}},"5.6.1":{"name":"@alexssmusica/pdf-to-printer","version":"5.6.1","keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","windows"],"license":"MIT","_id":"@alexssmusica/pdf-to-printer@5.6.1","maintainers":[{"name":"alexssmusica","email":"alexssmusica@gmail.com"}],"homepage":"https://github.com/Alexssmusica/pdf-to-printer#readme","bugs":{"url":"https://github.com/Alexssmusica/pdf-to-printer/issues"},"dist":{"shasum":"c901362b076c3e45f06215b002fe582783bd786a","tarball":"https://registry.npmjs.org/@alexssmusica/pdf-to-printer/-/pdf-to-printer-5.6.1.tgz","fileCount":13,"integrity":"sha512-dv3drAO1eRjceNPb/xQ1XQxrw5GXMGWXMcSoHT1AfQQF2LJv7QwWrt8sm7HZorn/dnzKRg8OetcFALhqPBzU1w==","signatures":[{"sig":"MEYCIQDtl2zLOhnLIZ77CUz95mHzO4vaRTZXTNvlipxyXNcbzAIhAJVNVk6+3nYfT45yqjHruGftX8J7fgyNGimWdtHsb+wN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14334815},"main":"dist/bundle.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"dist/index.d.ts","gitHead":"ecd98a43fdb97f4606276b1829ec41bc472672be","scripts":{"lint":"prettier --write .","test":"jest","build":"webpack --config webpack.production.config.js","prepare":"npm run lint && npm run test && npm run build"},"_npmUser":{"name":"alexssmusica","email":"alexssmusica@gmail.com"},"repository":{"url":"git+https://github.com/Alexssmusica/pdf-to-printer.git","type":"git"},"_npmVersion":"8.19.4","description":"A utility for printing PDFs and images from Node.js and Electron.","directories":{},"lint-staged":{"src/**/*.{js,ts,json,md}":["prettier --write"]},"_nodeVersion":"16.20.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","husky":"^8.0.3","ts-jest":"^29.0.5","webpack":"^5.58.2","prettier":"2.8.4","jest-mock":"^29.1.2","ts-loader":"^9.2.6","@babel/cli":"7.21.0","babel-jest":"^29.2.2","typescript":"^4.9.4","@babel/core":"7.20.12","@types/jest":"^29.2.6","@types/node":"^18.6.3","lint-staged":"^13.0.0","webpack-cli":"^5.0.0","@babel/preset-env":"7.20.2","copy-webpack-plugin":"^11.0.0","clean-webpack-plugin":"4.0.0","@babel/preset-typescript":"^7.15.0"},"_npmOperationalInternal":{"tmp":"tmp/pdf-to-printer_5.6.1_1728053336382_0.2269765187965549","host":"s3://npm-registry-packages"}},"5.6.2":{"name":"@alexssmusica/pdf-to-printer","version":"5.6.2","description":"A utility for printing PDFs and images from Node.js and Electron.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/Alexssmusica/pdf-to-printer.git"},"main":"dist/bundle.js","types":"dist/index.d.ts","scripts":{"test":"jest","lint":"prettier --write .","build":"webpack --config webpack.production.config.js","prepare":"npm run lint && npm run test && npm run build"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"src/**/*.{js,ts,json,md}":["prettier --write"]},"devDependencies":{"@babel/cli":"7.21.0","@babel/core":"7.20.12","@babel/preset-env":"7.20.2","@babel/preset-typescript":"^7.15.0","@types/jest":"^29.2.6","@types/node":"^18.6.3","babel-jest":"^29.2.2","clean-webpack-plugin":"4.0.0","copy-webpack-plugin":"^11.0.0","husky":"^8.0.3","jest":"^29.5.0","jest-mock":"^29.1.2","lint-staged":"^13.0.0","prettier":"2.8.4","ts-jest":"^29.0.5","ts-loader":"^9.2.6","typescript":"^4.9.4","webpack":"^5.58.2","webpack-cli":"^5.0.0"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","windows"],"gitHead":"7b20143843879604c4c24edd157458f5741af309","bugs":{"url":"https://github.com/Alexssmusica/pdf-to-printer/issues"},"homepage":"https://github.com/Alexssmusica/pdf-to-printer#readme","_id":"@alexssmusica/pdf-to-printer@5.6.2","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-cXRPFlJOQ4kvjijn0r+MHEWzL8WhzPMus43zeklsBgvlBrQNVWdcCBu62vGZPG//oomYJMBY7xl5dz8fnE7Kfw==","shasum":"3208a3ecbd9b505f0bc5a3526716464ab2f50d67","tarball":"https://registry.npmjs.org/@alexssmusica/pdf-to-printer/-/pdf-to-printer-5.6.2.tgz","fileCount":13,"unpackedSize":12677983,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDAdHfzysuDHhsFQYFWgjZ3EWR00ER+9EB81Ylu/E/YwIhAP1Y+vNZMnJSybYzq50z4/g1YTU3h5icdA+JcHn83lxl"}]},"_npmUser":{"name":"alexssmusica","email":"alexssmusica@gmail.com"},"directories":{},"maintainers":[{"name":"alexssmusica","email":"alexssmusica@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-to-printer_5.6.2_1729797607948_0.33835573804844943"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-20T12:52:22.476Z","modified":"2024-10-24T19:20:08.349Z","5.6.0":"2023-06-20T12:52:22.833Z","5.6.1":"2024-10-04T14:48:56.890Z","5.6.2":"2024-10-24T19:20:08.190Z"},"bugs":{"url":"https://github.com/Alexssmusica/pdf-to-printer/issues"},"license":"MIT","homepage":"https://github.com/Alexssmusica/pdf-to-printer#readme","keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","windows"],"repository":{"type":"git","url":"git+https://github.com/Alexssmusica/pdf-to-printer.git"},"description":"A utility for printing PDFs and images from Node.js and Electron.","maintainers":[{"name":"alexssmusica","email":"alexssmusica@gmail.com"}],"readme":"# Node.js printing\n\n[![Build Status](https://api.cirrus-ci.com/github/artiebits/pdf-to-printer.svg)](https://cirrus-ci.com/github/artiebits/pdf-to-printer)\n[![codecov](https://codecov.io/gh/artiebits/pdf-to-printer/branch/master/graph/badge.svg)](https://codecov.io/gh/artiebits/pdf-to-printer)\n![npm](https://img.shields.io/npm/dw/pdf-to-printer)\n\nA utility for printing PDFs and images from Node.js and Electron.\n\n- Available only on Windows. The Unix-like operating systems utility can be found on https://github.com/artiebits/unix-print.\n- It supports label printers like Rollo and Zebra.\n\n## Support This Project\n\nIf you rely on this package, please consider supporting it. Maintaining an open source project takes time and your support would be greatly appreciated.\n\n<a href=\"https://www.buymeacoffee.com/artiebits\" target=\"_blank\"><img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 50px !important;width: 207px !important;\" ></a>\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n- [Installation](#installation)\n- [Basic Usage](#basic-usage)\n- [API](#api)\n  - [`.print(pdf[, options]) => Promise<void>`](#printpdf-options--promisevoid)\n  - [`.getPrinters() => Promise<Printer[]>`](#getprinters--promiseprinter)\n  - [`.getDefaultPrinter() => Promise<Printer | null>`](#getdefaultprinter--promiseprinter--null)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nYou can install the package using `npm`:\n\n```bash\nnpm install --save pdf-to-printer\n```\n\nOr `yarn`\n\n```bash\nyarn add pdf-to-printer\n```\n\n## Basic Usage\n\nTo print a file to the default printer:\n\n```javascript\nimport { print } from \"pdf-to-printer\";\n\nprint(\"assets/sample.pdf\").then(console.log);\n```\n\n## API\n\n### `.print(pdf[, options]) => Promise<void>`\n\nA function that prints your file.\n\n**Arguments**\n\n1. `pdf` (`string`, required): A path to the file you want to print. An error will be thrown if the PDF is not specified or not found.\n2. `options` (`Object`, optional):\n   - `printer` ( `string`, optional): Sends the file to the specified printer.\n   - `pages` (`string`, optional): Specifies which pages to print in the PDF document.\n   - `subset` (`string`, optional): Prints odd pages only when the value is `odd`, and even pages only when it is `even`.\n   - `orientation` (`string`, optional): Provides 90-degree rotation of contents (NOT the rotation of paper which must be pre-set by the choice of printer defaults).\n   - `scale` (`string`, optional): Supported names are `noscale`, `shrink`, and `fit`.\n   - `monochrome` (`boolean`, optional): Prints the document in black and white. The default value is `false`.\n   - `side` (`string`, optional): Supported names are `duplex`, `duplexshort`, `duplexlong`, and `simplex`.\n   - `bin` (`string`, optional): Select tray to print to. Number or name.\n   - `paperSize` (`string`, optional): Specifies the paper size. `A2`, `A3`, `A4`, `A5`, `A6`, `letter`, `legal`, `tabloid`, `statement`, or a name selectable from your printer settings.\n   - `silent` (`boolean`, optional): Silences error messages.\n   - `printDialog` (`boolean`, optional): Displays the print dialog for all the files indicated on this command line.\n   - `copies`(`number`, optional): Specifies how many copies will be printed.\n\n**Returns**\n\n`Promise<void>`: A Promise that resolves with `undefined`.\n\n**Examples**\n\nTo print a file to the default printer, use the following code:\n\n```javascript\nimport { print } from \"pdf-to-printer\";\n\nprint(\"assets/sample.pdf\").then(console.log);\n```\n\nTo print to a specific printer:\n\n```javascript\nimport { print } from \"pdf-to-printer\";\n\nconst options = {\n  printer: \"Zebra\",\n};\n\nprint(\"assets/pdf-sample.pdf\", options).then(console.log);\n```\n\nHere is an example with a few print settings. It will print pages 1, 3, and 5, and scale them so that they fit into the printable area of the paper.\n\n```javascript\nimport { print } from \"pdf-to-printer\";\n\nconst options = {\n  printer: \"Zebra\",\n  pages: \"1-3,5\",\n  scale: \"fit\",\n};\n\nprint(\"assets/pdf-sample.pdf\", options).then(console.log);\n```\n\n### `.getPrinters() => Promise<Printer[]>`\n\nA function to get a list of available printers.\n\n**Returns**\n\n`Promise<Printer[]>`: a Promise that resolves with a list of available printers.\n\n**Examples**\n\n```javascript\nimport { getPrinters } from \"pdf-to-printer\";\n\ngetPrinters().then(console.log);\n```\n\n### `.getDefaultPrinter() => Promise<Printer | null>`\n\nA function to get the default printer information.\n\n**Returns**\n\n`Promise<Printer | null>`: a Promise that resolves with the default printer information, or `null` if there is no default printer.\n\n**Examples**\n\n```javascript\nimport { getDefaultPrinter } from \"pdf-to-printer\";\n\ngetDefaultPrinter().then(console.log);\n```\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}