Completed
Last Updated: 24 Oct 2016 12:55 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 24 Jun 2015 08:35
Category: PdfViewer
Type: Bug Report
0
FIX. RadPdfViewer - printed document is cut off on the right side when the RadPrintDocument.DefaultPageSettings.Margins is set to 0
To reproduce:

public Form1()
{
    InitializeComponent();

    radPdfViewer1.DocumentLoaded += radPdfViewer1_DocumentLoaded;
    radPdfViewer1.LoadDocument(@"..\..\TestDocument.pdf");
}

void radPdfViewer1_DocumentLoaded(object sender, EventArgs e)
{
    var pdfViewerElement = sender as RadPdfViewerElement;

    if (pdfViewerElement != null)
    {
        var myDocumentToPrint = new RadPrintDocument();
        myDocumentToPrint.AssociatedObject = pdfViewerElement;
        myDocumentToPrint.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
        myDocumentToPrint.Print();
    }
}
 
Please refer to the attached screenshots and sample pdf.

Workaround:  Specify the RadPrintDocument.DefaultPageSettings.Margins property on a way to have the right margin greater than 0 
0 comments