CalcBuilder Forum

Change PDF button image or button

User dhoeke 2024-10-15 09:23:20

Good morning,

On my site the PDF download button is not really showing good. I once uploaden another icon is assets but still it shows small and with a button outline. I would like to show a descend PDF button or a template button with 'Download as PDF' of something like that. Any tips for this?
Thanks, Dennis

Moonsoft support 2024-10-15 10:39:59

Hi,
the pdf export button contains as you say an image tag you can change. Then if you want to modify its size, remove the borders, etc, you'd need some css to achieve that. The button has the classes btn.btn-outline-secondary so in order to address the image you can use for ex:

.btn.btn-outline-secondary > img {
width: 50px !important;
height: 50px !important;
}

or even set the display none for the default image and set a text inside the button instead, something like:

.btn.btn-outline-secondary:before {
content: "MY PDF TEXT ";
}

Hope this helps, regards
Silvia Martín
Moonsoft Team

User dhoeke 2024-10-15 11:37:51

Thanks for the information. That works. For the image itself though, when I change the pdf_button.png in assets/img it keeps displaying another (not good and small) image. Also after clearing all cashes.

Moonsoft support 2024-10-15 11:46:05

Hi,
the image is at the url
https://www.yourwebsite/modules/mod_calcbuilder/assets/img/pdf_button.png

If you see the original one even if you uploaded a new file there, then any cache is still remaining, you can navigate that direct url and use crtl+f5 to force your browser to refresh.

Regards
Silvia Martín
Moonsoft Team



User dhoeke 2024-10-15 11:53:12

Thanks you. Yes, it must be something like that. I will double check.
Regards, Dennis

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!