added fetch api function for tcpdf bugfix