I am not good with tikz. I know that this question has already been answered in general (like, for example, here), but I was not able to transfer it to my example. I have the following code:
\documentclass[a4paper]{article}
\usepackage{geometry}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{background}
\usetikzlibrary{calc}
\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{black}
\SetBgContents{
\begin{tikzpicture}[overlay,remember picture]
\draw [line width=1pt,rounded corners=17pt,
]
($ (current page.north west) + (1.2cm,-1cm) $)
rectangle
($ (current page.south east) + (-1cm,2cm) $);
\end{tikzpicture}
}
\begin{document}
\lipsum
\end{document}
Which produces this type of rectangle around the whole page:
How can I make the NW and SE corners NON-rounded? So my special restriction is that I want the rectangle go all around the whole text, relative to the page size.


\draw [line width=1pt,rounded corners=17pt, ] ($ (current page.north west) + (1.2cm,-1cm) $) -| ($ (current page.south east) + (-1cm,2cm) $) ($ (current page.south east) + (-1cm,2cm) $) -| ($ (current page.north west) + (1.2cm,-1cm) $);– Zarko Dec 04 '17 at 17:17