Add PDF editing and envelope management features

Introduced a new `SenderEditorPage` with a modern UI for managing envelopes, uploading PDFs, and placing signature fields. Integrated `DevExpress.Blazor.PdfViewer` for PDF rendering and interaction.

Key features include:
- PDF upload, rendering, and validation.
- Signature field placement with normalized coordinates.
- Receiver management with validation and email suggestions.
- Envelope metadata handling (title, message).
- Save as draft and send functionality with validation.
- Edit mode for existing envelopes.
- Improved UX with dynamic elements and color-coded receivers.
- Localization support for multi-language UI.

Updated `_Imports.razor` to include necessary namespaces for DevExpress components and the new `PdfEditor` namespace.
This commit is contained in:
2026-09-29 11:59:06 +02:00
parent 4d3f72a3ed
commit 8a4963472c
3 changed files with 1144 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
@using DevExpress.Blazor.PdfViewer
<div class="pdf-editor-wrapper"
style="cursor: @(IsPlacementMode ? "crosshair" : "default");"
@onclick="HandleClickAsync">
@if (PdfBytes is { Length: > 0 })
{
<DxPdfViewer DocumentContent="@PdfBytes"
CssClass="@ViewerCssClass" />
}
</div>
@code {
[Parameter]
public byte[]? PdfBytes { get; set; }
[Parameter]
public bool IsPlacementMode { get; set; }
[Parameter]
public string ViewerCssClass { get; set; } = "sender-editor-pdf-viewer";
[Parameter]
public EventCallback<MouseEventArgs> EditorClick { get; set; }
private async Task HandleClickAsync(MouseEventArgs args)
{
if (EditorClick.HasDelegate)
await EditorClick.InvokeAsync(args);
}
}

View File

@@ -11,6 +11,7 @@
@using EnvelopeGenerator.Server.Client.Services
@using EnvelopeGenerator.Server.Client.Models
@using EnvelopeGenerator.Server.Client.Options
@using EnvelopeGenerator.Server.Client.Components.PdfEditor
@using DevExpress.Blazor
@using DevExpress.Blazor.PdfViewer
@using DevExpress.Blazor.Reporting