Introduced `PdfViewerOptions` class to centralize PDF viewer settings such as scaling, HiDPI support, zoom transitions, and rendering delays. Bound these options to `appsettings.json` for dynamic configuration. Injected `PdfViewerOptions` into `EnvelopeViewer.razor` and updated `OnInitializedAsync` to pass settings to JavaScript. Replaced hardcoded values in `pdf-viewer.js` with configurable options, improving maintainability and flexibility. Enhanced rendering logic to respect HiDPI settings, maximum DPR, and smooth zoom transitions. Improved thumbnail rendering with configurable delays to optimize performance.
18 lines
380 B
JSON
18 lines
380 B
JSON
{
|
|
"Api": {
|
|
"BaseUrl": "",
|
|
"ForceToUseFakeDocument": false
|
|
},
|
|
"PdfViewer": {
|
|
"ThumbnailBaseScale": 0.75,
|
|
"ThumbnailEnableHiDPI": true,
|
|
"ThumbnailMaxDPR": 2.0,
|
|
"MainCanvasEnableHiDPI": true,
|
|
"MainCanvasMaxDPR": 2.0,
|
|
"EnableSmoothZoom": true,
|
|
"ZoomTransitionDuration": 900,
|
|
"RenderingOpacity": 0.85,
|
|
"ThumbnailRenderDelay": 50
|
|
}
|
|
}
|