There are multiple possible reasons for an HP Envy printer offline. The printer may be inappropriately connected to the system or network, it could be switched off or lack ink or toner, the printer driver may be outdated or improperly installed, or there can be an issue with the system or network. Another option is that there are pending print jobs in the queue, which are preventing the printer from becoming online.
https://printersofflines.com/hp-printer-offline/