{"_id":"@alynva/outline-pdf-cjs","name":"@alynva/outline-pdf-cjs","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.5":{"name":"@alynva/outline-pdf-cjs","version":"1.0.5","description":"Add outline to outline-less pdf. Works in node and does not have any dependency on other programming languages.","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"check-updates":"ncu","update":"npx ncu -u;npm install","dead-files":"unimported","spell-check":"cspell \"./**/*\"","lint":"tsc --noEmit && eslint ./src/**/*.ts --max-warnings=0","test":"rm -rf ./coverage && npx jest --clearCache && npx jest ./src --coverage --silent","build-cjs":"tsc -p ./tsconfig.build.json && npx esbuild dist/index.js --bundle --minify --outfile=dist/outline-pdf.bundle.min.js --platform=node","build":"rm -rf ./dist && npm run build-cjs","pre-bump":"npm run dead-files && npm run spell-check && npm run lint && npm run test && npm run build && git add --all && git commit","release":"NODE_OPTIONS=--no-experimental-fetch npm run pre-bump && npm publish --access public && npm run after-bump","bump-patch":"npm run pre-bump && npm version patch && npm publish && npm run after-bump","bump-minor":"npm run pre-bump && npm version minor && npm publish && npm run after-bump","bump-major":"npm run pre-bump && npm version major && npm publish && npm run after-bump","after-bump":"git push origin master && rm -rf ./dist"},"keywords":["outline","pdf","node","nodejs","bookmark","bookmarks","index","pdf-lib","lillallol"],"author":{"name":"lillallol"},"license":"MIT","devDependencies":{"@types/jest":"^26.0.20","@typescript-eslint/eslint-plugin":"^4.18.0","@typescript-eslint/parser":"^4.18.0","cspell":"^5.3.7","eslint":"^7.22.0","jest":"^26.6.3","ts-jest":"^26.5.3","typescript":"^4.2.3","unimported":"^1.7.0"},"dependencies":{"@lillallol/outline-pdf":"^3.0.4","pdf-lib":"^1.16.0"},"bugs":{"url":"https://github.com/lillallol/outline-pdf-cjs/issues"},"repository":{"type":"git","url":"git+https://github.com/lillallol/outline-pdf-cjs.git"},"homepage":"https://github.com/lillallol/outline-pdf-cjs","_id":"@alynva/outline-pdf-cjs@1.0.5","gitHead":"03956b29ba20180feedb8ad32ede05fb19768ac6","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-oAg0rFSKudctLhYBbLbTtYFIQCnaIrzY5X/lxGP4XGhzkpbEPbkCHegun4j9/Sjegw3clfRgxxjTE3mMA8wUyg==","shasum":"df3d87b545768c36fe8c3195c9d83db213da341e","tarball":"https://registry.npmjs.org/@alynva/outline-pdf-cjs/-/outline-pdf-cjs-1.0.5.tgz","fileCount":10,"unpackedSize":526122,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRzlQ4VxGh+tR8YukNF8uSvt/DnD72o3AOrJOR8Mc7VAIhAPPAdXp5YucPQjoESYXhs9g47RlgXltdhYdmnEAO9dZT"}]},"_npmUser":{"name":"alynva","email":"alynva@gmail.com"},"directories":{},"maintainers":[{"name":"alynva","email":"alynva@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/outline-pdf-cjs_1.0.5_1724268204504_0.15375746418397562"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-21T19:23:24.372Z","1.0.5":"2024-08-21T19:23:24.726Z","modified":"2024-08-21T19:23:25.016Z"},"maintainers":[{"name":"alynva","email":"alynva@gmail.com"}],"description":"Add outline to outline-less pdf. Works in node and does not have any dependency on other programming languages.","homepage":"https://github.com/lillallol/outline-pdf-cjs","keywords":["outline","pdf","node","nodejs","bookmark","bookmarks","index","pdf-lib","lillallol"],"repository":{"type":"git","url":"git+https://github.com/lillallol/outline-pdf-cjs.git"},"author":{"name":"lillallol"},"bugs":{"url":"https://github.com/lillallol/outline-pdf-cjs/issues"},"license":"MIT","readme":"## Table of contents\n\n-   [Description](#description)\n-   [Installation](#installation)\n-   [Example](#example)\n-   [License](#license)\n\n> **NOTICE**: If you have outlined your pdf using a version from 1.0.0 to 1.0.4, then if you edit your pdf it will get corrupted due to a bug introduced by @lillallol/outline-pdf. From version 1.0.5 this bug has been resolved.\n\n## Description\n\nLike [@lillallol/outline-pdf](https://www.npmjs.com/package/@lillallol/outline-pdf) but with a higher level API that takes advantage of the node file system.\n\n## Installation\n\n```bash\nnpm install @lillallol/outline-pdf-cjs\n```\n\n## Example\n\n```ts\nimport { outlinePdfCjs } from \"@lillallol/outline-pdf-cjs\";\n\nawait outlinePdfCjs({\n    loadPath: \"path/to/pdf/to/outline.pdf\",\n    savePath: \"path/to/save/outlined.pdf\",\n    // first column  : page number\n    //                 negative for collapsing outline\n    // second column : outline depth\n    // third column  : outline title\n    outline: `\n         1||Title 1\n         2|-|Title 2\n        -3|--|Title 3\n         4|---|Title 4\n         5|---|Title 5\n         6|-|Title 6\n         7||Title 7\n    `,\n});\n```\n\n## License\n\n[MIT](https://github.com/lillallol/outline-pdf-cjs/blob/master/LICENSE)\n","readmeFilename":"README.md"}