1:add pdf creater.
2:fix some bugs
3:optimise performance