IXpsFixedDocumentSequenceReader IXpsFixedDocumentSequenceReader IXpsFixedDocumentSequenceReader IXpsFixedDocumentSequenceReader Interface

정의

FixedDocumentSequence의 파트를 읽기 위한 메서드를 정의합니다.Defines methods for reading the parts of a FixedDocumentSequence.

public interface class IXpsFixedDocumentSequenceReader
public interface IXpsFixedDocumentSequenceReader
type IXpsFixedDocumentSequenceReader = interface
Public Interface IXpsFixedDocumentSequenceReader

예제

다음 예제에는이 인터페이스를 구현 하는 개체에 대 한 참조를 가져오는 방법을 보여 줍니다.The following example shows how to obtain a reference to an object that implements this interface.


private void SignatureDefinitionCommandHandler(object sender, RoutedEventArgs e)
{
    SignatureDefinition sigDefDialog = new SignatureDefinition();
    if (sigDefDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
    {
        XpsSignatureDefinition signatureDefinition = new XpsSignatureDefinition();
        signatureDefinition.RequestedSigner = sigDefDialog.RequestedSigner.Text;
        signatureDefinition.Intent = sigDefDialog.Intent.Text;
        signatureDefinition.SigningLocale = sigDefDialog.SigningLocale.Text;
        try
        {
            signatureDefinition.SignBy = DateTime.Parse(sigDefDialog.SignBy.Text);
        }
        catch (FormatException)
        {
        }
        signatureDefinition.SpotId = Guid.NewGuid();
        IXpsFixedDocumentSequenceReader docSeq = _xpsDocument.FixedDocumentSequenceReader; //_xpsDocument is type System.Windows.Xps.Packaging.XpsDocument
        IXpsFixedDocumentReader doc = docSeq.FixedDocuments[0];
        doc.AddSignatureDefinition(signatureDefinition);
        doc.CommitSignatureDefinition();
        InitializeSignatureDisplay();
    }
}


Private Sub SignatureDefinitionCommandHandler(ByVal sender As Object, ByVal e As RoutedEventArgs)
	Dim sigDefDialog As New SignatureDefinition()
	If sigDefDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
		Dim signatureDefinition As New XpsSignatureDefinition()
		signatureDefinition.RequestedSigner = sigDefDialog.RequestedSigner.Text
		signatureDefinition.Intent = sigDefDialog.Intent.Text
		signatureDefinition.SigningLocale = sigDefDialog.SigningLocale.Text
		Try
			signatureDefinition.SignBy = Date.Parse(sigDefDialog.SignBy.Text)
		Catch e1 As FormatException
		End Try
		signatureDefinition.SpotId = Guid.NewGuid()
		Dim docSeq As IXpsFixedDocumentSequenceReader = _xpsDocument.FixedDocumentSequenceReader '_xpsDocument is type System.Windows.Xps.Packaging.XpsDocument
		Dim doc As IXpsFixedDocumentReader = docSeq.FixedDocuments(0)
		doc.AddSignatureDefinition(signatureDefinition)
		doc.CommitSignatureDefinition()
		InitializeSignatureDisplay()
	End If
End Sub

다음 예제에서는 가져오는 방법을 보여 줍니다.는 FixedDocumentSequenceReader 에 액세스 하기 위해 FixedDocument 부분을 XpsDocument입니다.The following example shows how to obtain a FixedDocumentSequenceReader in order to access FixedDocument parts in an XpsDocument.

ShowStatus("   Getting FixedDocumentSequenceReader.");
IXpsFixedDocumentSequenceReader fixedDocSeqReader =
    xpsDocument.FixedDocumentSequenceReader;

ShowStatus("   Getting FixedDocumentReaders.");
ICollection<IXpsFixedDocumentReader> fixedDocuments =
    fixedDocSeqReader.FixedDocuments;

ShowStatus("   Getting FixedPageReaders.");
IEnumerator<IXpsFixedDocumentReader> enumerator =
    fixedDocuments.GetEnumerator();
enumerator.MoveNext();
ICollection<IXpsFixedPageReader> fixedPages =
    enumerator.Current.FixedPages;


// Add a document structure to each fixed page.
int i = 0;
foreach (IXpsFixedPageReader fixedPageReader in fixedPages)
{
    XpsResource pageStructure;
    ShowStatus("   Adding page structure resource:\n       '" +
                       Filename(_fixedPageStructures[i]) + "'");
    try
    {   // Add a new StoryFragment to hold the page structure.
        pageStructure = fixedPageReader.AddStoryFragment();
    }
    catch (System.InvalidOperationException)
    {
        MessageBox.Show(xpsUnstructuredFile +
            "\n\nDocument structure cannot be added.\n\n" +
            Filename(xpsUnstructuredFile) + " might already " +
            "contain an existing document structure.",
            "Cannot Add Document Structure",
            MessageBoxButton.OK, MessageBoxImage.Error);
        break;
    }

    // Copy the page structure to the new StoryFragment.
    WriteResource(pageStructure, _fixedPageStructures[i++]);
}

ShowStatus("   Saving and closing the new document.\n");
xpsDocument.Close();
ShowStatus("   Getting FixedDocumentSequenceReader.")
Dim fixedDocSeqReader As IXpsFixedDocumentSequenceReader = xpsDocument.FixedDocumentSequenceReader

ShowStatus("   Getting FixedDocumentReaders.")
Dim fixedDocuments As ICollection(Of IXpsFixedDocumentReader) = fixedDocSeqReader.FixedDocuments

ShowStatus("   Getting FixedPageReaders.")
Dim enumerator As IEnumerator(Of IXpsFixedDocumentReader) = fixedDocuments.GetEnumerator()
enumerator.MoveNext()
Dim fixedPages As ICollection(Of IXpsFixedPageReader) = enumerator.Current.FixedPages


' Add a document structure to each fixed page.
Dim i As Integer = 0
For Each fixedPageReader As IXpsFixedPageReader In fixedPages
	Dim pageStructure As XpsResource
	ShowStatus("   Adding page structure resource:" & vbLf & "       '" & Filename(_fixedPageStructures(i)) & "'")
	Try
		pageStructure = fixedPageReader.AddStoryFragment()
	Catch e2 As InvalidOperationException
                 System.Windows.MessageBox.Show(xpsUnstructuredFile & vbLf & vbLf & "Document structure cannot be added." & vbLf & vbLf & Filename(xpsUnstructuredFile) & " might already " & "contain an existing document structure.",
                                 "Cannot Add Document Structure",
                                 MessageBoxButton.OK,
                                 MessageBoxImage.Error)
		Exit For
	End Try

	' Copy the page structure to the new StoryFragment.
	WriteResource(pageStructure, _fixedPageStructures(i))
	i += 1
Next fixedPageReader

ShowStatus("   Saving and closing the new document." & vbLf)
xpsDocument.Close()

속성

FixedDocuments FixedDocuments FixedDocuments FixedDocuments

FixedDocument의 각 문서에 대해 FixedDocumentSequence 판독기 컬렉션을 가져옵니다.Gets a collection of FixedDocument readers for each document in a FixedDocumentSequence.

PrintTicket PrintTicket PrintTicket PrintTicket

PrintTicket와 연결된 FixedDocument을(있는 경우) 가져옵니다.Gets the PrintTicket, if one exists, that is associated with the FixedDocument.

Thumbnail Thumbnail Thumbnail Thumbnail

FixedDocumentSequence와 연결되어 있는 축소판 그림 이미지(있는 경우)를 가져옵니다.Gets the thumbnail image, if one exists, that is associated with the FixedDocumentSequence.

Uri Uri Uri Uri

URI(Uniform Resource Identifier)uniform resource identifier (URI)FixedDocumentSequence을 가져옵니다.Gets the URI(Uniform Resource Identifier)uniform resource identifier (URI) of the FixedDocumentSequence.

메서드

GetFixedDocument(Uri) GetFixedDocument(Uri) GetFixedDocument(Uri) GetFixedDocument(Uri)

지정된 URI(Uniform Resource Identifier)uniform resource identifier (URI)를 사용하여 FixedDocument의 판독기를 가져옵니다.Gets a reader for the FixedDocument with the specified URI(Uniform Resource Identifier)uniform resource identifier (URI).

적용 대상