Commit Graph

7 Commits

Author SHA1 Message Date
db70bbcebf Add UnitOfLength enum and enhance SignatureDto immutability
Introduced the `UnitOfLength` enum to represent measurement units
(Inch and Point) for signature positioning, with detailed
documentation and conversion logic.

Updated `SignatureDto` to use `init` accessors for immutability,
added backing fields for `X` and `Y` with conversion support, and
introduced the `Factor` property to handle unit conversions.

Added a `Convert` method to enable switching between units of
length and improved extensibility for future `SenderAppType`
support. Enhanced code readability and maintainability with
detailed comments and remarks.
2026-06-07 10:17:42 +02:00
6d6e14fcb7 Add SenderAppType enum and integrate into SignatureDto
A new `SenderAppType` enum was introduced in the
`EnvelopeGenerator.ReceiverUI.Models.Constants` namespace, with
values `LegacyFormApp` and `ReceiverUIBlazorApp`.

The `SignatureDto` class was updated to include a new property of
type `SenderAppType`, enabling the specification of the sender
application type for a signature.

Additionally, a `using` directive for the
`EnvelopeGenerator.ReceiverUI.Models.Constants` namespace was added
to `SignatureDto.cs` to support the use of the new enum.
2026-06-06 21:23:43 +02:00
34f145305c Standardize coordinate system to use INCHES
Updated the digital document signing system to use INCHES as the standard unit for annotations and signatures, aligning with GdPicture14's native format. Previously used DevExpress units (1/100 inch) and other formats have been replaced.

- Updated `AnnotationDto` to reflect the new coordinate system.
- Introduced `SignatureDto` for signature positions, deprecating `AnnotationDto`.
- Added conversion formulas for transforming coordinates between INCHES and other systems (DevExpress, PDF Points, PDF.js, etc.).
- Added a unit comparison table and A4 page dimensions in various units.
- Introduced a new read-only PDF.js viewer for envelopes (`/envelope/{EnvelopeKey}`).

These changes improve consistency, simplify conversions, and align with modern tools like PSPDFKit and iText7.
2026-06-06 21:21:12 +02:00
dec2b81afe Refactor to use SignatureDto and SignatureService
Replaced AnnotationDto and AnnotationService with SignatureDto
and SignatureService for handling signature data. Marked
AnnotationDto and AnnotationService as obsolete.

Added the SignatureDto class to represent signature data and
introduced the SignatureService class to fetch signature data
from the API. Updated EnvelopeViewer.razor to use
SignatureService, replacing AnnotationService, and added a
debug log for retrieved signatures.

Performed general refactoring to align with the new signature
data model and functionality.
2026-06-06 19:14:42 +02:00
122942a5ff Add EnvelopeReceiverDto and related service class
Introduced `EnvelopeReceiverDto` and its nested models (`EnvelopeClientDto`, `EnvelopeSenderDto`, `DocumentClientDto`, `SignatureClientDto`, `ReceiverClientDto`) to represent client-side data for envelope receivers and their associated entities.

Added `EnvelopeReceiverService` to fetch `EnvelopeReceiverDto` from the API using `HttpClient`. Implemented error handling and JSON deserialization with `JsonSerializerDefaults.Web`. Updated necessary `using` directives.
2026-06-01 03:56:02 +02:00
6672b902b0 Make AnnotationDto properties non-nullable
Changed the `Page` property from `int?` to `int` to ensure it always has a value. Similarly, changed the `X` and `Y` properties from `double?` to `double` to enforce non-nullable values for horizontal and vertical positions.
2026-05-31 22:26:20 +02:00
759b60889e Add AnnotationDto and AnnotationService for API integration
Added `AnnotationDto` to represent signature annotation positions,
including properties for ID, page, and coordinates, with detailed
documentation on coordinate systems. Implemented `AnnotationService`
to fetch annotation data from an API endpoint, using `HttpClient`
and supporting cancellation tokens. Registered `AnnotationService`
in the DI container to enable its use across the application.
Provided development setup details for working with fake data
via YARP-proxied routes.
2026-05-31 11:19:03 +02:00