If I understood you correctly, you want your users to get the PDF downloaded immediately after hitting the submit button (without the extra step to click the download link in the form submission response message).
There is no feature like what you describe above in the plugin currently, however, it can be added with some JavaScript.
It is a pretty easy feature to add, so, maybe I’ll add it in the next version of the plugin. For now, you can use the following JS code snippet:
window.addEventListener('load', function(event)
{
document.addEventListener('wpcf7submit', function(event)
{
if(typeof event.detail !== 'object'
|| typeof event.detail.unitTag === 'undefined'
|| typeof event.detail.apiResponse !== 'object'
|| typeof event.detail.apiResponse.wpcf7_pdf_forms_data !== 'object'
|| event.detail.apiResponse.wpcf7_pdf_forms_data === null
|| typeof event.detail.apiResponse.wpcf7_pdf_forms_data.downloads !== 'object')
return;
var data = event.detail.apiResponse.wpcf7_pdf_forms_data.downloads;
if(data.length > 0)
{
var downloadLink = document.createElement('a');
downloadLink.href = data[0]['url'];
downloadLink.download = data[0]['filename'];
document.body.appendChild(downloadLink);
downloadLink.click();
document.body.removeChild(downloadLink);
}
}, false);
});
I recommend using some plugin like Simple Custom CSS and JS to add the snippet on the page where you have the form.
You will still need to enable the download link attachment option in order for this to work.
Let me know if that helps or not.
Thanks.