1
0
Fork 0
mirror of https://github.com/IRS-Public/direct-file.git synced 2025-06-28 04:25:52 +00:00
direct-file/docs/engineering/md_to_pdf/md-to-pdf.config.js

31 lines
773 B
JavaScript
Raw Permalink Normal View History

2025-05-29 13:12:11 -04:00
const headerTemplate = `
<style>
section {
margin: 0 auto;
font-family: system-ui;
font-size: 12px;
}
.footer div {
position: absolute;
width: 50%;
bottom: 30px;
}
</style>
<section><div>[[HEADER]]</div></section>
`
const footerTemplate = '<section class="footer"><div style="left: 30px;">[[FOOTER]]</div><div style="text-align: right; right: 30px;"><span class="pageNumber"></span></div></section>';
module.exports = {
headerTemplate: headerTemplate,
footerTemplate: footerTemplate,
pdf_options: {
format: 'letter',
headerTemplate: headerTemplate.replace('[[HEADER]]', ''),
footerTemplate: footerTemplate.replace('[[FOOTER]]', 'Draft/Pre-decisional')
},
// https://github.com/simonhaenisch/md-to-pdf/issues/247
launch_options: {
headless: "new"
}
};