Print Page | Close Window

Infinite jobs going to print queue

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2465
Printed Date: 21 Jul 26 at 9:37PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Infinite jobs going to print queue
Posted By: rutherk1
Subject: Infinite jobs going to print queue
Date Posted: 29 Nov 12 at 2:34PM
Greetings everyone. We are using QuickPDFDLL0813.dll in a service application that grabs base64 encoded PDFs from a web service and dumps them to a print queue with Quick PDF.

The service is running at about 100 sites. We recently had 1 customer report an issue where  a single document would get picked up and that 1 document would get sent to the print queue thousands of times. I believe it would keep sending it to the print queue indefinitely.  Printing a document from a PDF viewer yields only 1 document. Also, we rebooted the customers machine and it worked correctly for about 3-4 hours.

EDIT: They have about 5 print queues, and this is happening with all of them. Also, this customer has been trouble free for about a year.

I am trying to rule out QuickPDF but I thought I would post here in case anyone has heard of this issue or could point me in the right direction.

Thanks!

Tongue



Replies:
Posted By: tfrost
Date Posted: 30 Nov 12 at 5:37PM
Do you explicitly set the number of copies to 1 in the printer devmode or in the NewCustomPrinter each time?  If not, it may have been set externally to something silly, for example by a buggy printer driver.  If so, could you have accidentally set it to a huge number?


Posted By: rutherk1
Date Posted: 30 Nov 12 at 5:40PM
Originally posted by tfrost tfrost wrote:

Do you explicitly set the number of copies to 1 in the printer devmode or in the NewCustomPrinter each time?  If not, it may have been set externally to something silly, for example by a buggy printer driver.  If so, could you have accidentally set it to a huge number?

Thanks for the reply I'll look and let you know!!


Posted By: rutherk1
Date Posted: 30 Nov 12 at 5:55PM
hmm. Pardon me for my lack of expertise with this library. We are simply using it to print a pdf.

In the intellisense I am not seeing any properties about the copies.

Here is what we have.
Private Sub printPDF(ByVal arg As Object)

        Dim QP As PDFLibrary

        Try

           Dim pdfData As Byte() = CType(arg, PrintArguments).LabelImage()


           Dim sPrinterName As String = CType(arg, PrintArguments).PrinterName()

            Dim sPFDFile As String = CType(arg, PrintArguments).FilePath()

            Dim sDllPath As String = Environment.CurrentDirectory() & "\QuickPDFDLL0813.dll"

            QP = New QuickPDFDLL0813.PDFLibrary(sDllPath)

            QP.UnlockKey(qpKey)

            If QP.LibraryLoaded() Then

                If QP.Unlocked() = 1 Then

                    Dim pdfStream = New MemoryStream()

                    pdfStream.Write(pdfData, 0, pdfData.Length)

                    Dim DocumentID As Integer = QP.LoadFromString(pdfData, "")

                    If DocumentID > 0 Then

                        Dim Title As String = IIf(QP.GetInformation(2) = "", "Document", QP.GetInformation(2))

                        Dim OptionsID As Integer = QP.PrintOptions(0, 1, Title)

                        WriteLog.WriteLogFile("Loaded Document Correctly, Printing " & QP.PageCount & "page(s) with Options: " & OptionsID & " to: " & sPrinterName, "SaaSPrintService")

                        Dim PrintResults As Integer = QP.PrintDocument(sPrinterName, 1, QP.PageCount, OptionsID)

                        QP.RemoveDocument(DocumentID)

                        If PrintResults = 0 Then

                            WriteLog.WriteLogFile("There was an issue with the PDF, usually having to do with the Pagecount", "SaaSPrintService")

                        Else

                            WriteLog.WriteLogFile("No Issues, PDF Sent to printer", "SaaSPrintService")

                        End If

                    Else

                        WriteLog.WriteLogFile("Couldn't Load Document", "SaaSPrintService")

                    End If

                Else

                    WriteLog.WriteLogFile("DLL Library Key Invalid", "SaaSPrintService")

                End If

            Else

                WriteLog.WriteLogFile("Unable to load Quick PDF Library", "SaaSPrintService")

            End If

        Catch ex As Exception

            WriteLog.WriteLogFile("Error printPDF - There was an error printing. Most likely could not find the printer.", "SaaSPrintService")

        Finally

            QP = Nothing

        End Try

    End Sub



Posted By: AndrewC
Date Posted: 07 Dec 12 at 9:34PM
If QPL has been working for a long period of time then it is most likely that something has changed at that site and that would be the first place to look.

I have not heard of any other reports of this problem so it could be related to a corrupt printer driver or some global server setting.

Andrew.


Posted By: rutherk1
Date Posted: 07 Dec 12 at 9:44PM
Originally posted by AndrewC AndrewC wrote:

If QPL has been working for a long period of time then it is most likely that something has changed at that site and that would be the first place to look.

I have not heard of any other reports of this problem so it could be related to a corrupt printer driver or some global server setting.

Andrew.

Hi Andrew. Thanks so much for the reply. I had our support guy reinstall all the printer drivers at the customer site and I believe that took care of it!

Thanks again!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk