I'm looking to specify the file extension of the output file created by running my script from the processing toolbox. Currently, the user must type in the extension in themselves, which I would like to avoid if possible. Ideally, there would be a drop-down, and among the options I would like to have the .pdf extension type.
- My goal is to increase the usability of the script. It's not a major issue to have the user type in .some extension manually for their file output, but I believe a drop-down would be easier to use than having to type in a file extension each time.
To create the output option where the user has to choose a path for their output file, I use the following code in the script:
This code works as long as the user specifies and manually types in the .pdf extension illustrated below.