This is taken from [[https://njh.eu/printer.html|here]]

The drivers for the HL-2240D printer from the brother.com website are 32 bit which messes up a 64 bit install with 32 bit libraries.

This solutions uses the HP Linux Printing and Imaging system (HPIJS). So the first step is to install the hpijs system\\
<code>
sudo apt-get install printer-driver-hpijs
</code>

Then\\
<code>
cd /usr/share/ppd/custom
sudo wget -c --no-check-certificate https://njh.eu/Brother-HL-2240D-hpijs-pcl5e.ppd
sudo wget -c --no-check-certificate https://njh.eu/Brother-HL-2240D-hl1250.ppd
sudo chmod 644 *
</code>

You can then install the printer via the usual CUPS web interface i.e. [[http://localhost:631]]\\

The recommended ppd is the pcl5e ppd as the 1250 has alignment issues..