We study a model for a thin liquid film dewetting from a periodic heterogeneous substrate (template). The amplitude and periodicity of a striped template heterogeneity necessary to obtain a stable periodic stripe pattern, i.e. pinning, are computed. This requires a stabilization of the longitudinal and transversal modes driving the typical coarsening dynamics during dewetting of a thin film on a homogeneous substrate. If the heterogeneity has a larger spatial period than the critical dewetting mode, weak heterogeneities are sufficient for pinning. A large region of coexistence between coarsening dynamics and pinning is found.