Skip to content

Commit 3502c49

Browse files
committed
Adjust readme formatting
1 parent b550b0a commit 3502c49

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ html2pdf converts any webpage or element into a printable PDF entirely client-si
66

77
There are two ways to install html2pdf:
88

9-
1. **NPM:** Use `npm install --save html2pdf` to add html2pdf and its dependencies to your project. *Note: html2pdf **will not** run in Node.js, it must be run in a browser.*
10-
2. **HTML:** Download `dist/html2pdf.bundle.min.js` to your project folder and include it in your HTML with `<script src="html2pdf.bundle.min.js"></script>`.
9+
1. **NPM:** Use `npm install --save html2pdf` to add html2pdf and its dependencies to your project.
10+
2. **HTML:** Download `dist/html2pdf.bundle.min.js` to your project folder and include it in your HTML with:
11+
12+
`<script src="html2pdf.bundle.min.js"></script>`.
1113

1214
Once installed, html2pdf is ready to use. This command will generate a PDF of `#element-to-print` and prompt the user to save the result:
1315

@@ -16,11 +18,13 @@ var element = document.getElementById('element-to-print');
1618
html2pdf(element);
1719
```
1820

21+
**Note:** html2pdf **will not run in Node.js**, it must be run in a browser.
22+
1923
*[Click here](#dependencies) for more information about using the unbundled version `dist/html2canvas.min.js`.*
2024

2125
## Options
2226

23-
The PDF can be configured using an optional `opt` parameter:
27+
html2pdf can be configured using an optional `opt` parameter:
2428

2529
```js
2630
var element = document.getElementById('element-to-print');
@@ -69,9 +73,9 @@ These options are limited to the available settings for [HTMLCanvasElement.toDat
6973

7074
## Dependencies
7175

72-
html2pdf depends on the external packages [`html2canvas`](https://github.com/niklasvh/html2canvas) and [`jsPDF`](https://github.com/MrRio/jsPDF). These dependencies are automatically loaded when using NPM or the bundled package.
76+
html2pdf depends on the external packages [html2canvas](https://github.com/niklasvh/html2canvas) and [jsPDF](https://github.com/MrRio/jsPDF). These dependencies are automatically loaded when using NPM or the bundled package.
7377

74-
If using the un-bundled `dist/html2pdf.min.js` (or its un-minified version), you must also include each dependency. Order is important, otherwise html2canvas will be overridden by jsPDF's own internal implementation:
78+
If using the unbundled `dist/html2pdf.min.js` (or its un-minified version), you must also include each dependency. Order is important, otherwise html2canvas will be overridden by jsPDF's own internal implementation:
7579

7680
```html
7781
<script src="jspdf.min.js"></script>

0 commit comments

Comments
 (0)