1.0.1 • Published 9 years ago

cv2pdf v1.0.1

Weekly downloads
3
License
Public Domain
Repository
github
Last release
9 years ago

cv2pdf Build Status

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
# 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

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:

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

License

Public Domain

Acknowledgments

1.0.1

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago