modified convert to pdf add managing error
 .
Merge pull request #4 from gisweb/master

Pdf is json by Marco