Improve the output of printed pages to pdf

This commit is contained in:
Manuel Cillero 2017-10-01 20:55:21 +02:00
parent 39729c5f8e
commit 2e20b06d22
3 changed files with 10 additions and 8 deletions

View file

@ -85,6 +85,8 @@ function print_pdf_generate_path($path, $cid = NULL, $pdf_filename = NULL) {
return;
}
$print['body_class'] = 'print-pdf';
// Img elements must be set to absolute
$pattern = '!<(img\s[^>]*?)>!is';
$print['content'] = preg_replace_callback($pattern, '_print_rewrite_urls', $print['content']);