This is new software running in a Windows Service as a domain
user. The service downloads a PDF file, and then attempts to
print the document. This is logged by the service:
09:57:20.246 - 226 Transfer complete. Data Connection
Closed.
09:57:20.246 (ClosingData)
09:57:20.246 PrintQueueServiceThread signalled
09:57:20.356 Printing 4 pages of
C:\Users\Lee\AppData\Local\Temp\PQ_A000641683.pdf to LZC1 -
Programmer Area on ADC02.ODP.COM (redirected 5)...
09:57:20.590 pdftron.Common.PDFNetException: Exception:
Message: Could not start XPS print job
Conditional expression: SUCCEEDED(hr)
Filename : PDFPrintDocSpoolerWin.cpp
Function :
trn::PDF::Print::PDFPrintDocSpoolerWin::StartXpsPrintJob
Linenumber : 808
09:57:20.590 at pdftron.PDF.Print.StartPrintJob(PDFDoc
in_pdfdoc, String in_printerName, String in_jobName, String
in_outputFileName, PageSet in_pagesToPrint, PrinterMode
in_printerMode, Context in_ctx)
09:57:20.590 at EljayRelay.Globals.PrintQueueServiceThread()
in D:\ODPNET40\Customer\Eljay\EljayRelay\Globals.vb:line 1111
Any hints you can offer as to what I'm doing wrong and the cause of the exception will help me greatly. It can be a challenge to debug services sometimes, and I really depend on the error diagnostic logs for debugging.
If this helps....
If Not String.IsNullOrEmpty(thisPrintFile) Then
Dim doc As PDF.PDFDoc = Nothing
Try
doc = New PDF.PDFDoc(thisPrintFile)
doc.InitSecurityHandler()
ODP_DOCUMENTS_PRINTER = GetSetting("ElayRelay",
"ServiceConfiguration", "ODP_DOCUMENTS_PRINTER", "")
PLog(vbTab & "Printing " &
doc.GetPageCount.ToString & " pages of " & thisPrintFile
& " to " & ODP_DOCUMENTS_PRINTER & "...")
pdftron.PDF.Print.StartPrintJob(doc,
ODP_DOCUMENTS_PRINTER, doc.GetFileName, "", New PDF.PageSet(1,
doc.GetPageCount), New PDF.PrinterMode(), Nothing)
Catch ex As Exception
PLog(ex.ToString)
End Try
Try
If doc IsNot Nothing Then
doc.Close()
doc.Dispose()
doc = Nothing
End If
Catch ex As Exception
End Try
End If
02:17:12.682 at
pdftron.PDF.Print.StartPrintJob(PDFDoc in_pdfdoc, String
in_printerName, String in_jobName, String in_outputFileName,
PageSet in_pagesToPrint, PrinterMode in_printerMode, Context
in_ctx)
02:17:12.682 at
EljayRelay.Globals.PrintQueueServiceThread()
02:17:12.697 Printing 2 pages of
C:\Users\Jeff\AppData\Local\Temp\PQ_Inv0809788_20171106.pdf to
\\CARLI-PC\HP LaserJet 4050 Series PCL 5...
02:17:12.900 pdftron.Common.PDFNetException: Exception:
Message: Could not
start XPS print job
Conditional expression: SUCCEEDED(hr)
Filename : PDFPrintDocSpoolerWin.cpp
Function :
trn::PDF::Print::PDFPrintDocSpoolerWin::StartXpsPrintJob
Linenumber : 808