Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Wait for print to complete |
Post Reply
|
| Author | |
Natalia
Beginner
Joined: 10 Aug 15 Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Topic: Wait for print to completePosted: 10 Aug 15 at 5:01PM |
|
Hello,
We noticed that PrintDocument() method returns before print operation is complete, and are looking for the correct way to wait for print to finish. RequestPrinterStatus(300) returns 8208 during print, and 0 when after print succeeds. Where could we find the description of possible values returned by RequestPrinterStatus? What is 8208 and what values would be returned if error occurs? Thanks, Natalia. |
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(1)
Quote Reply
Posted: 10 Aug 15 at 8:41PM |
|
Hi Natalia,
the function RequestPrinterStatus is a bit experimental. In the description you can read that there's no guarantee that it works with all printer and all printer driver: Before printing you should use RequestPrinterStatus with StatusCommand 101. Then you should use PrintDocument. Then you should use RequestPrinterStatus with StatusCommand 200 in a loop. If there's no returning value 1 then the print job should be finished or your printer doesn't like this function ;-) Cheers and welcome here, Ingo BTW: What could be the sense to know (and stop the program) if a printout is finished? ;-) |
|
|
Cheers,
Ingo |
|
![]() |
|
Natalia
Beginner
Joined: 10 Aug 15 Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 Aug 15 at 9:55PM |
|
Thanks Ingo,
StatusCommand 200 seems to work if the print job succeeds. Do you know what would happen if the job fails after PrintDocument() function exits? Regarding the reason, our server does additional processing on print job at the end of the printing, we need to wait till printing is complete. Ideally, we would listen to some signal from the library, but as far as I understood no signals are available. I'll add polling loop for now, but I'm not sure how it would affect the performance. It should be more efficient using some signal or callback. I think the common scenario is notifying user when printing is complete. Thanks again, Natalia. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store