Issue #1196588: use ctype_digit to check if a given string is a number.
[project/print.git] / INSTALL.txt
CommitLineData
1e156b5a
JV
1INSTALLATION
2------------
1aaa7127 3
1e156b5a
JV
4Decompress the print-n.x-n.n.tar.gz file into your Drupal modules
5directory (usually sites/all/modules, see http://drupal.org/node/176044 for
6more information).
1aaa7127 7
f1d1524f 8Enable the print module: Administer > Modules (admin/modules)
1aaa7127 9
1e156b5a
JV
10PDF TOOL
11--------
b09f08f7
JV
12
13The print_pdf module requires the use of an external PDF generation tool.
bbe457ea
JV
14The currently supported tools are dompdf, TCPDF and wkhtmltopdf. Please
15note that any errors/bugs in those tools need to be reported and fixed by
16their maintainers. DO NOT report bugs in those tools in the print module's
17issue queue at Drupal.org.
18
19supported paths:
20 * print module lib directory (usually sites/all/modules/print/lib)
21 * libraries directory (sites/all/libraries)
b09f08f7
JV
22
23dompdf support:
1e156b5a 24 The dompdf tool produces results that are more faithful to the HTML
d54079c6
JV
25 printer-friendly page. Unicode is not supported (only ISO-8859-1).
26 This tool is not supported and there are several known bugs that result
27 from its incomplete implementation.
b09f08f7 28
b681828f 29 1. Download dompdf from http://code.google.com/p/dompdf/downloads/list
bbe457ea
JV
30 2. Extract the contents of the downloaded package into one of the
31 supported paths.
77e38352
JV
32 3. Check if dompdf_config.inc.php fits your installation. In 99% of cases,
33 no changes are necessary, so just try to use it and only edit anything if
34 the PDF generation fails.
b09f08f7 35 4. Grant write access to the lib/fonts directory to your webserver user.
1e156b5a
JV
36 5. If you're using dompdf-0.5.1, delete the dompdf.php file as it contains
37 a security vulnerability
45626194
JV
38 6. If you're using dompdf-0.6 or later, you can try to enable the Unicode
39 support, but you'll need to add some Unicode fonts. See
40 http://groups.google.com/group/dompdf/browse_thread/thread/9f7bc0162b04d5cf
41 for further info on this.
42 7. Check http://code.google.com/p/dompdf/ for further information.
b09f08f7
JV
43
44TCPDF support:
1e156b5a 45 TCPDF seems to be more actively developed than dompdf, but it's support
d54079c6
JV
46 for CSS is considerably worse. Unicode is supported (use of Unicode fonts
47 result in HUGE files). Page header and footer are supported. This module
48 requires TCPDF >= 4.0.000.
b09f08f7
JV
49
50 1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
bbe457ea
JV
51 2. Extract the contents of the downloaded package into one of the
52 supported paths. There is no need to modify the config/tcpdf_config.php
53 file, as the module self-configures TCPDF.
75628d9a 54 3. Check http://tcpdf.sourceforge.net/ for further information.
b09f08f7 55
d9a43552
JV
56wkhtmltopdf support:
57
58 1. Download wkhtmltopdf from
59 http://code.google.com/p/wkhtmltopdf/downloads/list. You can choose to
60 download the source and compile it or simply download the static binary,
61 which doesn't require you to complile anything.
bbe457ea
JV
62 2. Place the wkhtmltopdf executable into one of the supported paths.
63 (usually sites/all/modules/print/lib). You can also place a symbolic link
d9a43552 64 to the executable.
1e7951a3 65 3. Check http://code.google.com/p/wkhtmltopdf/ for further information.
d9a43552 66
1e156b5a
JV
67UPDATE
68------
17f0a422 69
1e156b5a
JV
70When updating from a previous version, just remove the print directory and
71follow the instructions above. Make sure that you backup any costumization
72to the print.tpl.php and print.css files.
17f0a422 73
1e156b5a
JV
74ROBOTS
75------
17f0a422 76
1e156b5a
JV
77Even though it is possible to set per-page robots settings, the following
78can be placed in your robots.txt file after the User-agent line to prevent
79search engines from even asking for the page:
17f0a422 80
1e156b5a
JV
81Disallow: /print/
82
83Also, for updates from older versions (<=4.7.x-1.0 and <=5.x-1.2) which used
84node/nnn/print instead of print/nnn, the following lines can prevent
85requests from Google for the obsolete print URLs:
6f8f233b 86
1e156b5a 87Disallow: /*/print$
6f8f233b 88
1e156b5a
JV
89Note that pattern matching in robots.txt is a Google extension (see
90http://www.google.com/support/webmasters/bin/answer.py?answer=40367 for more
91information).
17f0a422 92