we tried the updated code.. copied the code from this link https://gist.github.com/pdfcrowd/2891593 and just changed these two lines.. $client = new Pdfcrowd($username, $apikey); $to = 'recipient@example.com';
save it to a php file.. and upload to server..
we use a simple web hosting server, dont have any seperate webservers like apache
after the url path address with php file is entered in browser, getting pdf as attachment in the mail to recipient address, but its still corrupted.
support
wrote on 2014-06-23:
Hello,
That's strange. It did not work for me at first either but after I added an empty line before line 38 (see here), it started to work. Try to add more empty lines to see if it helps but if it won't, I'm out of ideas what to try next, sorry.
glassbaron
wrote on 2014-07-23:
Thanks for posting this thread and thank you Jaroslav for helping me through this problem. I tried both code examples and eventually when I removed all the white space AND all the tabs from the $message the $pdf generated correctly.
vishp
wrote on 2014-07-23:
Hello,
Thanks for the support, This is working fine now, i am able to attached PDF to mail , This is the fix I applied "I added an empty line before line 38" from the above post