Can't get the HP scanner working in Ubuntu20.04 + Can't install hplip in Ubuntu20.04

Solution 1:

This is the right plugin page: https://developers.hp.com/hp-linux-imaging-and-printing/plugins

You need to install the one that matches the hplip version you installed.

As N0rbert says, the minimum version of hplip that supports "HP DeskJet Ink Advantage 2300 All-in-One" is 3.20.5. 20.04 LTS ships with 3.20.3. I have a different model (HP Deskjet 2700) that also requires 3.20.5, so I had to purge 3.20.3 and install 3.20.5 manually following similar instructions to what you link, then, I installed the plugin and was able to scan using xsane.

Regarding dependencies, look out that you are not using python2 instead of python3. I installed hplip after a fresh Ubuntu install and it compiled stuff for python2 instead of python3. It is essential to install "python-is-python3" before hplip and the plugin, otherwise, missing extension errors start to appear (cupsext.so in my case). I was able to print on that "broken installation" by adding the printer with CUPS, but to make the scanner work I had to re-install hplip after fixing the python situation.

A brute force alternative is to upgrade to 20.10, that comes with hplip 3.20.11, and manually install the corresponding plugin on top of the correctly packaged version.