There are many printers (old and new) which are compatible with Windows 8.1
Availability of products may vary between different regions/countries and there is a wide range of products.
To buy new products and check compatibility, you might need to look for available products at HP.com (country specific site) or alternate channel to shortlist your choice of products.
For Windows 8.1 support with existing printers, check this HP web link (select your country and proceed):