What kind of response do you expect?
If you want to have it send to the client/downloaded for the user, then you need to add a download action after the generate action.
Ensure that the user who generates the document has at least read rights on this entity, otherwise the download will not be executed.