Can a company prevent a co-author of a paper from putting his name on it? I was working for a company where we put forward a paper with other colleagues. I was the first author and the paper got rejected. After that I left that company. Recently, I found out that they published the paper removing my name from the list of authors and they simply put me in the acknowledgements. The paper was basically the same. They did not even want to answer me when I asked for clarifications. After I asked the editor to intervene, their excuse was that because I left the company, they could not put my name as a researcher for their institution and that the research belonged to them. Because of that I had no rights for authorship. They even threatened me in case I have drafts of the first submission stating that I have no rights to take them with me when I left.
Can such claim was made and the authorship entirely removed based on the project ownership. I was clearly the main contributor

Thanks for your answers
Other responses talk about the law. However, if the paper, as I assume (after all this is academia.SE), is academic, there is another set of values that rule the matter, and that is defined by the academic rules for authorial attribution of scientific contributions; unlike patent or copyright ownership, they are not waived by working for a company. 

Moral rights or not - if you have significantly contributed to the paper (as evidenced by the first submission round), academically spoken, you are a co-author. Removing you is unethical and a breach of academic rules. It is academic misconduct. There is no "ghostwriting" in academia.

Laws or not: the decision to take away a doctoral title is in many countries not a legal, but an academic decision, to be decided by the academic institution that conferred it and not by court. Similar here: the judgement whether this is academic misconduct is happening on the academic, not the legal level.

Note: the fact that they demand the drafts seems to indicate that they know this and try to deprive you of the evidence that you have been co-author on a virtually identical copy; which, if in your possession, would prove that you were a co-author and should remain so for the resubmission. 

This may well be a legal trick on their side to improve their position in an academic misconduct investigation. On that part of the matter, you may need the support of a lawyer if you intend to fight, because of course, the company may have the ownership of the ideas and the copyright. But not the right to remove you as co-author.