Compare commits
5 Commits
eafcd79749
...
04b3d630fe
| Author | SHA1 | Date | |
|---|---|---|---|
| 04b3d630fe | |||
| d39a3d283d | |||
| 7cae9a5291 | |||
| 6f31d7b1d0 | |||
| 06431028cb |
@@ -6,6 +6,7 @@ using iText.Kernel.Geom;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
#endif
|
||||
@@ -68,7 +69,15 @@ namespace EnvelopeGenerator.PdfEditor
|
||||
{
|
||||
var page = doc.GetPage(pageIndex);
|
||||
design(doc.GetPage(pageIndex));
|
||||
});
|
||||
});
|
||||
|
||||
public Pdf<TInputStream, TOutputStream> Page(Action<PdfPage> design)
|
||||
{
|
||||
for (int i = 1; i <= _doc.GetNumberOfPages(); i++)
|
||||
Page(i, design);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public Pdf<TInputStream, TOutputStream> Design(int pageIndex, Action<PdfCanvas> design)
|
||||
=> Document(doc =>
|
||||
@@ -82,6 +91,13 @@ namespace EnvelopeGenerator.PdfEditor
|
||||
public Pdf<TInputStream, TOutputStream> Background<TSignature>(IEnumerable<TSignature> signatures)
|
||||
where TSignature : ISignature
|
||||
{
|
||||
// once per page
|
||||
Page(page =>
|
||||
{
|
||||
var canvas = new PdfCanvas(page);
|
||||
canvas.ConcatMatrix(1, 0, 0, -1, 0, page.GetPageSize().GetHeight());
|
||||
});
|
||||
|
||||
foreach (var signature in signatures)
|
||||
Page(signature.Page, page =>
|
||||
{
|
||||
@@ -95,10 +111,6 @@ namespace EnvelopeGenerator.PdfEditor
|
||||
|
||||
double bottomLineLength = 2.5;
|
||||
|
||||
Rectangle pageSize = page.GetPageSize();
|
||||
|
||||
canvas.ConcatMatrix(1, 0, 0, -1, 0, pageSize.GetHeight());
|
||||
|
||||
// draw background
|
||||
canvas.SetFillColor(new DeviceRgb(222, 220, 215))
|
||||
.Rectangle(x, y, width, height)
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
<PackageTags>digital data envelope generator web</PackageTags>
|
||||
<Description>EnvelopeGenerator.Web is an ASP.NET MVC application developed to manage signing processes. It uses Entity Framework Core (EF Core) for database operations. The user interface for signing processes is developed with Razor View Engine (.cshtml files) and JavaScript under wwwroot, integrated with PSPDFKit. This integration allows users to view and sign documents seamlessly.</Description>
|
||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||
<Version>3.4.0</Version>
|
||||
<AssemblyVersion>3.4.0</AssemblyVersion>
|
||||
<FileVersion>3.4.0</FileVersion>
|
||||
<Version>3.4.1</Version>
|
||||
<AssemblyVersion>3.4.1</AssemblyVersion>
|
||||
<FileVersion>3.4.1</FileVersion>
|
||||
<Copyright>Copyright © 2025 Digital Data GmbH. All rights reserved.</Copyright>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ try
|
||||
Directory
|
||||
.GetFiles(builder.Environment.ContentRootPath, "appsettings.*.json", SearchOption.TopDirectoryOnly)
|
||||
.Where(file => Path.GetFileName(file) != $"appsettings.Development.json")
|
||||
.Where(file => Path.GetFileName(file) != $"appsettings.migration.json")
|
||||
.ToList()
|
||||
.ForEach(file => config.AddJsonFile(file, true, true));
|
||||
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
</details>
|
||||
</section>
|
||||
</div>
|
||||
@if (smsExpiration is not null)
|
||||
{
|
||||
<script nonce="@nonce">
|
||||
var expiration = new Date(@Html.Raw(JsonConvert.SerializeObject(smsExpiration)));
|
||||
|
||||
@@ -121,4 +123,5 @@
|
||||
var remainingTime = `${formattedMinutes}:${formattedSeconds}`;
|
||||
element.textContent = remainingTime;
|
||||
}, 1000);
|
||||
</script>
|
||||
</script>
|
||||
}
|
||||
Reference in New Issue
Block a user