If your canon printer in error state, then you have followed the below-mentioned steps.
1. Make the changes in ports settings. Press the
Windows logo key + R on your keyboard > type devmgmt.msc and hit Enter to
open the Device Manager.
2. Make sure that your printer is Online.
3. Reinstall the printer driver.
4. Set the Print Spooler service to automatic.
5. Update Windows.