#30 pdf render optimization & bugfix