Ubuntu 18.04: Printer not working for most apps (PDF, evince, Firefox...)

I got it solved as follows:

  1. Reinstall hplip

    sudo apt-get purge hplip
    sudo apt-get install hplip
    

    and

  2. add a second network printer. (Note that I had manually installed the newest hplip version in order to get the printer running which did not help and resulted in an error message after bootup, if you did not do this, maybe just step 2 is enough.)

    Even though there is a printer already shown in "Settings / Devices / Printers", I had to add a second printer as follows:

    1. Go to Settings → Devices → Printers.
    2. Additional Printer Settings
    3. Add Network Printer
    4. Choose the shown IP address or own printer name and follow the dialogues.

It now works for me. In the Settings → Devices → Printers tab there are now 2 printers shown.