Introduce a `qualityPercent` parameter to control the quality of rendered PDF page images. Updated `IPdfPageImageRenderer` and its implementation to support this parameter, normalizing it within defined bounds and dynamically adjusting rendering DPI. Updated `PdfRenderController` to accept an optional `qualityPercent` query parameter, propagate it through the pipeline, and include it in cache keys. Modified `PdfRenderService` to construct API requests with the quality parameter. Added `CreateEnvelopeWizardRenderOptions` with a default `PreviewQualityPercent` of 55% for rendering previews in `CreateEnvelopeWizardPopup`. Adjusted caching logic and cache key format to account for quality-specific results.
29 lines
822 B
C#
29 lines
822 B
C#
using EnvelopeGenerator.Domain.Constants;
|
|
|
|
namespace EnvelopeGenerator.Server.Client.Components.Sender;
|
|
|
|
public sealed record CreateEnvelopeWizardResult(
|
|
string Title,
|
|
string Message,
|
|
EnvelopeType? Type,
|
|
string Language,
|
|
bool UseAccessCode,
|
|
bool TFAEnabled,
|
|
FinalEmailType FinalEmailToCreator,
|
|
FinalEmailType FinalEmailToReceivers,
|
|
bool SendReminderEmails,
|
|
int FirstReminderDays,
|
|
int ReminderIntervalDays,
|
|
int ExpiresWhenDays,
|
|
int ExpiresWarningWhenDays,
|
|
IReadOnlyList<CreateEnvelopeWizardReceiver> Receivers,
|
|
byte[]? DocumentBytes,
|
|
string? DocumentFileName);
|
|
|
|
public static class CreateEnvelopeWizardRenderOptions
|
|
{
|
|
public const int PreviewQualityPercent = 55;
|
|
}
|
|
|
|
public sealed record CreateEnvelopeWizardReceiver(string FullName, string EmailAddress);
|