{"_id":"unix-print","_rev":"13-d596bcc1b033e981327fbcb951026f77","time":{"0.1.0-beta-1":"2021-09-17T07:43:04.856Z","created":"2021-09-18T12:44:42.106Z","1.0.0-beta-1":"2021-09-18T12:44:42.256Z","modified":"2023-11-24T07:46:06.712Z","1.0.0":"2021-10-14T19:12:38.166Z","1.0.1":"2021-11-11T08:44:15.772Z","1.1.0":"2021-11-19T08:06:42.369Z","1.2.0":"2022-08-06T05:48:54.141Z","1.3.0-beta.1":"2023-06-13T13:56:42.087Z","1.3.0":"2023-08-22T20:03:14.004Z","1.3.1":"2023-11-07T10:55:17.207Z","1.3.2":"2023-11-24T07:46:06.496Z"},"name":"unix-print","dist-tags":{"beta":"1.3.0-beta.1","latest":"1.3.2"},"versions":{"1.0.0-beta-1":{"name":"unix-print","version":"1.0.0-beta-1","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"esbuild ./src --bundle --platform=node --outfile=build/index.js","prettier-check":"prettier -c ./src","prepare":"yarn prettier-check && npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^7.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"gitHead":"de601c7a126ea8f19c740ee90402cd4bcee4a58c","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_id":"unix-print@1.0.0-beta-1","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-XCC8rMFCehCfoCJWv6uo/nh+NaSB4ZsYI7rXU6Rc4jC5iNAbSFIY8Lv11jVZthU1qJ3hboY2aeNExMS4FYqQgw==","shasum":"017d3cc1b287772806529f4f408cc8521434c164","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.0.0-beta-1.tgz","fileCount":4,"unpackedSize":10224,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2PgOmjMdklrnq6ajCoK15xzYHQxBm/BGA4stzFEOCfgIgHl7VOUVmfqkH0ZIzZQre2v/lI/t+gjpdDOz/2FrMqxc="}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.0.0-beta-1_1631969082106_0.040624964796917906"},"_hasShrinkwrap":false},"1.0.0":{"name":"unix-print","version":"1.0.0","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"esbuild ./src --bundle --platform=node --outfile=build/index.js","prettier-check":"prettier -c ./src","prepare":"yarn prettier-check && npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^7.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"gitHead":"10e69a8e5f307108b6980145b1b6e2a5bbbd00ca","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_id":"unix-print@1.0.0","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-icpX63LGdchXSkwHQj4FD1YJuH/RnMYtp0myXiYkc6Enxw6YcbAFB26z/ZVDQsO3pRv7Klrjww/dcn/rys82oA==","shasum":"c4745d8023fe70d60d0d688d67b4dd5580204a51","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.0.0.tgz","fileCount":4,"unpackedSize":10247,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUZxGgqjNhnV5U/8HGmCdqq0tQJ5FSCHxGrshSmzd92AIhAIlCXJGtm7vsIen6NCpnPLRxWahPwBXJW5R6OVVsSlUv"}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.0.0_1634238758034_0.11997400336112363"},"_hasShrinkwrap":false},"1.0.1":{"name":"unix-print","version":"1.0.1","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"npm run build:clean && npm run build:esbuild && npm run build:declarations","build:clean":"rimraf build","build:esbuild":"esbuild ./src --bundle --platform=node --outfile=build/index.js","build:declarations":"tsc -p tsconfig.dist.json --emitDeclarationOnly --outFile build/index.d.ts","prettier-check":"prettier -c ./src","prepare":"yarn prettier-check && npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^7.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"gitHead":"6307a904b96bdc8f3f15a8a25bc7b51e75bd2036","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_id":"unix-print@1.0.1","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-lS8vF+3IKKNthSY//h74rRi4mJtNs3m2ujKzQcjk34gPSZvr1/HLipngpzePsISpasVuq2ou2OAyloAZUBoNHQ==","shasum":"07f7d0c6f86f9ba8ae255bfa517d7e0b1ff77024","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.0.1.tgz","fileCount":5,"unpackedSize":11496,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC2pqbmPNKj5aT39i1QjEZVV4xOa98xhPrkEL/cp98t0AiEAlkzO3T0ZA9oNEZkQLWJp8CbEvODa9Qdp3/eEydKtr8I="}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.0.1_1636620255612_0.031771123171586035"},"_hasShrinkwrap":false},"1.1.0":{"name":"unix-print","version":"1.1.0","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"npm run build:clean && npm run build:esbuild && npm run build:declarations","build:clean":"rimraf build","build:esbuild":"esbuild ./src --bundle --platform=node --outfile=build/index.js","build:declarations":"tsc -p tsconfig.dist.json --emitDeclarationOnly --outDir build","prettier-check":"prettier -c ./src","prepare":"yarn prettier-check && npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^7.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"gitHead":"d1a652a345afa66078e97548378456b1e1d04d39","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_id":"unix-print@1.1.0","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-PwboFrO0bY/rhR7TQVImDdi8QF7svv1LCAWXX2qOWn7R8FNQTA9VfSGFGXnomAoFXihXb/PbnUV32z+9mIBm1A==","shasum":"d609e0a3420e5866a3ff2f717cad19c13fe10273","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.1.0.tgz","fileCount":12,"unpackedSize":11694,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl1sSCRA9TVsSAnZWagAASpkQAJGLWuFIG3QlL7A94HBA\nwdjoffGEITZ3WTZ9s/xMcOYFv4VgJth/WtBAXCT1EgAOt35vd9WA53tY3lGg\n4K1/GLmwRif3/m2vefYIb1tXuUyTVISmDRMHw08YlBp2LmNdSWiC1iHo/9QA\nw3rzo4cQP91RI8L6v7c3LDmVIq10FdwJFz0XSN4tsMsOjcNqoqBAm69cqnHo\nFVG7IMayIuaTSu5riRw2EeSoEB2KQt/F1ts9WlSHSGnCDPr3VDzoi76hZiEI\na+4M1YQ0GnsY41a/2sB3tQ23VwUCEcPD9ojMgJJ7ktebUNxRb98QbL6zaT9v\nJ2ZcbIs5Fn4g42plm69Nt/9Evw0/UpcsRvUgLlM47fp/8xVce6JGQVew/9hj\n8ma0EAQ1FsejgiEEWKPeD3ohqDvM/6zCLKRXNlBh2ZnAI2OapOBWROaDQbZi\nSmhZZeON7KxZ+PuATjHt0Y0PKMPljFaMJFfGrkZTqkV21wkvDlZmjoXRUIUM\n7UBWArjnC7AxDWF47JPxYrhFdyDXb17cNLr0gKu7x5lZVVFRu6u095h2jrLF\nsVDTcz77ioKfwu6uYnbW5nU5sssOXHczFjhFrQBNikhNbtfxebOYA3PMRiXs\nxFgRv+w2a0scA6M7TmrShZFEYeyuLG4P/I5Tee1nNYmMxVHXgNsJ5583UZPM\nkalL\r\n=uICD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbjynCvkXnyNIDAML2EVHBO/nBpaoWAWDHXSdYZNbIoQIhAOZXTNUWTn1f5RYysxPWoqkQPcNt208RKo3vA/si9iLo"}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.1.0_1637309202233_0.10979270534854191"},"_hasShrinkwrap":false},"1.2.0":{"name":"unix-print","version":"1.2.0","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"npm run build:clean && npm run build:esbuild && npm run build:declarations","build:clean":"rimraf build","build:esbuild":"esbuild ./src --bundle --platform=node --outfile=build/index.js","build:declarations":"tsc -p tsconfig.dist.json --emitDeclarationOnly --outDir build","prettier-check":"prettier -c ./src","prepare":"yarn prettier-check && npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^7.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"gitHead":"f12f24770440bb1b0e8a890dbdde100f2df4e3db","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_id":"unix-print@1.2.0","_nodeVersion":"18.6.0","_npmVersion":"8.13.2","dist":{"integrity":"sha512-2bdXpjkaTNR+tzxKa59ZzwYz30DoGu+/fSkuPEzBn+uADgOKWy2cL7p0hZX6BTk9IOWDG6yMlGlqbpyFyax4aA==","shasum":"21ffd367bc0c14bf0baef0b018589535016cf3c7","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.2.0.tgz","fileCount":11,"unpackedSize":11634,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBcc5FIVhp0/rl8rvOWt2rSuCCZyZXYdKv1aNxuz2MWgIhAMUCaBq2IVVgb0XRL2nQ+aZky8okKPSd/IWCXlePtG0S"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7gDGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouMA/9FJ75DNBz3gZ01krRpyXdWVYhoqt8HGLLQKRC/FccH9LdOAX9\r\nlfwnM4K6oJUBRrECcBV+Ig5FsQ0eyyUgOIqLtzfGUZ5//qTOf0YdMxtB9dhH\r\nvMz/64pnoDevsql0CukcYIcJaGbUUyZCXzzFJRxWFHqXn47nw+UYdU1Bao6k\r\neVjRYTMedbJds+OmGtJIn0vO0wfvYne5Ap54hGrIQbS2FPlTelh9F1BmFA+e\r\nYK+xEtYgkn1rav/zZ5noHFmEl0129F4MMVYqfPRT0RKDEYgaSDx0QYs4oJhD\r\nJPcLccUC6Bawn8mH+PnkYAzyrstAzcHn3iUAeQDRg/1QX98flhgbdXqrvbGQ\r\nQouDmrlki4hTcOMOaCShVW7lesT9/ZFS23B+ByjqfG6Tvurt6A1GSHkI5XEz\r\nBqOpOrPjGLvdPa8Nlh2BTnILbMZGOIWfWkKTDPQ+2UxHnQusu0/XN3FxFpbp\r\nuW8l5gK4RlSTq3FIi7jm3JM8De0Fzjs9/4SMeuFQZORt1EIl6JwG+AZwTywK\r\ngOM/mAVBbPhgEu858qYaBgLCFz+rKTIFXx8PufNg5+erEaOPZUl0kgB8ICmI\r\nVasv7aRsJzNf/3eO4KM0H4EgbCP19MJKJQafA/fLE9fvKtcV3IYDVY9+ncx8\r\nwgXp5piGB8vfcxQMGDsidWTo8JoWAUwLHwU=\r\n=A12b\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.2.0_1659764933969_0.6553116615202976"},"_hasShrinkwrap":false},"1.3.0-beta.1":{"name":"unix-print","version":"1.3.0-beta.1","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"npm run build:clean && npm run build:esbuild && npm run build:declarations","build:clean":"rimraf build","build:esbuild":"esbuild ./src --bundle --platform=node --outfile=build/index.js","build:declarations":"tsc -p tsconfig.dist.json --emitDeclarationOnly --outDir build","prettier-check":"prettier -c ./","prepare":"npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^8.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"readme":"# Unix-print\n\nA utility for Unix-like operating systems to print files from Node.js and Electron.\n\n- Understands different types of files, such as PDF, text, PostScript, and image files.\n- Supports label printers such as Rollo and Zebra.\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**Table of Contents**\n\n- [Unix-print](#unix-print)\n  - [Basic Usage](#basic-usage)\n  - [Installation](#installation)\n  - [API](#api)\n    - [`print(pdf, printer, options) => Promise<void>`](#printpdf-printer-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## Basic Usage\n\nPrint a PDF file to the default printer:\n\n```javascript\nimport { print } from \"unix-print\";\n\nprint(\"assets/file.pdf\").then(console.log);\n```\n\n## Installation\n\nInstall using Yarn:\n\n```bash\nyarn add unix-print\n```\n\nOr using npm:\n\n```bash\nnpm install --save unix-print\n```\n\n## API\n\n### `print(pdf, printer, options) => Promise<void>`\n\nA function to print a file to a printer.\n\n**Arguments**\n\n| Argument |    Type    | Optional | Description                                                             |\n| -------- | :--------: | -------- | ----------------------------------------------------------------------- |\n| file     |  `string`  | Required | A file to print.                                                        |\n| printer  |  `string`  | Optional | Print a file to the specific printer.                                   |\n| options  | `string[]` | Optional | Any option from [this list](https://www.computerhope.com/unix/ulp.htm). |\n\n**Returns**\n\n`Promise<void>`.\n\nTo print a file to the default printer:\n\n```javascript\nimport { print } from \"unix-print\";\n\nprint(\"assets/file.pdf\").then(console.log);\n```\n\nTo print a file to a specific printer:\n\n```javascript\nimport { print } from \"unix-print\";\n\nconst fileToPrint = \"assets/file.pdf\";\nconst printer = \"Zebra\";\n\nprint(fileToPrint, printer).then(console.log);\n```\n\nWith some printer-specific options:\n\n```javascript\nimport { print } from \"unix-print\";\n\nconst fileToPrint = \"assets/file.jpg\";\nconst printer = undefined;\nconst options = [\"-o landscape\", \"-o fit-to-page\", \"-o media=A4\"];\n\nprint(\"assets/file.jpg\", printer, options).then(console.log);\n```\n\n### `getPrinters() => Promise<Printer[]>`\n\n**Returns**\n\n`Promise<Printer[]>`: List of available printers.\n\n**Examples**\n\n```javascript\nimport { getPrinters } from \"unix-print\";\n\ngetPrinters().then(console.log);\n```\n\n### `getDefaultPrinter() => Promise<Printer | null>`\n\n**Returns**\n\n`Promise<Printer | null>`: System default printer or `null`.\n\n**Examples**\n\n```javascript\nimport { getPrinters } from \"unix-print\";\n\ngetDefaultPrinter().then(console.log);\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) for details.\n","readmeFilename":"README.md","gitHead":"3eb1edc6d8504c16a2ae1430c04b408b0bb84cc4","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_id":"unix-print@1.3.0-beta.1","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-DLmYbd0fDfetbj+L82PRNQg511vNwRVRFhbClzY3O+Emit+HOHtaVJGmpzh/gqpqISslt85GJSVrt7edQci0Qw==","shasum":"6e5a77d229e0c68c3de8e59a0f3cce37375647a3","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.3.0-beta.1.tgz","fileCount":12,"unpackedSize":13138,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRHnduvxundgsAeWKJJjfjOepk4CmvK4mSuPUMGZXjIwIhAOaRmtDxKWA0UA494kvMqa7Ni9GfkO3nfCM7i5PsRvRT"}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.3.0-beta.1_1686664601898_0.7969786414192177"},"_hasShrinkwrap":false},"1.3.0":{"name":"unix-print","version":"1.3.0","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"npm run build:clean && npm run build:esbuild && npm run build:declarations","build:clean":"rimraf build","build:esbuild":"esbuild ./src --bundle --platform=node --outfile=build/index.js","build:declarations":"tsc -p tsconfig.dist.json --emitDeclarationOnly --outDir build","prettier-check":"prettier -c ./","prepare":"npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^8.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"gitHead":"5aa96e3d2c192e404913a8f10de53de29120501c","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_id":"unix-print@1.3.0","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"integrity":"sha512-9WwFlvKFdfxhM8JB3MPytayllL6Bmc7CexOHobB9f92PJfxz/iLGoW8pKAtkwRg4HVhEsjjoMGZZ68Sfx2JDwg==","shasum":"6bc6c5c700838e28964598218416d99f9d7fbdb9","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.3.0.tgz","fileCount":12,"unpackedSize":14305,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHw81tMyXb4Yz+Zz0jiOpXGzxm8n/4cqdusqpoYOB9ZACICglZI4xPGFWkBQLzzY2oxpfvunzBxqNOSIlilAE+9LG"}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.3.0_1692734593775_0.47760445517882055"},"_hasShrinkwrap":false},"1.3.1":{"name":"unix-print","version":"1.3.1","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"npm run build:clean && npm run build:esbuild && npm run build:declarations","build:clean":"rimraf build","build:esbuild":"esbuild ./src --bundle --platform=node --outfile=build/index.js","build:declarations":"tsc -p tsconfig.dist.json --emitDeclarationOnly --outDir build","prettier-check":"prettier -c ./","prepare":"npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^8.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"_id":"unix-print@1.3.1","gitHead":"eceeea91ebd99872150ece468a2d37934e6646a4","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_nodeVersion":"21.1.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-mgR2fJkg82W19sNe+qjsdER0NfO3o+KGDLR+lxq1T34uQ4mGQMlCucQJZCkMAweSHTkQYtcn2mT7SuPClq9ZrA==","shasum":"e61aa9d167ee988ec6e514f7d45e59e7b38dd358","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.3.1.tgz","fileCount":12,"unpackedSize":14359,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEHvR+HqsmmQbnaGIsmroNg0sd6Ag50N9r38Kftfh6IgIhAM9J45TF6eHuzd6hnBnktct6Aiesqc+/+82dxioHayjY"}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.3.1_1699354516998_0.26239234356228547"},"_hasShrinkwrap":false},"1.3.2":{"name":"unix-print","version":"1.3.2","description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","license":"MIT","main":"build/index.js","types":"build/index.d.ts","repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"scripts":{"test":"jest","build":"npm run build:clean && npm run build:esbuild && npm run build:declarations","build:clean":"rimraf build","build:esbuild":"esbuild ./src --bundle --platform=node --outfile=build/index.js","build:declarations":"tsc -p tsconfig.dist.json --emitDeclarationOnly --outDir build","prettier-check":"prettier -c ./","prepare":"npm run test && npm run build"},"devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/jest":"^27.0.2","@types/node":"^16.9.1","babel-jest":"^27.1.1","esbuild":"^0.12.26","husky":"^8.0.0","jest":"^27.1.1","prettier":"^2.4.0","pretty-quick":"^3.1.1","rimraf":"^3.0.2","typescript":"^4.4.4"},"keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"_id":"unix-print@1.3.2","gitHead":"c42565aa8c2921dc304f017bb986e31ac0c7067e","bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"homepage":"https://github.com/artiebits/unix-print#readme","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-0ibC236YdguosxDVdSf28IKRalwiMipo7vOmQ3nKZcqjhr38OG+ELGyBWscCNbfZj5WLvwVD8rObNGK7hxftjQ==","shasum":"4f41620ab435f5adddab2bc1401cd8a53afb70dc","tarball":"https://registry.npmjs.org/unix-print/-/unix-print-1.3.2.tgz","fileCount":12,"unpackedSize":14565,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/m1jueRsV68ULjg+UmvBUlrVSsFwGdeORbnr2bjQmqAiBW+xg0+N+3xy3yTv2pgJOYR4vAwnn3EVDYhAllYXIADA=="}]},"_npmUser":{"name":"artiebits","email":"artur.khusaenov@gmail.com"},"directories":{},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unix-print_1.3.2_1700811966330_0.6222960498510801"},"_hasShrinkwrap":false}},"maintainers":[{"name":"artiebits","email":"artur.khusaenov@gmail.com"}],"description":"Utility for Unix-like operating systems to print PDF files from Node.js and Electron","homepage":"https://github.com/artiebits/unix-print#readme","keywords":["pdf","printer","pdf-printer","zebra-printer","rollo-printer","node.js","electron","macos","linux"],"repository":{"type":"git","url":"git+https://github.com/artiebits/unix-print.git"},"bugs":{"url":"https://github.com/artiebits/unix-print/issues"},"license":"MIT","readme":"# Unix-print\n\nA utility for Unix-like operating systems to print files from Node.js and Electron.\n\n- Understands different types of files, such as PDF, text, PostScript, and image files.\n- Supports label printers such as Rollo and Zebra.\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**Table of Contents**\n\n- [Unix-print](#unix-print)\n  - [Basic Usage](#basic-usage)\n  - [Installation](#installation)\n  - [API](#api)\n    - [`print(pdf, printer, options) => Promise<{stdout, stderr}>`](#printpdf-printer-options--promisevoid)\n    - [`isPrintComplete(printResponse) => Promise<boolean>`](#isprintcompleteprintresponse--promiseboolean)\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## Basic Usage\n\nPrint a PDF file to the default printer:\n\n```javascript\nimport { print } from \"unix-print\";\n\nprint(\"assets/file.pdf\").then(console.log);\n```\n\n## Installation\n\nInstall using Yarn:\n\n```bash\nyarn add unix-print\n```\n\nOr using npm:\n\n```bash\nnpm install --save unix-print\n```\n\n## API\n\n### `print(pdf, printer, options) => Promise<void>`\n\nA function to print a file to a printer.\n\n**Arguments**\n\n| Argument |    Type    | Optional | Description                                                             |\n| -------- | :--------: | -------- | ----------------------------------------------------------------------- |\n| file     |  `string`  | Required | A file to print.                                                        |\n| printer  |  `string`  | Optional | Print a file to the specific printer.                                   |\n| options  | `string[]` | Optional | Any option from [this list](https://www.computerhope.com/unix/ulp.htm). |\n\n**Returns**\n\n`Promise<{stdout: string | null, stderr: string | null}>`.\n\nTo print a file to the default printer:\n\n```javascript\nimport { print } from \"unix-print\";\n\nprint(\"assets/file.pdf\").then(console.log);\n```\n\nTo print a file to a specific printer:\n\n```javascript\nimport { print } from \"unix-print\";\n\nconst fileToPrint = \"assets/file.pdf\";\nconst printer = \"Zebra\";\n\nprint(fileToPrint, printer).then(console.log);\n```\n\nWith some printer-specific options:\n\n```javascript\nimport { print } from \"unix-print\";\n\nconst fileToPrint = \"assets/file.jpg\";\nconst printer = undefined;\nconst options = [\"-o landscape\", \"-o fit-to-page\", \"-o media=A4\"];\n\nprint(\"assets/file.jpg\", printer, options).then(console.log);\n```\n\n### `isPrintComplete(printResponse) => Promise<boolean>`\n\n**Arguments**\n\n| Argument      |                   Type                    | Optional | Description                    |\n| ------------- | :---------------------------------------: | -------- | ------------------------------ |\n| printResponse | <code>{stdout: string &#124; null}</code> | Required | Resolved promise returned from [`print`](#printpdf-printer-options--promisevoid). |\n\n**Returns**\n\n`Promise<boolean>`: False if the job is on the queue or `stdout` is null, true otherwise.\n\n**Examples**\n\n```javascript\nimport { isPrintComplete } from 'unix-print';\n\nconst fileToPrint = 'assets/file.pdf';\nconst printJob = await print(fileToPrint);\n\nasync function waitForPrintCompletion(printJob) {\n  while (!await isPrintComplete(printJob)) {\n    // Wait a bit before checking again (to avoid constant checks)\n    await new Promise(resolve => setTimeout(resolve, 1000)); // Wait for 1 second\n  }\n  console.log('Job complete');\n}\n\nawait waitForPrintCompletion(printJob);\n```\n\n### `getPrinters() => Promise<Printer[]>`\n\n**Returns**\n\n`Promise<Printer[]>`: List of available printers.\n\n**Examples**\n\n```javascript\nimport { getPrinters } from \"unix-print\";\n\ngetPrinters().then(console.log);\n```\n\n### `getDefaultPrinter() => Promise<Printer | null>`\n\n**Returns**\n\n`Promise<Printer | null>`: System default printer or `null`.\n\n**Examples**\n\n```javascript\nimport { getPrinters } from \"unix-print\";\n\ngetDefaultPrinter().then(console.log);\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) for details.\n","readmeFilename":"README.md"}