Projet

Général

Profil

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

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

1
DESCRIPTION
2
-----------
3

    
4
This module allows you to generate the following printer-friendly versions
5
of any node:
6

    
7
    * Web page printer-friendly version (at www.example.com/print/nid)
8
    * PDF version (at www.example.com/printpdf/nid)
9
    * Send by-email (at www.example.com/printmail/nid)
10

    
11
where nid is the node id of content to render.
12

    
13
A link is inserted in the each node (configurable in the content type
14
settings), that opens a version of the page with no sidebars, search boxes,
15
navigation pages, etc.
16

    
17
INSTALLATION
18
------------
19

    
20
Follow the instructions in the provided INSTALL.txt file.
21

    
22
CONFIGURATION
23
-------------
24

    
25
- There are several settings that can be configured in the following places:
26

    
27
  Administration > Modules (admin/modules)
28
    Enable or disable the module. (default: disabled)
29

    
30
  Administration > People > Permissions (admin/people/permissions)
31
    Under print module:
32
    access print: Enable access to the PF page and display of the PF link in
33
    other pages. (default: disabled)
34
    administer print: Enable access to the module settings page. (default:
35
    disabled)
36

    
37
  Administration > Structure > Content types (admin/structure/types)
38
    For each content type it is possible to enable or disable the PF link
39
    via the "Show printer-friendly version link" checkbox. (default:
40
    enabled)
41
    It is also possible to enable or disable the PF link in individual
42
    comments via the "Show printer-friendly version link in individual
43
    comments" checkbox. (default: disabled)
44

    
45
  Administration > Configuration > User interface > Printer, email and PDF versions (admin/config/user-interface/print)
46
    This is where all the module-specific configuration options can be set.
47

    
48
- To modify the template of printer friendly pages, simply edit the
49
print.tpl.php or the css/print.css files.
50

    
51
- It is possible to set per-content-type and/or theme-specific templates
52
  which are searched for in the following order: 
53
   1. print--[format]--node--[type].tpl.php in the theme directory
54
   2. print--[format].tpl.php in the theme directory
55
   3. print--node--[type].tpl.php in the theme directory
56
   4. print.tpl.php in the theme directory
57
   5. print.tpl.php in the module directory (supplied by the module)
58

    
59
  format is either html, mail or pdf, and type is Drupal's node type (e.g.
60
  page, story, etc.)
61

    
62
API
63
---
64

    
65
print_insert_link(), print_mail_insert_link(), print_pdf_insert_link()
66

    
67
The *_insert_link functions are available to content developers that prefer
68
to place the printer-friendly link in a custom location. It is advisable to
69
disable the regular Printer-friendly link so that it is not shown in both
70
locations.
71

    
72
Calling the function like this:
73

    
74
  print_insert_link()
75

    
76
will return the HTML for a link pointing to a Printer-friendly version of
77
the current page.
78

    
79
It is also possible to specify the link to the page yourself:
80

    
81
  print_insert_link("print/42")
82

    
83
will return the HTML pointing to the printer-friendly version of node 42.
84

    
85
THEMEABLE FUNCTIONS
86
-------------------
87

    
88
The following themeable functions are defined:
89

    
90
  * theme_print_format_link()
91
  * theme_print_mail_format_link()
92
  * theme_print_pdf_format_link()
93
      Returns an array of formatted attributes for the Printer-friendly
94
      link.
95

    
96
  * print_pdf_dompdf_footer($html)
97
    Format the dompdf footer contents
98

    
99
  * print_pdf_tcpdf_header($pdf, $html, $font)
100
    Format the TCPDF header
101

    
102
  * print_pdf_tcpdf_page($pdf)
103
    Format the TCPDF page settings (margins, etc)
104

    
105
  * print_pdf_tcpdf_content($pdf, $html, $font)
106
    Format the TCPDF page content
107

    
108
  * print_pdf_tcpdf_footer($pdf, $html, $font)
109
    Format the TCPDF footer contents
110

    
111
  * print_pdf_tcpdf_footer2($pdf)
112
    Format the TCPDF footer layout
113

    
114
MORE INFORMATION
115
----------------
116

    
117
For more information, consult the modules' documentation at
118
http://drupal.org/node/190171.
119

    
120
ACKNOWLEDGMENTS
121
---------------
122
The print, pdf and mail icons are copyright Plone Foundation. Thanks for
123
letting me use them!
124