The generic analytic formulae of the stable and unstable manifolds near the separatrix and on the divertor plates in tokamaks in the presence of resonant magnetic perturbations are derived. The stable (unstable) manifolds on the divertor plates describe the form of the magnetic footprint boundaries. They are derived using the separatrix mapping. The analytical formulae depend on a few of the equilibrium plasma parameters and the magnetic perturbations.