pixelsToEMU()
pixelsToEMU(int $pValue) : int
Convert pixels to EMU.
Parameters
int | $pValue | Value in pixels |
Returns
int —Value in EMU
pixelsToCellDimension(int $pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont) : int
Convert pixels to column width. Exact algorithm not known.
By inspection of a real Excel file using Calibri 11, one finds 1000px ~ 142.85546875 This gives a conversion factor of 7. Also, we assume that pixels and font size are proportional.
int | $pValue | Value in pixels |
\PhpOffice\PhpSpreadsheet\Style\Font | $pDefaultFont | Default font of the workbook |
Value in cell dimension
cellDimensionToPixels(float $pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont) : int
Convert column width from (intrinsic) Excel units to pixels.
float | $pValue | Value in cell dimension |
\PhpOffice\PhpSpreadsheet\Style\Font | $pDefaultFont | Default font of the workbook |
Value in pixels