<commit_before># crtopdf
Converts HTML to PDF using Chrome's built-in engine.

Requires at least Chrome 59 (Chrome 60 on Windows) and Node 5.7. See `crtopdf --help` or the JSDoc for further information.

## CLI Example
```
npm install -g https://github.com/alexhorn/crtopdf.git

crtopdf -u https://en.wikipedia.org -o wikipedia.pdf
```

## Code Example
```
var fs = require('fs');
var CrToPdf = require('crtopdf');

var pdf = new CrToPdf();

pdf.init()
.then(function () {
  pdf.convert({
    url: 'https://en.wikipedia.org'
    landscape: 'portrait',
    printBackground: true,
    format: 'a4',
    marginTop: 1,
    marginBottom: 1,
    marginLeft: 1,
    marginRight: 1,
    pageRanges: '1-5'
  });
})<commit_msg>Shorten installation URL<commit_after># crtopdf
Converts HTML to PDF using Chrome's built-in engine.

Requires at least Chrome 59 (Chrome 60 on Windows) and Node 5.7. See `crtopdf --help` or the JSDoc for further information.

## CLI Example
```
npm install -g alexhorn/crtopdf

crtopdf -u https://en.wikipedia.org -o wikipedia.pdf
```

## Code Example
```
var fs = require('fs');
var CrToPdf = require('crtopdf');

var pdf = new CrToPdf();

pdf.init()
.then(function () {
  pdf.convert({
    url: 'https://en.wikipedia.org'
    landscape: 'portrait',
    printBackground: true,
    format: 'a4',
    marginTop: 1,
    marginBottom: 1,
    marginLeft: 1,
    marginRight: 1,
    pageRanges: '1-5'
  });
})
{'fraction_non_alphanumeric': 0.14627285513361463, 'fraction_numerical': 0.01828410689170183, 'mean_word_length': 3.446875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3969026', 'n_tokens_mistral': 538, 'n_tokens_neox': 508, 'n_words': 152}