AnnotationDocumentPaginator 생성자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
AnnotationDocumentPaginator 클래스의 새 인스턴스를 초기화합니다.
오버로드
| Name | Description |
|---|---|
| AnnotationDocumentPaginator(DocumentPaginator, Stream) |
지정된 AnnotationDocumentPaginator 및 주석 스토리지DocumentPaginator를 Stream 기반으로 클래스의 새 인스턴스를 초기화합니다. |
| AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore) |
지정된 AnnotationDocumentPaginator 클래스 및 에 따라 클래스의 DocumentPaginator 새 인스턴스를 초기화합니다AnnotationStore. |
| AnnotationDocumentPaginator(DocumentPaginator, Stream, FlowDirection) |
지정된AnnotationDocumentPaginator, 주석 스토리지 DocumentPaginator및 텍스트를 Stream기반으로 클래스의 FlowDirection 새 인스턴스를 초기화합니다. |
| AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore, FlowDirection) |
지정된 AnnotationDocumentPaginatorDocumentPaginator및 텍스트를 AnnotationStore기반으로 클래스의 FlowDirection 새 인스턴스를 초기화합니다. |
설명
클래스는 AnnotationDocumentPaginator 지정한 DocumentPaginatorAnnotationDocumentPaginator 항목을 생성자에 래핑하여 인쇄할 페이지에 사용자 주석을 추가합니다.
AnnotationDocumentPaginator(DocumentPaginator, Stream)
지정된 AnnotationDocumentPaginator 및 주석 스토리지DocumentPaginator를 Stream 기반으로 클래스의 새 인스턴스를 초기화합니다.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::IO::Stream ^ annotationStore);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.IO.Stream annotationStore);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.IO.Stream -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As Stream)
매개 변수
- originalPaginator
- DocumentPaginator
인쇄된 주석을 추가할 문서입니다.
- annotationStore
- Stream
주석을 검색할 주석 스토리지 스트림입니다.
설명
기본적으로 이 생성자는 텍스트 흐름 방향을 .로 LeftToRight설정합니다. 필요한 경우 대체 AnnotationDocumentPaginator 생성자 오버로드 중 하나를 사용하여 텍스트를 FlowDirection 다른 설정으로 설정할 수 있습니다.
클래스는 AnnotationDocumentPaginator 지정한 DocumentPaginatorAnnotationDocumentPaginator 항목을 생성자에 래핑하여 인쇄할 페이지에 사용자 주석을 추가합니다.
적용 대상
AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore)
지정된 AnnotationDocumentPaginator 클래스 및 에 따라 클래스의 DocumentPaginator 새 인스턴스를 초기화합니다AnnotationStore.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::Windows::Annotations::Storage::AnnotationStore ^ annotationStore);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.Windows.Annotations.Storage.AnnotationStore annotationStore);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.Windows.Annotations.Storage.AnnotationStore -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As AnnotationStore)
매개 변수
- originalPaginator
- DocumentPaginator
인쇄된 주석을 추가할 문서입니다.
- annotationStore
- AnnotationStore
주석을 검색할 저장소입니다.
예제
다음 예제에서는 생성자의 AnnotationDocumentPaginator 사용을 보여 있습니다.
PrintDialog prntDialog = new PrintDialog();
if ((bool)prntDialog.ShowDialog())
{
// XpsDocumentWriter.Write() may change the current
// directory to "My Documents" or another user selected
// directory for storing the print document. Save the
// current directory and restore it after calling Write().
string docDir = Directory.GetCurrentDirectory();
// Create and XpsDocumentWriter for the selected printer.
XpsDocumentWriter xdw = PrintQueue.CreateXpsDocumentWriter(
prntDialog.PrintQueue);
// Print the document with annotations.
try
{
xdw.Write(_annotHelper.GetAnnotationDocumentPaginator(
_xpsDocument.GetFixedDocumentSequence()));
}
catch (PrintingCanceledException)
{
// If in the PrintDialog the user chooses a file-based
// output, such as the "MS Office Document Image Writer",
// the user confirms or specifies the actual output
// filename when the xdw.write operation executes.
// If the user clicks "Cancel" in the filename
// dialog a PrintingCanceledException is thrown
// which we catch here and ignore.
// MessageBox.Show("Print output cancelled");
}
// Restore the original document directory to "current".
Directory.SetCurrentDirectory(docDir);
}
Dim prntDialog As New PrintDialog()
If CBool(prntDialog.ShowDialog()) Then
' XpsDocumentWriter.Write() may change the current
' directory to "My Documents" or another user selected
' directory for storing the print document. Save the
' current directory and restore it after calling Write().
Dim docDir As String = Directory.GetCurrentDirectory()
' Create and XpsDocumentWriter for the selected printer.
Dim xdw As XpsDocumentWriter = PrintQueue.CreateXpsDocumentWriter(prntDialog.PrintQueue)
' Print the document with annotations.
Try
xdw.Write(_annotHelper.GetAnnotationDocumentPaginator(_xpsDocument.GetFixedDocumentSequence()))
Catch e1 As PrintingCanceledException
' If in the PrintDialog the user chooses a file-based
' output, such as the "MS Office Document Image Writer",
' the user confirms or specifies the actual output
' filename when the xdw.write operation executes.
' If the user clicks "Cancel" in the filename
' dialog a PrintingCanceledException is thrown
' which we catch here and ignore.
End Try
' Restore the original document directory to "current".
Directory.SetCurrentDirectory(docDir)
End If
// ------------------ GetAnnotationDocumentPaginator ------------------
/// <summary>
/// Returns a paginator for printing annotations.</summary>
/// <param name="fds">
/// The FixedDocumentSequence containing
/// the annotations to print.</param>
/// <returns>
/// An paginator for printing the document's annotations.</returns>
public AnnotationDocumentPaginator GetAnnotationDocumentPaginator(
FixedDocumentSequence fds)
{
return new AnnotationDocumentPaginator(
fds.DocumentPaginator, _annotService.Store);
}
' ------------------ GetAnnotationDocumentPaginator ------------------
''' <summary>
''' Returns a paginator for printing annotations.</summary>
''' <param name="fds">
''' The FixedDocumentSequence containing
''' the annotations to print.</param>
''' <returns>
''' An paginator for printing the document's annotations.</returns>
Public Function GetAnnotationDocumentPaginator(ByVal fds As FixedDocumentSequence) As AnnotationDocumentPaginator
Return New AnnotationDocumentPaginator(fds.DocumentPaginator, _annotService.Store)
End Function
설명
기본적으로 이 생성자는 텍스트 흐름 방향을 .로 LeftToRight설정합니다. 필요한 경우 대체 AnnotationDocumentPaginator 생성자 오버로드 중 하나를 사용하여 텍스트를 FlowDirection 다른 설정으로 설정할 수 있습니다.
클래스는 AnnotationDocumentPaginator 지정한 DocumentPaginatorAnnotationDocumentPaginator 항목을 생성자에 래핑하여 인쇄할 페이지에 사용자 주석을 추가합니다.
적용 대상
AnnotationDocumentPaginator(DocumentPaginator, Stream, FlowDirection)
지정된AnnotationDocumentPaginator, 주석 스토리지 DocumentPaginator및 텍스트를 Stream기반으로 클래스의 FlowDirection 새 인스턴스를 초기화합니다.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::IO::Stream ^ annotationStore, System::Windows::FlowDirection flowDirection);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.IO.Stream annotationStore, System.Windows.FlowDirection flowDirection);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.IO.Stream * System.Windows.FlowDirection -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As Stream, flowDirection As FlowDirection)
매개 변수
- originalPaginator
- DocumentPaginator
인쇄된 주석을 추가할 문서입니다.
- annotationStore
- Stream
주석을 검색할 주석 스토리지 스트림입니다.
- flowDirection
- FlowDirection
텍스트 흐름 방향 LeftToRight 또는 RightToLeft.
설명
클래스는 AnnotationDocumentPaginator 지정한 DocumentPaginatorAnnotationDocumentPaginator 항목을 생성자에 래핑하여 인쇄할 페이지에 사용자 주석을 추가합니다.
적용 대상
AnnotationDocumentPaginator(DocumentPaginator, AnnotationStore, FlowDirection)
지정된 AnnotationDocumentPaginatorDocumentPaginator및 텍스트를 AnnotationStore기반으로 클래스의 FlowDirection 새 인스턴스를 초기화합니다.
public:
AnnotationDocumentPaginator(System::Windows::Documents::DocumentPaginator ^ originalPaginator, System::Windows::Annotations::Storage::AnnotationStore ^ annotationStore, System::Windows::FlowDirection flowDirection);
public AnnotationDocumentPaginator(System.Windows.Documents.DocumentPaginator originalPaginator, System.Windows.Annotations.Storage.AnnotationStore annotationStore, System.Windows.FlowDirection flowDirection);
new System.Windows.Annotations.AnnotationDocumentPaginator : System.Windows.Documents.DocumentPaginator * System.Windows.Annotations.Storage.AnnotationStore * System.Windows.FlowDirection -> System.Windows.Annotations.AnnotationDocumentPaginator
Public Sub New (originalPaginator As DocumentPaginator, annotationStore As AnnotationStore, flowDirection As FlowDirection)
매개 변수
- originalPaginator
- DocumentPaginator
인쇄된 주석을 추가할 문서입니다.
- annotationStore
- AnnotationStore
주석을 검색할 저장소입니다.
- flowDirection
- FlowDirection
텍스트 흐름 방향 LeftToRight 또는 RightToLeft.
설명
클래스는 AnnotationDocumentPaginator 지정한 DocumentPaginatorAnnotationDocumentPaginator 항목을 생성자에 래핑하여 인쇄할 페이지에 사용자 주석을 추가합니다.