Hi,
thanks for adding the PDF Function in the module.

I am using v6.x-1.x-dev.22.02.08 and I am getting the following error when I want to print a PDF:

Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/sites/.........../html/sites/all/modules/print/print.pdf.inc on line 19

Any ideas if it is a bug, or an open_basedir restriction (and tips on how I can get around it)?

Thanks in advance

Comments

Compactman’s picture

I am having this same issue.

I checked and I don't have a /usr/share/pear directory

I also noticed that I do have php-pear installed as an extension to php.

More information as to which package is needed would be most helpful.

jcnventura’s picture

Hi,

The PDF support is still in it's early stages.. I haven't even created any documentation on it, so I would like to ask if you have installed dompdf and/or tcpdf?

The module is expecting to find one of these tools inside it's directory (i.e. inside the sites/all/modules/print/dompdf dir for the dompdf tool). Also, the tool selection logic doesn't exist yet, so currently it's hardcoded to dompdf. You need to change a function inside print.pdf.php.inc to select tcpdf if you don't like dompdf.

João

wizian’s picture

Title: Fatal error » Dompdf or tcpdf?

Hi,
I haven't any preferences as yet. I noticed that there is a dompdf project (http://drupal.org/project/dompdf) although it is only for D5. Could you link into that?

I'm willing to try dompdf native - do you have your dompdf installed in .../modules/print?

Ian

wizian’s picture

Sorry about the silly question about the path- I overlooked it.

I have just copied dompdf v0.51 from http://www.digitaljunkies.ca/dompdf/ and placed it 1:1 as ..modules/print/dompdf and it works!

(BTW for anybody who is planning to use dompdf: Buggy is the pdf printing of the drupal admin pages).

jcnventura’s picture

Hi,

I am glad that it works for you.. Regarding your dompdf module question... I don't think I will use it for the following reasons:

1. I only use one function in that module (all the others there are for doing stuff that print does in another way).
2. I want to be able to use the same interface for both dompdf and TCPDF, so I don't want to be restricted by that one function's interface)
3. It introduces a module requirement that brings no added value (i.e. with that one function already inside print_pdf, the dompdf module is not necessary).
4. I would prefer to not be dependent on the dompdf module release cycle for the print_pdf module (i.e. where's dompdf for Drupal 6?).

Don't forget to delete the dompdf.php file as noted in the security advisory for the dompdf tool..!

João

jcnventura’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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