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

속성

Name Description
ColorContexts

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

Fonts

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

Images

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

PageNumber

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

PrintTicket

티켓이 PrintTicket있는 FixedPage경우 .

ResourceDictionaries

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

StoryFragment

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

Thumbnail

썸네일이 있는 경우 썸네일 이미지와 연결된 FixedPage썸네일 이미지를 가져옵니다.

Uri

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

XmlReader

페이지에 대한 값을 XmlReader 가져옵니다.

메서드

Name Description
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)가 있는 리소스 사전을 가져옵니다.

적용 대상