You are here

README.txt in PDF using mPDF 7.2

Same filename and directory in other branches
  1. 7 README.txt
MODULE
------
PDF using mPDF


DESCRIPTION/FEATURES
--------------------
* This module is used Conversion of HTML page to PDF using mPDF PHP Library.
This module allows you to generate the following pdf documents of any node:

  * PDF creation (at www.example.com/node/nid/pdf)

  where nid is the node id of content to render.

 1) Document Properties
 2) PDF Page settings
 3) Watermark Image/Text
 4) HTML Header & Footer
 5) Password Protected PDF
 6) Add custom Style Sheet to PDF
 7) Enable/disable PDF generation for each Content type
 8) Display/ hide any fields of Content type for PDF


REQUIREMENTS
------------
Drupal 7.0


INSTALLATION
------------

pdf_using_mpdf module is dependent on the Libraries module, you need to
have Libraries module enabled prior to using pdf_using_mpdf module.

Decompress the pdf_using_mpdf.tar.gz file into your Drupal modules
directory (usually sites/all/modules) and rename the directory to "mpdf".

Enable the PDF Using mPDF module: Administration > Modules (admin/modules)

Create a directory (if not exists) named 'libraries' in /sites/all/ or 
/sites/your-domain-name/ and download mPDF PHP library in this directory.

You can also download mPDF library in the module directory itself without 
creating any 'libraries' directory.


CONFIGURATION
-------------

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

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

  Administration > People > Permissions (admin/people/permissions)
    Under PDF using mPDF module.
    
  Administration > Configuration > User interface > PDF using mPDF settings
  (admin/config/user-interface/mpdf)
    This is where all the module-specific configuration options can be set.

- To create your own template pages, simply edit the node.tpl.php or
the css/style.css files.

- It is possible to set per-content-type and/or theme-specific templates
  which are searched for in the following order: 
  1. node--[id].tpl.php in the active theme directory.
  2. node--[type].tpl.php in the active theme directory.
  3. node.tpl.php in the active theme directory.


API
---

pdf_using_mpdf_api()

This api function is available to content developers that prefer
to generate a pdf file of custom path. The function takes two 
parameters, first a rendered html content and an optional second 
parameter, name of the pdf file.

Calling the function like this:

  pdf_using_mpdf_api($html)

will return the PDF file for the current html passed to it.

It is also possible to specify the function like this:

  pdf_using_mpdf_api("<html><body>Hello</body></html>", "mypdf")

will return the PDF file with a "Hello" and file named "mypdf.pdf".


PDF TOOL
--------

The pdf_using_mpdf module requires the use of an external PDF generation tool.
The currently supported tools are mPDF. Please note that any errors/bugs in
those tools need to be reported and fixed by their maintainers. DO NOT report
bugs in those tools in the PDF Using mPDF module's issue queue at Drupal.org.

supported paths:
  * libraries directory (sites/all/libraries/)
  * module directory itself (sites/all/modules/pdf_using_mpdf/)


MPDF support:
-------------
  MPDF's support for CSS is considerably worse than the other tools.
  Unicode is supported (use of Unicode fonts result in HUGE files).  Page
  header and footer are supported. This module requires MPDF >= 5.4 .

  1. Download mPDF from http://www.mpdf1.com/mpdf/download.
  2. Extract the contents of the downloaded package into one of the supported
  paths. There is a need to rename mpdf directry to mpdf eg: 'MPDF54' to 'mpdf'
  3. Grant write access to the cache and images directories to your
  webserver user.
  4. Check http://www.mpdf1.com/ for further information.

File

README.txt
View source
  1. MODULE
  2. ------
  3. PDF using mPDF
  4. DESCRIPTION/FEATURES
  5. --------------------
  6. * This module is used Conversion of HTML page to PDF using mPDF PHP Library.
  7. This module allows you to generate the following pdf documents of any node:
  8. * PDF creation (at www.example.com/node/nid/pdf)
  9. where nid is the node id of content to render.
  10. 1) Document Properties
  11. 2) PDF Page settings
  12. 3) Watermark Image/Text
  13. 4) HTML Header & Footer
  14. 5) Password Protected PDF
  15. 6) Add custom Style Sheet to PDF
  16. 7) Enable/disable PDF generation for each Content type
  17. 8) Display/ hide any fields of Content type for PDF
  18. REQUIREMENTS
  19. ------------
  20. Drupal 7.0
  21. INSTALLATION
  22. ------------
  23. pdf_using_mpdf module is dependent on the Libraries module, you need to
  24. have Libraries module enabled prior to using pdf_using_mpdf module.
  25. Decompress the pdf_using_mpdf.tar.gz file into your Drupal modules
  26. directory (usually sites/all/modules) and rename the directory to "mpdf".
  27. Enable the PDF Using mPDF module: Administration > Modules (admin/modules)
  28. Create a directory (if not exists) named 'libraries' in /sites/all/ or
  29. /sites/your-domain-name/ and download mPDF PHP library in this directory.
  30. You can also download mPDF library in the module directory itself without
  31. creating any 'libraries' directory.
  32. CONFIGURATION
  33. -------------
  34. - There are several settings that can be configured in the following places:
  35. Administration > Modules (admin/modules)
  36. Enable or disable the module. (default: disabled)
  37. Administration > People > Permissions (admin/people/permissions)
  38. Under PDF using mPDF module.
  39. Administration > Configuration > User interface > PDF using mPDF settings
  40. (admin/config/user-interface/mpdf)
  41. This is where all the module-specific configuration options can be set.
  42. - To create your own template pages, simply edit the node.tpl.php or
  43. the css/style.css files.
  44. - It is possible to set per-content-type and/or theme-specific templates
  45. which are searched for in the following order:
  46. 1. node--[id].tpl.php in the active theme directory.
  47. 2. node--[type].tpl.php in the active theme directory.
  48. 3. node.tpl.php in the active theme directory.
  49. API
  50. ---
  51. pdf_using_mpdf_api()
  52. This api function is available to content developers that prefer
  53. to generate a pdf file of custom path. The function takes two
  54. parameters, first a rendered html content and an optional second
  55. parameter, name of the pdf file.
  56. Calling the function like this:
  57. pdf_using_mpdf_api($html)
  58. will return the PDF file for the current html passed to it.
  59. It is also possible to specify the function like this:
  60. pdf_using_mpdf_api("Hello", "mypdf")
  61. will return the PDF file with a "Hello" and file named "mypdf.pdf".
  62. PDF TOOL
  63. --------
  64. The pdf_using_mpdf module requires the use of an external PDF generation tool.
  65. The currently supported tools are mPDF. Please note that any errors/bugs in
  66. those tools need to be reported and fixed by their maintainers. DO NOT report
  67. bugs in those tools in the PDF Using mPDF module's issue queue at Drupal.org.
  68. supported paths:
  69. * libraries directory (sites/all/libraries/)
  70. * module directory itself (sites/all/modules/pdf_using_mpdf/)
  71. MPDF support:
  72. -------------
  73. MPDF's support for CSS is considerably worse than the other tools.
  74. Unicode is supported (use of Unicode fonts result in HUGE files). Page
  75. header and footer are supported. This module requires MPDF >= 5.4 .
  76. 1. Download mPDF from http://www.mpdf1.com/mpdf/download.
  77. 2. Extract the contents of the downloaded package into one of the supported
  78. paths. There is a need to rename mpdf directry to mpdf eg: 'MPDF54' to 'mpdf'
  79. 3. Grant write access to the cache and images directories to your
  80. webserver user.
  81. 4. Check http://www.mpdf1.com/ for further information.