Code Monkey home page Code Monkey logo

mr-pdf's Introduction

πŸ“Œ Introduction

This is a PDF generator for document Apache Doris Website.

⚑ Usage

node --max-old-space-size=8192 ./lib/cli.js --initialDocURLs="https://doris.apache.org/zh-CN/docs/dev/get-starting/" --paginationSelector=".pagination-nav__link--next" --contentSelector="article" --coverImage="https://cdn.selectdb.com/static/doris_logo_512_4903556647.png" --coverTitle="Apache Doris Docs (δΈ­ζ–‡)" --outputPDFFilename="Apache Doris Docs (δΈ­ζ–‡).pdf" --tocOnlyH1=true

πŸ— CLI Options

Option Required Description
--initialDocURLs Yes set URL to start generating PDF from.
--contentSelector Yes used to find the part of main content
--paginationSelector Yes CSS Selector used to find next page to be printed for looping.
--excludeURLs No URLs to be excluded in PDF
--excludeSelectors No exclude selectors from PDF. Separate each selectorwith comma and no space. But you can use space in each selector. ex: --excludeSelectors=".nav,.next > a"
--cssStyle No CSS style to adjust PDF output ex:--cssStyle="body{padding-top: 0;}" *If you're project owner you can use @media print { } to edit CSS for PDF.
--outputPDFFilename No name of the output PDF file. Default is mr-pdf.pdf
--pdfMargin No set margin around PDF file. Separate each marginwith comma and no space. ex: --pdfMargin="10,20,30,40". This sets margin top: 10px, right: 20px, bottom: 30px, left: 40px
--pdfFormat No pdf format ex:--pdfFormat="A3". Please check this link for available formats Puppeteer document
--disableTOC No Optional toggle to show the table of contents or not
--coverTitle No Title for the PDF cover.
--coverImage No <src> Image for PDF cover (does not support SVG)
--coverSub No Subtitle the for PDF cover. Add `` tags for multiple lines.
--headerTemplate No HTML template for the print header. Please check this link for details of injecting valuesPuppeteer document
--footerTemplate No HTML template for the print footer. Please check this link for details of injecting valuesPuppeteer document
--buildDirPath No location of build directory
--firstDocPath No location of first doc path

mr-pdf's People

Contributors

kohheepeace avatar jeffreys-cat avatar ksmarty avatar lidkxx avatar meddbase-steve avatar jafin avatar mrdrivingduck avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.