This library converts converts PDF file to an image. Supported image formats are PNG and BMP, but you can easily add more. https://github.com/t90/lib-pdf/wiki