Spread Windows Forms 10.0 Product Documentation
PaperSource Property
Example 


Gets or sets the paper source for printing.
Syntax
'Declaration
 
Public Property PaperSource As PaperSource
'Usage
 
Dim instance As PrintInfo
Dim value As PaperSource
 
instance.PaperSource = value
 
value = instance.PaperSource
public PaperSource PaperSource {get; set;}

Property Value

PaperSource object specifying the source paper tray
Remarks

This property is run-time only. You cannot set it at design time.

If you set the size of the paper with the PaperSize property, you must make sure that the current paper source, whether it be the default or a custom paper source, holds that size of paper. Use this property to set the paper source. For example, setting the paper size to Legal does not search your printer (Printer property) for a tray that holds that size and redirect to it; you must specify the correct tray in the PaperSource property.

Example
This example shows how to define the print job settings.
// Define the printer settings
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
printset.JobName = "New Print Job";
printset.PageOrder = FarPoint.Win.Spread.PrintPageOrder.Auto;
printset.PaperSize = new System.Drawing.Printing.PaperSize("Letter", 600, 300);
printset.PaperSource = new System.Drawing.Printing.PrinterSettings.PaperSources[0].SourceName;
printset.Printer = "HP6L";

// Assign the printer settings to the sheet and print it
fpSpread1.Sheets[0].PrintInfo = printset;
fpSpread1.PrintSheet(0);
' Define the printer settings
Dim printset As New FarPoint.Win.Spread.PrintInfo()
printset.JobName = "New Print Job"
printset.PageOrder = FarPoint.Win.Spread.PrintPageOrder.Auto
printset.PaperSize = New System.Drawing.Printing.PaperSize("Letter", 600, 300)
printset.PaperSource = New System.Drawing.Printing.PrinterSettings.PaperSources(0).SourceName
printset.Printer = "HP6L"

' Assign the printer settings to the sheet and print it
FpSpread1.Sheets(0).PrintInfo = printset
FpSpread1.PrintSheet(0)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

PrintInfo Class
PrintInfo Members
PaperSize Property

User-Task Documentation

Customizing the Print Job Settings

 

 


Copyright © GrapeCity, inc. All rights reserved.