feat(PDFBurnerParams): add DefaultIndexOfAnnot and GetAnnotationIndex

- add `DefaultIndexOfAnnot` property to provide a fallback index for annotations
 - add `GetAnnotationIndex(string name)` method to safely retrieve an annotation index, returning default if not found
This commit is contained in:
2025-11-07 13:03:50 +01:00
parent a386ad72bb
commit 339e0e81cd
2 changed files with 13 additions and 1 deletions

View File

@@ -256,7 +256,7 @@ public class BurnPdfCommandHandler : IRequestHandler<BurnPdfCommand>
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();