I am migrating a client/server application from PowerBuilder 12.5 to PowerBuilder 2019 R3.
We are using Amyuni PDF Converter version 126.96.36.199 to create a PDF file from a report :
IF ab_concatinate THEN
SetFileNameOptions (al_handle, NoPrompt + UseFileName + Concatenate)
//Set the PDF printer as default
//Print the dw
adw_datawindow.Print( FALSE )
//Reset the default printer
Function long SetDefaultPrinter (long hPrinter) library "cdintf600.dll" is declared as an local external function in the non-visual.
With PowerBuilder 12.5 and PowerBuilder 2019 R2 this works fine. It seems that "SetDefaultPrinter()" doesn't work anymore with PowerBuilder 2019 R3. I have tried several workarounds but for bigger reports I am getting the message "printer not activated, error code -30" after a while and NO PDF file is created.
I tried it by :
- changing the printer of de datawindow : adw_datawindow.Modify('DataWindow.Printer="'+ is_currentPDFPrinter +'"')
- using PrintSetPrinter()
I have also done some tests with Amyuni PDF Converter version 188.8.131.52 with which I have the same problem.
What should be the problem so that SetDefaultPrinter (al_handle) doesn't work anymore in PowerBuilder 2019 R3 ?
Or is there another way to solve my "printer not activated, error code -30" for bigger reports ?