Generate pdf using tcpdf get images from other server then its take more time to generate pdf

I'll generate pdf using tcpdf I will get images from other server then its take more time to generate pdf. When there are 5 records then get 7 to 8 minute to generate pdf file. When i will get images from local server then its working proper. How to solved it.