XpsDocument xpsDoc = new XpsDocument(fileName, FileAccess.Read);
documentViewer.Document = xpsDoc.GetFixedDocumentSequence();
Second line gives next error: Compressed part has inconsistent data length
Why?
XpsDocument xpsDoc = new XpsDocument(fileName, FileAccess.Read);
documentViewer.Document = xpsDoc.GetFixedDocumentSequence();
Second line gives next error: Compressed part has inconsistent data length
Why?
Copyright © 2021 Jogjafile Inc.
Ok, I've found an answer.
I have created Xps document in this way:
Thus, after saving it and trying to view I got Compressed part has inconsistent data length error.
Then I changed
to
And it started working.
Hope this will help somebody who may face with it.