Hi,
We have a service made in PowerBuilder 12 that we use to create PDF document's
The problem is that the PrintGetPrinters() is not always finding the installed printer that is a virtual FILE: printer 'HP Universal Printing PS (v5.7.0)
The printer is named 'PostScript to PDF'.
We run this service on a 64-bit Windows Server 2012 R2.
I don't know what to check what might go wrong when it's not finding the printer?
I have made sure that the Printer Spooler Service is running.
Anyone have any clue what else to check what might go wrong?
Below is the code we are using.
Kind Regards,
Henrik
// Check if the printer exist/is configured
printers = PrintGetPrinters()
found = false
do while (Len(printers) > 0 and found = false)
ix = Pos(printers, "~n")
if (ix > 0) then
printer = Left(printers, ix) // Next printer
else
printer = printers // The remainder/last printer
ix = Len(printers)
end if
printer = Left(printer, Pos(printer, "~t") - 1) // Pick out the printer name
printers = Mid(printers, ix + 1) // Remove the picked out printer from the list
if (printer = printer_to_use) then
found = true
end if
loop
We have a service made in PowerBuilder 12 that we use to create PDF document's
The problem is that the PrintGetPrinters() is not always finding the installed printer that is a virtual FILE: printer 'HP Universal Printing PS (v5.7.0)
The printer is named 'PostScript to PDF'.
We run this service on a 64-bit Windows Server 2012 R2.
I don't know what to check what might go wrong when it's not finding the printer?
I have made sure that the Printer Spooler Service is running.
Anyone have any clue what else to check what might go wrong?
Below is the code we are using.
Kind Regards,
Henrik
// Check if the printer exist/is configured
printers = PrintGetPrinters()
found = false
do while (Len(printers) > 0 and found = false)
ix = Pos(printers, "~n")
if (ix > 0) then
printer = Left(printers, ix) // Next printer
else
printer = printers // The remainder/last printer
ix = Len(printers)
end if
printer = Left(printer, Pos(printer, "~t") - 1) // Pick out the printer name
printers = Mid(printers, ix + 1) // Remove the picked out printer from the list
if (printer = printer_to_use) then
found = true
end if
loop