CalcBuilder Forum

Image field output formatting

User TheFencepedia 2024-08-09 04:06:33

Hi there,

I'm hoping to add the option for companies to upload their logo and have it on their output from Calcbuilder, but I wanted to know if there's any way to either set image requirements in terms of size, or set the output size on their PDF download.

Moonsoft support 2024-08-09 10:23:09

Hi,
regarding restrictions, when you set a field with type 'upload', you can set at 'preferences' the Upload Max File size, together with the extensions allowed, etc, but these are validations restricting the size of the file, not width and height of the uploaded image. You could create that type of validation with php if you have some code knowledge, but also you can adjust the image size at the time of including it at the pdf. You can add some styles to the image tag in order to get the desired size, setting either a fixed size or a maximum, for ex:

img src="yourimageurl" width="50px" />

or

img src="..." style="max-width: 150px"/>

should do the work.

Hope this helps, regards
Silvia M.
Moonsoft Team

...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!
...
List Manager

Build different lists for your site

Buy now!