本文整理汇总了VB.NET中System.Windows.Xps.Packaging.XpsDocument.FixedDocumentSequenceReader属性的典型用法代码示例。如果您正苦于以下问题:VB.NET XpsDocument.FixedDocumentSequenceReader属性的具体用法?VB.NET XpsDocument.FixedDocumentSequenceReader怎么用?VB.NET XpsDocument.FixedDocumentSequenceReader使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了XpsDocument.FixedDocumentSequenceReader属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ICollection
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()
开发者ID:VB.NET开发者,项目名称:System.Windows.Xps.Packaging,代码行数:34,代码来源:XpsDocument.FixedDocumentSequenceReader