Pdf export

This Pr aims at adding the support for the pdf export.