Hello Everyone,
I just moved on from Xojo 2016r3 to Xojo 2018r4 on my project and without changing anything OpenPrinter method throws exception.
Common\runprint.cpp: 180
Failure Condition: returnGfx
My Code
If ivPrPrinterId>0 Then
Dim s As String
s = "KPRINTER_"+ivPrPrinterId.toString()
If rgPrinterSetupGet(ps, s) Then
End If
End If
ivGraphics = OpenPrinter(ps) // Pending to remove the "Dialog"
Public Method (byRef ps As PrinterSetup, configType As String = “GenericInvoicePrinterSetup”) returns Boolean
Dim s As String
If Not(GetConfigValue(configType, s)) Then
Return False
End If
If s = “” Then
Return False
End If
s = DefineEncoding(s, Encodings.ASCII)
'MsgBox(s.Encoding.internetName)
Dim mb As MemoryBlock = DecodeBase64(s)
Try
ps.SetupString = mb
Catch e As IOException
Return False
End Try
Return True
Above is the code where I save my PrinterSetup
Dim mb As MemoryBlock
mb = ps.SetupString
Dim s As String
s = DefineEncoding(EncodeBase64(mb), Encodings.ASCII)
Return PutConfigValue(configType, s)
Has anyone come up with this one?
Thank you in advance.