There are more js libraries like that. You can totaly generate pdf on the client but there are certain problems:
- It will work fine on current desktop browser, but might not work on older browsers. Imagine generating concert ticket on your old iphone with safari 5 in line in front of the venue. Basicaly you cant be sure that the person gets the PDF. Its OK if is something noncritical.
- Client can potentionaly change the code / gets the source.
- You cant cash it - i mean you dont care because client generates it but if its something static (print version of blogpost) it would probably be better to just generate it on server and then let people just download.