diff --git a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs index 77c4bb09..9c70349c 100644 --- a/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs +++ b/EnvelopeGenerator.Application/Pdf/BurnPdfCommand.cs @@ -43,6 +43,13 @@ public class BurnPdfCommandHandler : IRequestHandler _signRepo = signRepo; } + /// + /// + /// + /// + /// + /// + /// public byte[] BurnAnnotsToPDF(byte[] pSourceBuffer, List pInstantJSONList, int envelopeId) { // read the elements of envelope with their annotations @@ -99,10 +106,10 @@ public class BurnPdfCommandHandler : IRequestHandler var frame = element.Annotations?.FirstOrDefault(a => a.Name == "frame"); double frameY = element.Top - 0.5 - margin; - double frameYShift = frame.Y - frameY * inchFactor; - double frameXShift = frame.X - frameX * inchFactor; + double frameYShift = (frame!.Y ?? default) - frameY * inchFactor; + double frameXShift = (frame.X ?? default) - frameX * inchFactor; - foreach (var annot in element.Annotations) + foreach (var annot in element.Annotations!) { double yOffsetofFF; if (!yOffsetsOfFF.TryGetValue(annot.Name, out yOffsetofFF)) diff --git a/EnvelopeGenerator.Domain/Entities/Signature.cs b/EnvelopeGenerator.Domain/Entities/Signature.cs index 992e346d..42f26a95 100644 --- a/EnvelopeGenerator.Domain/Entities/Signature.cs +++ b/EnvelopeGenerator.Domain/Entities/Signature.cs @@ -2,6 +2,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Text.Json.Serialization; #if NETFRAMEWORK using System; using System.Collections.Generic; @@ -120,13 +121,17 @@ public class Signature : ISignature, IHasReceiver #endif Annotations { get; set; } -#if NETFRAMEWORK +#if NET + [JsonIgnore] +#endif [NotMapped] public double Top => Math.Round(Y, 5); +#if NET + [JsonIgnore] +#endif [NotMapped] public double Left => Math.Round(X, 5); -#endif } #if NETFRAMEWORK diff --git a/EnvelopeGenerator.Finalizer/appsettings.Database.json b/EnvelopeGenerator.Finalizer/appsettings.Database.json index c6c9cdfc..1c7059a7 100644 --- a/EnvelopeGenerator.Finalizer/appsettings.Database.json +++ b/EnvelopeGenerator.Finalizer/appsettings.Database.json @@ -18,5 +18,5 @@ "Receiver": [], "EmailTemplate": [ "TBSIG_EMAIL_TEMPLATE_AFT_UPD" ] }, - "UseInMemoryDb": true + "UseInMemoryDb": false } \ No newline at end of file