Skip to content
Permalink
Browse files
Merge pull request #20 from 340CT-1920SEPJAN/feature/pdf
Feature/pdf
  • Loading branch information
sellers3 committed Dec 2, 2019
2 parents 771ed6d + 2986382 commit 83612560dd7f6086cc29cdb4a37fc198568d5885
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
@@ -28,14 +28,10 @@ module.exports = class Order {
keywords: 'Menu, Restaurant, Price,',
creator: 'User'})
doc.addPage()
//doc.setFontSize(22)
//doc.text(20, 20, 'This is a title')
//doc.setFontSize(16)
//doc.text(20, 30, 'This is some normal sized text underneath.')
const fileName = `testFile${new Date().getSeconds()}.pdf`
// eslint-disable-next-line handle-callback-err
fs.writeFile(fileName, doc.output(), (err, data) => {
console.log(`${fileName } was created! great success!`)
console.log(`${fileName} was created! great success!`)
})
}
}
@@ -92,6 +92,7 @@ router.get('/menu', async ctx => {
router.post('/menu', async ctx => {
try {
const body = ctx.request.body
console.log(body)
const pdf = new PDF()
pdf.createPDF(body)
ctx.redirect('/menu')

0 comments on commit 8361256

Please sign in to comment.