This is a migrated thread and some comments may be shown as answers.

Print to PDF

3 Answers 187 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
Alex Dybenko
Top achievements
Rank 2
Alex Dybenko asked on 21 Feb 2018, 11:56 AM

Hi,

I know about export to PDF, but is it possible to print PivotGrid directly to PDF file, with headers/footers/watermarks, etc?

Thanks,

Alex

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Hristo
Telerik team
answered on 21 Feb 2018, 03:43 PM
Hello Alex,

As long as you have a PDF print driver you can print to PDF just like with any other printer. On Windows 10, you can achieve it this way: 
PivotGridPrintStyle style = new PivotGridPrintStyle()
{
    LayoutType = PivotLayout.Compact
};
 
this.radPivotGrid1.PrintStyle = style;
 
PrinterSettings printerSettings = new PrinterSettings()
{
    PrinterName = "Microsoft Print to PDF",
    PrintToFile = true,
    PrintFileName = @"test.pdf"
};
 
RadPrintDocument doc = new RadPrintDocument()
{
    PrinterSettings = printerSettings,
    AssociatedObject = this.radPivotGrid1
};
 
doc.Print();

For other operating systems you may need to install additional drivers. Let me know if you have other questions.


Regards,
Hristo
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Alex Dybenko
Top achievements
Rank 2
answered on 22 Feb 2018, 09:58 AM

Hi Hristo,

I just thought that I can pass RadPrintDocument to something like Telerik.Windows.Documents.someobject for export :)

Thanks,

Alex

 

 

0
Hristo
Telerik team
answered on 22 Feb 2018, 11:20 AM
Hi Alex,

We do not have a library to handle globally the printing of the different controls. Printing is handled individually according to the specifics of the control. The control needs to implement the IPrintable interface. The RadPrintDocument extends the standard PrintDocument class and adds API related to the controls in the suite.

Let me know if you have other questions.

Regards,
Hristo
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
PivotGrid and PivotFieldList
Asked by
Alex Dybenko
Top achievements
Rank 2
Answers by
Hristo
Telerik team
Alex Dybenko
Top achievements
Rank 2
Share this question
or