The neutral intergalactic medium above redshift 6 is opaque to ionizing radiation, therefore one needs indirect measurements of the escape fraction of ionizing photons from galaxies of this epoch. Low-ionization state absorption lines are a common feature in the spectrum of galaxies, showing a diversity of strengths and shapes. Since these lines indicate the presence of neutral gas in front of the stars, they have been proposed to carry information on the escape of ionizing radiation from galaxies. We study which processes are responsible for the shape of the absorption lines, to better understand their origin. We then explore whether the absorption lines can be used to predict the escape fractions. Using a radiation-hydrodynamical zoom-in simulation and the radiative transfer code RASCAS, we generate mock CII 1334 and LyB lines of a virtual galaxy at redshift 3 as seen from many directions of observation. We also compute the escape fraction of ionizing photons in those directions and look for correlations between the lines and the escape fractions. We find that the resulting mock absorption lines are comparable to observations and that the lines and the escape fractions vary strongly depending on the direction of observation. Gas velocity and dust always affect the absorption profile significantly. We find no strong correlations between observable LyB or CII 1334 and the escape fraction. After correcting the continuum for attenuation by dust to recover the intrinsic continuum, the residual flux of CII 1334 correlates well with the escape fraction for directions with a dust corrected residual flux larger than 30%. For other directions, the relations have a strong dispersion, and the residual flux overestimates the escape fraction for most cases. Concerning LyB, the residual flux after dust correction does not correlate with the escape fraction but can be used as a lower limit. (abridged)