HTML to PDF
Convert HTML to PDF simple and fast
sudo npm install pdfpy
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Installing
A step by step series of examples that tell you have to get a development env running
Install latest node and npm
Dependency
- Python
- pdfkit
- simplejson
Require
var pdfpy = ;
Types (file and url)
//To generate pdf from filepdfpy
//To generate pdf from urlpdfpy
Example
File
var pdfpy = ; var data = //the key as to be same as below input: "./test.html" output: "./output.pdf"pdfpy;
URL
var pdfpy = ; var data = //the key as to be same as below input: "http://google.com" output: "./output.pdf"pdfpy;
Using Options
var pdfpy = ; var data = //the key as to be same as below input: "./test.html" output: "./output.pdf" options: 'page-size': 'Letter' 'margin-top': '0.75in' 'margin-right': '0.75in' 'margin-bottom': '0.75in' 'margin-left': '0.75in' pdfpy;
Running the tests
npm test
Built With
pdfkit 0.6.1 python package
Authors
License
This project is licensed under the MIT License - see the LICENSE.md file for details