xpsdocument


Viewing Xps document - Compressed part has inconsistent data length


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

Related Links

Viewing Xps document - Compressed part has inconsistent data length

Categories

HOME
go
case
apache-spark-mllib
hessian
gradient
javacc
google-chrome-app
startup
project-intu
libc
capistrano3
standards
git-extensions
asp.net-core-webapi
asciidoctor-pdf
undertow
babel
backpack-for-laravel
dynamically-generated
mat
bioinformatics
mockjax
r-grid
mailkit
classcastexception
mnist
graphhopper
cd
demo
android-softkeyboard
escpos
softmax
knime
memory-mapping
context-switch
wpas
oozie-coordinator
janus
d3-force-directed
cmp
rocks
chromium-os
hadoop-2.7.2
windows-azure-queues
model-associations
udpclient
clipboard.js
php-socket
thread-sleep
np-spring
user-management
directdraw
terracotta
include-guards
poppler
branch-and-bound
ocra
umlgraph
exceldatareader
crowd
big-ip
imagefilter
vbe
maven-scm
qscrollarea
beaker-testing
dolby-audio-api
robotlegs
frameworkelementfactory
monotouch.dialog
azman
relative
expression-blend-4
exponentiation
collectionviewsource
photolibrary
qglwidget
silent
drupal-fivestar
binomial-heap
application-verifier
nstokenfield
spread

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App