Due to its flexibility, inkjet printing has become a widespread technique for the non-contact deposition of liquids, solutions and melts on a variety of substrates with a lateral resolution down to about 10 µm. Because the patterns are formed via coalescence of many individual droplets, ripples and undulations can appear in the deposited layers, which gradually disappear if sufficient time before ink solidification is given. In this manuscript, we study this spontaneous leveling process of inkjet printed lines that is driven by surface tension and hydrostatic pressure gradients. We show that the process can be significantly retarded if the ink contains soluble or insoluble surfactants, which are common additives to improve print quality. We present qualitative experiments as well as theoretical and numerical models that allow estimation of the leveling time for arbitrary ripple amplitudes and realistic surfactant properties.