docsifytopdf.js 583 B

12345678910
  1. module.exports = {
  2. contents: ['docs/_sidebar.md'], // array of "table of contents" files path
  3. pathToPublic: 'pdf/readme.pdf', // path where pdf will stored
  4. pdfOptions: {
  5. margin: { top: '100px', bottom: '100px' }
  6. }, // reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions
  7. removeTemp: true, // remove generated .md and .html or not
  8. emulateMedia: 'print', // mediaType, emulating by puppeteer for rendering pdf, 'print' by default (reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype)
  9. };