Commit ffcfdfa6 authored by jcnventura's avatar jcnventura

Fix warnings in PDF generation.

parent 06f58906
...@@ -90,7 +90,7 @@ function print_pdf_dompdf_requirements($phase) { ...@@ -90,7 +90,7 @@ function print_pdf_dompdf_requirements($phase) {
* Filename of the tool to be analysed. * Filename of the tool to be analysed.
* *
* @return string * @return string
* version number of the tcpdf library * version number of the dompdf library
*/ */
function _print_pdf_dompdf_version($pdf_tool) { function _print_pdf_dompdf_version($pdf_tool) {
require_once(DRUPAL_ROOT . '/' . $pdf_tool); require_once(DRUPAL_ROOT . '/' . $pdf_tool);
......
...@@ -56,7 +56,7 @@ function print_pdf_mpdf_requirements($phase) { ...@@ -56,7 +56,7 @@ function print_pdf_mpdf_requirements($phase) {
* Filename of the tool to be analysed. * Filename of the tool to be analysed.
* *
* @return string * @return string
* version number of the tcpdf library * version number of the mpdf library
*/ */
function _print_pdf_mpdf_version($pdf_tool) { function _print_pdf_mpdf_version($pdf_tool) {
require_once(DRUPAL_ROOT . '/' . $pdf_tool); require_once(DRUPAL_ROOT . '/' . $pdf_tool);
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Generates the PDF version using dompdf * Generates the PDF version using TCPDF
* *
* This file is included by the print_pdf_dompdf module and includes the * This file is included by the print_pdf_tcpdf module and includes the
* functions that interface with the dompdf library * functions that interface with the TCPDF library
* *
* @ingroup print * @ingroup print
*/ */
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
/** /**
* @file * @file
* Generates the PDF version using dompdf * Generates the PDF version using wkhtmltopdf
* *
* This file is included by the print_pdf_dompdf module and includes the * This file is included by the print_pdf_wkhtmltopdf module and includes the
* functions that interface with the dompdf library * functions that interface with the wkhtmltopdf library
* *
* @ingroup print * @ingroup print
*/ */
......
...@@ -112,15 +112,12 @@ function print_pdf_generate_path($path, $cid = NULL, $pdf_filename = NULL) { ...@@ -112,15 +112,12 @@ function print_pdf_generate_path($path, $cid = NULL, $pdf_filename = NULL) {
// And make anchor links relative again, to permit in-PDF navigation // And make anchor links relative again, to permit in-PDF navigation
$html = preg_replace("!${base_url}/" . $link['path'] . '/.*?#!', '#', $html); $html = preg_replace("!${base_url}/" . $link['path'] . '/.*?#!', '#', $html);
$meta = array(); $meta = array(
if (isset($node)) { 'node' => $node,
$meta['node'] = $node; 'url' => url(drupal_get_path_alias(empty($node->nid) ? $node->path : "node/$node->nid"), array('absolute' => TRUE)),
);
// @todo get these if (isset($node->name)) $meta['name'] = $node->name;
if (isset($node->url)) $meta['url'] = $node->url; if (isset($node->title)) $meta['title'] = $node->title;
if (isset($node->name)) $meta['name'] = $node->name;
if (isset($node->title)) $meta['title'] = $node->title;
}
return print_pdf_generate_html($html, $meta, $pdf_filename); return print_pdf_generate_html($html, $meta, $pdf_filename);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment