  Context. A lot of effort has been put into the detection and determination of
stellar magnetic fields using the spectral signal obtained from the combination
of hundreds or thousands of individual lines, an approach known as multi-line
techniques. However, so far most of multi-line techniques developed that
retrieve stellar mean longitudinal magnetic fields recourse to sometimes heavy
simplifications concerning line shapes and Zeeman splittings.
  Aims. To determine stellar longitudinal magnetic fields by means of the
Principal Components Analysis and Zeeman Doppler Imaging (PCA-ZDI) multi-line
technique, based on accurate polarised spectral line synthesis.
  Methods. In this paper we present the methodology to perform inversions of
profiles obtained with PCA-ZDI.
  Results. Inversions with various magnetic geometries, field strengths and
rotational velocities show that we can correctly determine the effective
longitudinal magnetic field in stars using the PCA-ZDI method.
