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!
![]() |
PrintDocument never returns |
Post Reply
|
| Author | |
matsj
Beginner
Joined: 26 Nov 14 Location: Sweden Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: PrintDocument never returnsPosted: 26 Nov 14 at 7:18AM |
|
Hi all!
This is my first post in this forum. I have a .NET program running in the background which is printing PDF documents. I have a problem with the PrintDocument function: When printing some PDFs the PrintDocument function call never returns. So my program just keeps waiting for it to return indefinitely! Does anyone have a hint? Using Debenu PDF Library 9.16, ActiveX version. Best regards, Mats
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 Nov 14 at 12:10PM |
|
Hi Mats,
if you're printing in a Loop i would wait 'till PrintDocument Returns with result 1 before sending the next printjob. Cheers and welcome here, Ingo |
|
|
Cheers,
Ingo |
|
![]() |
|
matsj
Beginner
Joined: 26 Nov 14 Location: Sweden Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 26 Nov 14 at 12:23PM |
|
Hi Ingo,
I'm not printing in a loop. To be on the safe side I wait until PrintDocument returns a result before issuing the next document. My problem is that PrintDocument NEVER returns. My program just "stands still" and wait for PrintDocument to return. It happens on irregulary basis and I haven't been able to see a pattern yet, except that it seems to happen more often when printing larger documents (over 200 pages). Best regards, Mats
|
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 Nov 14 at 6:35AM |
|
Mats,
Are you freeing the documents from memory after printing ? QP.RemoveDocument(QP.SelectectDocument()); Andrew
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 Nov 14 at 11:11AM |
|
As an addition to Andrew's post:
Does it happen with a very first printout, too? Cheers, Ingo |
|
|
Cheers,
Ingo |
|
![]() |
|
matsj
Beginner
Joined: 26 Nov 14 Location: Sweden Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 Dec 14 at 10:30AM |
|
Hi,
Andrew> Yes, I am freeing the document memory after printing by calling RemoveDocument. Ingo> Since I'm loading a new instance of the ActiveX for every document you could say that it is always the first printout. I do not retain anything loaded in memory inbetween printouts.
Anyway I have now switched to using the dll version of QuickPDF instead of the ActiveX. Let's see if it helps. My prime suspect for the problem is a buggy printer driver. Don't know whether it is possible at all, but a useful improvement to the PrintDocument function would be to add a timeout parameter. If the printer driver has not completed its work in a certain amount of time, PrintDocument would stop and return an error. Regards, Mats |
|
![]() |
|
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