Add new feature, support page ranges

This commit is contained in:
yumauri
2019-12-17 00:02:12 +03:00
parent 362deaa828
commit 56604dc858
6 changed files with 44 additions and 2 deletions
BIN
View File
Binary file not shown.
+12 -1
View File
@@ -1,5 +1,15 @@
import { createWriteStream } from 'fs'
import { add, convert, gotenberg, headers, pipe, please, url } from '../src'
import {
add,
convert,
gotenberg,
headers,
pipe,
please,
range,
set,
url,
} from '../src'
// need to run Gotenberg like this
// docker run --rm -p 3500:3000 thecodingmachine/gotenberg:6
@@ -14,6 +24,7 @@ pipe(
'Test-Header-2': 'Bar',
})
),
set(range('1-1')),
please
)(`https://request.urih.com/`)
.then(pdf => pdf.pipe(createWriteStream(`${__dirname}/headers.pdf`)))