{"_id":"@akashacms/pdf-document-maker","_rev":"5-206f10d3cb1ba6e29559e85ed2fe9514","name":"@akashacms/pdf-document-maker","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@akashacms/pdf-document-maker","version":"1.0.0","keywords":["PlantUML","KaTeX","Markdown","AkashaCMS","PDF"],"author":{"url":"http://davidherron.com","name":"David Herron","email":"david@davidherron.com"},"_id":"@akashacms/pdf-document-maker@1.0.0","maintainers":[{"name":"reikiman","email":"david@davidherron.com"}],"homepage":"https://github.com/akashacms/pdf-document-construction-set#readme","bugs":{"url":"https://github.com/akashacms/pdf-document-construction-set/issues"},"bin":{"pdf-document-maker":"pdf-document-maker.mjs"},"dist":{"shasum":"227c74afdd1c4619333915bcd299915dc4520557","tarball":"https://registry.npmjs.org/@akashacms/pdf-document-maker/-/pdf-document-maker-1.0.0.tgz","fileCount":7,"integrity":"sha512-rb5rokFIBBsV/1hD5xcJlAxML9WV70PLUAkwOWZx5QfaZ+GfL9FjxpOhbBfSjiyVx+3m7gbkmAK1vFEuwqM0qw==","signatures":[{"sig":"MEUCIQCyeVzSXcP6mFl4UIbLqGq9TMBbxiriAquZ8PuMGoqqegIgaPC1g+eZ8hSg/FY6RxxfzVrAUazNFKx1VP5P8iPja2o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73974},"main":"pdf-document-maker.mjs","type":"module","gitHead":"9ead73dd2b47848f075b2b3d0adfae99d8ef51e8","scripts":{"dopublish":"npm publish --access public"},"_npmUser":{"name":"reikiman","email":"david@davidherron.com"},"overrides":{"glob@<9":"10.4.5","rimraf@<4":"5.0.10"},"repository":{"url":"git://github.com/akashacms/pdf-document-construction-set.git","type":"git"},"_npmVersion":"10.9.2","description":"Make good looking PDF Documents from Markdown or AsciiDoc files","directories":{},"_nodeVersion":"23.6.0","dependencies":{"katex":"^0.16.21","jquery":"^3.6.x","bootstrap":"^4.6.x","commander":"^12.1.0","popper.js":"^1.16.x","puppeteer":"^23.10.3","npm-run-all":"^4.1.x","akasharender":"^0.9.x","markdown-it-div":"^1.1.0","markdown-it-attrs":"^4.3.0","markdown-it-anchor":"^9.2.0","markdown-it-texmath":"^1.0.0","@akashacms/renderers":"^0.9.x","markdown-it-footnote":"^4.0.0","@akashacms/plugins-base":"^0.9.x","markdown-it-highlightjs":"^3.5.0","@akashacms/diagrams-maker":"^0.9.x","markdown-it-image-figures":"^2.1.1","markdown-it-multimd-table":"^4.2.3","@akashacms/theme-bootstrap":"^0.9.x","markdown-it-table-captions":"^1.0.4","markdown-it-header-sections":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pdf-document-maker_1.0.0_1737642525762_0.6284677130615146","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@akashacms/pdf-document-maker","version":"1.0.1","keywords":["PlantUML","KaTeX","Markdown","AkashaCMS","PDF","Document","Puppeteer"],"author":{"url":"http://davidherron.com","name":"David Herron","email":"david@davidherron.com"},"_id":"@akashacms/pdf-document-maker@1.0.1","maintainers":[{"name":"reikiman","email":"david@davidherron.com"}],"homepage":"https://github.com/akashacms/pdf-document-construction-set#readme","bugs":{"url":"https://github.com/akashacms/pdf-document-construction-set/issues"},"bin":{"pdf-document-maker":"pdf-document-maker.mjs"},"dist":{"shasum":"099145053d74b03b36fac1c762905a5d335e84da","tarball":"https://registry.npmjs.org/@akashacms/pdf-document-maker/-/pdf-document-maker-1.0.1.tgz","fileCount":7,"integrity":"sha512-FbWhRgaixkzMMZHwobUoxqbYU7ajQXtXYzPVgAnxkwNI2u1MB2vtgQ5xXd8vj0StSBm0OBTYjDmpXP6Q/tCs5w==","signatures":[{"sig":"MEYCIQCLzcV7bPKhejUlwUuTM0YSmD78VKzxBZSxSbu6zFstXQIhALVTdwB5niB7nrkCbSOGRKnx6glK6+btVMcgSy3To3Be","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74316},"main":"pdf-document-maker.mjs","type":"module","gitHead":"c8d20e1c31f8d2668324e8d28fe2e69a037f2159","scripts":{"dopublish":"npm publish --access public"},"_npmUser":{"name":"reikiman","email":"david@davidherron.com"},"overrides":{"glob@<9":"10.4.5","rimraf@<4":"5.0.10"},"repository":{"url":"git://github.com/akashacms/pdf-document-construction-set.git","type":"git"},"_npmVersion":"10.9.2","description":"Make good looking PDF Documents from Markdown or AsciiDoc files","directories":{},"_nodeVersion":"23.6.0","dependencies":{"katex":"^0.16.21","jquery":"^3.6.x","bootstrap":"^4.6.x","commander":"^12.1.0","popper.js":"^1.16.x","puppeteer":"^23.10.3","npm-run-all":"^4.1.x","akasharender":"^0.9.x","markdown-it-div":"^1.1.0","markdown-it-attrs":"^4.3.0","markdown-it-anchor":"^9.2.0","markdown-it-texmath":"^1.0.0","@akashacms/renderers":"^0.9.x","markdown-it-footnote":"^4.0.0","@akashacms/plugins-base":"^0.9.x","markdown-it-highlightjs":"^3.5.0","@akashacms/diagrams-maker":"^0.9.x","markdown-it-image-figures":"^2.1.1","markdown-it-multimd-table":"^4.2.3","@akashacms/theme-bootstrap":"^0.9.x","markdown-it-table-captions":"^1.0.4","markdown-it-header-sections":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pdf-document-maker_1.0.1_1737643983911_0.7803585384069451","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@akashacms/pdf-document-maker","version":"1.0.2","keywords":["PlantUML","KaTeX","Markdown","AkashaCMS","PDF","Document","Puppeteer"],"author":{"url":"http://davidherron.com","name":"David Herron","email":"david@davidherron.com"},"_id":"@akashacms/pdf-document-maker@1.0.2","maintainers":[{"name":"reikiman","email":"david@davidherron.com"}],"homepage":"https://github.com/akashacms/pdf-document-construction-set#readme","bugs":{"url":"https://github.com/akashacms/pdf-document-construction-set/issues"},"bin":{"pdf-document-maker":"pdf-document-maker.mjs"},"dist":{"shasum":"474b50eb37cedbb7fa4a7e6c33d804f3aefb0654","tarball":"https://registry.npmjs.org/@akashacms/pdf-document-maker/-/pdf-document-maker-1.0.2.tgz","fileCount":7,"integrity":"sha512-1nIjzoFvy3bChLNXWcyF6ycMmszeaDVioU4yAoPkSxxY8c+vfwIr7HtmnK9DWRa/QwanSJAK3ShdwpGOVXJLow==","signatures":[{"sig":"MEQCIDezUKV6u793xUMh4pvBl2K4LpVU+UxDFLhTJTo4925PAiA/dpB36B1Q6czY2b3dK2WgKtdrQW8vGzWf+pqtcZl0Hg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75909},"main":"pdf-document-maker.mjs","type":"module","gitHead":"d6cee4b91ede2f4afc481ea0785ae71bd067f798","scripts":{"dopublish":"npm publish --access public"},"_npmUser":{"name":"reikiman","email":"david@davidherron.com"},"overrides":{"glob@<9":"10.4.5","rimraf@<4":"5.0.10"},"repository":{"url":"git://github.com/akashacms/pdf-document-construction-set.git","type":"git"},"_npmVersion":"10.9.2","description":"Make good looking PDF Documents from Markdown or AsciiDoc files","directories":{},"_nodeVersion":"23.6.0","dependencies":{"katex":"^0.16.21","jquery":"^3.6.x","bootstrap":"^4.6.x","commander":"^12.1.0","popper.js":"^1.16.x","puppeteer":"^23.10.3","npm-run-all":"^4.1.x","akasharender":"^0.9.x","markdown-it-div":"^1.1.0","markdown-it-attrs":"^4.3.0","markdown-it-anchor":"^9.2.0","markdown-it-texmath":"^1.0.0","@akashacms/renderers":"^0.9.x","markdown-it-footnote":"^4.0.0","@akashacms/plugins-base":"^0.9.x","markdown-it-highlightjs":"^3.5.0","@akashacms/diagrams-maker":"^0.9.x","markdown-it-image-figures":"^2.1.1","markdown-it-multimd-table":"^4.2.3","@akashacms/theme-bootstrap":"^0.9.x","markdown-it-table-captions":"^1.0.4","markdown-it-bracketed-spans":"^1.0.1","markdown-it-header-sections":"^1.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pdf-document-maker_1.0.2_1738513525591_0.63726187087721","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@akashacms/pdf-document-maker","version":"1.0.3","keywords":["PlantUML","KaTeX","Markdown","AkashaCMS","PDF","Document","Puppeteer"],"author":{"url":"http://davidherron.com","name":"David Herron","email":"david@davidherron.com"},"_id":"@akashacms/pdf-document-maker@1.0.3","maintainers":[{"name":"reikiman","email":"david@davidherron.com"}],"homepage":"https://github.com/akashacms/pdf-document-construction-set#readme","bugs":{"url":"https://github.com/akashacms/pdf-document-construction-set/issues"},"bin":{"pdf-document-maker":"dist/pdf-document-maker.js"},"dist":{"shasum":"9591d7ef20bfa3bcb2d3b042232a8bb62083a70b","tarball":"https://registry.npmjs.org/@akashacms/pdf-document-maker/-/pdf-document-maker-1.0.3.tgz","fileCount":30,"integrity":"sha512-X/udvkvo0ZsLaHsq0ySbtPyAC1iOLPcMjGnyUDE19T889vOfoQ2hU4qV5q0iHDD5ckC0mf6CsLlm8mv1spcVMg==","signatures":[{"sig":"MEQCIFtM9mVkOIYWEeagzMpkeJnlBE/7abE+313Thbik5DS0AiBGo+iW5QiaAGtWYoKigGRqK447O1LjxbNFToMupmYPzw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":799732},"main":"./dist/pdf-document-maker.js","type":"module","types":"./dist/pdf-document-maker.d.ts","gitHead":"3f5022203d7693f5ae47bdfeac00c6dd319ae1de","scripts":{"build":"npx tsc","watch":"npx tsc -w","dopublish":"npm publish --access public"},"_npmUser":{"name":"reikiman","email":"david@davidherron.com"},"overrides":{"glob@<9":"10.4.5","rimraf@<4":"5.0.10"},"repository":{"url":"git://github.com/akashacms/pdf-document-construction-set.git","type":"git"},"_npmVersion":"11.4.2","description":"Create good looking PDF Documents from Markdown or AsciiDoc files, PDF document manipulations","directories":{},"_nodeVersion":"24.3.0","dependencies":{"katex":"^0.16.21","jquery":"^3.6.x","pdf-lib":"^1.17.1","bootstrap":"^4.6.x","commander":"^12.1.0","popper.js":"^1.16.x","puppeteer":"^23.10.3","npm-run-all":"^4.1.x","akasharender":"^0.9.x","markdown-it-div":"^1.1.0","markdown-it-attrs":"^4.3.0","markdown-it-anchor":"^9.2.0","markdown-it-texmath":"^1.0.0","@akashacms/renderers":"^0.9.x","markdown-it-footnote":"^4.0.0","@akashacms/plugins-base":"^0.9.x","@mermaid-js/mermaid-cli":"^11.6.0","markdown-it-highlightjs":"^3.5.0","@akashacms/diagrams-maker":"^0.9.x","markdown-it-image-figures":"^2.1.1","markdown-it-multimd-table":"^4.2.3","@akashacms/theme-bootstrap":"^4.6.x","markdown-it-table-captions":"^1.0.4","markdown-it-bracketed-spans":"^1.0.1","markdown-it-header-sections":"^1.0.0","markdown-it-table-of-contents":"^0.9.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^22.15.29"},"peerDependencies":{"mime":"^4.0.7"},"_npmOperationalInternal":{"tmp":"tmp/pdf-document-maker_1.0.3_1752244315644_0.5921083050751157","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"author":{"name":"David Herron","email":"david@davidherron.com","url":"http://davidherron.com"},"name":"@akashacms/pdf-document-maker","description":"Create good looking PDF Documents from Markdown or AsciiDoc files, PDF document manipulations","version":"1.0.4","repository":{"type":"git","url":"git://github.com/akashacms/pdf-document-construction-set.git"},"keywords":["PlantUML","KaTeX","Markdown","AkashaCMS","PDF","Document","Puppeteer"],"type":"module","main":"./dist/pdf-document-maker.js","bin":{"pdf-document-maker":"dist/pdf-document-maker.js"},"scripts":{"build":"npx tsc","watch":"npx tsc -w","dopublish":"npm publish --access public"},"dependencies":{"@akashacms/diagrams-maker":"^0.9.x","@akashacms/plugins-base":"^0.9.x","@akashacms/renderers":"^0.9.x","@akashacms/theme-bootstrap":"^4.6.x","@mermaid-js/mermaid-cli":"^11.6.0","akasharender":"^0.9.x","bootstrap":"^4.6.x","commander":"^12.1.0","jquery":"^3.6.x","katex":"^0.16.21","markdown-it-anchor":"^9.2.0","markdown-it-attrs":"^4.3.0","markdown-it-bracketed-spans":"^1.0.1","markdown-it-div":"^1.1.0","markdown-it-footnote":"^4.0.0","markdown-it-header-sections":"^1.0.0","markdown-it-highlightjs":"^3.5.0","markdown-it-image-figures":"^2.1.1","markdown-it-multimd-table":"^4.2.3","markdown-it-table-captions":"^1.0.4","markdown-it-table-of-contents":"^0.9.0","markdown-it-texmath":"^1.0.0","npm-run-all":"^4.1.x","pdf-lib":"^1.17.1","popper.js":"^1.16.x","puppeteer":"^23.10.3"},"overrides":{"rimraf@<4":"5.0.10","glob@<9":"10.4.5"},"peerDependencies":{"got":"^14.4.7","mime":"^4.0.7"},"devDependencies":{"@anthropic-ai/claude-code":"^1.0.62","@types/node":"^22.15.29","typescript":"^5.8.3"},"_id":"@akashacms/pdf-document-maker@1.0.4","gitHead":"0a671a22f10a19901c4a215891a2e4fa4cc07ad1","types":"./dist/pdf-document-maker.d.ts","bugs":{"url":"https://github.com/akashacms/pdf-document-construction-set/issues"},"homepage":"https://github.com/akashacms/pdf-document-construction-set#readme","_nodeVersion":"24.6.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-ypziUZ+RmoCEqX+7AZ2OW+p/8YJZk0Ds8VclVgSFouq0BEDJLzdFV+z0nmRlqmT591JXfCSjLrCnGbXbb4CCVw==","shasum":"21544e4acd8a0532ced3956b615a16408665b559","tarball":"https://registry.npmjs.org/@akashacms/pdf-document-maker/-/pdf-document-maker-1.0.4.tgz","fileCount":30,"unpackedSize":9172297,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCz+e8LTjMOhCdKq1ZubrrysleXMZERA4jglvYHZCdeZgIhAPxvX+uaC3e8cFoYhCSO73HgRcnYTABDuuM2hxbFcGyu"}]},"_npmUser":{"name":"reikiman","email":"david@davidherron.com"},"directories":{},"maintainers":[{"name":"reikiman","email":"david@davidherron.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pdf-document-maker_1.0.4_1756909274103_0.9685373787660401"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-23T14:28:45.638Z","modified":"2025-09-03T14:21:14.632Z","1.0.0":"2025-01-23T14:28:45.959Z","1.0.1":"2025-01-23T14:53:04.104Z","1.0.2":"2025-02-02T16:25:25.811Z","1.0.3":"2025-07-11T14:31:55.870Z","1.0.4":"2025-09-03T14:21:14.429Z"},"bugs":{"url":"https://github.com/akashacms/pdf-document-construction-set/issues"},"author":{"name":"David Herron","email":"david@davidherron.com","url":"http://davidherron.com"},"homepage":"https://github.com/akashacms/pdf-document-construction-set#readme","keywords":["PlantUML","KaTeX","Markdown","AkashaCMS","PDF","Document","Puppeteer"],"repository":{"type":"git","url":"git://github.com/akashacms/pdf-document-construction-set.git"},"description":"Create good looking PDF Documents from Markdown or AsciiDoc files, PDF document manipulations","maintainers":[{"name":"reikiman","email":"david@davidherron.com"}],"readme":"\n<figure class=\"ml-auto mr-auto\">\n<img src=\"https://raw.githubusercontent.com/akashacms/pdf-document-construction-set/refs/heads/main/guide/assets/logo-pdf-document-maker.png\" class=\"ml-auto mr-auto\" alt=\"PDF Document Maker\"/>\n</figure>\n\n# PDF Document Maker - Generate high fidelity PDF documents from Markdown or AsciiDoc, PDF manipulation\n\n_PDF Document Maker_ supports creating richly formatted documents, in both HTML and PDF format, using file types (Markdown, CSS, etc) which are easily tracked in a source code repository, and which are easily edited with IDEs like Visual Studio Code.  It also supports many of the PDF manipulation functions used in PDF document creation.\n\nThere are many tools for creating richly formatted documents, such as WYSIWYG word processors like Libre Office.  But, they're not easily tracked in Git or other source code repositories.  Many kinds of technical projects require the ability to track all assets, including documentation, in a source repository, but also need to produce good looking documentation.\n\nWhile Markdown is a flexible markup format, it produces plain looking output.  Generating a PDF with fidelity close to what we'd get from a WYSIWYG word processor like Libre Office requires significant ability to customize the Markdown-HTML conversion result.  PDF Document Maker gives you a head start on that, and also supports precisely customizing the HTML and CSS any way you like.\n\nThe features include:\n\n* Supporting A3, A4, A5, Legal, Letter or Tabloid page formats\n* Customizable header and footer on each page\n* CSS stylesheets\n* Layout and Partial templates for custom formatting, using template engines like Nunjucks, Mustache, or EJS\n* Using PlantUML or Mermaid to support drawings\n* Using KaTeX to support equations\n* Using HighlightJS for styling code blocks\n* Custom HTML elements to bring in external data sources\n* Custom HTML/DOM processing\n* Intermediate HTML output\n* Using either/both Markdown and AsciiDoc\n* Generating figure/img/caption structures for images\n* Generating caption tag for tables\n* Optional support for MultiMarkdown tables\n* Merging multiple PDFs and images into a PDF\n* Extracting pages from a PDF\n* Resizing a PDF from one page size (e.g. A4) to another (e.g. US Letter)\n* Manipulate PDF metadata\n\n# Project setup and Installation\n\nPDF Document Maker runs on the Node.js platform, and is tested with Node.js v20.  It should work for later releases.\n\nFull documentation is available at: https://akashacms.github.io/pdf-document-construction-set/\n\nThe website includes a comprehensive usage guide that's available both in PDF (built using this tool) and online.  The website also demonstrates the possibility of the SAME content document being used both on a website and in a PDF.\n\nA project directory consists of a _package.json_ file which is used for listing dependencies and build processes.\n\n```shell\n$ npm init -y   # Set up the package.json\n$ npm install @akashacms/pdf-document-maker--save\n```\n\nOnce installed you can get help:\n\n```shell\n$ npx pdf-document-maker --help\n\nUsage: pdf-document-maker [options] [command] <docPaths>\n\nCLI to build PDF files from Markdown/AsciiDoc documents\n\nArguments:\n  docPaths                                           VPath for document to render\n\nOptions:\n  -v, --version                                      output the current version\n  --config <configFN>                                AkashaCMS configuration file. If specified it disables\n                                                     auto-generated config file.\n  --title <title>                                    Document title, overwriting any title in the document metadata.\n  --layout <layoutTemplate>                          File name, in a layouts directory, for the layout template.\n                                                     Overwrites any layout in the document metadata.\n  --publication-date <publDate>                      String containing a Date to be used in the publicationDate metdata\n                                                     field.\n  --format <format>                                  Page format, \"A3\", \"A4\", \"A5\", \"Legal\", \"Letter\" or \"Tabloid\"\n  --pdf-output <pdfDir>                              Output directory for PDF generation. Default process.cwd()/PDF\n  --html-output <htmlDir>                            Output directory for HTML generation\n  --template-header <tmplHeader>                     HTML template for page header\n  --height-header <height>                           Height of header block. Valid units are mm, cm, in and px.\n  --template-footer <tmplFooter>                     HTML template for page footer\n  --height-footer <height>                           Height of footer block. Valid units are mm, cm, in and px.\n  --style <cssFile...>                               File name of CSS style sheet\n  --lesscss <lesscssFile...>                         File name of LESS file to render to CSS\n  --layout-dir <layoutDir...>                        One or more directories for layout templates\n  --partial-dir <partialDir...>                      One or more directories for partial templates\n  --asset-dir <assetsDir...>                         One or more directories for assets\n  --document-dir <documentsDir...>                   One or more directories for documents\n  --no-headless                                      Turn off headless mode\n  --no-pdf                                           Do not generate PDFs\n  --no-printcss                                      Disable the print.css stylesheet\n  --no-md-anchor                                     Disable the markdown-it-anchor extension\n  --no-md-footnote                                   Disable the markdown-it-footnote extension\n  --no-md-attrs                                      Disable the markdown-it-attrs extension\n  --no-md-bracketed-spans                            Disable the markdown-it-bracketed-spans extension\n  --no-md-div                                        Disable the markdown-it-div extension\n  --no-md-header-sections                            Disable the markdown-it-header-sections extension\n  --no-md-highlightjs                                Disable the markdown-it-highlightjs extension\n  --no-md-image-figures                              Disable the markdown-it-image-figures extension\n  --no-md-multimd-table                              Disable the markdown-it-multimd-table extension\n  --no-md-table-captions                             Disable the markdown-it-table-captions extension\n  --no-md-katex                                      Disable the @vscode/markdown-it-katex extension\n  --no-md-plantuml                                   Disable the @akashacms/plugins-plantuml extension\n  --no-bootstrap                                     Disable Bootstrap v4 and related modules\n  --funcs <funcsFN>                                  Name a JS file containing Mahafuncs for custom processing\n  --verbose                                          Print extra information during execution\n  -h, --help                                         display help for command\n\nCommands:\n  info <inputFN>                                     Show information about the PDF\n  page-sizes                                         Show available page sizes\n  copy-metadata <inputFN> <donorFN> [outputFN]       Copy metadata values from one PDF to another\n  set-metadata [options] <pdfFN> [saveToFN]          Set metadata values in a PDF\n  reformat [options] <inputFN> [outputFN]            Change the document format (e.g. A4) to a new one (e.g. Letter\n  extract [options] <inputFN> <outputFN> <pages...>  Extract page numbers from input PDF to output. The pages are\n                                                     numbered from 0.\n  merge [options] <files...>                         Merge multiple PDF, PNG, JPG, into one document\n\n\n```\n\nWhile that's a lot of options there are reasonable defaults for most.\n\n# Example usage\n\nFor example, with a project directory initialized, create a directory named `documents` and put in it a Markdown file.  The search phrase \"_standard markdown test file_\" will turn up several such as this: https://github.com/mxstbr/markdown-test-file\n\nWith a file, `documents/TEST.md`, run this command:\n\n```shell\n$ npx pdf-document-maker  \\\n        --document-dir documents \\\n        --pdf-output PDF \\\n        --html-output out \\\n        --title 'Markdown test document' \\\n        --format A4 \\\n        TEST.md\n```\n\nThis command creates two files:\n\n* `out/TEST.html` - is the HTML intermediate file\n* `PDF/TEST.pdf` - is the PDF result\n\nThe directory _documents_ is a place the tool looks for documents.  There can be more than one documents directory.\n\nThe file name `TEST.md` is relative to the root directory of the documents directories.  In the help text you will see `VPath` used at least once.  The name `TEST.md` is an example of a Virtual Path (a.k.a. VPath) because it is the virtual path within the directory/directories named via the `--document-dir` option.\n\nIf more than one directory is named with `--document-dir` then the directories are \"stacked\" with the later directories higher in the stack.  When a VPath is requested, the stacked directories are searched in order to find the actual file to use.\n\nThe directories named with `--partial-dir`, `--asset-dir`, and `--layout-dir`, are treated the same way.  There can be multiple such directories, they are organized in a stack, and are searched from the top of the stack.\n\n## PDF Manipulation\n\n```shell\n$ npx pdf-document-maker.mjs extract \\\n    ../../guide/PDF/guide.pdf \\\n    extracted.pdf \\\n    0 2 4 6 8\n```\n\nExtract the named pages from a PDF into an output PDF.\n\n```shell\n$ npx pdf-document-maker --output merged.pdf \\\n     ../../guide/PDF/guide.pdf \\\n     ./Screenshot-merge-example.png\nReading input PDF ../../guide/PDF/guide.pdf application/pdf\nReading input IMAGE ./Screenshot-merge-example.png image/png\nWrite File merged.pdf\n```\n\nMerge multiple PDF files or images to create an output PDF.\n\n```shell\n$ npx pdf-document-maker page-sizes\n...\n$ npx pdf-document-maker reformat guide/PDF/guide.pdf reformatted.pdf \\\n        --page-format Tabloid\n```\n\nResize the PDF content to the named page size.  The `--page-format` option works for the `reformat`, `merge`, and `extract` commands.\n\n## `@akashacms/pdf-document-maker` versus `pdf-document-maker`\n\nAfter publishing this package, `@akashacms/pdf-document-maker`, it was learned that a package, `pdf-document-maker`, already existed.\n\nDespite the name similarity the two are not related other than having a similar purpose.\n\nBe careful when installing to correctly choose which you prefer to use.\n","readmeFilename":"README.md"}