You can do it two ways.
1. Apply a UVW map modifier and select Planar mapping. (check or uncheck Real-World Map Size depending on which suits the best. Before you do this, you can apply a checker map as material to see if there are distortions in the texture and the scale of it as well.) To scale up/down the texture size, you click the small arrow to the left of the UVW map modifier and select Gizmo under it. Then after using the scale tool, scale it up/down as you wish.
*2. Apply an Unwrap UVW map modifier. After applying the modifier do the following:
1. Under Selection, select the polygon sub-object mode. Keyboard shortcut key is "3". (unless it's already selected)
2. Under Configure, uncheck Normalize Map and then go to Edit UV's > Open UV Editor.
3. Press ctrl + A to select all the polygons then go to Projection and click on the Planar Map button (the left button next to the Cylinder) and under align options click Z.
4. In the UV Editor, under Arrange Elements click Pack UV's button. (** See attachment for all this steps)
PS! When you open the UV editor immediately after applying the Unwrap UVW modifier, it might seem as if everything is perfect. But it's not. If you notice, the UV is slightly stretched along V (Y axis in the UV editor). The steps mentioned above is to fix this problem.
* The 2nd suggestion is under my assumption that you're not aware of Unwrap UVW map modifier and it's tools. Please bear with me.
** This attachment shows all the Bold and Italic texts from the 2nd suggestion.