We study the adsorption of homogeneous or heterogeneous polymers onto heterogeneous planar surfaces with exponentially decaying site-site correlations, using a variational reference system approach. As a main result, we derive simple equations for the adsorption-desorption transition line. We show that the adsorption threshold is the same for systems with quenched and annealed disorder. The results are discussed with respect to their implications for the physics of molecular recognition.