A packing of particles subjected to an oedometric compression displays a large distribution of interparticle contact forces. The latter are correlated with the particle size. Using the principle of virtual work, we relate the 'partial' pressure supported by a granulometric class of particles to a purely geometrical problem, namely the compacity of a polydisperse granular medium as a function of its granulometry We apply this result in particular to the case of bi-modal packings and we show that the partial pressures are larger for small particles in three dimensions, whereas size independence is predicted in two dimensions. Numerical simulations in two dimensions confirm this result.