Doesn't matter if a company is outside a country of tax residence of a freelancer. Within EU there is "reverse charge", with US there is W8 form, allowing freelancer to work for anyone in EU/US. But EU tax offices don't like freelancers in general, so they try to impose more difficult conditions to minimize their number.