TOPIC:

Background-Image 2 years 3 months ago #259495

  • Topic Author
  • mango-bango
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 5
  • Thanks: 0
Before the breezingforms-update (Joomla) you could insert a background image as follows:

Please go to joomla root folder/components/com_breezingforms and there you'll see* facileforms.process.php* file. Open it and around line 5155 you will find the tcpdf setup:
$pdf->setPrintHeader(false);
$pdf->AddPage();
$pdf->writeHTML($c);
mt_srand();
$pdfname = $this->uploads . '/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
$pdf->lastPage();
$pdf->Output($pdfname, "F");
return $pdfname;
Replace it with this piece of code:
$pdf->setPrintHeader(false);
$pdf->AddPage();
//background image
if($this->formrow->name=='formname') {
$img_file = '/images/background.jpg';
$pdf->Image($img_file, 10, 10, 210, 297, '', '', '', false, 300, '', false, false, 0);
}
//end background image
$pdf->writeHTML($c);
mt_srand();
$pdfname = $this->uploads . '/ffexport-pdf-' . $date_stamp . '-' . mt_rand(0, mt_getrandmax()) . '.pdf';
$pdf->lastPage();
$pdf->Output($pdfname, "F");
return $pdfname;

Now it doesn't work anymore. Is there a new solution?

Please Log in or Create an account to join the conversation.

Background-Image 2 years 3 months ago #259496

  • Mirec's Avatar
  • Mirec
  • Offline
  • Platinum Member
  • Platinum Member
  • Registered
  • Posts: 3262
  • Thanks: 163
Hello,

you can use this code into your form > Advanced tab > more options > Form Pieces, Before Form:
echo '<style>
 .bfFormDiv {
background-image: url("http://www.vanseodesign.com/blog/wp-content/uploads/2011/10/background-3.jpg") !important;
}
</style>';

Let me know does it working!
regards!
Mirko

Please Log in or Create an account to join the conversation.

Background-Image 2 years 3 months ago #259504

  • Topic Author
  • mango-bango
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 5
  • Thanks: 0
Many thanks for the quick response.
Unfortunately, the PDF still comes with a white (empty) background via email.

Please Log in or Create an account to join the conversation.

Background-Image 2 years 3 months ago #259506

  • Mirec's Avatar
  • Mirec
  • Offline
  • Platinum Member
  • Platinum Member
  • Registered
  • Posts: 3262
  • Thanks: 163
Hello,

oh sorry, my mistake, I gave you the code for the Form background image but you need it for pdf file.

give me a little time to find the best solution for your problem. :)

Regards!
Mirko

Please Log in or Create an account to join the conversation.

Background-Image 2 years 3 months ago #259507

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 788
Hi,

please use this in /components/com_breezingforms:

File Attachment:

File Name: facileform...5-24.zip
File Size:65 KB

In line 5331 replace formname with name of your form, and put correct path for your background image

Regards,
Tihana
Attachments:

Please Log in or Create an account to join the conversation.

Background-Image 2 years 3 months ago #260591

  • Topic Author
  • mango-bango
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 5
  • Thanks: 0
When i do that the following message comes up:
TCPDF ERROR: Unable to write file:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.054 seconds

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!