Unplanned
Last Updated: 06 Feb 2017 10:00 by ADMIN
ADMIN
Hristo
Created on: 12 Dec 2016 11:34
Category: RichTextEditor
Type: Bug Report
2
FIX. RadRichTextEditor - the printing engine does not respect the margins set on the RadPrintDocument
How to reproduce:
private void radButton1_Click(object sender, EventArgs e)
{
    RadPrintDocument doc = new RadPrintDocument();
    doc.Margins = new Margins(0, 0, 10, 10);

    doc.AssociatedObject = this.radRichTextEditor1;
    RadPrintPreviewDialog dialog = new RadPrintPreviewDialog();
    dialog.Document = doc;
    dialog.ShowDialog();
}

Workaround: apply the margins on the document loaded in the editor
private void radButton1_Click(object sender, EventArgs e)
{
    RadPrintDocument doc = new RadPrintDocument();
    this.radRichTextEditor1.Document.SectionDefaultPageMargin = new Telerik.WinForms.Documents.Layout.Padding(0, 0, 10, 10);

    doc.AssociatedObject = this.radRichTextEditor1;
    RadPrintPreviewDialog dialog = new RadPrintPreviewDialog();
    dialog.Document = doc;
    dialog.ShowDialog();
}

0 comments