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.
CODE
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:
##PDF_file=output file
This code works as long as the user specifies and manually types in the .pdf extension illustrated below.
Choosing output file location
1 Answer 1
If you are using QGIS 2.18 (doesn't work in 2.14, untested in 2.16) you can use:
##PDF_file=output file pdf