You can get a model for nearly everything McMaster-Carr sells from their website.
M4 Hex Head Screw - https://www.mcmaster.com/#91280a140/=15dmpx8
The options to download models are to the right of the drawings.
You shall not use a CAD model to engage in 3D printing or other fabrication of the object depicted in the CAD model for any other purpose. You shall not otherwise redistribute or make available the CAD models (or any design drawings or prototypes that incorporate them) to any third parties, including third parties in the business of selling products similar to the products sold by us.
The thing you linked to describes itself as being generated from a parametric model: http://www.thingiverse.com/apps/customizer/run?thing_id=193647
To generate any different bolt or nut, you will need to identify the correct dimensions for not only the thread (where hints exist in the customiser), but also for the hex head. These are obviously less critical to define than the thread.
Once you have generated a custom model, you can share it and answer your own question.
A 3D printer does not have the necessary resolution to create a functioning screw thread. I suggest you print the hole (for the nut) and the shaft (for the screw) in oversize and use a tap and die set to make the threads.
You must print them out of PA12 nylon obviously. Due to the size, warping will not be an issue.
You could also apply a scaling factor in your slicer to make a downloaded object larger or smaller. An M3 model scaled at +1.333 would produce a working thread with a nominal 4 mm OD. As noted in the comments below, a different scale factor might be needed in the axial direction if exactly matching the pitch of an M4 thread is required.