1.3.0 • Published 9 months ago

docu-pdf v1.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

ℹ️ Note

This is a fork of the much appreciated mr-pdf. Our fork is just to ease maintenance for use with our Docusaurus sites, not the other systems that mr-pdf supports.

About docu-pdf

This is a command line tool for creating PDFs from documentation sites built with Docusaurus. While your browser can make pdfs of individual pages, this makes one of all the pages.

Usage

npx docu-pdf https://docs.bloomlibrary.org/

CLI Options

OptionRequiredDescription
main argumentYesThe root of your documentation. If you need multiple root urls, separate with commas.
--outputPathNopath to output PDF file. Default is site.pdf
--pageSizeNopdf format e.g. --pageSize="A3". Please check this link for available formats Puppeteer document
--coverPathNofile path to custom HTML file for cover. Top level should be like <div style="page-break-after:always"></div>.
--disableTOCNoOmit the table of contents
--headerTemplateNoHTML template for the print header. More info
--footerTemplateNoHTML template for the print footer. More info
OptionRequiredDescription
'--tocLevel 'No'The minimum header level to include in the table of contents. E.g. "1" (default), "2", or "3"'
--contentSelectorNoCSS selector for the major sections. Default is article.
--nextPageSelectorNoCSS selector for the link to follow to the next section
--excludeURLsNoURLs to be excluded in PDF. Comma separated.
--excludeSelectorsNoCSS selector for HTML elements to omit from PDF. E.g. .nav,.sidebar. Separate each selector with comma and no space. You can use space in each selector. e.g. --excludeSelectors=".nav,.next > a"
--cssStyleNoCSS style to adjust PDF output. E.g. --cssStyle="body{padding-top: 0;}" *If you're project owner you can use @media print { } to edit CSS for PDF.
--pdfMarginNoset margin around PDF file. Separate each margin with comma and no space. E.g. --pdfMargin="10,20,30,40". This sets margin top: 10px, right: 20px, bottom: 30px, left: 40px
1.3.0

9 months ago

1.2.2

1 year ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

2 years ago

1.0.0-alpha.1

2 years ago