refactor: add DigitalData.Core.Abstractions.Interfaces import and make Background method width/height configurable

This commit is contained in:
tekh 2025-10-28 16:43:59 +01:00
parent 23e0e5ddbe
commit d259a15b4b

View File

@ -2,6 +2,8 @@
using iText.Kernel.Pdf.Canvas; using iText.Kernel.Pdf.Canvas;
using EnvelopeGenerator.Domain.Interfaces; using EnvelopeGenerator.Domain.Interfaces;
using iText.Kernel.Colors; using iText.Kernel.Colors;
using DigitalData.Core.Abstractions.Interfaces;
#if NETFRAMEWORK #if NETFRAMEWORK
using System; using System;
using System.IO; using System.IO;
@ -100,7 +102,7 @@ namespace EnvelopeGenerator.PdfEditor
}); });
#endregion #endregion
public Pdf<TInputStream, TOutputStream> Background<TSignature>(IEnumerable<TSignature> signatures) public Pdf<TInputStream, TOutputStream> Background<TSignature>(IEnumerable<TSignature> signatures, double widthPx = 1.9500000000000002, double heightPx = 2.52)
where TSignature : ISignature where TSignature : ISignature
{ {
// once per page // once per page
@ -118,8 +120,8 @@ namespace EnvelopeGenerator.PdfEditor
double magin = .2; double magin = .2;
double x = (signature.X - .7 - magin) * inchFactor; double x = (signature.X - .7 - magin) * inchFactor;
double y = (signature.Y - .5 - magin) * inchFactor; double y = (signature.Y - .5 - magin) * inchFactor;
double width = 1.9500000000000002 * inchFactor; double width = widthPx * inchFactor;
double height = 2.52 * inchFactor; double height = heightPx * inchFactor;
double bottomLineLength = 2.5; double bottomLineLength = 2.5;