Joomla 5 Notice

We are pleased to announce that as of October 14, 2025, all of our Joomla extensions are compatible with Joomla 6.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5 and 6!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Background image size for PDF mail attachments

More
5 years 4 months ago #6896 by Oleg
Hello,
I need attach PDF document form with subscriber data to mail. But I can't to place Background image (A4 organization document form with header and footer) to fill the A4 page strictly; in result PDF Background image (jpeg or png file) stretches approximately 4 times. It not depends from Background image resolution. Is it technique to fill A4 page document with Background image?

More
5 years 4 months ago #6900 by Administrator AV
Replied by Administrator AV on topic Background image size for PDF mail attachments
Hi,

I'm sorry for your trouble.
I looks, as if maybe there is a problem with the scaling, because this is the second time, such a problem is reported.
The other user solved the problem the following way:
They created an image 7000 x 5000 Pixel and put the Background-Image with a resolution of 3508 x 2480 px (= A4) into the upper right corner. The rest was just filled with the background-color.
This obviously is a workaround, which hopefully will work for you, too.
I will try to check into the feature as soon as possible and provide a more adequate solution.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 5:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 4.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 5:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 4.
Bitte immer nur 1 Frage pro Thema stellen :-).

More
5 years 4 months ago #6901 by Oleg
Hi,
I create this file (with black background-color). Result see in file.

More
5 years 4 months ago #6913 by Oleg
After investigations on my site the temporary solution:
1) Image 7000 x 9800 (wight x height) pixels;
2) Background-Image with a resolution of 2480 x 3508 px into the upper LEFT corner.

More
5 years 4 months ago - 5 years 4 months ago #6927 by Administrator AV
Replied by Administrator AV on topic Background image size for PDF mail attachments
Hi,

I was finally able to look into this problem.
This actually is a bug in Visforms since Version 3.13.9.
For security reason, I switch to a newer version of the tcpdf library, then.
Because this newer version has modifitions to the way, how the page size is messured, I had to adapt my code.
Basically there is now a miscalculation in the page size, that effects the calculation of the background image size.

I will release a bugfix as soon as possible.
Here is the modified code.

Open administrator\components\com_visforms\helpers\pdf\visTCPDF.php
(please make sure that you have a backup of the file, before you make any modifications).

Replace the code at line 43 and 44
Code:
$this->pageSize[0] = (int) $this->pageSize[0]; $this->pageSize[1] = (int) $this->pageSize[1];

With
Code:
$this->pageSize[0] = (int) $this->pageSize[0] * 25.4 / 72; $this->pageSize[1] = (int) $this->pageSize[1] * 25.4 / 72 ;

After that, using the original background image with the proper 2480 x 3508 solution should work.


Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 5:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 4.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 5:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 4.
Bitte immer nur 1 Frage pro Thema stellen :-).
Last edit: 5 years 4 months ago by Administrator AV.

More
5 years 4 months ago #6939 by Oleg
Now all work fine. Thank you, Aicha.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum