You are here

README.txt in PDF using mPDF 7

Same filename and directory in other branches
  1. 7.2 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.


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