hi lars, welcome in community
reset print spooler with this commands. Press WIN + X and open terminal as admin, now type
net stop spooler
DEL /F /S /Q %systemroot%\System32\spool\PRINTERS\*
net start spooler
now, be sure to have the latest driver for your hp printer, check here
https://support.hp.com/se-sv/drivers/hp-envy-5540-all-in-one-printer-series/model/7770151?sku=K7C89A
Standard Disclaimer: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.
let me know
Elvis