Renamed namespaces and related identifiers from EnvelopeGenerator.WebUI to EnvelopeGenerator.Server across the project. This change affects data models, services, controllers, and configuration files to ensure consistency with the new architecture. Updated @using directives in Razor components and other files to reflect the new namespace structure. Adjusted project references in EnvelopeGenerator.Server.csproj to point to the new EnvelopeGenerator.Server.Client project. Modified middleware and logging configurations to use the new EnvelopeGenerator.Server namespace, including changes in Program.cs and appsettings.json. Updated resource and file references to use the new EnvelopeGenerator.Server path, ensuring correct resource loading. Adjusted configuration options in Program.cs to use the new namespace for options classes, such as ApiOptions and PdfViewerOptions. Updated authentication scheme names and related constants to align with the new namespace structure. Revised comments and documentation to reflect the new namespace, ensuring clarity and consistency in the codebase.
66 lines
2.6 KiB
C#
66 lines
2.6 KiB
C#
namespace EnvelopeGenerator.Server.Client.Models.Constants;
|
||
|
||
/// <summary>
|
||
/// Represents the unit of measurement for coordinate values in signature positioning.
|
||
/// Used for converting coordinates between different systems (GdPicture14, PDF.js, iText7).
|
||
/// </summary>
|
||
public enum UnitOfLength
|
||
{
|
||
/// <summary>
|
||
/// Inch unit (1 inch = 25.4 mm).
|
||
/// This is the native unit used by GdPicture14 (EnvelopeGenerator.Form - Legacy VB.NET app).
|
||
/// Database stores all coordinates (X, Y, Width, Height) in INCHES.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// <b>Source:</b> GdPicture14.Annotations.AnnotationStickyNote uses INCHES natively.
|
||
/// <br/>
|
||
/// <b>Evidence:</b> VB.NET code directly assigns database values to annotation properties without conversion:
|
||
/// <code>
|
||
/// oAnnotation.Left = CSng(pElement.X) ' Direct assignment → INCHES
|
||
/// oAnnotation.Top = CSng(pElement.Y)
|
||
/// </code>
|
||
/// <b>Standard Page Dimensions:</b>
|
||
/// <list type="bullet">
|
||
/// <item>A4: 8.27" × 11.69" (210mm × 297mm)</item>
|
||
/// <item>Letter: 8.5" × 11"</item>
|
||
/// </list>
|
||
/// </remarks>
|
||
Inch = 0,
|
||
|
||
/// <summary>
|
||
/// PDF Point unit (1 point = 1/72 inch).
|
||
/// This is the standard unit used by PDF specification and PDF.js viewer.
|
||
/// </summary>
|
||
/// <remarks>
|
||
/// <b>Definition:</b> According to PDF specification and Microsoft documentation:
|
||
/// <br/>
|
||
/// <i>"PDF pages are sized in point units. 1 pt == 1/72 inch"</i>
|
||
/// <br/><br/>
|
||
/// <b>Conversion Formula:</b>
|
||
/// <code>
|
||
/// points = inches * 72.0
|
||
/// inches = points / 72.0
|
||
/// </code>
|
||
/// <b>Important:</b> Point ≠ Pixel!
|
||
/// <list type="bullet">
|
||
/// <item><b>Point (pt):</b> Device-independent unit (always 1/72 inch)</item>
|
||
/// <item><b>Pixel (px):</b> Device-dependent unit (varies with screen DPI)</item>
|
||
/// <item>At 72 DPI: 1 point = 1 pixel (coincidence)</item>
|
||
/// <item>At 96 DPI: 1 point ≈ 1.33 pixels</item>
|
||
/// <item>At 300 DPI: 1 point ≈ 4.17 pixels</item>
|
||
/// </list>
|
||
/// <b>Standard Page Dimensions (in points):</b>
|
||
/// <list type="bullet">
|
||
/// <item>A4: 595 × 842 points (8.27" × 11.69" × 72)</item>
|
||
/// <item>Letter: 612 × 792 points (8.5" × 11" × 72)</item>
|
||
/// </list>
|
||
/// <b>Usage in EnvelopeGenerator:</b>
|
||
/// <list type="bullet">
|
||
/// <item>PDF.js viewer expects coordinates in points</item>
|
||
/// <item>iText7 library uses points for PDF manipulation</item>
|
||
/// <item>PSPDFKit (Web) uses points for annotation placement</item>
|
||
/// </list>
|
||
/// </remarks>
|
||
Point
|
||
}
|