PrintQueue Addjob hang issue in Windows 10
up vote
-1
down vote
favorite
I have a question about printing issue.
I have a function call contains below code:
PrintQueue.UserPrintTicket = Ticket;
PrintQueue.AddJob(ShortDocumentName, XpsDocumentFile, false);
Ticket is the type of PrintTicket
, ShortDocumentName
is string type of doc name, XpsDocumentFile
is string type of xps file name.
these two lines of code run successfully in Windows 7, but will hang in Windows 10.
Is there any work around or solution for this issue?
c# windows printing hang
add a comment |
up vote
-1
down vote
favorite
I have a question about printing issue.
I have a function call contains below code:
PrintQueue.UserPrintTicket = Ticket;
PrintQueue.AddJob(ShortDocumentName, XpsDocumentFile, false);
Ticket is the type of PrintTicket
, ShortDocumentName
is string type of doc name, XpsDocumentFile
is string type of xps file name.
these two lines of code run successfully in Windows 7, but will hang in Windows 10.
Is there any work around or solution for this issue?
c# windows printing hang
I today use the below method, but it is not work fine in Hard printer. using (var fileStream = new StreamReader(XpsDocumentFile)) using (var printStream = new PrintQueueStream(PrintQueue, ShortDocumentName, true)) fileStream.BaseStream.CopyTo(printStream);
– Yang Hong
Nov 9 at 9:00
var file = File.ReadAllBytes(XpsDocumentFile); using (var job = PrintQueue.AddJob(ShortDocumentName, Ticket)) using (var stream = job.JobStream) stream.Write(file, 0, file.Length); Also this method I tried, and it will crash in Windows 7.
– Yang Hong
Nov 9 at 9:02
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I have a question about printing issue.
I have a function call contains below code:
PrintQueue.UserPrintTicket = Ticket;
PrintQueue.AddJob(ShortDocumentName, XpsDocumentFile, false);
Ticket is the type of PrintTicket
, ShortDocumentName
is string type of doc name, XpsDocumentFile
is string type of xps file name.
these two lines of code run successfully in Windows 7, but will hang in Windows 10.
Is there any work around or solution for this issue?
c# windows printing hang
I have a question about printing issue.
I have a function call contains below code:
PrintQueue.UserPrintTicket = Ticket;
PrintQueue.AddJob(ShortDocumentName, XpsDocumentFile, false);
Ticket is the type of PrintTicket
, ShortDocumentName
is string type of doc name, XpsDocumentFile
is string type of xps file name.
these two lines of code run successfully in Windows 7, but will hang in Windows 10.
Is there any work around or solution for this issue?
c# windows printing hang
c# windows printing hang
edited Nov 9 at 7:28
Paul Karam
2,36061734
2,36061734
asked Nov 9 at 6:45
Yang Hong
11
11
I today use the below method, but it is not work fine in Hard printer. using (var fileStream = new StreamReader(XpsDocumentFile)) using (var printStream = new PrintQueueStream(PrintQueue, ShortDocumentName, true)) fileStream.BaseStream.CopyTo(printStream);
– Yang Hong
Nov 9 at 9:00
var file = File.ReadAllBytes(XpsDocumentFile); using (var job = PrintQueue.AddJob(ShortDocumentName, Ticket)) using (var stream = job.JobStream) stream.Write(file, 0, file.Length); Also this method I tried, and it will crash in Windows 7.
– Yang Hong
Nov 9 at 9:02
add a comment |
I today use the below method, but it is not work fine in Hard printer. using (var fileStream = new StreamReader(XpsDocumentFile)) using (var printStream = new PrintQueueStream(PrintQueue, ShortDocumentName, true)) fileStream.BaseStream.CopyTo(printStream);
– Yang Hong
Nov 9 at 9:00
var file = File.ReadAllBytes(XpsDocumentFile); using (var job = PrintQueue.AddJob(ShortDocumentName, Ticket)) using (var stream = job.JobStream) stream.Write(file, 0, file.Length); Also this method I tried, and it will crash in Windows 7.
– Yang Hong
Nov 9 at 9:02
I today use the below method, but it is not work fine in Hard printer. using (var fileStream = new StreamReader(XpsDocumentFile)) using (var printStream = new PrintQueueStream(PrintQueue, ShortDocumentName, true)) fileStream.BaseStream.CopyTo(printStream);
– Yang Hong
Nov 9 at 9:00
I today use the below method, but it is not work fine in Hard printer. using (var fileStream = new StreamReader(XpsDocumentFile)) using (var printStream = new PrintQueueStream(PrintQueue, ShortDocumentName, true)) fileStream.BaseStream.CopyTo(printStream);
– Yang Hong
Nov 9 at 9:00
var file = File.ReadAllBytes(XpsDocumentFile); using (var job = PrintQueue.AddJob(ShortDocumentName, Ticket)) using (var stream = job.JobStream) stream.Write(file, 0, file.Length); Also this method I tried, and it will crash in Windows 7.
– Yang Hong
Nov 9 at 9:02
var file = File.ReadAllBytes(XpsDocumentFile); using (var job = PrintQueue.AddJob(ShortDocumentName, Ticket)) using (var stream = job.JobStream) stream.Write(file, 0, file.Length); Also this method I tried, and it will crash in Windows 7.
– Yang Hong
Nov 9 at 9:02
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
How about trying PrintDialog?
PrintQueue.AddJob hangs when printing to non-xps based printers
Actually, I wanted to write in comments, but I have not that authority yet.
So I posted the answer. I'm sorry if I used it wrong.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
How about trying PrintDialog?
PrintQueue.AddJob hangs when printing to non-xps based printers
Actually, I wanted to write in comments, but I have not that authority yet.
So I posted the answer. I'm sorry if I used it wrong.
add a comment |
up vote
0
down vote
How about trying PrintDialog?
PrintQueue.AddJob hangs when printing to non-xps based printers
Actually, I wanted to write in comments, but I have not that authority yet.
So I posted the answer. I'm sorry if I used it wrong.
add a comment |
up vote
0
down vote
up vote
0
down vote
How about trying PrintDialog?
PrintQueue.AddJob hangs when printing to non-xps based printers
Actually, I wanted to write in comments, but I have not that authority yet.
So I posted the answer. I'm sorry if I used it wrong.
How about trying PrintDialog?
PrintQueue.AddJob hangs when printing to non-xps based printers
Actually, I wanted to write in comments, but I have not that authority yet.
So I posted the answer. I'm sorry if I used it wrong.
answered Nov 12 at 3:27
m mukai
1465
1465
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53221014%2fprintqueue-addjob-hang-issue-in-windows-10%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I today use the below method, but it is not work fine in Hard printer. using (var fileStream = new StreamReader(XpsDocumentFile)) using (var printStream = new PrintQueueStream(PrintQueue, ShortDocumentName, true)) fileStream.BaseStream.CopyTo(printStream);
– Yang Hong
Nov 9 at 9:00
var file = File.ReadAllBytes(XpsDocumentFile); using (var job = PrintQueue.AddJob(ShortDocumentName, Ticket)) using (var stream = job.JobStream) stream.Write(file, 0, file.Length); Also this method I tried, and it will crash in Windows 7.
– Yang Hong
Nov 9 at 9:02