got the PDF data from the server working