Commit Graph

6 Commits

Author SHA1 Message Date
99fbb33f1c Migrate PDF.js to DevExpress DxPdfViewer
Transitioned PDF rendering in `EnvelopeReceiverPage.razor`
from `PDF.js` to `DevExpress DxPdfViewer`. Updated code
and documentation to reflect the verified API of
`DevExpress.Blazor.PdfViewer` v25.2.3, addressing its
limitations (e.g., lack of `GoToPageAsync`, `PageNumberChanged`).

Implemented `CustomizeToolbar` for navigation/zoom controls
and manual state tracking for `_currentPage` and `_viewerZoomLevel`.
Replaced JavaScript interop for page count with the `PageCount`
property. Retained the custom thumbnail sidebar due to API
constraints.

Added temporary debug tools for DOM analysis and navigation
testing. Updated `TESTING_CHECKLIST.md` and added
`DEVEXPRESS_V25_LIMITATIONS.md` to document the new strategy,
API limitations, and testing scenarios. Cross-page signature
navigation implemented with state updates, though visible
page changes remain manual.

Prepared for future improvements while ensuring functional
migration to `DxPdfViewer`.
2026-06-30 16:12:05 +02:00
a10ee590c9 Remove unsupported ZoomLevelChanged from DxPdfViewer
Removed the `ZoomLevelChanged` parameter from the `DxPdfViewer`
component in `EnvelopeReceiverPage.razor` due to lack of support
in the installed `DevExpress.Blazor.PdfViewer` package version
`25.2.3`. This prevents runtime exceptions caused by the use of
an unsupported parameter.

Deleted the `OnViewerZoomLevelChanged` method, as it is no longer
needed. Updated `RECEIVER_PDF_VIEWER_CONTEXT.md` to reflect the
limitations of the installed package and adjusted the recovery
plan to bind zoom state directly to `DxPdfViewer.ZoomLevel`.

Simplified zoom handling by removing custom JavaScript logic for
`ctrl+wheel` zoom and retaining the overlay redraw pipeline.
Confirmed that the built-in DevExpress zoom UI now works without
runtime errors, and custom zoom duplication has been eliminated.
2026-06-29 14:09:14 +02:00
03367ebc4a Integrate DxPdfViewer and remove custom zoom controls
Replaced custom zoom controls in `EnvelopeReceiverPage.razor` with the built-in zoom functionality of the `DevExpress.Blazor.PdfViewer` component (`DxPdfViewer`).

- Removed custom zoom buttons, slider, and JavaScript zoom logic.
- Introduced `_viewerZoomLevel` to align with `DxPdfViewer.ZoomLevel`.
- Synchronized zoom state using `ZoomLevelChanged` to update `_currentZoom`.
- Updated overlay redraw logic to react to viewer zoom changes.
- Modified `FitToWidth` and `SetZoom` methods to work with `DxPdfViewer`.
- Updated documentation to reflect integration decisions and findings.

These changes simplify zoom handling, reduce UI redundancy, and ensure proper synchronization between the viewer and overlay logic.
2026-06-29 14:08:51 +02:00
1ac7188466 Update migration plan for PDF.js to DxPdfViewer
Revised `RECEIVER_PDF_VIEWER_CONTEXT.md` to reflect the current status and challenges of migrating from `PDF.js` to `DxPdfViewer`. Replaced the generic migration plan with a detailed post-migration status and recovery plan.

Added a breakdown of missing or unreliable features, including page navigation, zoom controls, overlay positioning, signature navigation, thumbnail behavior, and single-page mode. Identified the root cause as the difference between the old `PDF.js`-based platform and the new `DxPdfViewer` component-driven model.

Outlined an incremental recovery plan to restore features step-by-step, starting with verifying the `DxPdfViewer` API surface and restoring zoom functionality. Emphasized preserving stable workflow components and avoiding unnecessary refactoring.

Provided clear next steps and guidance to rebuild the viewer behavior bridge while maintaining the existing signing workflow.
2026-06-29 12:03:14 +02:00
a5e4f97397 Migrate PDF.js to DxPdfViewer in receiver signing page
This commit introduces a detailed migration plan to replace the
`PDF.js` rendering engine with `DxPdfViewer` in the receiver
signing experience (`EnvelopeReceiverPage.razor`). The migration
preserves the existing signing workflow and behavior while
introducing a new rendering layer.

Key changes:
- Replaced `PDF.js` rendering surface with `DxPdfViewer`.
- Preserved page-level orchestration for authorization, document
  loading, signature handling, and toolbar interactions.
- Introduced a custom overlay adapter for signature placeholders
  and applied signature overlays.
- Centralized page/zoom geometry acquisition for overlay alignment.
- Maintained signature navigation logic and thumbnail sidebar
  behavior.
- Updated `pdf-viewer.js` to separate engine-specific logic and
  adapt it for `DxPdfViewer`.
- Updated styles in `envelope-viewer.css` to support the new viewer.

This migration ensures that all existing workflow behaviors remain
functional, including navigation, zoom, signature placement, and
validation, while transitioning to the new rendering engine.
2026-06-29 11:04:53 +02:00
6ca03a50eb Add documentation for receiver PDF viewer context
Added `RECEIVER_PDF_VIEWER_CONTEXT.md` to the `src` project, documenting the current implementation and behavior of the receiver-side PDF viewing and signing experience in the `EnvelopeGenerator` project.

The document outlines the use of `PDF.js` as the current rendering engine, the planned migration to `DxPdfViewer`, and the functional capabilities that must be preserved. Key features include single-page PDF viewing, navigation, zoom, signature overlays, and metadata validation.

This addition ensures clarity for future development and emphasizes the importance of maintaining existing workflows during the migration or other changes.
2026-06-29 10:56:10 +02:00