I'm using tabularx with this solution: https://tex.stackexchange.com/a/12712 to achieve right alignment in a variable column width based on content size with linebreaks.
I would like the result to look like this:

The problem is the border between X | X columns is missing:
\documentclass{article}
\usepackage{tabularx} %% tables with auto size
\usepackage{array} %% tables content alignment
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\begin{document}
\begin{center}
\begin{tabularx}{\textwidth}{| X | X | R{2cm} | R{2cm} |}
\hline
Column1 & Column2 & Column3 & Column4 \\ \hline
a & Some Value & This is a very long right-aligned text that should break automatically & This is a very long right-aligned text that should break automatically \\ \hline
b & Some Value & Shorter right-aligned text & Shorter right-aligned text \\ \hline
\end{tabularx}
\end{center}
\end{document}

\hlineafter the table preamble (i.e. beforeColumn1). Usebooktabsin stead and get rid of the vertical lines. – Sveinung May 26 '16 at 08:54\hlinewas a typo. But I realized the table headers are still aligned left. Is it possible to align them center? If this is presented as an answer with mentioning the PDF Viewer problem I will gladly accept it. – Joudicek Jouda May 26 '16 at 09:05Xdoes not center, neither doesR– May 26 '16 at 09:17\multicolumn{1}{c|}{heading}(or|c|for the first column) – David Carlisle May 26 '16 at 09:34\multicolumnwith tabularx? Can you please show a sample for first row (heading) centering only? – Joudicek Jouda May 27 '16 at 13:39