On the extension to boundary for some analytic function Given analytic function $f(z)$ on $\mathbb{H}:=\{x>0\}$ satisfying
$$0\leq \Re{f(z)}\leq M\Re{z}$$
for some $M>0$ and $z \in \mathbb{H}$
I want to show that $f$ takes form
$$f(z)=mz+ic$$
where $m\in[0,M],c\in\mathbb{R}$.
[Observation]
If $f$ can be extended to $\partial{\mathbb{H}}$, then the condition implies that $f$ must takes purely imaginary number on $\{x=0\}$. By proper rotation we can extend $f$ to the whole plane by Reflection Principle and thus the entire function $e^{f(z)}$ have at most growth order of 1, whence by Hadamard's factorization theorem with some detailed argument we get the conclusion. Here's the only obstacle that left within the argument:

Can $f(z)$ be continuously extended to the boundary $\{x=0\}$ from the assumptions?

 A: Yes, $f$ can be extended to the entire plane by reflection.
Consider $u = \Re f$. The function
$$U(z) = \begin{cases}0 &, \Re z = 0\\
u(z) &, \Re z > 0\\
-u(-\overline{z}) &, \Re z < 0\end{cases}$$
is clearly continuous (by the bound on $\Re f$) and has the mean value property (for $\Re z \neq 0$, because it is known to be harmonic, for $\Re z = 0$ by the symmetry), hence it is an entire harmonic function.
$\mathbb{C}$ is simply connected, hence $U$ has a conjugate harmonic $V$, i.e. a real-valued entire harmonic function such that $F = U + iV$ is holomorphic. $\Re F = \Re f$ in the right half plane, so $f$ and $F$ differ by a purely imaginary constant there, which can be absorbed into $V$ to get the entire extension of $f$.
A: I've got an attempted solution that goes in a different direction. I can't think of an easy way to show that $f(z)$ can be extended to the boundary. Instead, I'll use Runge's Theorem.
Let $K_n$ be the compact set $[1/n, n]\times[-in, in]$. Then $f(z)$ is analytic in a neighborhood of $K_n$, so there exists a rational function $p_n(z)$ with a pole in each component of $\mathbb{C}\backslash K_n$ such that:
$$\sup_{z\in K_n}|f(z)-p_n(z)|<n^{-1}$$
 Furthermore, we can specify the location of each pole. Since $\mathbb{C}\backslash K_n$ has only one component, we can make $p_n(z)$ to have a pole only at $\infty$, so that $p_n(z)$ is a polynomial. On $K_n$, $\Re p_n(z)$ is bounded by $M\Re z+n^{-1}$. This tells us that $p^{(k)}_n(z)\to 0$ for $k\ge 2$, but $p_n^{(k)}(z)\to f^{(k)}(z)$, so $f$ is linear and the result follows. (This last argument is not rigorous at all; I'd appreciate some help in filling it out).
