function.addfont seems to be failing on a path issue, but I am not sure where to change the path.
Error received:
"# warning: addfont(D:/Inetpub/wwwroot/_OPENSOURCE/tcpdf/fonts/freeserif.php) [function.addfont]: failed to open stream: No such file or directory in /home/karl/public_html/home/d5/modules/pdfview/tcpdf/tcpdf.php on line 1651.
# warning: addfont() [function.include]: Failed opening 'D:/Inetpub/wwwroot/_OPENSOURCE/tcpdf/fonts/freeserif.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/karl/public_html/home/d5/modules/pdfview/tcpdf/tcpdf.php on line 1651."
My host runs PHP4.4, so I installed the 'tcpdf_php4' and renamed the directory to 'tcpdf' which correct a failure to open stream. Now I have this error.
Thanks.
K.
Comments
Comment #1
karl sf commentedUpon clicking the "Download PDF" button I see the following error:
"TCPDF error: Could not include font definition file"
When I go back to the page that tried launching the PDF I get the error above.
Comment #2
Crell commentedAlthough it doesn't seem to be documented anywhere in the PDFview docs, with tcpdf you need to setup the config file with the necessary paths. There's various defines at the top of tcpdf/config/tcpdf_config.php. For me, I used the following and it was able to find things:
Your paths may vary.
Moving this to a documentation bug, since that step really should be mentioned more prominently.
Comment #3
Crell commentedFollow-up, I think this is more general:
Comment #4
Christefano-oldaccount commentedLooks good, Crell. Let's get this added to the documentation.
Comment #5
promesToday I had almost the same error, but the path now reads: /var/www/html/sites/all/modules/pdfview/tcpdffont/freeserif.php
I downloaded both projects (pdfview and tcpdf) this week, so some changes can have been made already in the files since last comments.
The problem is in tcpdf/config directory in file tcpdf_config.php.
The following line is in error:
define ("K_PATH_MAIN", "/var/www/html/sites/all/modules/pdfview/tcpdf");
This should read / be changed into:
define ("K_PATH_MAIN", "/var/www/html/sites/all/modules/pdfview/tcpdf/");
Attention: only a trailing slash has been appended (ala the K_PATH_URL definition).
Thanks for a nice project.
Comment #6
jerome_107 commentedhi all!
thanks for this useful module...
thanks for this forum thread, too...
jerome
Comment #7
okellhammer commentedThanks !!
This fix works like a charm. Now the Pdfview module is usable in Drupal 5.7