Skip to content

Create a PDF version of Device42 documentation site

  • Start the docs project on localhost:3000
  • Run the following command (note the PDF is 1500+ pages, so it takes up to 30 mins to generate, hence the protocolTimeout)
  • Save something like this document as a PDF and add it as the first page, deleting the first page that is automatically generated
npx docs-to-pdf --initialDocURLs="http://localhost:3000/getstarted/" --contentSelector="article" --paginationSelector="a.pagination-nav__link.pagination-nav__link--next" --excludeSelectors=".margin-vert--xl a,[class^='tocCollapsible'],.breadcrumbs,.theme-edit-this-page" --coverImage="https://www.device42.com/wp-content/uploads/2021/07/d42-rgb-full.png" --coverTitle="Device42 Documentation" --protocolTimeout 1800000