The X-ray spectrum of a disc illuminated by ions