I need to set the width of a column in a table with the width of a bitmap (I have an image inside a cell in a column and I want to fill the cell with the image). The size of the bitmap is in pixel, the width of the column is in uint so how can I convert one of the sizes such that I can set the column width with the image width value?
PDF files have no pixel. You have to define how many DPI the image should have in the PDF file. Knowing pixel size and DPI you can calculate the size of the bitmap in cm, mm, inches, or points. And then you can use e.g. Unit.FromCentimeter()
to set the width of the column as needed.
Or do it the other way around: set the width of the column - and set the width of the image to the same value.
See also:
https://stackoverflow.com/a/26275816/162529