PDF using MPDF
Configuration setting screen shot

      This module is used for Conversion of HTML pages to PDF documents using mPDF PHP Library. It allows you to generate a pdf document of any node.


  • PDF creation (www.example.com/node/nid/pdf)
    where nid is the node id of content to render.
  • PDF generation API is provided, the content developers can use this API to generate a PDF document.
  • By creating your own CSS file and/or the node.tpl.php template files, it is possible to change the look of the output page to suit your taste. For a more fine-grained customization, it is possible to use a template file named:


  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

Drupal 7: node--[node-type|node-id].tpl.php

located in the your theme directory.

Where node-type & node-id are Drupal's node type (e.g. page, story, etc.) and node-id (eg: 12) respectively.

API Function : 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. E.g: pdf_using_mpdf_api($html) where $html is any html content.

You must install the following third-party tools to generate PDF documents :


Please follow the instructions in the README.txt files carefully.

Developed By : OSSCube
Developers : AbhijeetKalsi, gauravjeet_singh, sudanshu.singh, Bhupendra Singh, Yash Sharma

Project Information