Skip to content

NEW #33506 Add a constant to apply a ratio to resize images in ODT templates#33543

Merged
eldy merged 5 commits intoDolibarr:developfrom
i-faktur:develop
Mar 24, 2025
Merged

NEW #33506 Add a constant to apply a ratio to resize images in ODT templates#33543
eldy merged 5 commits intoDolibarr:developfrom
i-faktur:develop

Conversation

@Movix
Copy link
Copy Markdown
Contributor

@Movix Movix commented Mar 20, 2025

Added a new Dolibarr constant MAIN_DOC_ODT_IMAGE_RATIO.
This constant holds a number that is multiplied when computing the size of images in ODT templates.
All doc_generic_*_odt_modules.php files have been updated to call the setImage Method with a new parameter $ratio.
The method setImage in the file odt.php and segment.php has been modified to have a new parameter $ratio and use it to compute the image size

Movix added 4 commits March 20, 2025 08:36
…s in ODT templates

A new Dolibarr constant 					MAIN_DOC_ODT_IMAGE_RATIO
is taken in consideration for ODT templates.
This constant holds a number that is multiplied when computing the size of images in ODT templates.
All doc_generic_*_odt_modules.php files have been updated to call the setImage Method with a new parameter $ratio
The method setImage in the file odt.php has been modified to have a new parameter $ratio and use it to compute the image size
some other files needed to be changed in the develop branch
* @return odf
*/
public function setImage($key, $value)
public function setImage($key, $value, float $ratio=1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must add the parameter $ratio into the doc comment.
@param float $ratio Ratio for image

@eldy eldy added the PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do) label Mar 20, 2025
@eldy eldy merged commit b9946ce into Dolibarr:develop Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants