hey João!

I found it quite difficult to get this modul to work. The missing step was that I did not save the PDF settings page (admin/config/user-interface/print/pdf). It appeared to auto-detect everything (dompdf and the location of if) - so I thought everything is setup correctly. But actually the variables where not saved in the variable table - and the defaults didn't work (PRINT_PDF_PDF_TOOL_DEFAULT -> 0)

Would be great, if the modul would work without actually saving this form, as it obviously has all the needed information.

Or at least add an drupal warning if the PDF stuff seams to not be configured properly.

best,
walter

BTW: Now - after an hour of debugging - the module seems to be working greatly :)

Comments

jcnventura’s picture

Title: need to save config for PDF generation once in order to have working setup » Research how to use form API to not show first PDF tool as selected, when still using the null default value
Status: Active » Postponed

Hi,

Clearly, there is already a warning in the Drupal status report when there's no PDF tool configured (or the one configured isn't working anymore).

The default value is supposed to be 0, and not work. I'm sorry, but I really do think that the form needs to be saved. Unfortunately, due to the way HTML forms work, it's not that easy to set a radio control to not be selected in the first option available. I'll try to see if the form API has a way to deal with this.

João

gaele’s picture

Issue summary: View changes
Status: Postponed » Active

Clearly, there is already a warning in the Drupal status report when there's no PDF tool configured (or the one configured isn't working anymore).

You could add the same warning to the configuration page, and also do a check on print_pdf_pdf_tool in print_pdf_generate_html(). Currently if print_pdf_pdf_tool is not set $pdf is undefined, which will result in an error.

Unfortunately, due to the way HTML forms work, it's not that easy to set a radio control to not be selected in the first option available.

If you set it to FALSE instead of 0 it should work.

gaele’s picture

Version: 7.x-2.0-beta2 » 7.x-2.0

  • jcnventura committed 5eff8ea on 7.x-2.x
    Issue #1808612 by gaele, jcnventura: Do to not show first PDF tool as...
jcnventura’s picture

Status: Active » Fixed

Thanks @gaele

Status: Fixed » Closed (fixed)

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