Using Nf=2+1+1 lattice QCD, we determine the fermionic connected contributions to the second and third moment of the pion PDF. Based on gauge configurations from the European Twisted Mass Collaboration, chiral and continuum extrapolations are performed using pion masses in the range of 230 to 500 MeV and three values of the lattice spacing. Finite volume effects are investigated using different volumes. In order to avoid mixing under renormalisation for the third moment, we use an operator with two non-zero spatial components of momentum. Momenta are injected using twisted boundary conditions. Our final values read $langle xrangle=0.2075(106)$ and $langle x^2rangle=0.163(33)$, determined at 2 GeV in the $overline{MS}$-scheme and with systematic and statistical uncertainties summend in quadrature.