GithubHelp home page GithubHelp logo

isabella232 / pdf-from-html Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hq20/pdf-from-html

0.0 0.0 0.0 201 KB

Transform an HTML file in a PDF file

License: GNU General Public License v3.0

JavaScript 37.64% HTML 62.36%

pdf-from-html's Introduction

    pdf-from-html

pdf-from-html is a nodejs library to transform an html (possibly from markdown-it) in a PDF.

Installation

Install it with npm or yarn.

$ npm install --dev pdf-from-html
# or
$ yarn add --dev pdf-from-html

Usage

It's possible to use it from command line

$ pdf-from-html docs/ somefile.html

as npm script

"scripts": {
    "pdf": "pdf-from-html docs/ somefile.html"
},

or as part of your nodejs app

import { generatePDF } from 'pdf-from-html';
// or
// const generatePDF = require('pdf-from-html').generatePDF;
// and then just call the method
generatePDF(outputDir: string, outputFileName: string, inputContent: string);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache-2.0

Credits

pdf-from-html's People

Contributors

obernardovieira avatar dependabot-preview[bot] avatar dependabot[bot] 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.