I have been following this answer in trying to read text from an XPS document.
I have the following code:
string filePath = @"C:\A.xps";
XpsDocument _xpsDocument = new XpsDocument(filePath, System.IO.FileAccess.Read);
IXpsFixedDocumentSequenceReader fixedDocSeqReader = _xpsDocument.FixedDocumentSequenceReader;
The problem is fixedDocSeqReader
is null.
I tried using this instead:
var seq = _xpsDocument.GetFixedDocumentSequence();
But seq
is also null.
Any ideas?