The conformal-invariance approach is extended to two-dimensional critical systems with mixed ab boundary conditions. The profiles 〈\ensuremath{\varphi}(r)
〉ab of the magnetization and the energy density in Ising and Q-state Potts strips with +- and fixed-free boundary conditions are derived. The profile of an arbritrary operator degenerate at level 2 is expressed in terms of hypergeometric functions. The universal amplitudes
AabBab of the Casimir force and the Fisher--de Gennes distant-wall correction to the profile satisfy
Bab=-4\ensuremath{\pi}${\mathit{x}}_{\mathrm{\ensuremath{\varphi}}}$${\mathit{c}}^{\mathrm{\ensuremath{-}}1}$
Aab. Here ${\mathit{x}}_{\mathrm{\ensuremath{\varphi}}}$ is the scaling dimension of \ensuremath{\varphi}(r) and c is the central charge.
Off-diagonal profiles of local densities (e.g. order parameter or energy density) are calculated at the bulk critical point, by conformal methods, on a strip with transverse coordinate v, for different types of boundary conditions (free, fixed and mixed). Such profiles, which are defined by the non-vanishing matrix element of the appropriate operator between the ground state and the corresponding lowest excited state of the strip Hamiltonian, enter into the expression of two-point correlation functions on a strip. They are of interest in the finite-size scaling study of bulk and surface critical behaviour since they allow the elimination of regular contributions. The conformal profiles, which are obtained through a conformal transformation of the correlation functions from the half-plane to the strip, are in agreement with the results of a direct calculation, for the energy density of the two-dimensional Ising model.