We consider a random field ϕ:{1, …, N}→ℝ with Laplacian interaction of the form ∑iV(Δϕi), where Δ is the discrete Laplacian and the potential V(⋅) is symmetric and uniformly strictly convex. The pinning model is defined by giving the field a reward ɛ≥0 each time it touches the x-axis, that plays the role of a defect line. It is known that this model exhibits a phase transition between a delocalized regime (ɛ<ɛc) and a localized one (ɛ>ɛc), where 0<ɛc<∞. In this paper we give a precise pathwise description of the transition, extracting the full scaling limits of the model. We show, in particular, that in the delocalized regime the field wanders away from the defect line at a typical distance N3/2, while in the localized regime the distance is just O((log N)2). A subtle scenario shows up in the critical regime (ɛ=ɛc), where the field, suitably rescaled, converges in distribution toward the derivative of a symmetric stable Lévy process of index 2/5. Our approach is based on Markov renewal theory.