Szpadel / chrome-headless-render-pdf

223 stars 67 forks source link

unable to pass options when using programatically #44

Closed hansparsons closed 6 years ago

hansparsons commented 6 years ago

Hi,

how can we pass the options arguments when using the tool programmatically? i'm thinking something like this:

const RenderPDF = require('chrome-headless-render-pdf'); const options = {include-background: true, no-margins: true, page-ranges: '1'}; RenderPDF.generateSinglePdf( 'http://www.google.com', 'output.pdf', options);

Szpadel commented 6 years ago

You can check API in https://github.com/Szpadel/chrome-headless-render-pdf/blob/master/index.d.ts