resolved image export with PDF Export refs #5948

skala
Julio Bonifacio 12 years ago
parent 51a8ac4211
commit a4f05db4b0
  1. 6
      main/inc/lib/pdf.lib.php

@ -213,10 +213,12 @@ if($complete_style === false) { error_log(__FUNCTION__.' with no style'); }
$old_src = $item->getAttribute('src');
if (strpos($old_src, 'http') === false) {
if (strpos($old_src, '/main/default_course_document') === false) {
$old_src_fixed = '';
if (api_get_path(REL_PATH) != '/') {
$old_src = str_replace(api_get_path(REL_PATH), '', $old_src);
$old_src_fixed = str_replace(api_get_path(REL_PATH).'courses/'.$course_data['path'].'/document/', '', $old_src);
} else {
$old_src_fixed = str_replace('courses/'.$course_data['path'].'/document/', '', $old_src);
}
$old_src_fixed = str_replace('courses/'.$course_data['path'].'/document/', '', $old_src);
$new_path = $document_path.$old_src_fixed;
$document_html= str_replace($old_src, $new_path, $document_html);
}

Loading…
Cancel
Save