Thank you.
I have also added some comments. I paste here my solution for others:
I spend some time again on that node trying to make it work again and I didn't read this thread. It turned out that when I set it up on Windows Server sometimes it opens several instances of the node red and then this error happens.
After ending all of instances and starting again Node-Red the error disappears and HTML-PDF node works again like on normal Windows.