Sifrei Torah must be written by a sofer (scribe), with the proper kavana (intention), and may not be reproduced by a machine. There is, however, a method which is halachically permissible and extremely helpful to a sofer.
It is customary for some sofrim to place the parchment over a lightbox, which they place above the text which they intend to write. The light goes through the parchment, and the sofer can see the letters directly under the klaf. The sofer then writes the parshiot over the printed text, ensuring that he writes them correctly and in their proper place. In this case, assuming that the sofer has the correct intention for writing a mezuza, the mezuzot are halachically valid.
Hacham Ovadia writes that the sofer should still have a text next to him, as there are some parchments which are so thick that he cannot see the letters under the light-box through the klaf. Although this may be the preferred practice, there is no halakhic objection to writing mezuzot over a light-box.