If your scheduled arrival date in Thailand is within three days after your departure date from Thailand, eg a so-called border run, you can complete and print the TDAC before leaving Thailand.
Otherwise, you can go to a business centre or a so-called Internet café in the location where you stay outside Thailand or, alternatively, as a last resort, do it on arrival in Thailand using the facilities provided at the arrival point before going to the immigration desk.