We report second harmonic generation (SHG) measurements of rubbed and unrubbed surfaces of the fluorinated main-chain polyimide PMDA/BDAF made from pyromellitic dianhydride (PMDA) and 2,2-bis[4-(4-aminophenoxy)phenyl]hexafluoropropane (BDAF). Such rubbed polymers are commonly used as alignment materials for the nematic phases of liquid crystal display cells (LCD), although the rubbing process itself is not yet well understood. The SHG results are used to construct the full orientational distribution function of the noncentrosymmetric part of the polymer. This allows us to determine the preferred conformations of the polyimide at the surface and gives insight into the conformational changes of the polymer during rubbing.