# Vertically Align text in two columns

I am writing in two columns. I am trying to align the text vertically such that it does not add extra spaces. Happy for the content to be finished before the end of the page. This is what I want The class for this one is \dndbook

\documentclass[letterpaper,twocolumn,openany,nodeprecatedcode]{dndbook}
\usepackage{listings}
\usepackage{shortvrb}
\usepackage{stfloats}
\MakeShortVerb{|}
\lstset{%
basicstyle=\ttfamily,
language=[LaTeX]{TeX},
breaklines=true,
}
\begin{document}
\frontmatter
\maketitle
\tableofcontents


This is what I have I am using \raggedbottom and \extarticle class

\documentclass[twoside,twocolumn,10pt]{extarticle}
\raggedbottom
\begin{document}
\tableofcontents
\pagebreak


Thanks for the help

• Welcome to TeX.SE. Please, can you help us to put a complete compilable code to solve your problem? – Sebastiano Aug 25 '20 at 22:53
• I have added the code. The complete code is really long. I have just added the parts which I think are relevant. – Abdullah Younas Aug 25 '20 at 23:25
• It is very useful to have the relevant code deleting the packages that are not importants. – Sebastiano Aug 25 '20 at 23:38