Skip to content
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

PrintDialog issue at Windows 1607 #2637

Closed
Zubastic opened this issue Feb 17, 2020 · 3 comments
Closed

PrintDialog issue at Windows 1607 #2637

Zubastic opened this issue Feb 17, 2020 · 3 comments

Comments

@Zubastic
Copy link

When try to print page with System.Windows.Controls.PrintDialog at NetCore 3.1 program goes to infinity loop. If using virtual printer (for example Microsoft Print to PDF) it throw exception:

System.NotSupportedException: Specified method is not supported.
   at MS.Internal.PrintWin32Thunk.XpsPrintJobStream.Seek(Int64 offset, SeekOrigin origin)
   at System.Printing.PrintQueueStream.Seek(Int64 offset, SeekOrigin origin)
   at System.IO.Compression.ZipArchive.WriteFile()
   at System.IO.Compression.ZipArchive.Dispose(Boolean disposing)
   at System.IO.Compression.ZipArchive.Dispose()
   at System.IO.Packaging.ZipPackage.Dispose(Boolean disposing)
   at System.IO.Packaging.Package.System.IDisposable.Dispose()
   at System.IO.Packaging.Package.Close()
   at System.Windows.Xps.Packaging.XpsDocument.DisposeXpsDocument()
   at System.Printing.PrintQueue.DisposeSerializationManager(Boolean abort)
   at System.Windows.Xps.XpsDocumentWriter.EndWrite(Boolean disposeManager, Boolean abort)
   at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
   at System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator, PrintTicket printTicket)
   at System.Windows.Controls.PrintDialog.PrintDocument(DocumentPaginator documentPaginator, String description)
   at WpfNetcoreTest.Program..ctor() in C:\Users\Zubastic\Source\Repos\Zubastic\PrintDialogBug\WpfNetcoreTest\Program.cs:line 18
   at WpfNetcoreTest.App..ctor() in C:\Users\Zubastic\Source\Repos\Zubastic\PrintDialogBug\WpfNetcoreTest\App.xaml.cs:line 18
   at WpfNetcoreTest.App.Main()

Repo for reproduce bug:
https://github.com/Zubastic/PrintDialogBug

This reproduced only at 1607, at 1809 it is OK.

@jeffschwMSFT
Copy link
Member

@vatsan-madhavan should this be moved to wpf?

@vatsan-madhavan
Copy link
Member

@jeffschwMSFT 🙏 - moving it!

@vatsan-madhavan vatsan-madhavan transferred this issue from dotnet/runtime Feb 21, 2020
@Zubastic
Copy link
Author

#2609

@ghost ghost locked as resolved and limited conversation to collaborators Apr 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants