Ausstellen

This commit is contained in:
Moritz Utcke
2025-04-07 21:31:47 -04:00
parent ba7792a4b9
commit 71438a39eb
4 changed files with 13 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ import { addAnsichtsausweisLabel, addDatumGEG } from "./utils/helpers.js";
import { getS3File } from "#lib/s3.js";
export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewerbeClient, aufnahme: AufnahmeClient, objekt: ObjektClient, bilder: BildClient[], user: BenutzerClient) {
export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewerbeClient, aufnahme: AufnahmeClient, objekt: ObjektClient, bilder: BildClient[], user: BenutzerClient, vorschau = true) {
const VerbrauchsausweisWohnenGEG2024PDF = fs.readFileSync(new URL("../../../public/pdf/templates/GEG24_Nichtwohngebaeude.pdf", import.meta.url), "base64");
const pdf = await PDFDocument.load(VerbrauchsausweisWohnenGEG2024PDF)
const pages = pdf.getPages()
@@ -613,7 +613,9 @@ export async function pdfVerbrauchsausweisGewerbe(ausweis: VerbrauchsausweisGewe
for (const page of pages) {
addAnsichtsausweisLabel(page, font)
if (vorschau) {
addAnsichtsausweisLabel(page, font)
}
addDatumGEG(page, font)
}