Giter VIP home page Giter VIP logo

html2pdf.it's Introduction

Generate PDFs from any web-page. You need Node.js to run it.

See it in action at: html2pdf.it.

Works out of the box on both Windows and Ubuntu. On Mac you need to:

brew install phantomjs

To get started you need to clone the repository, cd to it and run:

npm install

Running webserver locally

node open.js

This also opens your web-browser pointing to your locally running html2pdf.it:

Running webserver

node .

If you want to host html2pdf.it yourself, you will have to ask your host if they support hosting Node.js applications.

If your host does not support Node.js, you'll need to find a new host that does. Check out Heroku or Nodejitsu for example.

Running tests

npm test

Page breaks

You can use the CSS attribute:

page-break-before: always;

Data URIs

You can use data URIs like the following to generate PDFs for arbitrary HTML:

data:text/html;encoding=utf-8,<h1>Hello</h1>

As described on Wikipedia, the data URI should have the following format:

data:[<media type>][;base64],<data>

License

MIT

html2pdf.it's People

Contributors

ebdrup avatar edm00se avatar krokhale avatar gbrault avatar jamescdavis avatar gurix avatar kaltsimon 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.