PaperSourceList
Represents a list of paper sources.
public class PaperSourceList : IEnumerable, IEnumerable<PaperSource>
Public Class PaperSourceList
Implements IEnumerable, IEnumerable(Of PaperSource)
Inheritance: ObjectPaperSourceList
Implements: IEnumerable, IEnumerable<PaperSource>
Licensing Info
This class is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Examples
The following examples creates a print job, sets the paper source and prints the job.Imports System
Imports ceTe.DynamicPDF.Printing
Module MyModule
Sub Main()
' Create a print job
Dim MyPrintJob As PrintJob = New PrintJob("PrinterName", "C:\MyDocument.pdf")
' Get the list of available paper sources for the printer
Dim MyPaperSourceList As PaperSourceList = MyPrintJob.Printer.PaperSources
' Set the paper source if it is supported by the printer
If (Not MyPaperSourceList.Automatic Is Nothing) Then
MyPrintJob.PrintOptions.PaperSource = MyPaperSourceList.Automatic
End If
' Print the job
MyPrintJob.Print()
End Sub
End Module
using System;
using ceTe.DynamicPDF.Printing;
class MyClass
{
static void Main()
{
// Create a print job
PrintJob printJob = new PrintJob("PrinterName", @"C:\MyDocument.pdf");
// Get the list of available paper sources for the printer
PaperSourceList paperSourceList = printJob.Printer.PaperSources;
// Set the paper source if it is supported by the printer
if (paperSourceList.Automatic != null)
{
printJob.PrintOptions.PaperSource = paperSourceList.Automatic;
}
// Print the job
printJob.Print();
}
}
Properties
Automatic | Gets the 'Automatic' paper source if it is specified by the printer. |
Cassette | Gets the 'Cassette' paper source if it is supported by the printer. |
Count | Gets the number of paper sources in the list. |
Envelope | Gets the 'Envelope' paper source if it is specified by the printer. |
EnvelopeManual | Gets the 'EnvelopeManual' paper source if it is specified by the printer. |
First | Gets the 'First' paper source if it is specified by the printer. |
FormSource | Gets the 'FormSource' paper source if it is specified by the printer. |
Item[Int32] | Gets a PaperSource object by index. |
Item[String] | Gets a PaperSource object by name. |
LargeCapacity | Gets the 'LargeCapacity' paper source if it is specified by the printer. |
LargeFormat | Gets the 'LargeFormat' paper source if it is specified by the printer. |
Last | Gets the 'Last' paper source if it is specified by the printer. |
Lower | Gets the 'Lower' paper source if it is specified by the printer. |
Manual | Gets the 'Manual' paper source if it is specified by the printer. |
Middle | Gets the 'Middle' paper source if it is specified by the printer. |
OnlyOne | Gets the 'OnlyOne' paper source if it is specified by the printer. |
SmallFormat | Gets the 'SmallFormat' paper source if it is specified by the printer. |
Tractor | Gets the 'Tractor' paper source if it is specified by the printer. |
Upper | Gets the 'Upper' paper source if it is specified by the printer. |
Methods
Equals(Object) | Determines whether the specified Object is equal to the current Object . (Inherited from Object) |
GetEnumerator() | Returns an enumerator that iterates through a collection. |
GetHashCode() | Serves as a hash function for a particular type. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
ToString() | Returns a String that represents the current Object . (Inherited from Object) |