- Franky Ruzeré
- PowerBuilder
- Wednesday, 30 June 2021 02:10 PM UTC
Hello,
I am migrating a client/server application from PowerBuilder 12.5 to PowerBuilder 2019 R3.
We are using Amyuni PDF Converter version 6.0.4.1 to create a PDF file from a report :
IF ab_concatinate THEN
SetFileNameOptions (al_handle, NoPrompt + UseFileName + Concatenate)
END IF
//Set the PDF printer as default
SetDefaultPrinter (al_handle)
//Print the dw
adw_datawindow.Print( FALSE )
//Reset the default printer
RestoreDefaultPrinter(al_handle)
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 5.0.1.5 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 ?
Thanks,
Franky.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.