Comparing version 1.3.2 to 1.3.3
{ | ||
"name": "jspdf", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"homepage": "https://github.com/mrrio/jspdf", | ||
@@ -26,7 +26,24 @@ "description": "PDF Document creation from JavaScript", | ||
"devDependencies": { | ||
"babel-preset-es2015-rollup": "^1.1.1", | ||
"local-web-server": "^1.2.6", | ||
"rollup": "^0.31.1", | ||
"rollup-plugin-babel": "^2.4.0", | ||
"uglify-js": "^2.6.2" | ||
"babel-preset-es2015": "6.16.0", | ||
"babel-preset-es2015-rollup": "1.2.0", | ||
"codeclimate-test-reporter": "^0.4.0", | ||
"diff": "3.0.0", | ||
"docdash": "0.4.0", | ||
"jasmine": "2.5.2", | ||
"js-yaml": "3.6.1", | ||
"jsdoc": "3.4.2", | ||
"karma": "1.3.0", | ||
"karma-babel-preprocessor": "6.0.1", | ||
"karma-chrome-launcher": "2.0.0", | ||
"karma-coverage": "1.1.1", | ||
"karma-firefox-launcher": "1.0.0", | ||
"karma-jasmine": "1.0.2", | ||
"karma-mocha-reporter": "^2.2.0", | ||
"karma-sauce-launcher": "1.0.0", | ||
"local-web-server": "1.2.6", | ||
"markdown": "^0.5.0", | ||
"pdfjs-dist": "1.6.283", | ||
"rollup": "0.36.3", | ||
"rollup-plugin-babel": "2.6.1", | ||
"uglify-js": "2.7.3" | ||
}, | ||
@@ -36,4 +53,7 @@ "scripts": { | ||
"build": "npm install && bower install && node build.js", | ||
"version": "npm run build && git add -A dist" | ||
"version": "npm run build && git add -A dist", | ||
"test": "./node_modules/.bin/karma start saucelabs.karma.conf.js --single-run && for a in coverage/*; do codeclimate-test-reporter < \"$a/lcov.info\"; break; done", | ||
"test-local": "node tests/utils/reference-server.js & karma start", | ||
"generate-docs": "node_modules/.bin/jsdoc -c jsdoc.json --readme README.md" | ||
} | ||
} |
@@ -1,23 +0,49 @@ | ||
#jsPDF | ||
# jsPDF | ||
[![Inline docs](http://inch-ci.org/github/MrRio/jsPDF.svg?branch=master)](http://inch-ci.org/github/MrRio/jsPDF) | ||
[![Build Status](https://saucelabs.com/buildstatus/jspdf)](https://saucelabs.com/beta/builds/526e7fda50bd4f97a854bf10f280305d) | ||
**Generate PDF files in client-side JavaScript.** | ||
[![Code Climate](https://codeclimate.com/repos/57f943855cdc43705e00592f/badges/2665cddeba042dc5191f/gpa.svg)](https://codeclimate.com/repos/57f943855cdc43705e00592f/feed) [![Test Coverage](https://codeclimate.com/repos/57f943855cdc43705e00592f/badges/2665cddeba042dc5191f/coverage.svg)](https://codeclimate.com/repos/57f943855cdc43705e00592f/coverage) | ||
**A library to generate PDFs in client-side JavaScript.** | ||
You can [catch me on twitter](http://twitter.com/MrRio): [@MrRio](http://twitter.com/MrRio) or head over to [my company's website](http://parall.ax) for consultancy. | ||
## [Live Demo](http://rawgit.com/MrRio/jsPDF/master/) | [Documentation](http://rawgit.com/MrRio/jsPDF/master/docs/) | ||
## Creating your first document | ||
See examples/basic.html. There's a live editor example at index.html. | ||
The easiest way to get started is to drop the CDN hosted library into your page: | ||
```html | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.3/jspdf.debug.js"></script> | ||
``` | ||
Then you're ready to start making your document: | ||
```javascript | ||
var doc = new jsPDF(); | ||
doc.text(20, 20, 'Hello world.'); | ||
doc.save('Test.pdf'); | ||
// Default export is a4 paper, portrait, using milimeters for units | ||
var doc = new jsPDF() | ||
doc.text('Hello world!', 10, 10) | ||
doc.save('a4.pdf') | ||
``` | ||
**Head over to [jsPDF.com](http://jspdf.com) for details or [_here_](http://mrrio.github.io/jsPDF/) for our most recent live editor and examples.** | ||
If you want to change the paper size, orientation, or units, you can do: | ||
```javascript | ||
// Landscape export, 2×4 inches | ||
var doc = new jsPDF({ | ||
orientation: 'landscape', | ||
unit: 'in', | ||
format: [4, 2] | ||
}) | ||
doc.text('Hello world!', 10, 10) | ||
doc.save('two-by-four.pdf') | ||
``` | ||
Great! Now give us a Star :) | ||
## Contributing | ||
Build the library with `npm run build`. This will fetch all dependencies and then compile the `dist` files. To see the examples locally you can start a web server with `npm start` and go to `localhost:8000`. | ||
Build the library with `npm run build`. This will fetch all dependencies and then compile the `dist` files. To see the examples locally you can start a web server with `npm start` and go to `localhost:8000`. | ||
@@ -24,0 +50,0 @@ ## Credits |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
16386
76
844781
22