How do I turn off the printer automatically when not in use?

Enable Auto-Off technology to save energy. The printer will enter a low-power sleep mode when idle and can be configured via HP Wolf Pro Security settings.

From the official HP Laserjet Pro 4001 4004n DN DW D Printer manual, page 4

Have a follow-up question?

Answers from the official manual.

Common questions