When I add a PDF display to my view the following error on a WSOD appears:

Fatal error: require_once(): Failed opening required 'sites/all/libraries/tcpdf/tcpdf.php' (include_path='.:/usr/share/php:..') in /www/htdocs/…/sites/all/modules/views_pdf/views_pdf_template.php on line 16

I guess the is something wrong with the installed libraries but I can't solve it.

Here is my library files list:

sites/all/libraries/fpdi (directory)
sites/all/libraries/fpdi/filters (directory
sites/all/libraries/fpdi/filters/FilterASCII85_FPDI.php
sites/all/libraries/fpdi/filters/FilterASCII85.php
sites/all/libraries/fpdi/filters/FilterLZW_FPDI.php
sites/all/libraries/fpdi/filters/FilterLZW.php
sites/all/libraries/fpdi/fpdf_tpl.php (separately downloaded it and put it in here)
sites/all/libraries/fpdi/fpdi_pdf_parser.php
sites/all/libraries/fpdi/fpdi.php
sites/all/libraries/fpdi/fpdi2tcpdf_bridge.php
sites/all/libraries/fpdi/pdf_context.php
sites/all/libraries/fpdi/pdf_parser.php

sites/all/libraries/tcpdf (directory)
sites/all/libraries/tcpdf/Exception.php
sites/all/libraries/tcpdf/Tcpdf.php

Any help please?

Comments

marco.b created an issue. See original summary.

marco.b’s picture

Issue summary: View changes
aadil.addweb’s picture

You need to change name of tcpdf.php instead of Tcpdf.php or Please install tcpdf library again and check.

marco.b’s picture

Ok, thanks, I did that, but now I get another error:

Fatal error: Class 'TCPDF' not found in /www/htdocs/…/sites/all/libraries/fpdi/fpdi2tcpdf_bridge.php on line 29

hmmm?

aadil.addweb’s picture

Please install "fpdi library" from https://www.setasign.com/products/fpdi/about and "tcpdf library" from https://github.com/tecnickcom/tcpdf and check.

Let me know if this works for you.

marco.b’s picture

Thanks, now it works. Cool.

marco.b’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

knight218’s picture

still getting error on the bridge thing, got libraries from link posted

chri5tia’s picture

Same here. I downloaded from the inks above and updated views_pdf to the latest version. I am still getting an error that makes reference to a file that doesn't exist in the library files from the download:

Fatal error: require_once(): Failed opening required 'sites/all/libraries/fpdi/fpdi2tcpdf_bridge.php' (include_path='.:') in /sites/all/modules/contrib/views_pdf/views_pdf_template.php on line 22

miksha’s picture

This module needs FPDI library version 1.6.2. I got this by trial and error. Then it functions properly. TCPDF library can be newer.

https://www.setasign.com/downloads/1884275/FPDI-1.6.2.tgz

lbrassaw’s picture

Thanks @miksha.

Indeed, version 2.x doesn't include the fpdi2tcpdf_bridge.php file that Views PDF is looking for.