Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumesolderaserli committed Apr 9, 2020
1 parent 971231d commit 8a39146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const generatePDF = (inputAsHTML, name, options, callback) => {
if (err) {
callback(err, null)
} else {
RenderPDF.generateSinglePdf(`file://${pathFileName}`, outputPathFileName, options || {})
RenderPDF.generateSinglePdf(`file://${pathFileName}`, outputPathFileName, options || {})
.then(() => {
deleteSilently(pathFileName)
callback(null, outputPathFileName)
Expand Down
6 changes: 3 additions & 3 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const app = express()
const pdf = require('./pdf.js')
const { deleteSilently } = require('./file-utils')

const jsonParser = bodyParser.json({limit: '10mb'})
const jsonParser = bodyParser.json({ limit: '10mb' })

const claimSharedkey = process.env.CLAIM_SHAREDKEY
const otoroshiExchangeProtocolEnabled = claimSharedkey && claimSharedkey !== ''
Expand Down Expand Up @@ -38,7 +38,7 @@ app.post('/convert/pdf/', jsonParser, (req, res) => {
// sample options : {paperWidth: 8.3, paperHeight: 11.7} = A4 page in inches
// sample options : {noMargin: true} = disable default 1cm margins
// available other options : includeBackground (include elements background), landscape (generate pdf in landscape orientation)
const options = req.body.options || {}
const options = req.body.options || {}
console.info(`Starting PDF generation for ${name}`)
console.time('pdf-generation')
pdf.generatePDF(content, name, options, (err, outputFileName) => {
Expand All @@ -49,7 +49,7 @@ app.post('/convert/pdf/', jsonParser, (req, res) => {
console.info(`${name} generated!`)
console.timeEnd('pdf-generation')
const headers = {
'headers': {
headers: {
'Content-Type': 'application/pdf'
}
}
Expand Down

0 comments on commit 8a39146

Please sign in to comment.