【问题标题】:XpsDocument.FixedDocumentSequenceReader is nothingXpsDocument.FixedDocumentSequenceReader 什么都不是
【发布时间】:2014-05-14 12:05:59
【问题描述】:

好的,所以我想不通。我使用 Word 2013 在 Win 8 中创建了一个快速单词 .docx。3-4 行文本,使用 Microsoft XPS Document Writer v4 打印。它创建了一个 .oxps。我将其更改为 .zip,浏览页面并阅读 FixedDocumentSequence.fdseq、FixedDocument.fdoc 和生成的一个 1.fpage,以确保 xaml 是干净的。我还阅读了页面上的字形,看看“UnicodeString”是否也在那里。

这是我的控制台应用程序代码...

Sub Main()
    Dim myXPS As New XpsDocument("d:\wordtest.oxps", IO.FileAccess.Read, IO.Packaging.CompressionOption.NotCompressed)        
    Dim reader As IXpsFixedDocumentSequenceReader = myXPS.FixedDocumentSequenceReader()
End Sub

我在阅读器处设置断点并调试代码。对象“myXPS”很好exept 它没有 FixedDocumentSequenceReader。看着当地人时,它说“什么都没有”。

我有所有我应该的参考资料,并且正在导入:

Imports System.Text
Imports System.Windows.Xps.Packaging

发生这种情况有什么原因吗?

我有 VS 2013 Ultimate。

【问题讨论】:

    标签: vb.net xaml visual-studio-2013 xps xpsdocument


    【解决方案1】:

    我从以下链接中发现您应该在此处使用正斜杠: http://www.michaelflanakin.com/Articles/tabid/143/articleType/ArticleView/ArticleID/496/PageID/26/Default.aspx

    例如,

    Dim myXPS As New XpsDocument("d:/wordtest.oxps", ...
    

    【讨论】:

    • 我确实尝试过,但没有运气。无论“/”或“\”,对象仍然相同。
    【解决方案2】:

    Microsoft XPS 文档编写器允许您在保存文件时打印到 .xps。一旦我这样做了,程序就可以正常工作了。显然 vs2013(和 2010)不喜欢 Windows 8 .oxps 文件。值得深思。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-09
      • 1970-01-01
      • 2012-01-18
      • 2018-07-18
      • 1970-01-01
      • 2013-04-20
      • 2015-06-29
      • 2010-09-19
      相关资源
      最近更新 更多