Hi there,
Windows Server 2019 has this issue last summer and their was an patch released for this issue . Make sure you have updated with all patches in the server.
The below thread discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue. Microsoft Print to PDF not working after Windows update to Windows Server 2019
I hope this information helps.
--------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer--