Spread Windows Forms 12.0 Product Documentation
PrintToPdf Property
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > PrintInfo Class : PrintToPdf Property
Gets or sets whether to print the sheet as PDF.
Syntax
'Declaration
 
Public Property PrintToPdf As Boolean
'Usage
 
Dim instance As PrintInfo
Dim value As Boolean
 
instance.PrintToPdf = value
 
value = instance.PrintToPdf
public bool PrintToPdf {get; set;}

Property Value

Boolean: true to print to a PDF file; false otherwise
Example
This example prints to a PDF file.
// Define the printer settings
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
printset.Header = "Print Job For /nFPT Inc.";
printset.Footer = "This is Page /p/nof /pc Pages";
printset.HeaderHeight = 30;
// Assign the printer settings to the sheet and print to PDF
printset.PrintToPdf = true;
printset.PdfFileName = "C:\\results.pdf";
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
Dim printset As New FarPoint.Win.Spread.PrintInfo
printset.Header = "Print Job For /nFPT Inc."
printset.Footer = "This is Page /p/nof /pc Pages"
printset.HeaderHeight = 30
' Assign the printer settings to the sheet and print to PDF
printset.PrintToPdf = True
printset.PdfFileName = "C:\results.pdf"
fpSpread1.Sheets(0).PrintInfo = printset
fpSpread1.PrintSheet(0)
See Also

Reference

PrintInfo Class
PrintInfo Members