-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOException when viewing XpsDocument with DocumentViewer #39430
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Any solution to this? having the really same issue |
@Chapre how exactly are you creating your In my case, I was able to obtain an XPS stream which enabled me to do this file access change in memory: MemoryStream xpsStream = ...
var package = Package.Open(xpsStream, FileMode.Open, FileAccess.Read);
var uri = new Uri($"memorystream://{Guid.NewGuid():N}.xps");
PackageStore.AddPackage(uri, package);
this.xps = new XpsDocument(package, CompressionOption.NotCompressed, uri.AbsoluteUri);
this.viewer.Document = this.xps.GetFixedDocumentSequence(); |
@MarioZ i got the same exception, but when i tried to write the xps document with pagination. `
` Sorry for formatting, my first comment ever |
I have the same problem,please fix it soon |
What's more, I can't print,Using XpsDocument with DocumentViewer |
Would you be interested in debugging into it @PeterPandefu ? |
what should I do? |
Is such that. If My FlowDocument Contain Image ,This error will appear,otherwise no |
I'm getting an
IOException
and "Entries cannot be opened multiple times in Update mode." message when providingXpsDocument
toDocumentViewer
control.The issue occurs only in .NET Core, it doesn't occur in the .NET Framework.
I'm generating the
XpsDocument
in-memory and displaying it withDocumentViewer
, but this issue can also be reproduced by creating theXpsDocument
from the XPS file, see this repro project.After loading the XPS file, you need to do some actions/movements on the
DocumentViewer
control and eventually, the exception will occur. For instance, you can zoom in and out, hover inside and outside, click inside and outside the control, etc.I didn't determine exactly what action causes the issue, sometimes it is on mouse movement, sometimes it is on mouse click...
Anyway, what I did notice is that the issue doesn't occur when file access is
Read
, notReadWrite
.Also, the issue doesn't occur when the XPS content doesn't contain any image.
The text was updated successfully, but these errors were encountered: