The absorption spectra of polymers derived from ortho, meta and para phenylenediamines (o-PDA, m-PDA and p-PDA) have been simulated combining periodic density functional theory (DFT) calculations with time-dependent DFT simulations. These latter have been carried out on finite clusters embedded in a set of point charges devised to exactly reproduce the electrostatic potential of the periodic chains. The results are compared with those obtained for solvated o-PDA, m-PDA and p-PDA oligomers of increasing sizes extracted from the periodic structures. The electronic transitions involved have been investigated by a qualitative analysis based on isodensity maps completed by a quantitative analysis based on the density-based index (DCT ). For poly-(o)- and poly-(p)- phenylenediamines the agreement with the experimental data is achieved already by modeling solvated dimers whereas the inclusion of long-range electrostatic effects is mandatory for poly-(m)-phenylenediamine highlighting the importance of an accurate treatment of the electrostatic environment when a finite cluster approach is considered.