From b20aafe7a512a404367d2a309d730756d2391d26 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 10 Mar 2026 04:07:28 +0100 Subject: [PATCH] Fix PDF/A conversion status check in PDFMerger Previously, the code checked the status of the original document after converting the merged PDF to PDF/A, which could miss conversion errors. Now, it correctly checks the status of the merged PDF to ensure the conversion succeeded. --- .../Jobs/FinalizeDocument/PDFMerger.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFMerger.vb b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFMerger.vb index 207a916c..f0c3f963 100644 --- a/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFMerger.vb +++ b/EnvelopeGenerator.CommonServices/Jobs/FinalizeDocument/PDFMerger.vb @@ -56,7 +56,7 @@ Public Class PDFMerger ' Convert to PDF/A oMergedPDF.ConvertToPDFA(oFinalStream, PDFAConformanceLevel, ALLOW_VECTORIZATION, ALLOW_RASTERIZATION) - oStatus = oDocumentPDF.GetStat() + oStatus = oMergedPDF.GetStat() If oStatus <> GdPictureStatus.OK Then Throw New MergeDocumentException($"Document could not be converted to PDF/A: {oStatus}") End If