The adsorption of 3,4,9,10-perylenetetracarboxylic dianhydride (PTCDA) and N,N′-dimethyl-3,4,9,10-perylenetetracarboxylic diimide (DiMe-PTCDI) on differently treated n-doped GaAs(100) surfaces was investigated using high-resolution photoemission spectroscopy. The chemical interaction between the molecules and the semiconductor substrate is found to be weak; core level photoemission spectra show no additional chemically shifted peaks, indicating the absence of any covalent/ionic bond formation. Only a sharpening of the core level spectra is observed for a coverage lower than one monolayer and this is attributed to a reduction of inhomogeneous band bending at the surface. This is interpreted in terms of preferential sticking of the organic molecules to surface defects. The energy offset between the occupied states in the substrate and the organic film is directly derived from ultraviolet photoemission spectroscopy measurements. Interface dipoles are found to form according to the electron affinities of the substrates and PTCDA films at the interfaces and, consequently, the vacuum level alignment rule does not hold. For vanishing interface dipole the lowest unoccupied molecular orbital of PTCDA is found to align with the conduction band minimum of GaAs resulting in electron affinity of 4.12 eV for PTCDA. This provides an energy gap in the range of 2.44-2.55 eV, which is larger than the onset of optical absorption. The same procedure is applied to DiMe-PTCDI layers.