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