Triggers, history and pdf2jpg

Added enable/disable_trigger()
Bugfix with checking if history is enabled
Mirko's arranged function pdf2jpg