fix ordering, remove parameters
parent
4e59ebe8ad
commit
0a4d54a150
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference types="cookie-parser" />
|
||||
import type { Request, Response, NextFunction } from 'express';
|
||||
import type { NextFunction, Request, Response } from 'express';
|
||||
export declare function handler(request: Request, response: Response, next: NextFunction): Promise<void>;
|
||||
export default handler;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import camelcase from 'camelcase';
|
|||
import * as ejs from 'ejs';
|
||||
import * as configFunctions from '../../helpers/functions.config.js';
|
||||
import * as lotOccupancyFunctions from '../../helpers/functions.lotOccupancy.js';
|
||||
import { getReportData, getPdfPrintConfig } from '../../helpers/functions.print.js';
|
||||
import { getPdfPrintConfig, getReportData } from '../../helpers/functions.print.js';
|
||||
const attachmentOrInline = configFunctions.getProperty('settings.printPdf.contentDisposition');
|
||||
export async function handler(request, response, next) {
|
||||
const printName = request.params.printName;
|
||||
|
|
@ -40,9 +40,6 @@ export async function handler(request, response, next) {
|
|||
format: 'letter',
|
||||
printBackground: true,
|
||||
preferCSSPageSize: true
|
||||
}, undefined, {
|
||||
cacheBrowser: true,
|
||||
remoteContent: false
|
||||
});
|
||||
pdfCallbackFunction(pdf);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@ import { convertHTMLToPDF } from '@cityssm/pdf-puppeteer'
|
|||
import * as dateTimeFunctions from '@cityssm/utils-datetime'
|
||||
import camelcase from 'camelcase'
|
||||
import * as ejs from 'ejs'
|
||||
import type { Request, Response, NextFunction } from 'express'
|
||||
import type { NextFunction, Request, Response } from 'express'
|
||||
|
||||
import * as configFunctions from '../../helpers/functions.config.js'
|
||||
import * as lotOccupancyFunctions from '../../helpers/functions.lotOccupancy.js'
|
||||
import {
|
||||
getReportData,
|
||||
getPdfPrintConfig
|
||||
getPdfPrintConfig,
|
||||
getReportData
|
||||
} from '../../helpers/functions.print.js'
|
||||
|
||||
const attachmentOrInline = configFunctions.getProperty(
|
||||
|
|
@ -74,19 +74,11 @@ export async function handler(
|
|||
return
|
||||
}
|
||||
|
||||
const pdf = await convertHTMLToPDF(
|
||||
ejsData,
|
||||
{
|
||||
const pdf = await convertHTMLToPDF(ejsData, {
|
||||
format: 'letter',
|
||||
printBackground: true,
|
||||
preferCSSPageSize: true
|
||||
},
|
||||
undefined,
|
||||
{
|
||||
cacheBrowser: true,
|
||||
remoteContent: false
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
pdfCallbackFunction(pdf)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue