The logo header contains one or two logo image file supplied by clients with variable size.

There is a several lines of text, which varies from one product to another used by our clients.

So the usual header is not of constant size. That is our big and important problem to be solved.
For some reason I need to know the exact size of the header (table with logo images, name of product plus some of optional additional info). I have to incorporate this functionality in Cs file (C#). So I could not use javascript for that.

In fact I need to convert the html report file to pdf, so I need to know the size of header.

Is there any way to do that by designing some code?