Projet

Général

Profil

Paste
Télécharger (3,66 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / print / INSTALL.txt @ 87dbc3bf

1
INSTALLATION
2
------------
3

    
4
Decompress the print-n.x-n.n.tar.gz file into your Drupal modules
5
directory (usually sites/all/modules, see http://drupal.org/node/176044 for
6
more information).
7

    
8
Enable the print module: Administration > Modules (admin/modules)
9

    
10
PDF TOOL
11
--------
12

    
13
The print_pdf module requires the use of an external PDF generation tool.
14
The currently supported tools are dompdf, TCPDF and wkhtmltopdf.  Please
15
note that any errors/bugs in those tools need to be reported and fixed by
16
their maintainers.  DO NOT report bugs in those tools in the print module's
17
issue queue at Drupal.org.
18

    
19
supported paths:
20
  * print module lib directory (usually sites/all/modules/print/lib)
21
  * libraries directory (sites/all/libraries)
22

    
23
dompdf support:
24
  The dompdf tool produces results that are more faithful to the HTML
25
  printer-friendly page. Good support of CSS 2.1 and partially CSS3.
26

    
27
  1. Download dompdf from http://code.google.com/p/dompdf/downloads/list
28
  2. Extract the contents of the downloaded package into one of the
29
  supported paths.
30
  3. Check if dompdf_config.inc.php fits your installation. In 99% of cases,
31
  no changes are necessary, so just try to use it and only edit anything if
32
  the PDF generation fails.
33
  4. Grant write access to the lib/fonts directory to your webserver user.
34
  5. If you're using dompdf-0.5.1, delete the dompdf.php file as it contains
35
  a security vulnerability
36
  6. If you're using dompdf-0.6 or later, you can try to enable the Unicode
37
  support, but you'll need to add some Unicode fonts. See 
38
  http://groups.google.com/group/dompdf/browse_thread/thread/9f7bc0162b04d5cf
39
  for further info on this.
40
  7. Check http://code.google.com/p/dompdf/ for further information.
41

    
42
TCPDF support:
43
  TCPDF's support for CSS is considerably worse than the other tools.
44
  Unicode is supported (use of Unicode fonts result in HUGE files).  Page
45
  header and footer are supported. This module requires TCPDF >= 5.9.012.
46

    
47
  1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
48
  2. Extract the contents of the downloaded package into one of the
49
  supported paths.  There is no need to modify the config/tcpdf_config.php
50
  file, as the module self-configures TCPDF.
51
  3. Grant write access to the cache and images directories to your
52
  webserver user.
53
  4. Check http://tcpdf.sourceforge.net/ for further information.
54

    
55
wkhtmltopdf support:
56
  wkhtmltopdf is a webkit-based tool that actually is a browser in order to
57
  generate the PDF.  Resource hungry: expect to need some 30Mb+ of RAM and
58
  some seconds of CPU power.  The static binaries may need additional
59
  libraries in your site, which may present problems in shared hosting
60
  environments.  The best, if you can run it.
61

    
62
  1. Download wkhtmltopdf from
63
  http://code.google.com/p/wkhtmltopdf/downloads/list. You can choose to
64
  download the source and compile it or simply download the static binary,
65
  which doesn't require you to compile anything. Note that the compiled
66
  version may require a running X server (static uses patched libs that can
67
  work without one).
68
  2. Place the wkhtmltopdf executable into one of the supported paths. 
69
  (usually sites/all/modules/print/lib).  You can also place a symbolic link
70
  to the executable.
71
  3. Check http://code.google.com/p/wkhtmltopdf/ for further information.
72

    
73
UPDATE
74
------
75

    
76
When updating from a previous version, just remove the print directory and
77
follow the instructions above. Make sure that you backup any costumization
78
to the print.tpl.php and print.css files.
79

    
80
ROBOTS
81
------
82

    
83
Even though it is possible to set per-page robots settings, the following
84
can be placed in your robots.txt file after the User-agent line to prevent
85
search engines from even asking for the page:
86

    
87
Disallow: /print/