I have a requirement to print PDF through a background job in the application. I am planning to set up a Job scheduler and invoke a activity. However this code only seems to connect to a printer but unable to print. any ideas?
I don't know the first thing about interfacing with printers from a Java app, but there will surely be more to it than making a TCP connection to the printer and sending base64-encoded PDF as a byte stream down the connection.
Printers are typically services registered with the Operating System and your application layer would have to interface with the host operating system to get to the printer. Even a Cloud-based printing service is likely to need REST/HTTP protocol to encapsulate the content you want printed.
Search Java forums on Google on how to solve this problem for a Java application, and then set up your Pega infrastructure to align with the implementation approach.