| 1 |
<?php |
<?php |
| 2 |
// $Id: drutex_pdf.inc,v 1.18 2007/04/25 14:46:28 darthsteven Exp $ |
// $Id: drutex_pdf.inc,v 1.18.6.1 2008/11/17 09:05:36 darthsteven Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 106 |
* The node id. |
* The node id. |
| 107 |
*/ |
*/ |
| 108 |
function drutex_node2pdf_wrapper($nid) { |
function drutex_node2pdf_wrapper($nid) { |
| 109 |
|
global $base_url; |
| 110 |
$node = node_load($nid); |
$node = node_load($nid); |
| 111 |
$pdf_dir = drutex_var_get("drutex_dir_images_{$node->format}"); |
$pdf_dir = drutex_var_get("drutex_dir_images_{$node->format}"); |
| 112 |
$pdf_file = $pdf_dir .'/'. $node->nid .'.pdf'; |
$pdf_file = $pdf_dir .'/'. $node->nid .'.pdf'; |
| 113 |
if (!is_file($pdf_file)) { |
if (!is_file($pdf_file)) { |
| 114 |
drutex_node2pdf($nid); |
drutex_node2pdf($nid); |
| 115 |
} |
} |
| 116 |
drupal_goto($pdf_file); |
drupal_goto($base_url .'/'. $pdf_file); |
| 117 |
} |
} |
| 118 |
|
|
| 119 |
/** |
/** |
| 188 |
* The node id. |
* The node id. |
| 189 |
*/ |
*/ |
| 190 |
function drutex_node2latex_wrapper($nid) { |
function drutex_node2latex_wrapper($nid) { |
| 191 |
|
global $base_url; |
| 192 |
$node = node_load($nid); |
$node = node_load($nid); |
| 193 |
$pdf_dir = drutex_var_get("drutex_dir_images_{$node->format}"); |
$pdf_dir = drutex_var_get("drutex_dir_images_{$node->format}"); |
| 194 |
$tex_file = $pdf_dir .'/'. $node->nid .'.tex'; |
$tex_file = $pdf_dir .'/'. $node->nid .'.tex'; |
| 196 |
drutex_node2latex($nid); |
drutex_node2latex($nid); |
| 197 |
} |
} |
| 198 |
|
|
| 199 |
drupal_goto($tex_file); |
drupal_goto($base_url .'/'. $tex_file); |
| 200 |
} |
} |
| 201 |
|
|
| 202 |
/** |
/** |