Updated the zoom slider in `EnvelopeViewer.razor` to allow finer adjustments by changing the step size from 25 to 1. Modified `pdf-viewer.js` to enable smoother zooming with 1% increments for `zoomIn` and `zoomOut` methods. Capped zoom levels between 0.5 and 3.0. Enhanced mouse wheel zoom behavior to adjust zoom in 1% steps and notify the .NET side of changes via `OnZoomChanged`. Ensured pages are re-rendered after each zoom adjustment.
The PDF toolbar in `EnvelopeViewer.razor` has been redesigned to improve usability and functionality. Key changes include:
- Added buttons for page navigation, zooming, and preset zoom levels.
- Introduced a zoom slider and page input field for direct control.
- Added "Fit to Width" and "Set Zoom to 100%" features.
- Updated `ZoomIn` and `ZoomOut` methods with boundary checks.
- Added new methods: `SetZoom`, `OnZoomSliderChanged`, `OnPageInputChanged`, and `FitToWidth`.
Styling updates in `envelope-viewer.css` include a modernized toolbar design with rounded corners, shadows, and responsive layouts for smaller screens.
`pdf-viewer.js` was updated with `setScale` and `fitToWidth` methods to support the new functionality. These changes enhance the interactivity, flexibility, and user experience of the PDF viewer.
Added functionality to maintain the scroll position and viewport
center of the `.pdf-frame` container during PDF page rendering.
This ensures the user's view remains centered on the same content
after re-rendering, even if the canvas dimensions change.
Implemented logic to store the scroll position and viewport center
before rendering and restore them afterward using scaling factors
calculated from the canvas's old and new dimensions.
Introduced a new EnvelopeViewer component (`EnvelopeViewer.razor`)
to replace the legacy ReportViewer for non-signing workflows.
The new viewer is based on PDF.js and provides a modern,
lightweight, and responsive user experience.
Added `pdf-viewer.js` to handle PDF rendering, zoom, pagination,
and mouse wheel control, integrated with Blazor via JSInterop.
Externalized styles to `envelope-viewer.css` with a modern
glassmorphism design.
Enhanced user experience with unlimited zoom, global mouse
wheel zoom (`Ctrl+Wheel`), and responsive design. Fixed issues
like scroll behavior and canvas size restrictions.
Updated `COPILOT_CONTEXT_EN.md` to document the new
EnvelopeViewer, its architecture, and its advantages over the
legacy ReportViewer. Added external dependencies for PDF.js
via CDN and updated project history to reflect these changes.
Added `DotNetObjectReference` in `EnvelopeViewer.razor` to enable Blazor-JS communication. Updated `OnAfterRenderAsync` to pass the reference to `pdfViewer.initialize`. Introduced `[JSInvokable]` method `OnZoomChanged` to handle zoom updates from JavaScript.
Enhanced `DisposeAsync` to clean up resources, including disposing of the `.NET reference` and invoking a JavaScript `dispose` method.
In `pdf-viewer.js`, modified `initialize` to accept a `.NET reference` and added `attachWheelEvent` to handle zooming via mouse wheel with `Ctrl`/`Meta` key. Updated `dispose` to clean up event listeners and reset the `.NET reference`. Added `getScale` to retrieve the current zoom scale.
Improved resource cleanup and event handling to prevent memory leaks and ensure stability.
Updated `.pdf-viewer-container` to vertically center content by changing `align-items` to `center`. Adjusted `.pdf-frame` dimensions to use dynamic height and width, added a maximum width, and centered text alignment. Introduced rounded corners to the gradient bar with a `border-radius`. Changed `.pdf-canvas` to `inline-block` display with `vertical-align: top`. Further refined `.pdf-frame` layout with slightly different height and width calculations.
Moved inline styles from `EnvelopeViewer.razor` to a new external
CSS file `envelope-viewer.css` for better maintainability and
separation of concerns. Added external JavaScript dependencies
(`pdf.js` and `pdf-viewer.js`) to enable PDF rendering.
Fixed encoding issues in error messages and improved the layout
structure with responsive design rules. Enhanced readability and
usability by organizing styles and ensuring proper localization
support.
Simplified the component by removing unnecessary debug output
and redundant comments. Removed the `OnAfterRenderAsync`
method, which previously handled PDF viewer initialization
and related JavaScript calls. This suggests the initialization
logic has been moved elsewhere or is no longer required in
this component.
Introduced `currentRenderTask` to track and manage rendering tasks, ensuring only one task is active at a time. Added logic to cancel ongoing tasks before starting new ones, preventing conflicts and redundant rendering.
Enhanced error handling to gracefully manage `RenderingCancelledException` and allow rendering of pending pages. Improved logging for better debugging and insights into the rendering process. Ensured clean state management by resetting `currentRenderTask` after task completion or cancellation.
Introduced a new Blazor component `EnvelopeViewer.razor` to display PDF documents with a user-friendly interface. The component supports dynamic routing via `/envelope/{EnvelopeKey}` and integrates the `pdf.js` library for efficient PDF rendering in the browser.
Key features include:
- Zoom and navigation controls (Next/Previous page, Zoom In/Out).
- Loading spinner, error handling, and fallback UI for robustness.
- Responsive design with modern styling using CSS.
- JavaScript interop via `pdf-viewer.js` for managing PDF rendering, scaling, and navigation.
Added lifecycle methods (`OnInitializedAsync`, `OnAfterRenderAsync`) for dynamic loading and rendering. Ensured asynchronous operations for smooth user interactions. Included a `DisposeAsync` method for cleanup.
The `ForceToUseFakeDocument` property in the `Api` section of
`appsettings.json` was changed from `true` to `false`. This
modification alters the application's behavior to no longer
force the use of fake documents, potentially enabling the use
of real documents or other configurations as defined by the
application logic.
Reformatted the `Transforms` sections in `yarp.json` to use
multi-line JSON objects instead of single-line objects.
This change improves the readability and maintainability
of the configuration file without altering its functionality.
The `Path` matching rule for the `receiver-ui-envelope` route was updated to use `/envelope/{EnvelopeKey}` instead of the wildcard `/envelope/{**catch-all}` for more specific routing.
Additionally, a `Transforms` section was added to the route, which includes a transformation to set the path to `/index.html`.
The `GetDocumentOfReceiver` method was introduced to handle
retrieving a document for a specified envelope key. It is
secured with the `[Authorize(Policy = AuthPolicy.Receiver)]`
attribute and responds to HTTP GET requests with a route
parameter `envelopeKey`.
The previous logic for extracting and validating the
`envelopeId` from user claims was removed. This was replaced
with a call to `User.GetEnvelopeIdOfReceiver()` for improved
clarity and maintainability.
The method uses the `mediator` to send a `ReadDocumentQuery`
and returns a `NotFound` response if the document's `ByteData`
is empty.
Refactor `ReceiverClaimExtensions` to support multiple claim
type variations by introducing arrays for envelope ID, UUID,
and receiver signature claim types. Updated the
`GetRequiredClaimOfReceiver` method to handle multiple claim
types and provide detailed error messages when claims are
missing. Refactored methods to use the new claim type arrays
for improved flexibility and robustness.
A new `SolutionItems` section was added to the `EnvelopeGenerator.sln` solution file. This section includes the `COPILOT_CONTEXT_EN.md` file, which is likely intended for documentation or context purposes. The section is marked as `preProject`, ensuring it is processed before other project sections.
Adjusted the y-coordinate values for annotations with id 1, 2,
and 3 in annotations.json to reposition them on their respective
pages:
- Changed y for id 1 from 980.0 to 380.0.
- Changed y for id 2 from 980.0 to 680.0.
Added a `BackColor` property to both `signature` and
`signatureLabel` objects to improve visual consistency.
Adjusted the `BoundsF` property of `signatureLabel` to
slightly move the label upward for better alignment.
Replaced the `primary` destination address in the `receiver-ui`
cluster from `http://172.24.12.39:1234` to `https://localhost:52936`.
This change likely supports local development or testing by
switching to `localhost` with HTTPS and a different port.
The `itext` library (version 8.0.5) was added as a package reference to the `EnvelopeGenerator.ReceiverUI.csproj` file. This update introduces support for PDF generation or manipulation, potentially enabling new features or enhancing existing functionality related to PDF handling.
Updated `AddSignatureAtAnnotation` to use `DetailBand` instead of `BottomMarginBand` for managing signature annotations. Adjusted logic to ensure signatures are placed in the detail section and only displayed on the specified page using the `BeforePrint` event. Reformatted constants for readability and updated `RemoveExistingSignatureById` to operate on `DetailBand`. Removed reliance on bottom margin height for positioning and introduced `annotation?.Y` for vertical placement.
Updated `<Version>` to 1.3.0 to reflect the new application version.
Aligned `<AssemblyVersion>` and `<FileVersion>` to 1.3.0.0
for API compatibility and Windows file version consistency.
Introduced a dynamic typing effect for the homepage description using the `Typed` library. Replaced hardcoded description text in `Index.razor` with a dynamically rendered `<span>` element. Added a constant for the description text and implemented `OnAfterRenderAsync` to invoke the typing animation on first render.
Included the `typed.umd.js` library in `index.html` and updated `receiver-signature.js` with a `startTyped` function to support typing animations. Registered `startTyped` in the public API for external use.
Enhanced the user experience with dynamic content rendering and improved maintainability by centralizing the description text. Also added a new theme file for improved styling.
Added a new `ReverseProxy` section in `appsettings.Development.json` to define the `receiver-ui` cluster with a destination pointing to `https://localhost:52936`. Reformatted the `Logging` configuration without changing its values.
Updated the `yarp.json` file to modify the `receiver-ui` cluster's destination address from `https://localhost:52936` to `http://172.24.12.39:1234` to reflect the new backend service location.
Updated the project version in `EnvelopeGenerator.API.csproj`
from `1.3.0` to `1.3.1`, including `<Version>`, `<FileVersion>`,
and `<AssemblyVersion>` properties, indicating a minor update.
Simplified the YARP proxy mapping in `Program.cs` by replacing
the conditional `app.MapWhen` logic with a direct call to
`app.MapReverseProxy()`, allowing all requests to be forwarded
through the reverse proxy without path filtering.
Added new CSS rules in `privacy-policy.css` to improve the styling of the body, header, headings, sections, lists, and links. Minified these styles into `privacy-policy.min.css` for better performance. Updated the stylesheet path in `privacy-policy.de-DE.html` to ensure the correct relative path is used.
A new publish profile `IISProfileNet8.pubxml` was added to configure deployment settings for a .NET project targeting the `net8.0` framework. Key settings include:
- `WebPublishMethod` set to `Package` for deployment packaging.
- `LastUsedBuildConfiguration` set to `Release`.
- `DesktopBuildPackageLocation` specifies the output path with a version placeholder.
- `PackageAsSingleFile` set to `true` for single-file packaging.
- `DeployIisAppPath` set to `EnvelopeGenerator` for IIS deployment.
- `TargetFramework` specified as `net8.0`.
This profile streamlines the deployment process and ensures compatibility with .NET 8.0.
Updated `Version`, `FileVersion`, and `AssemblyVersion` in the `EnvelopeGenerator.API.csproj` file from `1.2.3` to `1.3.0`, indicating a minor version update with backward-compatible improvements or new features.
The `<Version>` element was updated from `1.0.1` to `1.2.0`, marking a new release with potential new features or improvements.
The `<AssemblyVersion>` was updated from `1.0.1.0` to `1.2.0.0`, indicating changes that may affect API compatibility.
The `<FileVersion>` was updated from `1.0.1.0` to `1.2.0.0`, reflecting the new build or release version.
Removed styles for `.sidebar` and `.top-row` elements, including their background, layout, and responsive behavior, as they are no longer used. Simplified `main` and `article` elements by standardizing `margin` and `padding` to `0`.
Removed media query styles for `.top-row` and `.sidebar` to streamline responsive design. Updated global styles in `app.css` to ensure consistent spacing and alignment for `html`, `body`, `main`, and `.page`.
Focused on creating a cleaner, more minimal design by removing redundant styles and ensuring uniformity across the layout.
Updated the content in `Index.razor` to describe the digital signature portal's features and removed redundant UI elements, including a document signing button and a feature badge.
Modified `ReportViewer.razor` to remove the `/receiver` route, leaving only `/receiver/{EnvelopeKey}`. Updated the `EnvelopeKey` parameter to be non-nullable with a default value, improving type safety and preventing null reference issues.
Replaced the old card-based layout in `Index.razor` with a modern, visually appealing home page design. Added a hero header, content section, and call-to-action button for signing documents. Introduced new SVG icons and text elements to enhance the UI.
Removed the `OnAfterRenderAsync` method and automatic redirection logic to simplify user navigation. Added a new stylesheet link for the DevExpress Blazor theme.
Updated `app.css` to support the new design:
- Changed `article` overflow to `overflow-y: auto`.
- Added new classes for layout, buttons, and feature badges.
- Styled the home page with a gradient background, rounded corners, and hover effects.
These changes improve usability, responsiveness, and visual consistency.
Introduced a new footer in `MainLayout.razor` with copyright
information, a link to "Digital Data GmbH," and a privacy
policy link. Added two new privacy policy files
(`privacy-policy.en-US.html` and `privacy-policy.fr-FR.html`)
to the project and configured them to always copy to the
output directory.
Updated `app.css` to adjust layout heights to accommodate
the footer. Added new styles for the footer, including a
gradient background, responsive design, and hover effects
for links.
Added privacy policy documents in German (de-DE), English (en-US), and French (fr-FR). Each document is structured as an HTML file with sections covering general information, data processing responsibilities, data collection, use of cookies, and rights of affected persons.
Included metadata (title, charset, viewport) and linked a consistent stylesheet (`css/privacy-policy.min.css`). Provided contact details for the manufacturer (Digital Data GmbH) and Data Protection Officer in all locales.
Referenced locale-specific legal frameworks (e.g., GDPR, DSGVO, RGPD) and outlined session cookie usage. Documents are dated November 18, 2025, ensuring clarity and compliance with data protection regulations.
Enhanced `ReportViewer.razor` with new UI elements, including a detailed `receiver-info-header` and `receiver-action-bar` for better signature workflows. Refactored signature logic to ensure accurate placement using `report.AfterPrint` and `PrintingSystem.Pages`. Removed legacy methods and iText7-based workflows.
Added Turkish documentation (`COPILOT_CONTEXT_TR.md`) detailing project structure, workflows, and pending tasks. Updated `MainLayout.razor` to simplify layout. Improved styling in `app.css` for better visual hierarchy and readability.
Documented pending tasks such as adding signature backgrounds, improving checkbox styles, and automating signature workflows.
A new service, `EnvelopeGenerator.ReceiverUI.Services.EnvelopeReceiverService`, was registered in the dependency injection container using `AddScoped`. This ensures the service is available for injection with a scoped lifetime, creating a new instance per HTTP request or scope.
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.
Modified the method to return a single item or null by using
`SingleOrDefault()` on the result of `await _mediator.Send(...)`.
This ensures the response is no longer a collection but a single
object, improving clarity and aligning with expected behavior.
Enhance the user interface and functionality for applying signatures:
- Add detailed display of signature fields and their pages.
- Introduce a progress bar to show marking progress visually.
- Display success message when all fields are marked.
- Automatically submit signatures when all fields are marked.
- Provide guidance for creating a signature if none exists.
- Disable "Export Signed PDF" button until signature is applied.
- Refactor code to simplify logic and remove redundancy.
These changes improve usability and provide clearer feedback to users.
Added a `Zoom` property with a value of `1.3` to the `DxReportViewer` component in `ReportViewer.razor`. This change adjusts the default display scale to improve readability and enhance the user experience.
Simplified the `OpenSignaturePopupAsync` method by converting it to a synchronous `void` method and removing unnecessary asynchronous calls. Introduced a new `OnPopupShownAsync` method to handle popup initialization logic.
Updated the `<Popup>` component to include the `Shown="OnPopupShownAsync"` attribute and re-added the `CloseOnOutsideClick="false"` attribute. Improved the logic for opening the signature popup by setting the active tab and resetting validation messages inline.
Enhanced the `OnAfterRenderAsync` lifecycle method to include additional checks for `Report`, annotations, and signature state before triggering JavaScript runtime calls. These changes improve the popup's behavior and overall state management.
Modified `<DxPopup>` properties to prevent closing via Escape,
outside clicks, or the close button. Updated the "Schliessen"
button to always be enabled, regardless of `_capturedSignature`
state.
Updated the signature button text and SVG icon for clarity.
Enhanced the `DxPopup` component with better interaction
properties (`CloseOnEscape` and `CloseOnOutsideClick`).
Disabled the "Close" button in the popup when no signature
is captured.
Reformatted and restructured constants and fields in the
`@code` block for readability. Reintroduced previously
removed fields, constants, and methods to ensure
functionality. Added a conditional block in `LogoutAsync`
to open the signature popup when the user has access.
Performed general cleanup and code reorganization to
improve maintainability.
Updated `.annot-sig-cb-wrapper` and related classes to improve
appearance, interactivity, and hover effects. Key changes include:
- Increased `border-radius` and adjusted `font-size`, `font-weight`,
and `padding` for a cleaner look.
- Replaced solid background and borders with gradient backgrounds
and updated `box-shadow` for modern styling.
- Added `cursor` property and refined `transition` effects for
smoother interactions.
- Updated hover and checked states with dynamic `filter` and
enhanced `box-shadow`.
- Hid `.annot-sig-cb` checkbox and improved `.annot-sig-cb__label`
readability with `letter-spacing`.
Simplified the `signatureInformation` string formatting by removing the `"Empfaengerunterschrift\n"` prefix and starting directly with `signerFullName`. Adjusted `infoHeight` from `65F` to `48.75F` to refine layout spacing.
Added a `BackColor` property to both `XRPictureBox` and `XRLabel` for consistent background styling (`Color.FromArgb(219, 219, 219)`). Updated `XRLabel` properties: adjusted `BoundsF` to offset `labelY` by `-5` for better vertical alignment and changed `TextAlignment` from `TopLeft` to `TopCenter`.
Made minor formatting adjustments to improve the visual consistency of signature and label elements.
Enhanced documentation for the EnvelopeGenerator system:
- Added purpose section describing its functionality as a digital document signing system.
- Documented solution structure, listing projects, frameworks, and purposes.
- Highlighted key files in `ReceiverUI` and `API` with their roles.
- Explained `AnnotationDto` coordinate system and unit conversions.
- Detailed the signing flow in `ReceiverUI`, including page load, signature popup, and export steps.
- Documented JavaScript checkbox overlay logic for annotations.
- Provided a breakdown of `StampSignaturesOnPdf` using iText7.
- Described `BuildFreshBaseReport` behavior in real and dev modes.
- Listed NuGet packages with versions and purposes.
- Added "Mistakes History" to prevent repeated errors.
- Clarified why DevExpress X.509 signing article does not apply.
- Summarized development sessions in a change log.
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.
- Added dependency injection for `AnnotationService`, `DocumentService`, and `AuthService` in `ReportViewer.razor`.
- Improved signature button logic with dynamic appearance and feedback.
- Introduced annotation checkbox overlays for marking signature fields.
- Refactored signature saving and application logic into `SaveSignatureAsync` and `SubmitSignaturesAsync`.
- Added `BuildFreshBaseReport` and `AddAnnotationPlaceholders` for dynamic report creation.
- Implemented annotation-specific signature placement with `AddSignatureAtAnnotation`.
- Enhanced state management for annotations and signature overlays.
- Updated `app.css` with styles for annotation checkboxes.
- Added cache-control headers and versioned JavaScript in `index.html`.
- Improved `receiver-signature.js` with annotation checkbox management, optimized signature pad logic, and debugging utilities.
- Performed general code cleanup and optimization for maintainability.
Replaced hardcoded `envelopeId` with dynamic retrieval from
user claims. Reintroduced and updated error handling logic
to validate the `envelopeId` and log detailed errors when
parsing fails. Improved robustness by returning a 500 error
for invalid or missing envelope claims.
Introduce a `Transforms` section in `yarp.json` for the `receiver-ui` route to enforce a no-cache policy. This includes setting the following response headers for all responses:
- `Cache-Control`: `no-cache, no-store, must-revalidate`
- `Pragma`: `no-cache`
- `Expires`: `0`
These changes ensure that client-side caching is disabled for the `receiver-ui` route.