Hi!
What about add some image as the page background in PDF?
it very useful with Possibility display download link for download PDF file after submitting the form if someone want generate the tickets or something, or simple want to have a nice PDF document

I made small patch for this.
(apply after Possibility display download link for download PDF file after submitting the form)

Comments

denes.szabo’s picture

Status: Active » Needs review
StatusFileSize
new14.34 KB

Dear fedik, please never do this again to send a patch not for the module's dev version but against a not committed patch!
Unfortunately, this patch is not can be applicable either the other, the download link patch.

I reworked this patch, fixed a little bit. Attached. It seems work now.

mr.york’s picture

I changed your patch, please test.

denes.szabo’s picture

Your patch is apply but with errors (whitespace). Unfortunately you did not make interdiff (http://hojtsy.hu/blog/2012-apr-13/quick-and-simple-interdiffs) so it is hard to see what is the difference between the patches.

As I see, you initialized the default variable for background, p_background. I have a more simpler solution for the default values handling there: http://drupal.org/node/1625246 With this you no need more to initialize default values in the install and update hooks.

If you accept this default variable handling I can amend this background image patch soon.

djayou’s picture

Version: 7.x-3.x-dev » 7.x-3.0
StatusFileSize
new162.84 KB

Hi Denes.Szabo,

I use your patch to add a background image field to webform2pdf but I have some errors messages after install it.

Notice : Undefined index: p_background dans webform2pdf_admin_settings() (ligne 30 dans /Applications/MAMP/htdocs/axcehabitat/sites/all/modules/webform2pdf/includes/webform2pdf.settings.inc).
Notice : Undefined index: p_background dans webform2pdf_admin_settings() (ligne 33 dans /Applications/MAMP/htdocs/axcehabitat/sites/all/modules/webform2pdf/includes/webform2pdf.settings.inc).

I got some errors too when I clic to "Generate PDF document" in webform (see attach file)

The field is there and I can upload an image but I can't create the pdf.

Do you have any issue?

Thanks a lot!

Regards.

Julien

mr.york’s picture

Did you run update.php?

nessunluogo’s picture

I applied #2, ran db update and it worked like a charm!

Do you think is there some way to exclude some pages from printing the background?

Thanks in advance!

mr.york’s picture

Issue summary: View changes
Status: Needs review » Fixed

Commited.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.