Cookbook
- Learn phpdocx in 5 minutes
- Tutorial
- API quick guide
- HTML to Word
- HTML Extended
- Conversion plugin
- Word to HTML
- DOCXPath
- Bulk processing
- DOCXCustomizer
- Digital signature
- Cryptophpdocx
- Right to left languages
- phpdocx CLI command
- Tracking
- Artificial Intelligence
- Blockchain for documents
- JavaScript API
- Compiled mode
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: