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 でもかまいません。 (パラメーター documentImageableAreapageRangeSelection、および pageRange はすべて 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 でもかまいません。 (パラメーター documentImageableArea は、メソッドによって初期化される ref [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 でもかまいません。 (パラメーター documentImageableArea は、メソッドによって初期化される ref [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 でもかまいません。 (パラメーター documentImageableAreapageRangeSelection、および pageRange はすべて ref [Visual Basic のByRef ] パラメーターであり、ユーザーによって初期化され、ダイアログが閉じられたときに返されるため、それぞれが追加の返される項目を表します)。

属性

注釈

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

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

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

適用対象