Acenes are an important class of polycyclic aromatic hydrocarbons which have recently gained exceptional attention due to their potential as functional organic semiconductors. Fundamentally, they are important systems to study the convergence of physico-chemical properties of all-carbon sp2-frameworks in the one-dimensional limit; and by virtue of having a zigzag edge topology they also provide a fertile playground to explore magnetism in graphenic nanostructures. The study of larger acenes is thus imperative from both a fundamental and applied perspective, but their synthesis via traditional solution-chemistry route is hindered by their poor solubility and high reactivity. Here, we demonstrate the on-surface formation of heptacene and nonacene, via visible-light-induced photo-dissociation of α-bisdiketone precursors on an Au(111) substrate under ultra-high vacuum conditions. Through combined scanning tunneling microscopy/spectroscopy and non-contact atomic force microscopy investigations, together with state-of-the-art first principles calculations, we provide insight into the chemical and electronic structure of these elusive compounds.