Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
The module description says the following about background PDFs: "This static PDF can be exchanged dynamically by using a File Field." How do I achieve that?
I have a file field (PDF) on a content type and would like to generate a cover page for it with the node title via this module.
Thank you in advance!
Comments
Comment #1
vegansupreme CreditAttribution: vegansupreme commentedI've never used this feature. I just tried to do this and I'm getting an error.
Here's how I tried to do it.
The PDF templates don't show up, and you get the following error:
Notice: Undefined property: stdClass::$field_data_field_file_node_values in PdfTemplate::getTemplatePath() (line 992 of .../sites/all/modules/views_pdf/views_pdf_template.php).
I've never tried to use this feature before so maybe I'm doing it wrong.
Has anyone got this working?
Comment #2
maxneaga CreditAttribution: maxneaga commentedvegansupreme,
Thank you, I'm also getting the same error.
Also I'm wondering why can't we select the attached file for the "Succeed PDF Template", as the only available option is "Template PDF" under Format -> Show -> PDF Fields -> Settings? I would like the file to be appended to the end of the generated PDF.
Comment #3
m-si CreditAttribution: m-si commentedI got the same Probleme. Background PDF doesn't show up. Things I did
no background PDF shows. The same file via upload in the dialog works as expected. I checkd the appreance of the file via another block view, so the entity reference works as expected. Addiotionally I brought in the file via the same field on the node form. PDF is not showing up.
I assume it simply dosent work even though the funtionality is promoted on the modules page. A possible resolution could be at least stop promoting this functionality...
Comment #4
vegansupreme CreditAttribution: vegansupreme commentedIt seems @syndalis has been able to make this work in this issue:
#2332553: Get PDF Template URL from field?
Maybe this is different from that issue.
Looks like this is the problem code, but I'm not sure what's going on with it.
I suspect this worked properly at one time, but something broke it. I'll take a look at old code to see I can find a time when it worked.
May possibly be related to these issues:
#1936072: TCPDF ERROR: Unable to find pointer to xref table
#1146622: TCPDF ERROR: Unable to find pointer to xref table
Comment #5
vegansupreme CreditAttribution: vegansupreme commentedDoes anyone know what's going on with this bit of code?
$row->field_data_field_file_node_values[0]['uri']
I don't understand how this is supposed to work. The Drupal 6 version of that line was:
$view->field[$template]->theme($row)
Comment #6
killua99 CreditAttribution: killua99 commented