diff --git a/EnvelopeGenerator.Application/Common/Configurations/PDFBurnerParams.cs b/EnvelopeGenerator.Application/Common/Configurations/PDFBurnerParams.cs
index 60e19579..d0d090af 100644
--- a/EnvelopeGenerator.Application/Common/Configurations/PDFBurnerParams.cs
+++ b/EnvelopeGenerator.Application/Common/Configurations/PDFBurnerParams.cs
@@ -57,4 +57,16 @@ public class PDFBurnerParams
{ "city", 2 },
{ "date", 3 }
};
+
+ ///
+ ///
+ ///
+ public int DefaultIndexOfAnnot { get; set; } = 0;
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public int GetAnnotationIndex(string name) => IndexOfAnnot.TryGetValue(name, out var value) ? value : DefaultIndexOfAnnot;
}
\ No newline at end of file
diff --git a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs
index e8bc6f9e..86d36920 100644
--- a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs
+++ b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs
@@ -256,7 +256,7 @@ public class BurnPdfCommandHandler : IRequestHandler
private void AddFormFieldValue(Annotation pAnnotation, FormFieldValue formFieldValue)
{
- var ffIndex = _pdfBurnerParams.IndexOfAnnot[pAnnotation.EgName];
+ var ffIndex = _pdfBurnerParams.GetAnnotationIndex(pAnnotation.EgName);
// Convert pixels to Inches
var oBounds = pAnnotation.Bbox?.Select(ToInches).ToList();