File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,15 @@ HTML to PDF converter provided by command line interface and RESTful API. Powere
3
3
4
4
## Installing
5
5
```
6
- npm install https://github.com/iamdual/html2pdf
6
+ npm install -g https://github.com/iamdual/html2pdf
7
7
```
8
8
9
9
## Usage
10
10
11
11
### Command-line
12
12
``` bash
13
+ html2pdf ' <!DOCTYPE html><strong>Hello world!</strong>' -o output.pdf
14
+
13
15
html2pdf " https://www.google.com" --format A4 --timeout 10 -o google.pdf
14
16
```
15
17
@@ -40,7 +42,7 @@ curl -X POST 'http://localhost:3000/generate' \
40
42
## Parameters
41
43
| Name | Type | Description |
42
44
| ------------| ---------| -------------------------------------------------------------------------------------------------------------------------------------|
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. |
44
46
| timeout | integer | Set connection timeout. Default is ` 10 ` . |
45
47
| javascript | boolean | Enable JavaScripts. To enable, the value should be true. Disabled by default. |
46
48
| pageRanges | string | Set pages by the numbers and ranges. Example: ` 1,2-4 ` . All pages included by default. |
You can’t perform that action at this time.
0 commit comments