Skip to content

Commit 778619d

Browse files
committed
update readme
1 parent 5aca854 commit 778619d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ HTML to PDF converter provided by command line interface and RESTful API. Powere
33

44
## Installing
55
```
6-
npm install https://github.com/iamdual/html2pdf
6+
npm install -g https://github.com/iamdual/html2pdf
77
```
88

99
## Usage
1010

1111
### Command-line
1212
```bash
13+
html2pdf '<!DOCTYPE html><strong>Hello world!</strong>' -o output.pdf
14+
1315
html2pdf "https://www.google.com" --format A4 --timeout 10 -o google.pdf
1416
```
1517

@@ -40,7 +42,7 @@ curl -X POST 'http://localhost:3000/generate' \
4042
## Parameters
4143
| Name | Type | Description |
4244
|------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
43-
| source | string | Set PDF document source. It must be specified. The source can be a URL or an HTML. |
45+
| source | string | Set PDF document source. It must be specified. The source can be a URL or an HTML code. |
4446
| timeout | integer | Set connection timeout. Default is `10`. |
4547
| javascript | boolean | Enable JavaScripts. To enable, the value should be true. Disabled by default. |
4648
| pageRanges | string | Set pages by the numbers and ranges. Example: `1,2-4`. All pages included by default. |

0 commit comments

Comments
 (0)