Quality control of mammography units is necessary to reduce the dose imparted to women as much as possible. Accurate characterization of the primary X-ray spectra is very useful for this purpose. Obtaining primary spectra normally involves the use of unfolding methods to be applied to pulse-height distributions (PHDs) measured in detector devices. In this work, the modified truncated singular value decomposition, the damped singular value decomposition, and the Tikhonov unfolding methods have been applied to several PHDs simulated with the Monte Carlo code MCNP5. The main goal of this paper is to test the capability of these unfolding methods to reproduce different primary spectra, corresponding to several high voltages and to the different anode materials molybdenum and rhodium. With this aim, an MCNP5 model has been developed to reproduce an actual experimental measurement including the X-ray focus, a Compton spectrometer, and a silicon detector. Quality parameters, such as the half-value layer, homogeneity factor, mean energy, and transmission curve, have been evaluated to see the effect of discrepancies observed between unfolded and theoretical spectra.