PrintQueue.CreateXpsDocumentWriter メソッド

定義

XpsDocumentWriter オブジェクトを作成します。

オーバーロード

CreateXpsDocumentWriter(PrintDocumentImageableArea, PageRangeSelection, PageRange)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開いてページの範囲と印刷ジョブの説明を指定し、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

CreateXpsDocumentWriter(PrintDocumentImageableArea)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開き、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

CreateXpsDocumentWriter(PrintQueue)

XpsDocumentWriter オブジェクトを作成し、指定した印刷キューに関連付けます。

CreateXpsDocumentWriter(Double, Double)

指定したサイズで XpsDocumentWriter オブジェクトを作成します。

CreateXpsDocumentWriter(String, PrintDocumentImageableArea)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開いてジョブの説明を指定し、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

CreateXpsDocumentWriter(String, PrintDocumentImageableArea, PageRangeSelection, PageRange)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開いてページの範囲を指定し、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

CreateXpsDocumentWriter(PrintDocumentImageableArea, PageRangeSelection, PageRange)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開いてページの範囲と印刷ジョブの説明を指定し、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

public:
 static System::Windows::Xps::XpsDocumentWriter ^ CreateXpsDocumentWriter(System::Printing::PrintDocumentImageableArea ^ % documentImageableArea, System::Windows::Controls::PageRangeSelection % pageRangeSelection, System::Windows::Controls::PageRange % pageRange);
[System.Security.SecurityCritical]
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (ref System.Printing.PrintDocumentImageableArea documentImageableArea, ref System.Windows.Controls.PageRangeSelection pageRangeSelection, ref System.Windows.Controls.PageRange pageRange);
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (ref System.Printing.PrintDocumentImageableArea documentImageableArea, ref System.Windows.Controls.PageRangeSelection pageRangeSelection, ref System.Windows.Controls.PageRange pageRange);
[<System.Security.SecurityCritical>]
static member CreateXpsDocumentWriter : PrintDocumentImageableArea * PageRangeSelection * PageRange -> System.Windows.Xps.XpsDocumentWriter
static member CreateXpsDocumentWriter : PrintDocumentImageableArea * PageRangeSelection * PageRange -> System.Windows.Xps.XpsDocumentWriter
Public Shared Function CreateXpsDocumentWriter (ByRef documentImageableArea As PrintDocumentImageableArea, ByRef pageRangeSelection As PageRangeSelection, ByRef pageRange As PageRange) As XpsDocumentWriter

パラメーター

documentImageableArea
PrintDocumentImageableArea

デバイスが印刷できるページ領域の寸法を含むオブジェクトへの参照。 このパラメーターのデータ型にパブリック コンストラクターが存在しないため、このパラメーターは初期化されずに渡されます。

pageRangeSelection
PageRangeSelection

すべてのページを印刷するか、ユーザーによって指定された範囲だけを印刷するかを指定する値。

pageRange
PageRange

印刷されるページの範囲

戻り値

XPS データをストリームに書き込む XpsDocumentWriter これは null でもかまいません。 documentImageableAreapageRangeSelectionpageRange の各パラメーターはいずれもユーザーによって初期化され、ダイアログ ボックスを閉じると返される ref (Visual Basic では ByRef) であるため、それぞれが追加の戻り項目を表します。

属性

注釈

多くのプリンターでは、用紙をグリップしてプリンター内を移動するために、各ページの端の周りに最大 4 分の 1 インチの印刷されていない領域が必要です。 そうしないと、トナーは紙の流れ機構を汚すことになります。 印刷できる領域は、"イメージ可能な領域" です。

PrintDocumentImageableArea にはパブリック コンストラクターがありません。 そのため、変数 documentImageableArea を宣言して に null 割り当て、メソッドに渡す必要があります。 このメソッドは、ユーザーからの必要な PrintDialog 入力を表示します。 ユーザーは、ダイアログで印刷ジョブを構成します (プリンター、用紙サイズ、向き、ページ範囲の選択を含む)。 ダイアログを閉じ、 pageRangeSelectionpageRange 値を持ち、 documentImageableArea プロパティが初期化された実際のオブジェクトを指す場合。

ユーザーがダイアログをキャンセルまたは閉じると、戻り値は になります null。 その結果、戻り値はアプリケーションによってチェック null される必要があります。

こちらもご覧ください

適用対象

CreateXpsDocumentWriter(PrintDocumentImageableArea)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開き、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

public:
 static System::Windows::Xps::XpsDocumentWriter ^ CreateXpsDocumentWriter(System::Printing::PrintDocumentImageableArea ^ % documentImageableArea);
[System.Security.SecurityCritical]
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (ref System.Printing.PrintDocumentImageableArea documentImageableArea);
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (ref System.Printing.PrintDocumentImageableArea documentImageableArea);
[<System.Security.SecurityCritical>]
static member CreateXpsDocumentWriter : PrintDocumentImageableArea -> System.Windows.Xps.XpsDocumentWriter
static member CreateXpsDocumentWriter : PrintDocumentImageableArea -> System.Windows.Xps.XpsDocumentWriter
Public Shared Function CreateXpsDocumentWriter (ByRef documentImageableArea As PrintDocumentImageableArea) As XpsDocumentWriter

パラメーター

documentImageableArea
PrintDocumentImageableArea

デバイスが印刷できるページ領域の寸法を含むオブジェクトへの参照。 このパラメーターのデータ型にパブリック コンストラクターが存在しないため、このパラメーターは初期化されずに渡されます。

戻り値

XPS データをストリームに書き込む XpsDocumentWriter これは null でもかまいません。 パラメーター documentImageableArearef (Visual Basic では ByRef) パラメーターであり、このメソッドで初期化されます。したがって、このパラメーターは 2 番目に返される項目を表します。

属性

注釈

多くのプリンターでは、用紙をグリップしてプリンター内を移動するために、各ページの端の周りに最大 4 分の 1 インチの印刷されていない領域が必要です。 そうしないと、トナーは紙の流れ機構を汚すことになります。 印刷できる領域は、"イメージ可能な領域" です。

PrintDocumentImageableArea にはパブリック コンストラクターがありません。 そのため、変数 documentImageableArea を宣言して に null 割り当て、メソッドに渡す必要があります。 このメソッドは、ユーザーからの必要な PrintDialog 入力を表示します。 ユーザーがプリンター、用紙サイズ、および向きを選択し、ダイアログを閉じた後、実際のオブジェクトをポイントし、 documentImageableArea そのプロパティが初期化されます。

ユーザーがダイアログをキャンセルまたは閉じると、戻り値は になります null。 その結果、戻り値はアプリケーションによってチェック null される必要があります。

こちらもご覧ください

適用対象

CreateXpsDocumentWriter(PrintQueue)

XpsDocumentWriter オブジェクトを作成し、指定した印刷キューに関連付けます。

public:
 static System::Windows::Xps::XpsDocumentWriter ^ CreateXpsDocumentWriter(System::Printing::PrintQueue ^ printQueue);
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (System.Printing.PrintQueue printQueue);
static member CreateXpsDocumentWriter : System.Printing.PrintQueue -> System.Windows.Xps.XpsDocumentWriter
Public Shared Function CreateXpsDocumentWriter (printQueue As PrintQueue) As XpsDocumentWriter

パラメーター

printQueue
PrintQueue

XPS ドキュメントを印刷する印刷キュー。

戻り値

XPS ストリームに書き込む XpsDocumentWriter

次の例は、このメソッドを使用して を作成する方法を XpsDocumentWriter示しています。

// -------------------- GetPrintXpsDocumentWriter() -------------------
/// <summary>
///   Returns an XpsDocumentWriter for the default print queue.</summary>
/// <returns>
///   An XpsDocumentWriter for the default print queue.</returns>
private XpsDocumentWriter GetPrintXpsDocumentWriter()
{
    // Create a local print server
    LocalPrintServer ps = new LocalPrintServer();

    // Get the default print queue
    PrintQueue pq = ps.DefaultPrintQueue;

    // Get an XpsDocumentWriter for the default print queue
    XpsDocumentWriter xpsdw = PrintQueue.CreateXpsDocumentWriter(pq);
    return xpsdw;
}// end:GetPrintXpsDocumentWriter()
' -------------------- GetPrintXpsDocumentWriter() -------------------
''' <summary>
'''   Returns an XpsDocumentWriter for the default print queue.</summary>
''' <returns>
'''   An XpsDocumentWriter for the default print queue.</returns>
Private Function GetPrintXpsDocumentWriter() As XpsDocumentWriter
    ' Create a local print server
    Dim ps As New LocalPrintServer()

    ' Get the default print queue
    Dim pq As PrintQueue = ps.DefaultPrintQueue

    ' Get an XpsDocumentWriter for the default print queue
    Dim xpsdw As XpsDocumentWriter = PrintQueue.CreateXpsDocumentWriter(pq)
    Return xpsdw
End Function ' end:GetPrintXpsDocumentWriter()

こちらもご覧ください

適用対象

CreateXpsDocumentWriter(Double, Double)

指定したサイズで XpsDocumentWriter オブジェクトを作成します。

public:
 static System::Windows::Xps::XpsDocumentWriter ^ CreateXpsDocumentWriter(double % width, double % height);
[System.Security.SecurityCritical]
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (ref double width, ref double height);
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (ref double width, ref double height);
[<System.Security.SecurityCritical>]
static member CreateXpsDocumentWriter : double * double -> System.Windows.Xps.XpsDocumentWriter
static member CreateXpsDocumentWriter : double * double -> System.Windows.Xps.XpsDocumentWriter
Public Shared Function CreateXpsDocumentWriter (ByRef width As Double, ByRef height As Double) As XpsDocumentWriter

パラメーター

width
Double

XPS ドキュメントの幅。

height
Double

XPS ドキュメントの高さ。

戻り値

XPS ストリームに書き込む XpsDocumentWriter。 これは null でもかまいません。

属性

注釈

このメソッドは、ユーザーからの必要な PrintDialog 入力を表示します。 ユーザーがダイアログをキャンセルまたは閉じると、戻り値は になります null。 その結果、戻り値はアプリケーションによってチェック null される必要があります。

こちらもご覧ください

適用対象

CreateXpsDocumentWriter(String, PrintDocumentImageableArea)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開いてジョブの説明を指定し、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

public:
 static System::Windows::Xps::XpsDocumentWriter ^ CreateXpsDocumentWriter(System::String ^ jobDescription, System::Printing::PrintDocumentImageableArea ^ % documentImageableArea);
[System.Security.SecurityCritical]
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (string jobDescription, ref System.Printing.PrintDocumentImageableArea documentImageableArea);
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (string jobDescription, ref System.Printing.PrintDocumentImageableArea documentImageableArea);
[<System.Security.SecurityCritical>]
static member CreateXpsDocumentWriter : string * PrintDocumentImageableArea -> System.Windows.Xps.XpsDocumentWriter
static member CreateXpsDocumentWriter : string * PrintDocumentImageableArea -> System.Windows.Xps.XpsDocumentWriter
Public Shared Function CreateXpsDocumentWriter (jobDescription As String, ByRef documentImageableArea As PrintDocumentImageableArea) As XpsDocumentWriter

パラメーター

jobDescription
String

印刷ジョブの名前。 これは、Windows 印刷ユーザー インターフェイスに表示されます。

documentImageableArea
PrintDocumentImageableArea

デバイスが印刷できるページ領域の寸法を含むオブジェクトへの参照。 このパラメーターのデータ型にパブリック コンストラクターが存在しないため、このパラメーターは初期化されずに渡されます。

戻り値

XPS データをストリームに書き込む XpsDocumentWriter これは null でもかまいません。 パラメーター documentImageableArearef (Visual Basic では ByRef) パラメーターであり、このメソッドで初期化されます。したがって、このパラメーターは 2 番目に返される項目を表します。

属性

注釈

多くのプリンターでは、用紙をグリップしてプリンター内を移動するために、各ページの端の周りに最大 4 分の 1 インチの印刷されていない領域が必要です。 そうしないと、トナーは紙の流れ機構を汚すことになります。 印刷できる領域は、"イメージ可能な領域" です。

PrintDocumentImageableArea にはパブリック コンストラクターがありません。 そのため、変数 documentImageableArea を宣言して に null 割り当て、メソッドに渡す必要があります。 このメソッドは、ユーザーからの必要な PrintDialog 入力を表示します。 ユーザーがプリンター、用紙サイズ、および向きを選択し、ダイアログを閉じた後、 documentImageableArea 実際のオブジェクトをポイントし、そのプロパティが初期化されます。

ユーザーがダイアログをキャンセルまたは閉じると、戻り値は になります null。 その結果、戻り値はアプリケーションによってチェック null される必要があります。

こちらもご覧ください

適用対象

CreateXpsDocumentWriter(String, PrintDocumentImageableArea, PageRangeSelection, PageRange)

XpsDocumentWriter オブジェクトを作成し、Windows のコモン印刷ダイアログを開いてページの範囲を指定し、イメージ可能領域とメディアのサイズに関する情報を表す ref (Visual Basic の場合は ByRef) パラメーターを返します。

public:
 static System::Windows::Xps::XpsDocumentWriter ^ CreateXpsDocumentWriter(System::String ^ jobDescription, System::Printing::PrintDocumentImageableArea ^ % documentImageableArea, System::Windows::Controls::PageRangeSelection % pageRangeSelection, System::Windows::Controls::PageRange % pageRange);
[System.Security.SecurityCritical]
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (string jobDescription, ref System.Printing.PrintDocumentImageableArea documentImageableArea, ref System.Windows.Controls.PageRangeSelection pageRangeSelection, ref System.Windows.Controls.PageRange pageRange);
public static System.Windows.Xps.XpsDocumentWriter CreateXpsDocumentWriter (string jobDescription, ref System.Printing.PrintDocumentImageableArea documentImageableArea, ref System.Windows.Controls.PageRangeSelection pageRangeSelection, ref System.Windows.Controls.PageRange pageRange);
[<System.Security.SecurityCritical>]
static member CreateXpsDocumentWriter : string * PrintDocumentImageableArea * PageRangeSelection * PageRange -> System.Windows.Xps.XpsDocumentWriter
static member CreateXpsDocumentWriter : string * PrintDocumentImageableArea * PageRangeSelection * PageRange -> System.Windows.Xps.XpsDocumentWriter
Public Shared Function CreateXpsDocumentWriter (jobDescription As String, ByRef documentImageableArea As PrintDocumentImageableArea, ByRef pageRangeSelection As PageRangeSelection, ByRef pageRange As PageRange) As XpsDocumentWriter

パラメーター

jobDescription
String

印刷ジョブの名前。 これは、Windows 印刷ユーザー インターフェイスに表示されます。

documentImageableArea
PrintDocumentImageableArea

デバイスが印刷できるページ領域の寸法を含むオブジェクトへの参照。 このパラメーターのデータ型にパブリック コンストラクターが存在しないため、このパラメーターは初期化されずに渡されます。

pageRangeSelection
PageRangeSelection

すべてのページを印刷するか、ユーザーによって指定された範囲だけを印刷するかを指定する値。

pageRange
PageRange

印刷されるページの範囲

戻り値

XPS データをストリームに書き込む XpsDocumentWriter これは null でもかまいません。 documentImageableAreapageRangeSelectionpageRange の各パラメーターはいずれもユーザーによって初期化され、ダイアログ ボックスを閉じると返される ref (Visual Basic では ByRef) であるため、それぞれが追加の戻り項目を表します。

属性

注釈

多くのプリンターでは、用紙をグリップしてプリンター内を移動するために、各ページの端の周りに最大 4 分の 1 インチの印刷されていない領域が必要です。 そうしないと、トナーは紙の流れ機構を汚すことになります。 印刷できる領域は、"イメージ可能な領域" です。

PrintDocumentImageableArea にはパブリック コンストラクターがありません。 そのため、変数 documentImageableArea を宣言して に null 割り当て、メソッドに渡す必要があります。 このメソッドは、ユーザーからの必要な PrintDialog 入力を表示します。 ユーザーは、ダイアログで印刷ジョブを構成します (プリンター、用紙サイズ、向き、ページ範囲の選択を含む)。 ダイアログを閉じ、 pageRangeSelectionpageRange 値を持ち、 documentImageableArea プロパティが初期化された実際のオブジェクトを指す場合。

ユーザーがダイアログをキャンセルまたは閉じると、戻り値は になります null。 その結果、戻り値はアプリケーションによってチェック null される必要があります。

こちらもご覧ください

適用対象