diff --git a/sites/all/modules/contrib/print/print.module b/sites/all/modules/contrib/print/print.module
index d799a82..cb35a06 100644
--- a/sites/all/modules/contrib/print/print.module
+++ b/sites/all/modules/contrib/print/print.module
@@ -163,6 +163,54 @@ function print_preprocess_print(&$variables) {
     }
   }
 
+  $variables['scripts'] = drupal_get_js();
+  $variables['footer_scripts'] = drupal_get_js('footer');
+  if (variable_get('print_html_sendtoprinter', PRINT_HTML_SENDTOPRINTER_DEFAULT)) {
+    drupal_add_js();
+    $print_html_new_window = variable_get('print_html_new_window', PRINT_HTML_NEW_WINDOW_DEFAULT);
+    $print_html_windowclose = variable_get('print_html_windowclose', PRINT_HTML_WINDOWCLOSE_DEFAULT);
+    $window_close = ($print_html_new_window && $print_html_windowclose) ? 'window.close();' : '';
+
+    $variables['sendtoprinter'] = '<script type="text/javascript">(function ($) { Drupal.behaviors.print = {attach: function(context) {$(window).load(function() {window.print();' . $window_close . '})}}})(jQuery);</script>';
+  }
+  else {
+    $variables['sendtoprinter'] = '';
+  }
+
+  $print_css = variable_get('print_css', PRINT_CSS_DEFAULT);
+  $print_keep_theme_css = variable_get('print_keep_theme_css', PRINT_KEEP_THEME_CSS_DEFAULT);
+  if (!empty($print_css)) {
+    drupal_add_css(strtr($print_css, array('%t' => path_to_theme())));
+  }
+  else {
+    drupal_add_css(drupal_get_path('module', 'print') . '/css/print.css');
+  }
+  $drupal_css = drupal_add_css();
+  if (!$print_keep_theme_css) {
+    foreach ($drupal_css as $key => $css_file) {
+      if ($css_file['group'] == CSS_THEME) {
+      // Unset the theme's CSS
+        unset($drupal_css[$key]);
+      }
+    }
+  }
+
+  // If we are sending a message via email, the CSS must be embedded
+  if (!empty($variables['print']['message'])) {
+    $style = '';
+    $css_files = array_keys($drupal_css);
+    foreach ($css_files as $filename) {
+      $res = file_exists($filename) ? file_get_contents($filename, TRUE) : FALSE;
+      if ($res != FALSE) {
+        $style .= $res;
+      }
+    }
+    $variables['css'] = "<style type='text/css' media='all'>$style</style>\n";
+  }
+  else {
+    $variables['css'] = drupal_get_css($drupal_css);
+  }
+
   $format = $variables['type'];
   $type = (isset($variables['node']->type)) ? $variables['node']->type : '';
   $nid = (isset($variables['node']->nid)) ? $variables['node']->nid : '';
diff --git a/sites/all/modules/contrib/print/print.pages.inc b/sites/all/modules/contrib/print/print.pages.inc
index a7bd734..c7482ca 100644
--- a/sites/all/modules/contrib/print/print.pages.inc
+++ b/sites/all/modules/contrib/print/print.pages.inc
@@ -166,12 +166,9 @@ function _print_var_generator($node, $query = NULL, $message = NULL, $cid = NULL
   $path = empty($node->nid) ? $node->path : "node/$node->nid";
 
   // print module settings
-  $print_css = variable_get('print_css', PRINT_CSS_DEFAULT);
-  $print_keep_theme_css = variable_get('print_keep_theme_css', PRINT_KEEP_THEME_CSS_DEFAULT);
   $print_logo_options = variable_get('print_logo_options', PRINT_LOGO_OPTIONS_DEFAULT);
   $print_logo_url = variable_get('print_logo_url', PRINT_LOGO_URL_DEFAULT);
   $print_html_new_window = variable_get('print_html_new_window', PRINT_HTML_NEW_WINDOW_DEFAULT);
-  $print_html_sendtoprinter = variable_get('print_html_sendtoprinter', PRINT_HTML_SENDTOPRINTER_DEFAULT);
   $print_html_windowclose = variable_get('print_html_windowclose', PRINT_HTML_WINDOWCLOSE_DEFAULT);
   $print_sourceurl_enabled = variable_get('print_sourceurl_enabled', PRINT_SOURCEURL_ENABLED_DEFAULT);
   $print_sourceurl_forcenode = variable_get('print_sourceurl_forcenode', PRINT_SOURCEURL_FORCENODE_DEFAULT);
@@ -182,51 +179,11 @@ function _print_var_generator($node, $query = NULL, $message = NULL, $cid = NULL
   $print['language'] = $language->language;
   $print['title'] = check_plain($node->title);
   $print['head'] = drupal_get_html_head();
-  if ($print_html_sendtoprinter) {
-    drupal_add_js('misc/drupal.js', array('weight' => JS_LIBRARY));
-  }
-  $print['scripts'] = drupal_get_js();
-  $print['footer_scripts'] = drupal_get_js('footer');
   $print['robots_meta'] = _print_robots_meta_generator();
   $print['url'] = url($path, array('absolute' => TRUE, 'query' => $query));
   $print['base_href'] = "<base href='" . $print['url'] . "' />\n";
   $print['favicon'] = theme_get_setting('toggle_favicon') ? "<link rel='shortcut icon' href='" . theme_get_setting('favicon') . "' type='image/x-icon' />\n" : '';
 
-  if (!empty($print_css)) {
-    drupal_add_css(strtr($print_css, array('%t' => path_to_theme())));
-  }
-  else {
-    drupal_add_css(drupal_get_path('module', 'print') . '/css/print.css');
-  }
-  $drupal_css = drupal_add_css();
-  if (!$print_keep_theme_css) {
-    foreach ($drupal_css as $key => $css_file) {
-      if ($css_file['group'] == CSS_THEME) {
-      // Unset the theme's CSS
-        unset($drupal_css[$key]);
-      }
-    }
-  }
-
-  // If we are sending a message via email, the CSS must be embedded
-  if (!empty($message)) {
-    $style = '';
-    $css_files = array_keys($drupal_css);
-    foreach ($css_files as $filename) {
-      $res = file_exists($filename) ? file_get_contents($filename, TRUE) : FALSE;
-      if ($res != FALSE) {
-        $style .= $res;
-      }
-    }
-    $print['css'] = "<style type='text/css' media='all'>$style</style>\n";
-  }
-  else {
-    $print['css'] = drupal_get_css($drupal_css);
-  }
-
-  $window_close = ($print_html_new_window && $print_html_windowclose) ? 'window.close();' : '';
-  $print['sendtoprinter'] = $print_html_sendtoprinter ? '<script type="text/javascript">(function ($) { Drupal.behaviors.print = {attach: function(context) {$(window).load(function() {window.print();' . $window_close . '})}}})(jQuery);</script>' : '';
-
   switch ($print_logo_options) {
     case 0: // none
       $logo_url = 0;
diff --git a/sites/all/modules/contrib/print/print.tpl.php b/sites/all/modules/contrib/print/print.tpl.php
index 18a5025..7562a19 100644
--- a/sites/all/modules/contrib/print/print.tpl.php
+++ b/sites/all/modules/contrib/print/print.tpl.php
@@ -13,11 +13,11 @@
     <?php print $print['head']; ?>
     <?php print $print['base_href']; ?>
     <title><?php print $print['title']; ?></title>
-    <?php print $print['scripts']; ?>
-    <?php print $print['sendtoprinter']; ?>
+    <?php print $scripts; ?>
+    <?php print $sendtoprinter; ?>
     <?php print $print['robots_meta']; ?>
     <?php print $print['favicon']; ?>
-    <?php print $print['css']; ?>
+    <?php print $css; ?>
   </head>
   <body>
     <?php if (!empty($print['message'])) {
@@ -33,6 +33,6 @@
     <hr class="print-hr" />
     <div class="print-source_url"><?php print $print['source_url']; ?></div>
     <div class="print-links"><?php print $print['pfp_links']; ?></div>
-    <?php print $print['footer_scripts']; ?>
+    <?php print $footer_scripts; ?>
   </body>
 </html>
