Skip to content

The big XPS-issue and printing thread #78629

Open

Description

@wstaelens

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.

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

  1. ghost added
    untriaged
    on Nov 21, 2022
  2. jeffhandley commented on Nov 23, 2022

    @jeffhandley
    Member

    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.

  3. Terumasa1972 commented on Nov 24, 2022

    @Terumasa1972

    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.

  4. bradleypeet commented on Jan 18, 2023

    @bradleypeet

    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.
    image

  5. wstaelens commented on Jan 18, 2023

    @wstaelens
    Author

    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. image

    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...

  6. added this to the Future milestone on Feb 17, 2023
  7. ghost removed
    untriaged
    on Feb 17, 2023
  8. wstaelens commented on Mar 23, 2023

    @wstaelens
    Author

    Updated the list with new tickets regarding XPS and printing.

  9. wstaelens commented on Sep 19, 2023

    @wstaelens
    Author

    Any updates on .net 8 regarding XPS?

  10. changed the title [-]The big XPS-issue thread[/-] [+]The big XPS-issue (and printing) thread[/+] on Sep 20, 2023
  11. changed the title [-]The big XPS-issue (and printing) thread[/-] [+]The big XPS-issue and printing thread[/+] on Sep 20, 2023
  12. wstaelens commented on Oct 20, 2023

    @wstaelens
    Author

    wish @davidfowl worked on this. 😅

  13. neplan commented on Dec 1, 2023

    @neplan

    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

  14. wstaelens commented on Dec 1, 2023

    @wstaelens
    Author

    Good luck @neplan I don't think @jeffhandley and his team are spending any time on this. 😞 Been waiting for years.

  15. neplan commented on Dec 1, 2023

    @neplan

    @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?

  16. wstaelens commented on Dec 1, 2023

    @wstaelens
    Author

    @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....

  17. wstaelens commented on Dec 5, 2023

    @wstaelens
    Author
  18. znakeeye commented on Mar 30, 2024

    @znakeeye

    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. image

    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 this SerializableObjectContext leak takes you nowhere.

  19. wstaelens commented on Oct 29, 2024

    @wstaelens
    Author

    The list received some updates (new items added, items closed)

  20. mdell-seradex commented on Nov 6, 2024

    @mdell-seradex

    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.

  21. WolfgangHG commented on Apr 8, 2025

    @WolfgangHG

    Maybe also for this list: same problem for the WinForms "PrintDialog": dotnet/winforms#13264

  22. mdell-seradex commented on Jul 17, 2025

    @mdell-seradex

    I hope this has not been forgotten.
    Printing performance is still a major issue for some of our clients.

  23. wstaelens commented on Jul 18, 2025

    @wstaelens
    Author

    I hope this has not been forgotten. Printing performance is still a major issue for some of our clients.

    I think @edwardneal is busy on improving/removing STA and the XPS document APIs:
    dotnet/wpf#10361

    He's doing a great job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions