pdf: better handling of pdf errors
pdf: moving to use common task running infrastructure