download thumbnail instead of original picture when covert to pdf. fix bug that exception throw when no array when render pdf