PDF Time Eval Corrections

This commit is contained in:
2025-11-14 20:13:54 +01:00
parent f61c780185
commit f8c62a90f0

View File

@@ -922,7 +922,19 @@ export const createTimeSheetPDF = async (server: FastifyInstance, returnMode, da
opacity: 1
})*/
console.log(input)
pages[pageCounter - 1].drawText(`Anwesenheitsauswertung`,{
x: getCoordinatesForPDFLib(20,40,pages[pageCounter -1]).x,
y: getCoordinatesForPDFLib(20,40,pages[pageCounter -1]).y,
size: 15,
font: fontBold
})
pages[pageCounter - 1].drawText(`Mitarbeiter: ${input.full_name}`,{
x: getCoordinatesForPDFLib(20,50,pages[pageCounter -1]).x,
y: getCoordinatesForPDFLib(20,50,pages[pageCounter -1]).y,
size: 10,
})
pages[pageCounter - 1].drawText(`Nummer: ${input.employee_number}`,{
x: getCoordinatesForPDFLib(20,55,pages[pageCounter -1]).x,
y: getCoordinatesForPDFLib(20,55,pages[pageCounter -1]).y,
size: 10,
@@ -1005,7 +1017,9 @@ export const createTimeSheetPDF = async (server: FastifyInstance, returnMode, da
lastIndex = lastIndex + (i + 1) * 40 + 1
}
splitted.push(reversedInput.slice(lastIndex, reversedInput.length))
if(reversedInput.slice(lastIndex, reversedInput.length).length > 0) splitted.push(reversedInput.slice(lastIndex, reversedInput.length))
console.log(splitted )
splitted.forEach((chunk,index) => {