From 02c5f286ec0c7c42fc98ab3356bb9d94c160698f Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 7 Nov 2025 12:44:05 +0100 Subject: [PATCH] feat(pdf): implement AddFormFieldValue for PDF annotations - Added implementation for AddFormFieldValue method to properly add text annotations to PDF pages using AnnotationManager. - Preserves font settings from PDFBurnerParams. - Other annotation methods remain unimplemented. --- EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs index ab3ffa11..e0a25921 100644 --- a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs +++ b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs @@ -254,9 +254,18 @@ public class BurnPdfCommandHandler : IRequestHandler private void AddFormFieldValue(double x, double y, double width, double height, int page, string value) { - throw new NotImplementedException(); - } + _manager.SelectPage(page); + + // Add the text annotation + var ant = _manager.AddTextAnnot((float)x, (float)y, (float)width, (float)height, value); + // Set the font properties + ant.FontName = _pdfBurnerParams.FontName; + ant.FontSize = _pdfBurnerParams.FontSize; + ant.FontStyle = _pdfBurnerParams.FontStyle; + + _manager.SaveAnnotationsToPage(); + } private void AddFormFieldValue(Annotation pAnnotation, FormFieldValue formFieldValue) {