Well, since I was looking for a solution for this Dynamic Programming problem some time ago and didn't find a solution online I'll write the solution now..
This solves the problem for $n$ elements and $k$ partitions where for each element (letter) $i$, $1 \le i \le n$, the size of the element (number of pages for this letter) is $P_i$.
Let $C[i, j]$ be the optimal solution for $i$ partitions of a set with $j$ elements . The optimal solution is a solution where the maximum number of pages in a partition is minimal relative to other solutions.
so $C[k, n]$ is the optimal solution to the problem.
Define the recursive formula
$$
C[i,j] = \left\{\begin{aligned}
&0 && j=0 \\
&\infty && i=0 \land j \ne 0 \\
&\min_{1 \le r \le j} \{ \max \{{ C[i-1, r], \sum_{s=r}^j{P_s }}\}\} && otherwise
\end{aligned}
\right.$$
What happening is this: In the first case where $j=0$ there are no letters and no pages so the sum of pages in the last partition is 0.
In the second case you have pages to split but no available partitions so the sum of pages is $\infty$ (this is a sort of auxiliary case).
In the last case, you assume you have an optimal solution for $i-1$ partitions of the $j$ elements, now you need to choose the sequence of elements you put in the last partition. You look in previous results and give the last partition all the elements starting from $1 \le r \le j$ which results in the minimal size of the biggest partition.
Taking the minimal maximum makes the partition balanced. If you'd just take the minimum, The size of another partition will grow.
With this recursive formula you fill a table where the rows 0 to $k$ represent the partitions and the columns 0 to $n$ represent the elements (letters in you case).
You fill the table row by row, column by column relying on the recursive formula and former calculations to fill each cell $[i, j]$, it's best if you also save the $1 \le r \le j$ in each cell. that's the first element in the $i$th partition in a sequence of $j$ elements.
After you've filled the table, you read the solution by starting from the last cell $[k, n]$ and tracing back, following the $i$'s and moving one row wards until you reach the cell $[0, 0]$.
Complexity: fill $k+1$ rows and $n+1$ columns. for each cell $[i, j]$ you examine all the cells $[i-1,1] \text{ to } [i-1, j]$. That's $\mathcal{O}(n^2)$ for each row so the total is $\mathcal{O}(k*n^2)$.
reading the solution is $\mathcal{O}(k)$.
So $\mathcal{O}(k*n^2)$.
I explained it the best I could.. I hope this helps you in some way.