Skip to content

Commit

Permalink
Add print options
Browse files Browse the repository at this point in the history
Add print options as per the following information:

jsonresume/resume-cli#617
  • Loading branch information
asbjornu committed May 7, 2023
1 parent 9ff142e commit 74aff87
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function sort(array, ascending, field) {
}

function render(resume) {
var css = fs.readFileSync(__dirname + "/Kards10/css/styles.css", "utf-8");
var css = fs.readFileSync(__dirname + "/Kards10/css/styles.css", "utf-8");
var mainJs = fs.readFileSync(__dirname + "/Kards10/js/main.js", "utf-8");
var pluginsJs = fs.readFileSync(__dirname + "/Kards10/js/plugins.js", "utf-8");
var tpl = fs.readFileSync(__dirname + "/resume.hbs", "utf-8");
Expand Down Expand Up @@ -199,5 +199,16 @@ function render(resume) {
}

module.exports = {
render: render
render: render,
pdfRenderOptions: {
format: 'A4',
mediaType: 'print',
pdfViewport: { width: 1920, height: 1280 },
margin: {
top: '1cm',
bottom: '1cm',
left: '1cm',
right: '1cm',
},
},
};

0 comments on commit 74aff87

Please sign in to comment.