added fetch api function for tcpdf