add callback when download pdf