html2pdf.it

Webservice for generating pdfs from html

  • Owner: apilayer/html2pdf.it
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

logo html2pdf.it

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

Main metrics

Overview
Name With Ownerapilayer/html2pdf.it
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 2)
Platform
License:
所有者活动
Created At2012-06-09 09:21:04
Pushed At2020-10-08 10:40:05
Last Commit At2019-05-12 08:22:58
Release Count9
Last Release Namev2.0.0 (Posted on 2017-02-07 17:59:22)
First Release Name1.2.1 (Posted on )
用户参与
Stargazers Count546
Watchers Count31
Fork Count155
Commits Count194
Has Issues Enabled
Issues Count62
Issue Open Count21
Pull Requests Count9
Pull Requests Open Count1
Pull Requests Close Count6
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private