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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - PrintDocument never returns
  FAQ FAQ  Forum Search   Register Register  Login Login

PrintDocument never returns

 Post Reply Post Reply
Author
Message
matsj View Drop Down
Beginner
Beginner


Joined: 26 Nov 14
Location: Sweden
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote matsj Quote  Post ReplyReply Direct Link To This Post Topic: PrintDocument never returns
    Posted: 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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
matsj View Drop Down
Beginner
Beginner


Joined: 26 Nov 14
Location: Sweden
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote matsj Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 29 Nov 14 at 6:35AM
Mats,

Are you freeing the documents from memory after printing ?

  QP.RemoveDocument(QP.SelectectDocument());

Andrew
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
matsj View Drop Down
Beginner
Beginner


Joined: 26 Nov 14
Location: Sweden
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote matsj Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store