-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do i convert between centimeters and the $width used in addImage() and addCell() ? #73
Labels
Milestone
Comments
Image widths are defined in pixels. Use // Image with 2 cm width
$imageStyle = array('width' => PHPWord_Shared_Font::centimeterSizeToPixels(2));
$section->addImage('MyImage.jpg', $imageStyle); Cell widths are defined in twips. Use $table = $section->addTable();
$table->addRow();
$table->addCell(PHPWord_Shared_Font::centimeterSizeToTwips(1.5)); // Cell with 1.5 cm width |
@Progi1984 I think we can close this question. |
@badpenguin @ivanlanin Any help on how to use this class in Laravel? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do i convert between centimeters
and the $width used in addImage() and addCell() ?
The text was updated successfully, but these errors were encountered: