Convert a Markdown CV to PDF.
Requirements:
- Node.js
$ npm install -g cv2pdf
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
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());
});
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>
Public Domain
- default CSS based on jasonm23/markdown-css-themes