Send profile to pdf

I want to make a pdf page from user profile data. First I was creating an html page of data then send html to pdf using a 3rd party lib. But is there a better way to send nicely formatted data to pdf without making it html first?