Commit d6839b14 authored by Karl Yoder's avatar Karl Yoder Committed by Devin Zuczek
Browse files

Issue #3300032 by kyoder: Not possible to style images

parent 821ae840
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -182,11 +182,12 @@ function certificate_single($account, $node) {
 */
function certificate_preview($cid) {
  global $user;
  global $base_url;
  $template = entity_load_single('certificate', $cid);
  if ($template) {
    $page = theme('certificate_certificate', array('node' => NULL, 'account' => $user, 'template' => $template));
    $css = drupal_get_css();
    $output = "<html><head><meta charset=\"utf-8\"/>$css</head><body>$page</body></html>";
    $output = "<html><head><base href=\"$base_url\"/><meta charset=\"utf-8\"/>$css</head><body>$page</body></html>";
  }

  $print_pdf_pdf_tool = variable_get('print_pdf_pdf_tool', '');
@@ -240,10 +241,6 @@ function certificate_print_pdf_wrapper($filename, $html, $orientation) {
  module_load_include('pages.inc', 'print_pdf', 'print_pdf');
  module_load_include('inc', 'print', 'includes/print');

  // Rewrite image URLs using Print.
  $pattern = '!<(img\s[^>]*?)>!is';
  $html = preg_replace_callback($pattern, '_print_rewrite_urls', $html);

  if (function_exists('_print_scan_libs')) {
    // Print 2.x
    $meta = array(