Unplanned
Last Updated: 02 May 2024 12:01 by ADMIN
Colin
Created on: 02 May 2024 11:56
Category: PdfViewer
Type: Bug Report
2
RadPdfViewer: On HDPI (200%) Print Preview Dialog bottom buttons are cut off
On HDPI (200%) Print Preview Dialog bottom buttons are cut off.
1 comment
ADMIN
Dinko | Tech Support Engineer
Posted on: 02 May 2024 12:01

Hello Colin,

Thank you for reporting this. As a workaround, we can set the MinimumSize of the dialog so that the buttons are visible. 

this.radPdfViewerNavigator1.PrintButton.MouseDown += PrintButton_MouseDown;

private void PrintButton_MouseDown(object? sender, MouseEventArgs e)
{
    var dpi = NativeMethods.GetMonitorDpi(Screen.FromControl(this), NativeMethods.DpiType.Effective);
    if (dpi.Width > 1)
    {
        RadPrintDocument document = new RadPrintDocument();
        document.AssociatedObject = radPdfViewer1;
        PdfPrintPreviewDialog dialog = new PdfPrintPreviewDialog(document);
        dialog.Load += Dialog_Load;

        if (dialog.DialogResult != DialogResult.Abort)
        {
            dialog.ShowDialog();
        }

        dialog.Dispose();
    }
}

private void Dialog_Load(object? sender, EventArgs e)
{
    var dialog = sender as PdfPrintPreviewDialog;
    dialog.MinimumSize = new Size(dialog.Size.Width, dialog.Height + 10);
}

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.