I am currently developing a plugin that during the publication edition launches a function whose task is to make the user download a PDF file.
I register the Hook: "HookRegistry::register(‘Publication::edit’,…) and when I finish the function then I have to send the appropriate headers to the client browser so that the PDF can be downloaded. The problem comes because the client is waiting for a JSON response after an AJAX request. My question is, is there a Hook that determines that the AJAX response has already been sent to the client, so that I can send the client browser new headers?
I’m under the OJS 22.214.171.124 version