  The properties of ionic solutions between charged surfaces are often studied
within the Poisson-Boltzmann framework, by finding the electrostatic potential
profile. For example, the osmotic pressure between two charged planar surfaces
can be evaluated by solving coupled equations for the electrostatic potential
and osmotic pressure. Such a solution relies on symmetry arguments and is
restricted to either equally or oppositely charged surfaces. Here, we provide a
different and more efficient scheme to derive the osmotic pressure
straight-forwardly, without the need to find the electrostatic potential
profile. We derive analytical expressions for the osmotic pressure in terms of
the inter-surface separation, salt concentration, and arbitrary boundary
conditions. Such results should be useful in force measurement setups, where
the force is measured between two differently prepared surfaces, or between two
surfaces held at a fixed potential difference. The proposed method can be
systematically used for generalized Poisson-Boltzmann theories in planar
geometries, as is demonstrated for the sterically modified Poisson-Boltzmann
theory.
