=== modified file 'sites/all/modules/print/INSTALL.txt'
--- sites/all/modules/print/INSTALL.txt	2010-08-11 18:28:27 +0000
+++ sites/all/modules/print/INSTALL.txt	2010-08-11 18:35:39 +0000
@@ -12,11 +12,21 @@
 --------
 
 The print_pdf module requires the use of an external PDF generation tool.
-The currently supported tools are dompdf and TCPDF. Please note that any
-errors/bugs in those tools need to be reported and fixed by their
+The currently supported tools are dompdf, TCPDF and wkhtmltopdf. 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 print module's issue
 queue at Drupal.org.
 
+The tool needs to be downloaded separately, and placed into a designated
+'libraries' directory. This directory can be:
+- if the 'Libraries API' (http://drupal.org/project/libraries) is enabled:
+  the Drupal libraries directory (usually sites/all/libraries).
+  Inside that libraries directory, the directory containing the actual files
+  must be the name without any version numbers, i.e. 'dompdf', 'tcpdf' or
+  'wkhtmltopdf', respectively.
+- otherwise: the print module lib directory (usually
+  sites/all/modules/print/lib).
+
 dompdf support:
   The dompdf tool produces results that are more faithful to the HTML
   printer-friendly page. Unicode is not supported (only ISO-8859-1).
@@ -24,12 +34,12 @@
   from its incomplete implementation.
 
   1. Download dompdf from http://code.google.com/p/dompdf/downloads/list
-  2. Extract the contents of the downloaded package into the print module
-  lib directory (usually sites/all/modules/print/lib)
+  2. Extract the contents of the downloaded package into the designated
+  'libraries' directory (see above).
   3. Check if dompdf_config.inc.php fits your installation. In 99% of cases,
   no changes are necessary, so just try to use it and only edit anything if
   the PDF generation fails.
-  4. Grant write access to the lib/fonts directory to your webserver user.
+  4. Grant write access to the dompdf/lib/fonts directory to your php user.
   5. If you're using dompdf-0.5.1, delete the dompdf.php file as it contains
   a security vulnerability
   6. If you're using dompdf-0.6 or later, you can try to enable the Unicode
@@ -45,10 +55,9 @@
   requires TCPDF >= 4.0.000.
 
   1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
-  2. Extract the contents of the downloaded package into the print module
-  lib directory (usually sites/all/modules/print/lib). There is no need to
-  modify the config/tcpdf_config.php file, as the module self-configures
-  TCPDF.
+  2. Extract the contents of the downloaded package into the desitnated
+  'libraries' directory (see above). There is no need to modify the
+  config/tcpdf_config.php file, as the module self-configures TCPDF.
   3. Check http://tcpdf.sourceforge.net/ for further information.
 
 wkhtmltopdf support:
@@ -57,9 +66,10 @@
   http://code.google.com/p/wkhtmltopdf/downloads/list. You can choose to
   download the source and compile it or simply download the static binary,
   which doesn't require you to complile anything.
-  2. Place the wkhtmltopdf executable into the print module lib directory
-  (usually sites/all/modules/print/lib). You can also place a symbolic link
-  to the executable.
+  2. Place the wkhtmltopdf executable into the designated 'libraries'
+  directory. If you use site/all/libraries, please note you need to create an
+  extra subdirectory site/all/libraries/wkhtmltopdf/ and place the executable
+  inside. You can also place a symbolic link to the executable.
   3. Check http://code.google.com/p/wkhtmltopdf/ for further information.
 
 UPDATE

=== modified file 'sites/all/modules/print/print_pdf/print_pdf.admin.inc'
--- sites/all/modules/print/print_pdf/print_pdf.admin.inc	2010-08-11 18:28:27 +0000
+++ sites/all/modules/print/print_pdf/print_pdf.admin.inc	2010-08-11 18:37:49 +0000
@@ -273,6 +273,12 @@
   $tools = array_merge($tools, array_keys(file_scan_directory(PRINT_PDF_LIB_PATH, '^dompdf_config.inc.php$')));
   $tools = array_merge($tools, array_keys(file_scan_directory(PRINT_PDF_LIB_PATH, '^tcpdf.php$')));
   $tools = array_merge($tools, array_keys(file_scan_directory(PRINT_PDF_LIB_PATH, '^wkhtmltopdf')));
+  if (module_exists('libraries')) {
+    $tools = array_merge($tools, array_keys(file_scan_directory(libraries_get_path('dompdf'), '^dompdf_config.inc.php$')));
+    $tools = array_merge($tools, array_keys(file_scan_directory(libraries_get_path('tcpdf'), '^tcpdf.php$')));
+    $tools = array_merge($tools, array_keys(file_scan_directory(libraries_get_path('wkhtmltopdf'), '^wkhtmltopdf')));
+  }
+
 
   $num_tools = count($tools);
 

