Completed
Last Updated: 06 Sep 2016 07:30 by ADMIN
ADMIN
Hristo
Created on: 12 May 2016 12:10
Category: PdfViewer
Type: Feature Request
2
ADD. RadPdfViewer - when printing implement auto landscape/portrait functionality respecting the orientation of each page individually
Workaround: until the feature be implemented one can print each page individually respecting its orientation whether it is portrait or landscape
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
 
        this.radPdfViewer1.LoadDocument(@"..\..\sample.pdf");
    }
 
    private void radButton1_Click(object sender, EventArgs e)
    {
        RadPrintDocument doc = new RadPrintDocument();
        doc.AssociatedObject = this.radPdfViewer1;
 
        for (int i = 0; i < this.radPdfViewer1.Document.Pages.Count; i++)
        {
            RadFixedPage page = this.radPdfViewer1.Document.Pages[i];
 
            doc.CurrentPage = i;
            doc.PrinterSettings.PrintRange = PrintRange.CurrentPage;
            doc.Landscape = page.ActualWidth > page.ActualHeight;
 
            doc.Print();
        }
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
ADMIN
Hristo
Posted on: 13 Jun 2016 14:05
Hi Joshua,

Indeed, the suggested approach is not covering all possible scenarios. With the present implementation it is not possible to send a complete document and have the engine set the Landscape property on а page by page basis.

Regards,
Hristo
Josh
Posted on: 07 Jun 2016 12:30
This workaround was suggested to me but I was unable to use it because I need the full document to go to the printer all at once rather than 1 page at a time.