add callback when download pdf

It'd be good to also be able to pass a cb without filename