Initial implementation of PDF conversion. To be tested locally.