Cookbook

Standardize the size of images added to documents

When inserting images with the addImage and replacePlaceholderImage methods it is recommended to define their height, width and dpi. Otherwise, images may show a changed, unwanted size.

E.g., even with a chosen height and size of 100, a picture with a different dpi will appear with an unexpected final size, as it will choose its own dpi.

In order to avoid this issue, just be sure to specify size when defining the three values: