create a downloadable file after submit webform Hello Im not sure if this can be done, but Im trying to make a simple app where you create your own lexical analyzer.

So in the webform I ask the necessary information, then I need the following:


After send the webform generate a script file (from a template I already have done)
I need a way to replace some tokens in the script file with data from the submitted webform
Let the user download the generated script file


Any idea how to achieve this? maybe it is not that complex...

Thank you very much
This module may be used for your idea please use and try this module 

Webform2PDF

The Webform2PDF Drupal module is an extension of the Webform module. It can be used to generate PDF document from the results of a form. The generated PDF document can be attached to the form summary e-mail sent by Webform module, or it can be downloaded from the /Results/ page. Different PDF templates can be set for each form. The templates can be formatted with HTML tags, and they can be edited with WYSIWYG Drupal module, making the template creation easy and the templates highly customizable. The output documents will be created by using these templates.