From d259a15b4b7878930acac65e27f6f12d6408022e Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 28 Oct 2025 16:43:59 +0100 Subject: [PATCH] refactor: add DigitalData.Core.Abstractions.Interfaces import and make Background method width/height configurable --- EnvelopeGenerator.PdfEditor/Pdf.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/EnvelopeGenerator.PdfEditor/Pdf.cs b/EnvelopeGenerator.PdfEditor/Pdf.cs index 325c2775..03b629f0 100644 --- a/EnvelopeGenerator.PdfEditor/Pdf.cs +++ b/EnvelopeGenerator.PdfEditor/Pdf.cs @@ -2,6 +2,8 @@ using iText.Kernel.Pdf.Canvas; using EnvelopeGenerator.Domain.Interfaces; using iText.Kernel.Colors; +using DigitalData.Core.Abstractions.Interfaces; + #if NETFRAMEWORK using System; using System.IO; @@ -100,7 +102,7 @@ namespace EnvelopeGenerator.PdfEditor }); #endregion - public Pdf Background(IEnumerable signatures) + public Pdf Background(IEnumerable signatures, double widthPx = 1.9500000000000002, double heightPx = 2.52) where TSignature : ISignature { // once per page @@ -118,8 +120,8 @@ namespace EnvelopeGenerator.PdfEditor double magin = .2; double x = (signature.X - .7 - magin) * inchFactor; double y = (signature.Y - .5 - magin) * inchFactor; - double width = 1.9500000000000002 * inchFactor; - double height = 2.52 * inchFactor; + double width = widthPx * inchFactor; + double height = heightPx * inchFactor; double bottomLineLength = 2.5;