You have, at least two options allowing page breaks inside the framed text. You can use the tcolorbox
package:
\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{most}
\usepackage{lipsum}
\newtcolorbox{mybox}{
freelance,
breakable,
frame code={
\draw
([xshift=2cm]frame.north west) --
(frame.north west) --
(frame.south west) --
([xshift=2cm]frame.south west);
\draw
([xshift=-2cm]frame.north east) --
(frame.north east) --
(frame.south east) --
([xshift=-2cm]frame.south east);
},
colback=white
}
\begin{document}
\lipsum[4]
\begin{mybox}
\lipsum[4]
\end{mybox}
\lipsum[4]
\end{document}
or you can use the mdframed
package:
\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\newmdenv[
hidealllines=true,
singleextra={
\draw
([xshift=2cm]O) --
(O) --
(O|-P) --
([xshift=2cm]O|-P);
\draw
([xshift=-2cm]P) --
(P) --
(P|-O) --
([xshift=-2cm]P|-O);
},
firstextra={
\draw
(O) --
(O|-P) --
([xshift=2cm]O|-P);
\draw
([xshift=-2cm]P) --
(P) --
(P|-O);
},
middleextra={
\draw
(O) --
(O|-P);
\draw
(P) --
(P|-O);
},
secondextra={
\draw
([xshift=2cm]O) --
(O) --
(O|-P);
\draw
(P) --
(P|-O) --
([xshift=-2cm]P|-O);
},
]{mybox}
\begin{document}
\lipsum[4]
\begin{mybox}
\lipsum[4]
\end{mybox}
\lipsum[4]
\end{document}