Get PDF is not working correctly