Repository navigation
Description
Description
Since the first release of .NET Core not everything seems to be fully implemented or ported from .NET Framework to .NET Core.
Now we are at .net 7 at .net 8, and still we are not being able to e.g. open XPS documents generated by the XPSDrv because code was not ported or contains bugs. The list of XPS and print related tickets, issues is long, I list a few from several domains.
This is a cry for help to get some attention to the XPS/print thing.
We know XPS and printing aren't sexy, but just because they're unpopular doesn't mean they shouldn't be given attention.
-
.NET 5 - Printing - XPS requires STA Threads wpf#4000
- -->ongoing: [API Proposal]: Lightweight in-place XpsDocument modification APIs wpf#10361 -
https://developercommunity.visualstudio.com/t/Improve-XPS-printing-STA/690912
-
Remove ArrayLists from WPF / XPS to improve code and performance wpf#6426
-
IOException in ZipArchiveEntry.OpenInUpdateMode when printing wpf#6842
-
XpsDocumentWriter.SaveAsXaml - BitmapMetadata is not available on BitmapImage wpf#6386
-
IOException when viewing XpsDocument with DocumentViewer #39430
-
SerializerDescriptor relies on unsupported reflection API and will always throw wpf#4479
-
Close Stream when creating an ImageSource from a Uri wpf#6843
-
Update XPS Serialization Stack for Packaging/Compression Semantic Changes wpf#2085
-
IOException in ZipArchiveEntry.OpenInUpdateMode when printing wpf#6842
-
https://github.com/microsoft/Windows-driver-samples/issues?q=XPS
-
{StaticResource} references are broken for XPS Paths after December2022 security patch wpf#7436
-
https://github.com/dotnet/runtime/issues/78629#issuecomment-1386307405 (thread safety issue, since 2013)
-
Printing from WPF is leaving random small spaces in the text when using Arial or Calibri fonts wpf#7499 - GlyphSerializer rounding fix wpf#7545
-
Text rendering with alpha in Color renders incorrectly wpf#7711
-
[Feature Request]: Modern library for printer communication and print control #75628
-
[Performance] Rewrite DirectWriteForwarder in C# to improve rendering performance wpf#5305
-
.NET core WPF print dialog freeze/not supported exception wpf#2609
-
PrintServer.GetPrintQueues throws NullReferenceException wpf#8339
-
Matchad Prime clipboard bugs after NET 7.0 installation #80815
-
Print Dialog Settings in Windows 11 22H2 Not Honored wpf#8355
-
Print preview is not taking over the given print settings wpf#8529
-
Printer tray changes are not detected by papersources winforms#9034
-
[Feature Request] Printing UI for MAUI Windows/Android/iOS maui#9931
-
Controlling the print dialog/window MicrosoftEdge/WebView2Feedback#42
-
IOException in ZipArchiveEntry.OpenInUpdateMode when printing wpf#9418
-
[API Proposal]: Print without
PrintQueueabstraction using the modern print dialog wpf#8940 -
Support for the Win11 22H2 UnifiedPrintDialog winforms#13264
-
Problem with update KB5050009 affecting IIS web application (XPS Document images) wpf#10322
-
Fix FontSource/FontFileStream embedded resource memory leak wpf#9948
Reproduction Steps
use XPS
Expected behavior
fast, multi-threaded, bug-free XPS drivers, libraries, runtime, sdk's, ...
XPS is a great format (knowing what garbage you can find in PDF documents).
Actual behavior
Slow, high memory, high cpu, unable to open xps files, bugs, ...
Regression?
.NET Framework is somewhat ok, but .net core/.net versions are not.
Known Workarounds
none :sad:
Configuration
No response
Other information
The frustrations towards Microsoft are high, very high, after all these years. Please give some attention to XPS and printing.
Activity
jeffhandley commentedon Nov 23, 2022
Thank you for organizing this info @wstaelens; that's very helpful. We will review further to see if there are opportunities for some small wins during .NET 8 and/or if there are issues where we can apply the help wanted[up-for-grabs] Good issue for external contributors
label and give guidance for how we think the issues should be addressed.
Terumasa1972 commentedon Nov 24, 2022
There has been a little development from .NetFrameWork 4.8 to 4.8.1 on GabageCollection.
But there seems to be some bugs still.
XpsDocumentWriter never release its resource and cannot be desposed.So I am suffering from printing a second fixedpage made by my custom FixedDocumentPaginator.It writes the same fixedpage to one in first time.
bradleypeet commentedon Jan 18, 2023
Anyone know if the thread safety issue in System.Windows.Xps.Serialization.SerializableObjectContext was ever fixed? I escalated a case with Microsoft and came up with my own workaround back in 2013.

wstaelens commentedon Jan 18, 2023
no idea, added it to the list @bradleypeet maybe you can mention the original case number? I really do hope it is fixed but I doubt it...
wstaelens commentedon Mar 23, 2023
Updated the list with new tickets regarding XPS and printing.
wstaelens commentedon Sep 19, 2023
Any updates on .net 8 regarding XPS?
[-]The big XPS-issue thread[/-][+]The big XPS-issue (and printing) thread[/+][-]The big XPS-issue (and printing) thread[/-][+]The big XPS-issue and printing thread[/+]wstaelens commentedon Oct 20, 2023
wish @davidfowl worked on this. 😅
neplan commentedon Dec 1, 2023
Hi to all,
We have an application where the printing is quite an important task!
At the moment all our Windows 11 users have problems with the print preview. The settings from our application are not applied to the print preview. This is a big problem for us!
Is there any workaround to solve this problem? The bug is there since one year and nothing is done since then?
Best regards,
Alessandro
wstaelens commentedon Dec 1, 2023
Good luck @neplan I don't think @jeffhandley and his team are spending any time on this. 😞 Been waiting for years.
neplan commentedon Dec 1, 2023
@wstaelens this is really terrible that such a basing thing is ignored completely! You didn't find any workaround or an external library or so?
wstaelens commentedon Dec 1, 2023
@neplan printing in Windows is internally XPS (gdi is being converted to XPS).
XPS is a subset of XAML (whohoo!!) . I also don't understand why nobody gives a #!@§! about it (for years already...)
Looking forward to reading the next excuse again.
@neplan I would suggest to wait for @jeffhandley and his team....
wstaelens commentedon Dec 5, 2023
znakeeye commentedon Mar 30, 2024
Wow. I came up with the exact same hack, though calling the
Clear()method instead. It's a bit unfortunate that you didn't provide this in text format. Googling thisSerializableObjectContextleak takes you nowhere.wstaelens commentedon Oct 29, 2024
The list received some updates (new items added, items closed)
mdell-seradex commentedon Nov 6, 2024
Glad to see that there has been a little progress on addressing printing issues!
I really hope those issues which can cause generic slowdowns and exceptions for most if not all attempts at printing in .NET, get fixed soon, and get ported back to older versions of .NET where applicable. Some of those have been plaguing systems intermittently for years without a permanent solution for our clients, and they ask about them everytime.
WolfgangHG commentedon Apr 8, 2025
Maybe also for this list: same problem for the WinForms "PrintDialog": dotnet/winforms#13264
mdell-seradex commentedon Jul 17, 2025
I hope this has not been forgotten.
Printing performance is still a major issue for some of our clients.
wstaelens commentedon Jul 18, 2025
I think @edwardneal is busy on improving/removing STA and the XPS document APIs:
dotnet/wpf#10361
He's doing a great job.