IXpsFixedPageReader 인터페이스

정의

FixedPage의 파트를 읽기 위한 메서드를 정의합니다.

public interface class IXpsFixedPageReader : System::Windows::Xps::Packaging::IStoryFragmentProvider
public interface IXpsFixedPageReader : System.Windows.Xps.Packaging.IStoryFragmentProvider
type IXpsFixedPageReader = interface
    interface IStoryFragmentProvider
Public Interface IXpsFixedPageReader
Implements IStoryFragmentProvider
구현

예제

다음 예제에서는 가져오는 방법을 보여 줍니다.는 IXpsFixedPageReader 에서 컬렉션을 IXpsFixedDocumentReader입니다. 샘플에도 새 추가할 고정 페이지 판독기를 사용 하는 방법을 보여 줍니다 StoryFragment 페이지의 문서 구조를 정의 하는 합니다.

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()

속성

ColorContexts

페이지에 있는 모든 색 컨텍스트 컬렉션을 가져옵니다.

Fonts

페이지에서 사용되는 모든 글꼴 컬렉션을 가져옵니다.

Images

페이지에 있는 모든 이미지 컬렉션을 가져옵니다.

PageNumber

페이지 번호를 가져옵니다.

PrintTicket

티켓이 있는 경우 PrintTicket와 연결된 FixedPage을 가져옵니다.

ResourceDictionaries

페이지의 모든 리소스 사전 컬렉션을 가져옵니다.

StoryFragment

StoryFragments XPS 패키지의 태그 부분을 가져옵니다.

Thumbnail

FixedPage와 연결되어 있는 축소판 그림 이미지(있는 경우)를 가져옵니다.

Uri

FixedPage의 URI(Uniform Resource Identifier)를 가져옵니다.

XmlReader

해당 페이지의 XmlReader를 가져옵니다.

메서드

AddStoryFragment()

StoryFragments XPS 패키지에 요소를 추가합니다.

(다음에서 상속됨 IStoryFragmentProvider)
GetColorContext(Uri)

지정된 URI(Uniform Resource Identifier)가 있는 리소스의 색 컨텍스트를 가져옵니다.

GetFont(Uri)

지정된 URI(Uniform Resource Identifier)가 있는 글꼴을 가져옵니다.

GetImage(Uri)

지정된 URI(Uniform Resource Identifier)가 있는 이미지를 가져옵니다.

GetResource(Uri)

지정된 URI(Uniform Resource Identifier)가 있는 리소스를 가져옵니다.

GetResourceDictionary(Uri)

지정된 URI(Uniform Resource Identifier)가 있는 리소스 사전을 가져옵니다.

적용 대상