You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to have same/related issue as these old (fixed) ones: #224 #227
Images created with templateProcessor->setImageValue and open in windows vs mac are different in size. I tried to add images into table cell and after tweaking dimensions (images in pt, cell width in some weird Twentieths of a Point) I got image fit into cell correctly in LibreOffice in Mac. However, when open MS Word in Windows, images are rendered in different size.
Steps to Reproduce
Please provide a code sample that reproduces the issue.
In template docx I have template variable for table ${table}
Images rendered in document are same size regardless operating system.
Current Behavior
Images are rendered in different size. And it seems, that it also depends on size. If I set image size to 300, they seems to have almost identical. 400, already big difference. Below are screenshots how 300, 400 and 600 looks in mac vs win.
300 mac
300 win
400 mac
400 win
600 mac
600 win
In windows, all images above 300 are clearly larger (indicated by activated image corners), and do not fit into cell in case of 600. Width doesn't seems to be linear unit at all in windows. 400 seems to be 2x larger than 300. Same thing happens in LibreOffice in Windows.
Also, I wasn't able to use $cell->addImage, no image was rendered, but that's another problem.
Context
Please fill in your environment information:
PHP Version: 8.1
PHPWord Version: 1.2.0
The text was updated successfully, but these errors were encountered:
sookoll
changed the title
Images produced by templateProcessor->setImageValue look different in Word for Windows and Word for Mac
Images produced by templateProcessor->setImageValue look different in Windows versus Mac
Feb 23, 2024
Describe the Bug
It seems to have same/related issue as these old (fixed) ones:
#224
#227
Images created with templateProcessor->setImageValue and open in windows vs mac are different in size. I tried to add images into table cell and after tweaking dimensions (images in pt, cell width in some weird Twentieths of a Point) I got image fit into cell correctly in LibreOffice in Mac. However, when open MS Word in Windows, images are rendered in different size.
Steps to Reproduce
Please provide a code sample that reproduces the issue.
In template docx I have template variable for table ${table}
Expected Behavior
Images rendered in document are same size regardless operating system.
Current Behavior
Images are rendered in different size. And it seems, that it also depends on size. If I set image size to 300, they seems to have almost identical. 400, already big difference. Below are screenshots how 300, 400 and 600 looks in mac vs win.
300 mac
300 win
400 mac
400 win
600 mac
600 win
In windows, all images above 300 are clearly larger (indicated by activated image corners), and do not fit into cell in case of 600. Width doesn't seems to be linear unit at all in windows. 400 seems to be 2x larger than 300. Same thing happens in LibreOffice in Windows.
Also, I wasn't able to use $cell->addImage, no image was rendered, but that's another problem.
Context
Please fill in your environment information:
The text was updated successfully, but these errors were encountered: