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.
30 lines
1.3 KiB
C#
30 lines
1.3 KiB
C#
namespace EnvelopeGenerator.ReceiverUI.Models;
|
|
|
|
/// <summary>
|
|
/// Represents a pre-assigned signature annotation position on a specific page.
|
|
/// <br/><br/>
|
|
/// <b>Coordinate unit (X, Y):</b> Hundredths of an inch (1/100 inch ? 2.83 PDF points),
|
|
/// origin at the <b>top-left</b> corner of the page, both axes increase downward/rightward.
|
|
/// This matches the DevExpress XtraReports coordinate system (<see cref="System.Drawing.RectangleF"/>).
|
|
/// <br/><br/>
|
|
/// <b>Difference from PSPDFKit:</b> Same origin (top-left) and direction, but PSPDFKit uses PDF points (1/72 inch).
|
|
/// Convert: <c>xDX = xPsPdf * (100.0 / 72.0)</c>
|
|
/// <br/>
|
|
/// <b>Difference from GDPicture:</b> GDPicture uses PDF points with <b>bottom-left</b> origin (PDF standard); Y is flipped.
|
|
/// Convert: <c>yDX = (pageHeightPt - yGD - elemHeightPt) * (100.0 / 72.0)</c>
|
|
/// </summary>
|
|
public record AnnotationDto
|
|
{
|
|
/// <summary>Unique identifier of the annotation.</summary>
|
|
public long Id { get; init; }
|
|
|
|
/// <summary>1-based page number within the document.</summary>
|
|
public int Page { get; init; }
|
|
|
|
/// <summary>Horizontal position in hundredths of an inch from the left edge of the page.</summary>
|
|
public double X { get; init; }
|
|
|
|
/// <summary>Vertical position in hundredths of an inch from the top edge of the page.</summary>
|
|
public double Y { get; init; }
|
|
}
|