Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IXpsFixedPageReader Interface

IXpsFixedPageReader Interface

Defines methods for reading the parts of a FixedPage.

Namespace:  System.Windows.Xps.Packaging
Assembly:  ReachFramework (in ReachFramework.dll)

public interface IXpsFixedPageReader : IStoryFragmentProvider

The IXpsFixedPageReader type exposes the following members.

Public propertyColorContextsGets a collection of all the color contexts on the page.
Public propertyFontsGets a collection of all the fonts that are used on the page.
Public propertyImagesGets a collection of all the images on the page.
Public propertyPageNumberGets the page number.
Public propertyPrintTicketGets the PrintTicket, if a ticket exists, that is associated with the FixedPage.
Public propertyResourceDictionariesGets a collection of all the resource dictionaries for the page.
Public propertyStoryFragmentGets the StoryFragments part of the markup of an XPS package.
Public propertyThumbnailGets the thumbnail image, if a thumbnail exists, that is associated with the FixedPage.
Public propertyUriGets the uniform resource identifier (URI) of the FixedPage.
Public propertyXmlReaderGets an XmlReader for the page.

Public methodAddStoryFragmentAdds a StoryFragments element to an XPS package. (Inherited from IStoryFragmentProvider.)
Public methodGetColorContextGets the color context for the resource that has the specified uniform resource identifier (URI).
Public methodGetFontGets the font that has the specified uniform resource identifier (URI).
Public methodGetImageGets the image that has the specified uniform resource identifier (URI).
Public methodGetResourceGets the resource that has the specified uniform resource identifier (URI).
Public methodGetResourceDictionaryGets the resource dictionary that has the specified uniform resource identifier (URI).

The following example shows how to obtain an IXpsFixedPageReader collection from an IXpsFixedDocumentReader. The sample also shows how to use the fixed-page reader to add a new StoryFragment that defines the document structure of the page.

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

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

ShowStatus("   Getting FixedPageReaders.");
IEnumerator<IXpsFixedDocumentReader> enumerator =
ICollection<IXpsFixedPageReader> 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]) + "'");
    {   // 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);

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

ShowStatus("   Saving and closing the new document.\n");

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft