We introduce a microscopic model for collinear multiferroics capable to reproduce, as a consequence of magnetic frustration and easy-axis anisotropy, the so-called uudd (or antiphase) magnetic ordering observed in several type II multiferroic materials. The crucial role of lattice distortions in the multiferroic character of these materials is entered into the model via an indirect magnetoelectric coupling, mediated by elastic degrees of freedom through a pantograph mechanism. Long range dipolar interactions set electric dipoles in the antiferroelectric order. We investigate this model by means of extensive DMRG computations and complementary analytical methods. We show that a lattice dimerization induces a spontaneous Z2 ferrielectric bulk polarization, with a sharp switch off produced by a magnetic field above a critical value. The topological character of the magnetic excitations makes this mechanism robust.