Find height of irregular trapezoid with known angles and surface area 
KNOWN:

*

*Length DC

*Alpha

*Beta

*Surface S

NEEDED:

*

*Height h

For an algorithm, I require a way to solve this for any trapezoid. Sort of like this question (Given a known isosceles Trapezoid find height of another with same angles & one base but different area) but not with the isosceles restriction.
Just like in that question, I effectively have all information about a larger trapezoid with identical angles and DC as well, but I think the only gain I get from that are the angles.
Have mattered my brain a while now without success.
Going off of the formula for surface:
S = h * ((AB + DC)/2)
I could end up for the formula:
h = (2*S) / (AB + DC)
But this hardly helps because I do not know AB.
Formulas based on the angles also always required both DC and AB, or alternatively the lengths of the legs.
Another idea I had was to split trapezoid into two right triangles and one square because solving the problem appears to be easier for each in particular.
But after implementing half of that, I realized that I have no way of knowing what the desired surface area of each figure would be...
Is there a known solution to this?
Huuge thanks in advance!
 A: This seems like a problem best done using trig. Consider:
Draw a vertical line upward from $D$ to a point $E$ on $AB$. Do the same downward from $B$ to $F$ on $CD$.
We know $\overline{DE}$ and $\overline{BF}$ are equal to h. $\overline{BE}$ and $\overline{DF}$ are some unknown distance $d$.
As you noted, the area is the sum of the rectangle and two triangles, which is $$S = dh + S(\Delta BFC) + S(\Delta ADE)$$
And we can find our lengths for the new segments
$$\overline{CF} = \frac{h}{\tan \beta}$$ $$\overline{AE} = h \tan (\alpha - 90°) = h \tan \gamma$$
I'm just throwing gamma as a sub for alpha - 90° in there for ease of reading. And all this means $$ S = dh + \frac{1}{2}\frac{h^2}{\tan \beta} + \frac{1}{2}h^2 \tan \gamma $$
Well, that's one equation in two variables. We need at least one more. Thankfully we know the length $\overline{CD}$, and it has to be:
$$ \overline{CD} = d + \frac{h}{\tan \beta}$$
Two last substitutions give
$$ S = h\left(\overline{CD}-\frac{h}{\tan \beta}\right) + \frac{1}{2}\frac{h^2}{\tan \beta} + \frac{1}{2}h^2 \tan \gamma $$
$$ S = h\cdot\overline{CD } + h^2\left(\frac{1}{2}\tan \gamma - \frac{1}{2 \tan \beta}\right)$$
And I'm not going to go through the quadratic equation with that using variables, so plug in your actual numbers at this point.
Hope that helps! Going to quickly double-check my steps though.
