# cv2pdf

> Convert a Markdown CV to PDF

Latest version **1.0.1** (published 2015-01-30) · Public Domain license · 0 weekly downloads

## Install

```sh
npm install cv2pdf
pnpm add cv2pdf
yarn add cv2pdf
bun add cv2pdf
```

Provides the command `cv2pdf`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-01-30 |
| First published | 2015-01-17 |
| Weekly downloads | 0 |
| License | Public Domain |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Renato S. Martins |
| Maintainers | renatomartins |
| Keywords | cv, resume, markdown, pdf, convert |

## Links

- npm: https://www.npmjs.com/package/cv2pdf
- Repository: https://github.com/renatomartins/cv2pdf
- Issues: https://github.com/renatomartins/cv2pdf/issues
- npm.io page: https://npm.io/package/cv2pdf

## Dependencies (3)

- [minimist](https://npm.io/package/minimist.md) ^1.1.0
- [phantomjs](https://npm.io/package/phantomjs.md) ^1.9.13
- [remarkable](https://npm.io/package/remarkable.md) ^1.6.0

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-01-30
- 0.3.1 — 2015-01-26
- 0.3.0 — 2015-01-23
- 0.1.1 — 2015-01-17
- 0.1.0 — 2015-01-17

## README

# cv2pdf [![Build Status](https://travis-ci.org/renatomartins/cv2pdf.svg?branch=master)](https://travis-ci.org/renatomartins/cv2pdf)

Convert a Markdown CV to PDF.

## Install:

Requirements:

 * Node.js

```
$ npm install -g cv2pdf
```

## Usage

### Command line

Options:
 * --out | -o: output filename
 * --css | -c: custom css
 * --html | -h: whether to save an html file
 * --watch | -w: converts everytime the file is saved
 * --help: show usage

```sh
# basic example
$ cv2pdf cv.md

# change the output filename
$ cv2pdf --out=cv-latest.pdf cv.md

# save only the html and apply custom css
$ cv2pdf --html --css=style.css cv.md

# convert to html everytime the file is saved
$ cv2pdf --watch --html cv.md
```

### Programmatic

```js
var Cv2Pdf = require('cv2pdf');

// basic example
var cv2pdf = new Cv2Pdf('cv.md');
cv2pdf.convert();

// change the output filename
var cv2pdf = new Cv2Pdf('cv.md', {out: 'cv-latest.pdf'});
cv2pdf.convert();

// save only the html and apply custom css
var cv2pdf = new Cv2Pdf('cv.md', {html: true, css: 'style.css'});
cv2pdf.convert();

// this method is asynchronous
cv2pdf.convert(function () {
  console.log('Done!');
});

// watch modifications on a file, also asynchronous
cv2pdf.watch(function (err) {
  if (err) return console.error(err);
  console.log('Last converted: ' + Date.now());
});
```

## Styling

Apart from all the HTML tags you can style, the PDF will also render a footer for each page with the class `page-footer`:

```html
<span class="page-footer">1 / 3</span>
```

## License

Public Domain


## Acknowledgments

 * default CSS based on [jasonm23/markdown-css-themes](https://github.com/jasonm23/markdown-css-themes/blob/2bab19caff1590ede65821cedd5cd1ac4d63233d/markdown5.css)

---
_Source: https://npm.io/package/cv2pdf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
