PrintJobPrintOptions

Represents the printing options for a job.

public class PrintJobPrintOptions : IDisposable
Public Class PrintJobPrintOptions
    Implements IDisposable

Inheritance: ObjectPrintJobPrintOptions

Implements: IDisposable

Licensing Info

This class is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:

Examples

The following examples creates a print job, sets print options 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")

        ' Set all the print options
        If (MyPrintJob.Printer.Color) Then ' If the printer supports color printing
            MyPrintJob.PrintOptions.Color = True
        End If
        If (MyPrintJob.Printer.Duplex) Then ' If the printer supports duplex printing
            MyPrintJob.PrintOptions.DuplexMode = DuplexMode.DuplexVertical
        End If
        MyPrintJob.PrintOptions.Copies = 1
        MyPrintJob.PrintOptions.HorizontalAlign = HorizontalAlign.Left
        MyPrintJob.PrintOptions.PrintAnnotations = False
        MyPrintJob.PrintOptions.Scaling = PageScaling.ActualSize
        MyPrintJob.PrintOptions.SetPaperSizeByName("Legal")
        MyPrintJob.PrintOptions.SetPaperSourceByName("Tray 2")
        MyPrintJob.PrintOptions.SetResolutionByDpi(300)
        MyPrintJob.PrintOptions.VerticalAlign = VerticalAlign.Top

        ' 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");
 
        // Set all the print options
        if (printJob.Printer.Color) // If the printer supports color printing
        {
            printJob.PrintOptions.Color = true;
        }
        if (printJob.Printer.Duplex) // If the printer supports duplex printing
        {
            printJob.PrintOptions.DuplexMode = DuplexMode.DuplexVertical;
        }
        printJob.PrintOptions.Copies = 1;
        printJob.PrintOptions.HorizontalAlign = HorizontalAlign.Left;
        printJob.PrintOptions.PrintAnnotations = false;
        printJob.PrintOptions.Scaling = PageScaling.ActualSize;
        printJob.PrintOptions.SetPaperSizeByName("Legal");
        printJob.PrintOptions.SetPaperSourceByName("Tray 2");
        printJob.PrintOptions.SetResolutionByDpi(300);
        printJob.PrintOptions.VerticalAlign = VerticalAlign.Top;

        // Print the job
        printJob.Print();
    }
}

Properties

CollateGets or sets a value indicating if the job's copies should be collated.
ColorGets or sets a value indicating if the job should printed in color.
CopiesGets or sets a value indicating the number of copies to print.
DuplexModeGets or sets a value indicating the duplex mode to use when printing the pages.
HorizontalAlignGets or sets a value indicating the horizontal alignment to use when printing the pages.
MediaTypeGets or sets a value indicating the media type to use when printing.
OrientationGets a value indicating the orientation to use when printing the pages.
PaperSizeGets or sets a value indicating the size of paper to use when printing the pages.
PaperSourceGets or sets a value indicating the paper source (tray) to use when printing.
PrintAnnotationsGets or sets a value indicating if annotations from the PDF should be printed.
ResolutionGets or sets a value indicating the resolution to use when printing.
ScalingGets or sets a value indicating the page scaling to use when printing the pages.
VerticalAlignGets or sets a value indicating the vertical alignment to use when printing the pages.

Methods

Dispose()Clean up any resources being used.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
SetMediaTypeByName(String)Sets the media type to use based on its name.
SetPaperSizeByName(String)Sets the size of paper to use based on its name.
SetPaperSourceByName(String)Sets the paper source (tray) to use based on its name.
SetResolutionByDpi(Int32)Sets the resolution to use based on its DPI.
SetResolutionByDpi(Int32, Int32)Sets the resolution to use based on its DPI.
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.Printing

In this topic