From 860d1f3e144cb2c8672a994c82651d244168c591 Mon Sep 17 00:00:00 2001 From: Rafael Falk Date: Thu, 5 Dec 2024 16:46:53 +0100 Subject: [PATCH] feature(pdf-service): remove Druckvermerk from Hinweisblatt in pkh pdf (#1527) --- app/domains/prozesskostenhilfe/services/pdf/index.ts | 9 ++------- .../services/pdf/loadHinweisblatt.ts | 11 +---------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/app/domains/prozesskostenhilfe/services/pdf/index.ts b/app/domains/prozesskostenhilfe/services/pdf/index.ts index cc65f369b..ff1b44cbe 100644 --- a/app/domains/prozesskostenhilfe/services/pdf/index.ts +++ b/app/domains/prozesskostenhilfe/services/pdf/index.ts @@ -86,13 +86,11 @@ export async function prozesskostenhilfePdfFromUserdata( ], }); - const xPositionDruckvermerk = 9; - const filledPdfFormDocument = await fillPdf({ flowId: "/prozesskostenhilfe/formular", pdfValues, yPositionsDruckvermerk: [43, 51, 40, 44], // Different y positions because the form boxes jump for each page - xPositionsDruckvermerk: xPositionDruckvermerk, + xPositionsDruckvermerk: 9, }); printNameInSignatureFormField(filledPdfFormDocument, userData); @@ -116,10 +114,7 @@ export async function prozesskostenhilfePdfFromUserdata( await appendPagesToPdf( filledPdfFormDocumentWithMetadata, - await loadHinweisblatt({ - yPositionDruckvermerk: 44, - xPositionDruckvermerk, - }), + await loadHinweisblatt(), ); return filledPdfFormDocumentWithMetadata.save(); diff --git a/app/domains/prozesskostenhilfe/services/pdf/loadHinweisblatt.ts b/app/domains/prozesskostenhilfe/services/pdf/loadHinweisblatt.ts index ee12f8734..9624b0eec 100644 --- a/app/domains/prozesskostenhilfe/services/pdf/loadHinweisblatt.ts +++ b/app/domains/prozesskostenhilfe/services/pdf/loadHinweisblatt.ts @@ -1,15 +1,8 @@ import fs from "node:fs"; import path from "node:path"; import { PDFDocument } from "pdf-lib"; -import { addDruckvermerk } from "~/services/pdf/druckvermerk"; -export default async function loadHinweisblatt({ - yPositionDruckvermerk, - xPositionDruckvermerk, -}: { - yPositionDruckvermerk: number; - xPositionDruckvermerk: number; -}) { +export default async function loadHinweisblatt() { const filepath = path.resolve( path.join( process.cwd(), @@ -21,7 +14,5 @@ export default async function loadHinweisblatt({ const pdfDoc = await PDFDocument.load(fs.readFileSync(filepath)); - addDruckvermerk(pdfDoc, yPositionDruckvermerk, xPositionDruckvermerk); - return pdfDoc; }