diff --git a/composer.json b/composer.json index 46bb95c014..a981e970ec 100755 --- a/composer.json +++ b/composer.json @@ -36,7 +36,8 @@ "zendframework/zend-config": "2.3.3", "ezyang/htmlpurifier": "4.6.0", "szymach/c-pchart": "1.*", - "aferrandini/phpqrcode": "1.0.1" + "aferrandini/phpqrcode": "1.0.1", + "mpdf/mpdf": "5.7.4" }, "extra": { "branch-alias": { diff --git a/composer.lock b/composer.lock index 731703604a..98894150b8 100755 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "14f25295cfdba7534deecf11519b2d22", + "hash": "6278d7d871b000bcfc52ed6726bc22e5", "packages": [ { "name": "aferrandini/phpqrcode", @@ -422,6 +422,49 @@ ], "time": "2014-12-29 21:29:35" }, + { + "name": "mpdf/mpdf", + "version": "v5.7.4", + "source": { + "type": "git", + "url": "https://github.com/finwe/mpdf.git", + "reference": "f9a374c7ea975ce8c795cec4dfd17ef55addac9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/finwe/mpdf/zipball/f9a374c7ea975ce8c795cec4dfd17ef55addac9c", + "reference": "f9a374c7ea975ce8c795cec4dfd17ef55addac9c", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=4.3.10" + }, + "type": "library", + "autoload": { + "classmap": [ + "mpdf.php", + "classes" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-1.0+" + ], + "authors": [ + { + "name": "Ian Back" + } + ], + "description": "A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support", + "homepage": "http://www.mpdf1.com/mpdf/index.php", + "keywords": [ + "pdf", + "php", + "utf-8" + ], + "time": "2014-12-14 18:32:11" + }, { "name": "neutron/temporary-filesystem", "version": "2.1.1", @@ -569,6 +612,33 @@ ], "time": "2012-12-21 11:40:51" }, + { + "name": "ros/ezpdf", + "version": "0.12.0-RC17", + "source": { + "type": "git", + "url": "https://github.com/didaxRedux/php-ezPDF.git", + "reference": "62e09bc84985e848645c6ae359cc8be4275cfd32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/didaxRedux/php-ezPDF/zipball/62e09bc84985e848645c6ae359cc8be4275cfd32", + "reference": "62e09bc84985e848645c6ae359cc8be4275cfd32", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Porting of the well-known R&OS PDF class.", + "time": "2014-09-30 15:15:44" + }, { "name": "sabre/vobject", "version": "3.3.5", @@ -1166,7 +1236,8 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "php-ffmpeg/php-ffmpeg": 20 + "php-ffmpeg/php-ffmpeg": 20, + "ros/ezpdf": 5 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/main/attendance/index.php b/main/attendance/index.php index f46c439d17..76bfec0087 100755 --- a/main/attendance/index.php +++ b/main/attendance/index.php @@ -24,7 +24,7 @@ require_once '../inc/global.inc.php'; require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php'; require_once api_get_path(LIBRARY_PATH).'attendance.lib.php'; require_once api_get_path(LIBRARY_PATH).'app_view.php'; -require_once api_get_path(LIBRARY_PATH).'ezpdf/class.ezpdf.php'; + require_once 'attendance_controller.php'; require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/fe/exportgradebook.php'; require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php'; diff --git a/main/gradebook/gradebook.php b/main/gradebook/gradebook.php index 483ddae455..add69a43be 100755 --- a/main/gradebook/gradebook.php +++ b/main/gradebook/gradebook.php @@ -30,8 +30,7 @@ require_once 'lib/gradebook_data_generator.class.php'; require_once 'lib/fe/gradebooktable.class.php'; require_once 'lib/fe/displaygradebook.php'; require_once 'lib/fe/userform.class.php'; -require_once api_get_path(LIBRARY_PATH).'document.lib.php'; -require_once api_get_path(LIBRARY_PATH).'ezpdf/class.ezpdf.php'; + $htmlHeadXtra[] = ' - - -

WARNING: This utility will OVERWRITE mpdf.php file in the current directory.

-

Select the functions you wish to INCLUDE in your mpdf.php program. When you click generate, a new mpdf.php file will be written to the current directory.

-
Notes - -
- Select/Unselect All

- -
-'; -foreach($excl AS $k=>$ex) { - echo ' '.$ex.'
'; -} - -echo '
- -
- -'; -exit; -} - -$inc = $_POST['inc']; -if (is_array($inc) && count($inc)>0 ) { - foreach($inc AS $i=>$v) { - $key = array_search($i, $excl); - unset($excl[$key]); - } -} - -set_magic_quotes_runtime(0); - -$l = file('mpdf_source.php'); -if (!count($l)) { die("ERROR - Could not find mpdf_source.php file in current directory"); } -$exclflags = array(); -$x = ''; -foreach($l AS $k=>$ln) { - $exclude = false; - // *XXXXX* - preg_match_all("/\/\/ \*([A-Za-z\-]+)\*/", $ln, $m); - foreach($m[1] AS $mm) { - if (in_array($mm, $excl)) { - $exclude = true; - } - } - /*-- XXXXX --*/ - preg_match_all("/\/\*-- ([A-Za-z\-]+) --\*\//", $ln, $m); - foreach($m[1] AS $mm) { - if (in_array($mm, $excl)) { - $exclflags[$mm] = true; - } - $exclude = true; - } - $exclflags = array_unique($exclflags); - /*-- END XXXX --*/ - preg_match_all("/\/\*-- END ([A-Za-z\-]+) --\*\//", $ln, $m); - foreach($m[1] AS $mm) { - if (in_array($mm, $excl)) { - unset($exclflags[$mm]); - } - $exclude = true; - } - if (count($exclflags)==0 && !$exclude) { - $x .= $ln; - } -} - -$check = file_put_contents('mpdf.php', $x); -if (!$check) { die("ERROR - Could not write to mpdf.php file. Are permissions correctly set?"); } -echo '

mPDF file generated successfully!

'; -echo '
mPDF file size '.number_format((strlen($x)/1024)).' kB
'; - -unset($l); -unset($x); - -include('mpdf.php'); -$mpdf = new mPDF(); - -echo '
Memory usage on loading mPDF class '.number_format((memory_get_usage(true)/(1024*1024)),2).' MB
'; - -exit; - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/config.php b/main/inc/lib/mpdf/config.php deleted file mode 100755 index baa4e70a5c..0000000000 --- a/main/inc/lib/mpdf/config.php +++ /dev/null @@ -1,472 +0,0 @@ -mirrorMargins = 0; // alias = $useOddEven -$this->restoreBlockPagebreaks = false; -$this->forcePortraitMargins = false; -$this->displayDefaultOrientation = false; - - -// PAGE NUMBERING -// Page numbering - Conditional Text -$this->pagenumPrefix; -$this->pagenumSuffix; -$this->nbpgPrefix; -$this->nbpgSuffix; - - -// FONTS LANGUAGES & CHARACTER SETS -// Allows automatic character set conversion if "charset=xxx" detected in html header (WriteHTML() ) -$this->allow_charset_conversion = true; -$this->biDirectional=false; // automatically determine BIDI text in LTR page -// If using a CJK codepage with only CJK/ASCII or embedded characters, this will prevent loading of Unicode fonts - makes smaller files -$this->use_CJK_only = false; -$this->autoFontGroupSize = 2; // 1: individual words are spanned; 2: words+; 3: as big chunks as possible. -$this->useLang = true; // Default changed in mPDF 4.0 -$this->disableMultilingualJustify = true; // Disables If more than one language on a line using different text-justification - // e.g. Chinese (character) and RTL (word) -$this->useSubstitutionsMB = false; // mPDF 4.2 Substitute missing characters in UTF-8(multibyte) documents - from core fonts -$this->falseBoldWeight = 5; // mPDF 4.2 Weight for bold text when using an artificial (outline) bold; value 0 (off) - 10 (rec. max) - - -// CONFIGURATION -// This will force all fonts to be substituted with Arial(Helvetica) Times or Courier when using codepage win-1252 - makes smaller files -$this->useOnlyCoreFonts = false; // alias = $use_embeddedfonts_1252 -$this->allow_output_buffering = false; - -$this->enableImports = false; // mPDF 4.2.006 Adding mPDFI - -$this->collapseBlockMargins = true; // mPDF 4.2 Allows top and bottom margins to collapse between block elements -$this->progressBar = 0; // mPDF 4.2 Shows progress-bars whilst generating file 0 off, 1 simple, 2 advanced - -$this->dpi = 96; // mPDF 4.4.003 To interpret "px" pixel values in HTML/CSS (see img_dpi below) - -// Automatically correct for tags where HTML specifies optional end tags e.g. P,LI,DD,TD -// If you are confident input html is valid XHTML, turning this off may make it more reliable(?) -$this->allow_html_optional_endtags = true; -$this->ignore_invalid_utf8 = false; -$this->text_input_as_HTML = false; // Converts all entities in Text inputs to UTF-8 before encoding -$this->useGraphs = false; - -// PDFA1-b Compliant files -$this->PDFA = false; // mPDF 4.2.018 true=Forces compliance with PDFA-1b spec -$this->PDFAauto = false; // mPDF 4.2.018 Overrides warnings making changes when possible to force PDFA1-b compliance - -$this->ICCProfile = ''; // mPDF 4.2.018 Colour profile OutputIntent for defaultRGB colorSpace - // sRGB_IEC61966-2-1 (=default if blank and PDFA), or other added .icc profile - - -// mPDF 4.2 - When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space -// by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out -// the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be. -// FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer. -$this->incrementFPR1 = 10; // i.e. will alter by 1/[10]th of width and try again until within closer limits -$this->incrementFPR2 = 20; -$this->incrementFPR3 = 30; -$this->incrementFPR4 = 50; // i.e. will alter by 1/[50]th of width and try again when it nearly fits - - -// DEBUGGING & DEVELOPERS -$this->showStats = false; -$this->debug = false; -$this->showImageErrors = false; // false/true; -$this->table_error_report = false; // Die and report error if table is too wide to contain whole words -$this->table_error_report_param = ''; // Parameter which can be passed to show in error report i.e. chapter number being processed// - - -// ANNOTATIONS -$this->title2annots = false; -$this->annotSize = 0.5; // default mm for Adobe annotations - nominal -$this->annotMargin; // default position for Annotations -$this->annotOpacity = 0.5; // default opacity for Annotations - -// BOOKMARKS -$this->anchor2Bookmark = 0; // makes into a bookmark as well as internal link target; 1 = just name; 2 = name (p.34) - -// CSS & STYLES -$this->CSSselectMedia='print'; // mPDF 4.3.001 screen, print, or any other CSS @media type (not "all") -// $this->disablePrintCSS depracated // mPDF 4.3.001 -$this->rtlCSS = 2; // RTL: 0 overrides defaultCSS; 1 overrides stylesheets; 2 overrides inline styles - TEXT-ALIGN left => right etc. - // when directionality is set to rtl - - -// PAGE HEADERS & FOOTERS -$this->forcePortraitHeaders = false; -// Values used if simple FOOTER/HEADER given i.e. not array -$this->defaultheaderfontsize = 8; // pt -$this->defaultheaderfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI' -$this->defaultheaderline = 1; // 1 or 0 - line under the header -$this->defaultfooterfontsize = 8; // pt -$this->defaultfooterfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI' -$this->defaultfooterline = 1; // 1 or 0 - line over the footer -$this->header_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize -$this->footer_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize -// If 'pad' margin-top sets fixed distance in mm (padding) between bottom of header and top of text. -// If 'stretch' margin-top sets a minimum distance in mm between top of page and top of text, which expands if header is too large to fit. -$this->setAutoTopMargin = false; -$this->setAutoBottomMargin = false; -$this->autoMarginPadding = 2; // distance in mm used as padding if 'stretch' mode is used - - - -// TABLES -$this->simpleTables = false; // mPDF 4.2.017 Forces all cells to have same border, background etc. Improves performance -$this->packTableData = false; // mPDF 4.3.009 Reduce memory usage processing tables (but with increased processing time) -$this->ignore_table_percents = false; -$this->ignore_table_widths = false; -$this->keep_table_proportions = false; // If table width set > page width, force resizing but keep relative sizes - // Also forces respect of cell widths set by % -$this->shrink_tables_to_fit = 1.4; // automatically reduce fontsize in table if words would have to split ( not in CJK) - // 0 or false to disable; value (if set) gives maximum factor to reduce fontsize - -$this->tableMinSizePriority = false; // mPDF 4.5.006 If page-break-inside:avoid but cannot fit on full page without - // exceeding autosize; setting this value to true will force respsect for - // autosize, and disable the page-break-inside:avoid - -$this->use_kwt = false; - -// IMAGES -$this->img_dpi = 96; // Default dpi to output images if size not defined - // See also above "dpi" - - -// TEXT SPACING & JUSTIFICATION -$this->justifyB4br = false; // mPDF 4.3.003 In justified text,
does not cause the preceding text to be justified in browsers - // Change to true to force justification (as in MS Word) - -$this->tabSpaces = 8; // Number of spaces to replace for a TAB in
 sections
-				// Notepad uses 6, HTML specification recommends 8
-$this->jSWord = 0.4;	// Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
-$this->jSmaxChar = 2;	// Maximum spacing to allocate to character spacing. (0 = no maximum)
-
-$this->jSmaxCharLast = 1;	// Maximum character spacing allowed (carried over) when finishing a last line
-$this->jSmaxWordLast = 2;	// Maximum word spacing allowed (carried over) when finishing a last line
-$this->orphansAllowed = 5;		// No of SUP or SUB characters to include on line to avoid leaving e.g. end of line//32
-$this->normalLineheight = 1.33;	// mPDF 4.2 - Value used for line-height when CSS specified as 'normal' (default)
-
-
-// HYPHENATION
-$this->hyphenate = false;
-$this->hyphenateTables = false;
-$this->SHYlang = "en"; // Should be one of: 'en','de','es','fi','fr','it','nl','pl','ru','sv'
-$this->SHYleftmin = 2;
-$this->SHYrightmin = 2;
-$this->SHYcharmin = 2;
-$this->SHYcharmax = 10;
-
-// COLUMNS
-$this->keepColumns = false;	// Set to go to the second column only when the first is full of text etc.
-$this->max_colH_correction = 1.15;	// Maximum ratio to adjust column height when justifying - too large a value can give ugly results
-$this->ColGap=5;
-
-
-// LISTS
-$this->list_align_style = 'R';	// Determines alignment of numbers in numbered lists
-$this->list_indent_first_level = 0;	// 1/0 yex/no to indent first level of list
-$this->list_number_suffix = '.';	// Content to follow a numbered list marker e.g. '.' gives 1. or IV.; ')' gives 1) or a)
-
-
-// WATERMARKS
-$this->watermarkImgBehind = false;	// mPDF 4.3.018
-$this->showWatermarkText = 0;	// alias = $TopicIsUnvalidated
-$this->showWatermarkImage = 0;
-$this->watermarkText = '';	// alias = $UnvalidatedText
-$this->watermarkImage = '';
-$this->watermark_font = '';
-$this->watermarkTextAlpha = 0.2;
-$this->watermarkImageAlpha = 0.2;
-$this->watermarkImgAlphaBlend = 'Normal';	// mPDF 4.4.002
-	// Accepts any PDF spec. value: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn,
-	// HardLight, SoftLight, Difference, Exclusion
-	// "Multiply" works well for watermark image on top
-
-// BORDERS
-$this->autoPadding = false; // Automatically increases padding in block elements with border-radius set - if required
-
-// FORMS
-$this->textarea_lineheight = 1.25;
-
-// NOT USED???
-$this->formBgColor = 'white';
-$this->formBgColorSmall = '#DDDDFF';	// Color used for background of form fields if reduced in size (so border disappears)
-
-
-//////////////////////////////////////////////
-
-// Default values if no style sheet offered	(cf. http://www.w3.org/TR/CSS21/sample.html)
-$this->defaultCSS = array(
-	'BODY' => array(
-		'FONT-FAMILY' => 'serif',
-		'FONT-SIZE' => '11pt',
-		'TEXT-ALIGN' => 'left',
-		'TEXT-INDENT' => '0pt',	/* Moved from mPDF 4.0 */
-		'LINE-HEIGHT' => 'normal', /* mPDF 4.2 changed from 1.33 */
-		'MARGIN-COLLAPSE' => 'collapse', /* Custom property to collapse top/bottom margins at top/bottom of page - ignored in tables/lists */
-	),
-	'P' => array(
-	/*	'TEXT-ALIGN' => 'left',	Removed mPDF 4.0 */
-		'MARGIN' => '1.12em 0',
-	),
-	'H1' => array(
-		'FONT-SIZE' => '2em',
-		'FONT-WEIGHT' => 'bold',
-		'MARGIN' => '0.67em 0',
-		'PAGE-BREAK-AFTER' => 'avoid',
-	),
-	'H2' => array(
-		'FONT-SIZE' => '1.5em',
-		'FONT-WEIGHT' => 'bold',
-		'MARGIN' => '0.75em 0',
-		'PAGE-BREAK-AFTER' => 'avoid',
-	),
-	'H3' => array(
-		'FONT-SIZE' => '1.17em',
-		'FONT-WEIGHT' => 'bold',
-		'MARGIN' => '0.83em 0',
-		'PAGE-BREAK-AFTER' => 'avoid',
-	),
-	'H4' => array(
-		'FONT-WEIGHT' => 'bold',
-		'MARGIN' => '1.12em 0',
-		'PAGE-BREAK-AFTER' => 'avoid',
-	),
-	'H5' => array(
-		'FONT-SIZE' => '0.83em',
-		'FONT-WEIGHT' => 'bold',
-		'MARGIN' => '1.5em 0',
-		'PAGE-BREAK-AFTER' => 'avoid',
-	),
-	'H6' => array(
-		'FONT-SIZE' => '0.75em',
-		'FONT-WEIGHT' => 'bold',
-		'MARGIN' => '1.67em 0',
-		'PAGE-BREAK-AFTER' => 'avoid',
-	),
-	'HR' => array(
-		'COLOR' => '#888888',
-		'TEXT-ALIGN' => 'center',
-		'WIDTH' => '100%',
-		'HEIGHT' => '0.2mm',
-		'MARGIN-TOP' => '0.83em',
-		'MARGIN-BOTTOM' => '0.83em',
-	),
-	'PRE' => array(
-		'MARGIN' => '0.83em 0',
-		'FONT-FAMILY' => 'monospace',
-	),
-	'S' => array(
-		'TEXT-DECORATION' => 'line-through',
-	),
-	'STRIKE' => array(
-		'TEXT-DECORATION' => 'line-through',
-	),
-	'DEL' => array(
-		'TEXT-DECORATION' => 'line-through',
-	),
-	'SUB' => array(
-		'VERTICAL-ALIGN' => 'sub',
-		'FONT-SIZE' => '55%',	/* Recommended 0.83em */
-	),
-	'SUP' => array(
-		'VERTICAL-ALIGN' => 'super',
-		'FONT-SIZE' => '55%',	/* Recommended 0.83em */
-	),
-	'U' => array(
-		'TEXT-DECORATION' => 'underline',
-	),
-	'INS' => array(
-		'TEXT-DECORATION' => 'underline',
-	),
-	'B' => array(
-		'FONT-WEIGHT' => 'bold',
-	),
-	'STRONG' => array(
-		'FONT-WEIGHT' => 'bold',
-	),
-	'I' => array(
-		'FONT-STYLE' => 'italic',
-	),
-	'CITE' => array(
-		'FONT-STYLE' => 'italic',
-	),
-	'Q' => array(
-		'FONT-STYLE' => 'italic',
-	),
-	'EM' => array(
-		'FONT-STYLE' => 'italic',
-	),
-	'VAR' => array(
-		'FONT-STYLE' => 'italic',
-	),
-	'SAMP' => array(
-		'FONT-FAMILY' => 'monospace',
-	),
-	'CODE' => array(
-		'FONT-FAMILY' => 'monospace',
-	),
-	'KBD' => array(
-		'FONT-FAMILY' => 'monospace',
-	),
-	'TT' => array(
-		'FONT-FAMILY' => 'monospace',
-	),
-	'SMALL' => array(
-		'FONT-SIZE' => '83%',
-	),
-	'BIG' => array(
-		'FONT-SIZE' => '117%',
-	),
-	'ACRONYM' => array(
-		'FONT-SIZE' => '77%',
-		'FONT-WEIGHT' => 'bold',
-	),
-	'ADDRESS' => array(
-		'FONT-STYLE' => 'italic',
-	),
-	'BLOCKQUOTE' => array(
-		'MARGIN-LEFT' => '40px',
-		'MARGIN-RIGHT' => '40px',
-		'MARGIN-TOP' => '1.12em',
-		'MARGIN-BOTTOM' => '1.12em',
-	),
-	'A' => array(
-		'COLOR' => '#0000FF',
-		'TEXT-DECORATION' => 'underline',
-	),
-	'UL' => array(
-		'MARGIN' => '0.83em 0',		/* only applied to top-level of nested lists */
-		'TEXT-INDENT' => '1.3em',	/* Custom effect - list indent */
-	),
-	'OL' => array(
-		'MARGIN' => '0.83em 0',		/* only applied to top-level of nested lists */
-		'TEXT-INDENT' => '1.3em',	/* Custom effect - list indent */
-	),
-	'DL' => array(
-		'MARGIN' => '1.67em 0',
-	),
-	'DT' => array(
-	),
-	'DD' => array(
-		'PADDING-LEFT' => '40px',
-	),
-	'TABLE' => array(
-		'MARGIN' => '0',			/* mPDF 4.2 changed */
-		'BORDER-COLLAPSE' => 'separate',
-		'BORDER-SPACING' => '2px',
-		'EMPTY-CELLS' => 'show',
-		'TEXT-ALIGN' => 'left',
-		'LINE-HEIGHT' => '1.2',
-		'VERTICAL-ALIGN' => 'middle',
-	),
-	'THEAD' => array(
-	),
-	'TFOOT' => array(
-	),
-	'TH' => array(
-		'FONT-WEIGHT' => 'bold',
-		'TEXT-ALIGN' => 'center',
-		'PADDING-LEFT' => '0.1em',
-		'PADDING-RIGHT' => '0.1em',
-		'PADDING-TOP' => '0.1em',
-		'PADDING-BOTTOM' => '0.1em',
-	),
-	'TD' => array(
-		'PADDING-LEFT' => '0.1em',
-		'PADDING-RIGHT' => '0.1em',
-		'PADDING-TOP' => '0.1em',
-		'PADDING-BOTTOM' => '0.1em',
-	),
-	'IMG' => array(
-		'MARGIN' => '0',			/* mPDF 4.2 changed */
-		'VERTICAL-ALIGN' => 'baseline', /* mPDF 4.2 changed */
-	),
-	'INPUT' => array(
-		'FONT-FAMILY' => 'sans-serif',
-		'VERTICAL-ALIGN' => 'middle',
-		'FONT-SIZE' => '0.9em',
-	),
-	'SELECT' => array(
-		'FONT-FAMILY' => 'sans-serif',
-		'FONT-SIZE' => '0.9em',
-		'VERTICAL-ALIGN' => 'middle',
-	),
-	'TEXTAREA' => array(
-		'FONT-FAMILY' => 'monospace',
-		'FONT-SIZE' => '0.9em',
-		'VERTICAL-ALIGN' => 'text-bottom', /* mPDF 4.2 changed */
-	),
-);
-
-
-//////////////////////////////////////////////////
-// VALUES ONLY LIKELY TO BE CHANGED BY DEVELOPERS
-//////////////////////////////////////////////////
-$this->pdf_version = '1.4';	// mPDF 4.2.018  Previously set as 1.5
-
-// Hyphenation
-$this->SHYlanguages = array('en','de','es','fi','fr','it','nl','pl','ru','sv');	// existing defined patterns
-
-$this->default_lineheight_correction=1.2;	// Value 1 sets lineheight=fontsize height;
-							// Value used if line-height not set by CSS (usuallly is)
-
-$this->fontsizes = array('XX-SMALL'=>0.7, 'X-SMALL'=>0.77, 'SMALL'=>0.86, 'MEDIUM'=>1, 'LARGE'=>1.2, 'X-LARGE'=>1.5, 'XX-LARGE'=>2);
-
-// CHARACTER PATTERN MATCHES TO DETECT LANGUAGES
-// pattern used to detect RTL characters -> force RTL
-$this->pregRTLchars = "\x{0590}-\x{06FF}\x{0750}-\x{077F}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}";
-
-	// CJK Chars which require changing and are distinctive of specific charset
-	$this->pregUHCchars = "\x{3130}-\x{318F}\x{AC00}-\x{D7AF}";
-	$this->pregSJISchars = "\x{3040}-\x{309F}\x{30A0}-\x{30FF}\x{3190}-\x{319F}\x{31F0}-\x{31FF}";
-	// Chars which distinguish CJK but not between different 	// mPDF 3.0 widen Plane 3
-	$this->pregCJKchars = "\x{2E80}-\x{A4CF}\x{A800}-\x{D7AF}\x{F900}-\x{FAFF}\x{FF00}-\x{FFEF}\x{20000}-\x{2FA1F}";
-	// ASCII Chars which shouldn't break string
-	// Use for very specific words
-	$this->pregASCIIchars1 = "\x{0021}-\x{002E}\x{0030}-\x{003B}?";	// no [SPACE]
-	// Use for words+
-	$this->pregASCIIchars2 = "\x{0020}-\x{002E}\x{0030}-\x{003B}?";	// [SPACE] punctuation and 0-9
-	// Use for chunks > words
-	$this->pregASCIIchars3 = "\x{0000}-\x{002E}\x{0030}-\x{003B}\x{003F}-\x{007E}";	// all except <>
-	// Vietnamese - specific
-	$this->pregVIETchars = "\x{01A0}\x{01A1}\x{01AF}\x{01B0}\x{1EA0}-\x{1EF1}";
-	// Vietnamese -  Chars which shouldn't break string
-	$this->pregVIETPluschars = "\x{0000}-\x{003B}\x{003F}-\x{00FF}\x{0300}-\x{036F}\x{0102}\x{0103}\x{0110}\x{0111}\x{0128}\x{0129}\x{0168}\x{0169}\x{1EF1}-\x{1EF9}";	// omits < >
-
-	// Arabic
-	$this->pregARABICchars = "\x{0600}-\x{06FF}\x{0750}-\x{077F}\x{FB50}-\x{FDFD}\x{FE70}-\x{FEFF}";
-	// Characters of Urdu, Pashto, Sindhi (but NOT arabic or persian/farsi) [not covered by DejavuSans font]
-	$this->pregNonARABICchars = "\x{0671}-\x{067D}\x{067F}-\x{0685}\x{0687}-\x{0697}\x{0699}-\x{06A8}\x{06AA}-\x{06AE}\x{06B0}-\x{06CB}\x{06CD}-\x{06D3}";
-
-	$this->pregHEBchars = "\x{0590}-\x{05FF}\x{FB00}-\x{FB49}";	// Hebrew
-
-	// INDIC
-	$this->pregHIchars = "\x{0900}-\x{0963}\x{0966}-\x{097F}";	// Devanagari (Hindi) minus the common indic punctuation 0964,0965
-	$this->pregBNchars = "\x{0980}-\x{09FF}";	// Bengali
-	$this->pregPAchars = "\x{0A00}-\x{0A7F}";	// Gurmukhi (Punjabi)
-	$this->pregGUchars = "\x{0A80}-\x{0AFF}";	// Gujarati
-	$this->pregORchars = "\x{0B00}-\x{0B7F}";	// Oriya
-	$this->pregTAchars = "\x{0B80}-\x{0BFF}";	// Tamil
-	$this->pregTEchars = "\x{0C00}-\x{0C7F}";	// Telugu
-	$this->pregKNchars = "\x{0C80}-\x{0CFF}";	// Kannada
-	$this->pregMLchars = "\x{0D00}-\x{0D7F}";	// Malayalam
-	$this->pregSHchars = "\x{0D80}-\x{0DFF}";	// Sinhala
-
-	$this->pregINDextra = "\x{200B}-\x{200D}\x{0964}\x{0965}\x{0020}-\x{0022}\x{0024}-\x{002E}\x{003A}-\x{003F}\x{005B}-\x{0060}\x{007B}-\x{007E}-\x{00A0}";
-	// 200B-D=Zero-width joiners; 0964,0965=Generic Indic punctuation; NBSP & general punctuation (excludes # and / so can use in autoFont() )
-
-$this->allowedCSStags = 'DIV|P|H1|H2|H3|H4|H5|H6|FORM|IMG|A|BODY|TABLE|HR|THEAD|TFOOT|TBODY|TH|TR|TD|UL|OL|LI|PRE|BLOCKQUOTE|ADDRESS|DL|DT|DD';
-
-// mPDF 4.0
-$this->allowedCSStags .= '|SPAN|TT|I|B|BIG|SMALL|EM|STRONG|DFN|CODE|SAMP|KBD|VAR|CITE|ABBR|ACRONYM|STRIKE|S|U|DEL|INS|Q|FONT';
-
-$this->outerblocktags = array('DIV','FORM','CENTER','DL');
-$this->innerblocktags = array('P','BLOCKQUOTE','ADDRESS','PRE','H1','H2','H3','H4','H5','H6','DT','DD');
-// NOT Currently used
-$this->inlinetags = array('SPAN','TT','I','B','BIG','SMALL','EM','STRONG','DFN','CODE','SAMP','KBD','VAR','CITE','ABBR','ACRONYM','STRIKE','S','U','DEL','INS','Q','FONT','TTS','TTZ','TTA');
-$this->listtags = array('UL','OL','LI');
-$this->tabletags = array('TABLE','THEAD','TFOOT','TBODY','TFOOT','TR','TH','TD');
-$this->formtags = array('TEXTAREA','INPUT','SELECT');
-
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/config_cp.php b/main/inc/lib/mpdf/config_cp.php
deleted file mode 100755
index 232b0e98f1..0000000000
--- a/main/inc/lib/mpdf/config_cp.php
+++ /dev/null
@@ -1,163 +0,0 @@
-
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/config_fonts.php b/main/inc/lib/mpdf/config_fonts.php
deleted file mode 100755
index 2ee70b3a92..0000000000
--- a/main/inc/lib/mpdf/config_fonts.php
+++ /dev/null
@@ -1,78 +0,0 @@
-available_fonts = array(
-		'dejavusanscondensed','dejavusanscondensedB','dejavusanscondensedI','dejavusanscondensedBI',
-		'dejavuserifcondensed','dejavuserifcondensedB','dejavuserifcondensedI','dejavuserifcondensedBI',
-		'dejavusans','dejavusansB','dejavusansI','dejavusansBI',
-		'dejavuserif','dejavuserifB','dejavuserifI','dejavuserifBI',
-		'dejavusansmono','dejavusansmonoB','dejavusansmonoI','dejavusansmonoBI',
-
-		'freesans','freesansB','freesansI','freesansBI',
-		'freeserif','freeserifB','freeserifI','freeserifBI',
-		'freemono','freemonoB','freemonoI','freemonoBI',
-		'ocrb',
-
-/* Add any extra codepaged fonts here */
-
-		);
-
-// List of ALL available fonts (incl. styles) in Unicode directory
-// Always put main font (without styles) before font+style; put preferred default first in order
-// Do NOT include Arial Helvetica Times Courier Symbol or ZapfDingbats
-$this->available_unifonts = array(
-		'dejavusanscondensed','dejavusanscondensedB','dejavusanscondensedI','dejavusanscondensedBI',
-		'dejavuserifcondensed','dejavuserifcondensedB','dejavuserifcondensedI','dejavuserifcondensedBI',
-		'dejavusans','dejavusansB','dejavusansI','dejavusansBI',
-		'dejavuserif','dejavuserifB','dejavuserifI','dejavuserifBI',
-		'dejavusansmono','dejavusansmonoB','dejavusansmonoI','dejavusansmonoBI',
-
-		'freesans','freesansB','freesansI','freesansBI',
-		'freeserif','freeserifB','freeserifI','freeserifBI',
-		'freemono','freemonoB','freemonoI','freemonoBI',
-		'garuda','garudaB','garudaI','garudaBI',
-		'norasi','norasiB','norasiI','norasiBI',
-		'ocrb',
-
-/* Indic scripts - Uncomment the lines below if you install the Indic font pack */
-/*
-		'ind_hi_1_001', 'ind_bn_1_001', 'ind_ml_1_001', 'ind_kn_1_001', 'ind_gu_1_001', 
-		'ind_or_1_001', 'ind_ta_1_001', 'ind_te_1_001', 'ind_pa_1_001', 
-*/
-
-/* Arabic scripts - Uncomment the lines below if you install the Arabic/RTL font pack */
-/*
-		'ar_1_001', 'ar_1_002', 'ar_1_003', 'ar_1_004', 'ar_1_005', 'ar_1_006', 'ar_1_007', 
-		'ar_2_001', 'ar_2_002', 'ar_2_003', 'ar_2_004', 
-		'ar_k_001', 'ar_k_002', 'fa_1_001', 'fa_1_002', 
-		'ur_1_001', 'sd_1_001', 'sd_1_002', 'ps_1_001',
-*/
-
-/* CJK scripts - Uncomment the lines below if you install the CJK ont pack */
-/*
-		'zn_hannom_a', 'unbatang_0613',
-*/
-
-		);
-
-
-
-
-// List of all font families in directories (either) 
-// + any others that may be read from a stylesheet - to determine 'type'
-// should include sans-serif, serif and monospace, arial, helvetica, times and courier
-// The order will determine preference when substituting fonts in certain circumstances
-$this->sans_fonts = array('dejavusanscondensed','dejavusans','freesans','franklin','tahoma','garuda','calibri','trebuchet',
-				'verdana','geneva','lucida','arial','helvetica','arialnarrow','arialblack','sans','sans-serif','cursive','fantasy',
-);
-
-$this->serif_fonts = array('dejavuserifcondensed','dejavuserif','freeserif','constantia','georgia','albertus','times',
-				'norasi','serif','charis','palatino', 
-);
-
-$this->mono_fonts = array('dejavusansmono','freemono','courier', 'mono','monospace','ocrb','ocr-b','lucidaconsole');
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/courier.php b/main/inc/lib/mpdf/font/courier.php
deleted file mode 100755
index 9f8b85e805..0000000000
--- a/main/inc/lib/mpdf/font/courier.php
+++ /dev/null
@@ -1,9 +0,0 @@
-629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-23 -250 715 805]');
-$up=-100;
-$ut=50;
-
-?>
diff --git a/main/inc/lib/mpdf/font/courierb.php b/main/inc/lib/mpdf/font/courierb.php
deleted file mode 100755
index 4a0e61e549..0000000000
--- a/main/inc/lib/mpdf/font/courierb.php
+++ /dev/null
@@ -1,9 +0,0 @@
-629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-113 -250 749 801]');
-$up=-100;
-$ut=50;
-
-
-?>
diff --git a/main/inc/lib/mpdf/font/courierbi.php b/main/inc/lib/mpdf/font/courierbi.php
deleted file mode 100755
index 8797ca5454..0000000000
--- a/main/inc/lib/mpdf/font/courierbi.php
+++ /dev/null
@@ -1,9 +0,0 @@
-629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-57 -250 869 801]');
-$up=-100;
-$ut=50;
-
-
-?>
diff --git a/main/inc/lib/mpdf/font/courieri.php b/main/inc/lib/mpdf/font/courieri.php
deleted file mode 100755
index fd2a769855..0000000000
--- a/main/inc/lib/mpdf/font/courieri.php
+++ /dev/null
@@ -1,9 +0,0 @@
-629,'Descent'=>-157,'CapHeight'=>562,'FontBBox'=>'[-27 -250 849 805]');
-$up=-100;
-$ut=50;
-
-
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusans-iso-8859-2.php
deleted file mode 100755
index db2e5d00ef..0000000000
--- a/main/inc/lib/mpdf/font/dejavusans-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-52 -236 956 946]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>684,chr(162)=>500,chr(163)=>562,chr(164)=>636,chr(165)=>557,chr(166)=>635,chr(167)=>500,chr(168)=>500,chr(169)=>635,chr(170)=>635,chr(171)=>611,chr(172)=>685,chr(173)=>361,chr(174)=>685,chr(175)=>685,
-	chr(176)=>500,chr(177)=>613,chr(178)=>500,chr(179)=>284,chr(180)=>500,chr(181)=>375,chr(182)=>521,chr(183)=>500,chr(184)=>500,chr(185)=>521,chr(186)=>521,chr(187)=>392,chr(188)=>525,chr(189)=>500,chr(190)=>525,chr(191)=>525,chr(192)=>695,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>557,
-	chr(198)=>698,chr(199)=>698,chr(200)=>698,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>632,chr(205)=>295,chr(206)=>295,chr(207)=>770,chr(208)=>775,chr(209)=>748,chr(210)=>748,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>695,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>611,chr(222)=>611,chr(223)=>630,chr(224)=>411,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>278,chr(230)=>550,chr(231)=>550,chr(232)=>550,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>615,chr(237)=>278,chr(238)=>278,chr(239)=>635,chr(240)=>635,chr(241)=>634,
-	chr(242)=>634,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>411,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>592,chr(254)=>392,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusans-iso-8859-2.z';
-$size1=6006;
-$size2=24759;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusans-iso-8859-2.z
deleted file mode 100755
index 8c1c673e16..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusans-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusans-iso-8859-4.php
deleted file mode 100755
index 069355b91a..0000000000
--- a/main/inc/lib/mpdf/font/dejavusans-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-52 -250 956 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>684,chr(162)=>579,chr(163)=>695,chr(164)=>636,chr(165)=>295,chr(166)=>557,chr(167)=>500,chr(168)=>500,chr(169)=>635,chr(170)=>632,chr(171)=>775,chr(172)=>611,chr(173)=>361,chr(174)=>685,chr(175)=>500,
-	chr(176)=>500,chr(177)=>613,chr(178)=>500,chr(179)=>411,chr(180)=>500,chr(181)=>278,chr(182)=>278,chr(183)=>500,chr(184)=>500,chr(185)=>521,chr(186)=>615,chr(187)=>635,chr(188)=>392,chr(189)=>748,chr(190)=>525,chr(191)=>634,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
-	chr(198)=>974,chr(199)=>295,chr(200)=>698,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>632,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>656,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>732,chr(222)=>732,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>982,chr(231)=>278,chr(232)=>550,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>615,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>635,chr(241)=>634,
-	chr(242)=>612,chr(243)=>579,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>634,chr(254)=>634,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusans-iso-8859-4.z';
-$size1=6025;
-$size2=25007;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusans-iso-8859-4.z
deleted file mode 100755
index 6b66400be4..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusans-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusans-iso-8859-7.php
deleted file mode 100755
index e09e7487cf..0000000000
--- a/main/inc/lib/mpdf/font/dejavusans-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-52 -236 1000 978]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>318,chr(162)=>318,chr(163)=>636,chr(164)=>600,chr(165)=>600,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>612,chr(172)=>838,chr(173)=>361,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>500,chr(182)=>692,chr(183)=>318,chr(184)=>746,chr(185)=>871,chr(186)=>408,chr(187)=>612,chr(188)=>813,chr(189)=>969,chr(190)=>825,chr(191)=>826,chr(192)=>338,chr(193)=>684,chr(194)=>686,chr(195)=>557,chr(196)=>684,chr(197)=>632,
-	chr(198)=>685,chr(199)=>752,chr(200)=>787,chr(201)=>295,chr(202)=>656,chr(203)=>684,chr(204)=>863,chr(205)=>748,chr(206)=>632,chr(207)=>787,chr(208)=>752,chr(209)=>603,chr(210)=>600,chr(211)=>632,chr(212)=>611,chr(213)=>611,chr(214)=>787,chr(215)=>685,chr(216)=>787,chr(217)=>764,chr(218)=>295,chr(219)=>611,
-	chr(220)=>659,chr(221)=>541,chr(222)=>634,chr(223)=>338,chr(224)=>579,chr(225)=>659,chr(226)=>638,chr(227)=>592,chr(228)=>612,chr(229)=>541,chr(230)=>544,chr(231)=>634,chr(232)=>612,chr(233)=>338,chr(234)=>589,chr(235)=>592,chr(236)=>636,chr(237)=>559,chr(238)=>558,chr(239)=>612,chr(240)=>602,chr(241)=>635,
-	chr(242)=>587,chr(243)=>634,chr(244)=>602,chr(245)=>579,chr(246)=>660,chr(247)=>578,chr(248)=>660,chr(249)=>837,chr(250)=>338,chr(251)=>579,chr(252)=>612,chr(253)=>579,chr(254)=>837,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusans-iso-8859-7.z';
-$size1=5982;
-$size2=21236;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusans-iso-8859-7.z
deleted file mode 100755
index 7b2255b243..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusans-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusans-iso-8859-9.php
deleted file mode 100755
index 51120c1981..0000000000
--- a/main/inc/lib/mpdf/font/dejavusans-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-52 -236 956 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>401,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>471,chr(171)=>612,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>471,chr(187)=>612,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>531,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
-	chr(198)=>974,chr(199)=>698,chr(200)=>632,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>295,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>295,chr(222)=>635,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>982,chr(231)=>550,chr(232)=>615,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>635,chr(241)=>634,
-	chr(242)=>612,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>278,chr(254)=>521,chr(255)=>592);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusans-iso-8859-9.z';
-$size1=6060;
-$size2=25231;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusans-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusans-iso-8859-9.z
deleted file mode 100755
index 6ebf1ed033..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusans-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusans-win-1251.php b/main/inc/lib/mpdf/font/dejavusans-win-1251.php
deleted file mode 100755
index 5c16981cc5..0000000000
--- a/main/inc/lib/mpdf/font/dejavusans-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-52 -236 1287 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>786,chr(129)=>610,chr(130)=>318,chr(131)=>525,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>636,chr(137)=>1342,chr(138)=>1094,chr(139)=>400,chr(140)=>1045,chr(141)=>710,chr(142)=>786,chr(143)=>752,chr(144)=>625,chr(145)=>318,chr(146)=>318,chr(147)=>518,chr(148)=>518,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>902,chr(155)=>400,chr(156)=>898,chr(157)=>604,chr(158)=>652,chr(159)=>654,chr(160)=>318,chr(161)=>609,chr(162)=>592,chr(163)=>295,chr(164)=>636,chr(165)=>610,chr(166)=>337,chr(167)=>500,chr(168)=>632,chr(169)=>1000,chr(170)=>698,chr(171)=>612,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>295,
-	chr(176)=>500,chr(177)=>838,chr(178)=>295,chr(179)=>278,chr(180)=>525,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>615,chr(185)=>1040,chr(186)=>549,chr(187)=>612,chr(188)=>278,chr(189)=>635,chr(190)=>521,chr(191)=>278,chr(192)=>684,chr(193)=>686,chr(194)=>686,chr(195)=>610,chr(196)=>781,chr(197)=>632,
-	chr(198)=>1077,chr(199)=>641,chr(200)=>748,chr(201)=>748,chr(202)=>710,chr(203)=>752,chr(204)=>863,chr(205)=>752,chr(206)=>787,chr(207)=>752,chr(208)=>603,chr(209)=>698,chr(210)=>611,chr(211)=>609,chr(212)=>861,chr(213)=>685,chr(214)=>776,chr(215)=>686,chr(216)=>1069,chr(217)=>1094,chr(218)=>833,chr(219)=>882,
-	chr(220)=>686,chr(221)=>698,chr(222)=>1080,chr(223)=>695,chr(224)=>613,chr(225)=>617,chr(226)=>589,chr(227)=>525,chr(228)=>691,chr(229)=>615,chr(230)=>901,chr(231)=>532,chr(232)=>650,chr(233)=>650,chr(234)=>604,chr(235)=>639,chr(236)=>754,chr(237)=>654,chr(238)=>612,chr(239)=>654,chr(240)=>635,chr(241)=>550,
-	chr(242)=>583,chr(243)=>592,chr(244)=>855,chr(245)=>592,chr(246)=>681,chr(247)=>591,chr(248)=>915,chr(249)=>942,chr(250)=>707,chr(251)=>790,chr(252)=>589,chr(253)=>549,chr(254)=>842,chr(255)=>602);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusans-win-1251.z';
-$size1=6216;
-$size2=25960;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusans-win-1251.z b/main/inc/lib/mpdf/font/dejavusans-win-1251.z
deleted file mode 100755
index 636a00b705..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusans-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusans.php b/main/inc/lib/mpdf/font/dejavusans.php
deleted file mode 100755
index 67314f6857..0000000000
--- a/main/inc/lib/mpdf/font/dejavusans.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-63 -236 1287 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>636,chr(129)=>600,chr(130)=>318,chr(131)=>352,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1342,chr(138)=>635,chr(139)=>400,chr(140)=>1070,chr(141)=>600,chr(142)=>685,chr(143)=>600,chr(144)=>600,chr(145)=>318,chr(146)=>318,chr(147)=>518,chr(148)=>518,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>521,chr(155)=>400,chr(156)=>1023,chr(157)=>600,chr(158)=>525,chr(159)=>611,chr(160)=>318,chr(161)=>401,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>471,chr(171)=>612,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>471,chr(187)=>612,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>531,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
-	chr(198)=>974,chr(199)=>698,chr(200)=>632,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>295,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>611,chr(222)=>605,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>982,chr(231)=>550,chr(232)=>615,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>612,chr(241)=>634,
-	chr(242)=>612,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>592,chr(254)=>635,chr(255)=>592);
-$enc='win-1252';
-$diff='';
-$file='dejavusans.z';
-$size1=6074;
-$size2=28274;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusans.z b/main/inc/lib/mpdf/font/dejavusans.z
deleted file mode 100755
index fa04b390e1..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusans.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-2.php
deleted file mode 100755
index 3df610c549..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-56 -236 1072 935]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>838,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>774,chr(162)=>500,chr(163)=>642,chr(164)=>636,chr(165)=>637,chr(166)=>720,chr(167)=>500,chr(168)=>500,chr(169)=>720,chr(170)=>720,chr(171)=>682,chr(172)=>725,chr(173)=>415,chr(174)=>725,chr(175)=>725,
-	chr(176)=>500,chr(177)=>675,chr(178)=>500,chr(179)=>371,chr(180)=>500,chr(181)=>479,chr(182)=>595,chr(183)=>500,chr(184)=>500,chr(185)=>595,chr(186)=>595,chr(187)=>478,chr(188)=>582,chr(189)=>500,chr(190)=>582,chr(191)=>582,chr(192)=>770,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>637,
-	chr(198)=>734,chr(199)=>734,chr(200)=>734,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>683,chr(205)=>372,chr(206)=>372,chr(207)=>830,chr(208)=>838,chr(209)=>837,chr(210)=>837,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>770,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>724,chr(222)=>682,chr(223)=>719,chr(224)=>493,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>343,chr(230)=>593,chr(231)=>593,chr(232)=>593,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>678,chr(237)=>343,chr(238)=>343,chr(239)=>716,chr(240)=>716,chr(241)=>712,
-	chr(242)=>712,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>493,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>652,chr(254)=>478,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusansb-iso-8859-2.z';
-$size1=6027;
-$size2=25555;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-2.z
deleted file mode 100755
index 4a242366a2..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-4.php
deleted file mode 100755
index 2a2d0829e7..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-56 -236 1072 931]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>838,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>774,chr(162)=>665,chr(163)=>770,chr(164)=>636,chr(165)=>372,chr(166)=>637,chr(167)=>500,chr(168)=>500,chr(169)=>720,chr(170)=>683,chr(171)=>821,chr(172)=>682,chr(173)=>415,chr(174)=>725,chr(175)=>500,
-	chr(176)=>500,chr(177)=>675,chr(178)=>500,chr(179)=>493,chr(180)=>500,chr(181)=>343,chr(182)=>343,chr(183)=>500,chr(184)=>500,chr(185)=>595,chr(186)=>678,chr(187)=>716,chr(188)=>478,chr(189)=>837,chr(190)=>582,chr(191)=>712,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
-	chr(198)=>1085,chr(199)=>372,chr(200)=>734,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>683,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>838,chr(209)=>837,chr(210)=>850,chr(211)=>775,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>812,chr(222)=>812,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>343,chr(232)=>593,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>678,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>716,chr(241)=>712,
-	chr(242)=>687,chr(243)=>665,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>712,chr(254)=>712,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusansb-iso-8859-4.z';
-$size1=6046;
-$size2=25898;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-4.z
deleted file mode 100755
index b3d283eb05..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-7.php
deleted file mode 100755
index 676cee36d5..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-56 -236 1072 978]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>838,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>380,chr(162)=>380,chr(163)=>696,chr(164)=>600,chr(165)=>600,chr(166)=>365,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>646,chr(172)=>838,chr(173)=>415,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>441,chr(181)=>500,chr(182)=>797,chr(183)=>380,chr(184)=>846,chr(185)=>1009,chr(186)=>563,chr(187)=>646,chr(188)=>891,chr(189)=>1035,chr(190)=>980,chr(191)=>894,chr(192)=>390,chr(193)=>774,chr(194)=>762,chr(195)=>637,chr(196)=>774,chr(197)=>683,
-	chr(198)=>725,chr(199)=>837,chr(200)=>850,chr(201)=>372,chr(202)=>775,chr(203)=>774,chr(204)=>995,chr(205)=>837,chr(206)=>632,chr(207)=>850,chr(208)=>837,chr(209)=>733,chr(210)=>600,chr(211)=>683,chr(212)=>682,chr(213)=>724,chr(214)=>850,chr(215)=>771,chr(216)=>850,chr(217)=>850,chr(218)=>372,chr(219)=>724,
-	chr(220)=>687,chr(221)=>557,chr(222)=>712,chr(223)=>390,chr(224)=>675,chr(225)=>687,chr(226)=>716,chr(227)=>681,chr(228)=>687,chr(229)=>557,chr(230)=>591,chr(231)=>712,chr(232)=>687,chr(233)=>390,chr(234)=>710,chr(235)=>633,chr(236)=>736,chr(237)=>681,chr(238)=>591,chr(239)=>687,chr(240)=>791,chr(241)=>716,
-	chr(242)=>593,chr(243)=>779,chr(244)=>638,chr(245)=>675,chr(246)=>782,chr(247)=>645,chr(248)=>794,chr(249)=>869,chr(250)=>390,chr(251)=>675,chr(252)=>687,chr(253)=>675,chr(254)=>869,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusansb-iso-8859-7.z';
-$size1=6002;
-$size2=21995;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-7.z
deleted file mode 100755
index 0cea71d2b2..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-9.php
deleted file mode 100755
index adf22baf54..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-56 -236 1072 931]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>838,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>456,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>365,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>564,chr(171)=>646,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>500,chr(185)=>438,chr(186)=>564,chr(187)=>646,chr(188)=>1035,chr(189)=>1035,chr(190)=>1035,chr(191)=>580,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
-	chr(198)=>1085,chr(199)=>734,chr(200)=>683,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>372,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>821,chr(209)=>837,chr(210)=>850,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>372,chr(222)=>720,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>593,chr(232)=>678,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>343,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>716,chr(241)=>712,
-	chr(242)=>687,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>343,chr(254)=>595,chr(255)=>652);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusansb-iso-8859-9.z';
-$size1=6081;
-$size2=26107;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusansb-iso-8859-9.z
deleted file mode 100755
index 04da1e7581..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansb-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansb-win-1251.php b/main/inc/lib/mpdf/font/dejavusansb-win-1251.php
deleted file mode 100755
index 90700e4358..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansb-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-56 -236 1417 928]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>838,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>878,chr(129)=>637,chr(130)=>380,chr(131)=>522,
-	chr(132)=>657,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>696,chr(137)=>1440,chr(138)=>1154,chr(139)=>412,chr(140)=>1130,chr(141)=>817,chr(142)=>878,chr(143)=>837,chr(144)=>714,chr(145)=>380,chr(146)=>380,chr(147)=>657,chr(148)=>657,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>991,chr(155)=>412,chr(156)=>956,chr(157)=>679,chr(158)=>734,chr(159)=>691,chr(160)=>348,chr(161)=>771,chr(162)=>652,chr(163)=>372,chr(164)=>636,chr(165)=>637,chr(166)=>365,chr(167)=>500,chr(168)=>683,chr(169)=>1000,chr(170)=>734,chr(171)=>646,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>372,
-	chr(176)=>500,chr(177)=>838,chr(178)=>372,chr(179)=>343,chr(180)=>522,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>678,chr(185)=>1203,chr(186)=>593,chr(187)=>646,chr(188)=>343,chr(189)=>720,chr(190)=>595,chr(191)=>343,chr(192)=>774,chr(193)=>762,chr(194)=>762,chr(195)=>637,chr(196)=>891,chr(197)=>683,
-	chr(198)=>1224,chr(199)=>710,chr(200)=>837,chr(201)=>837,chr(202)=>817,chr(203)=>831,chr(204)=>995,chr(205)=>837,chr(206)=>850,chr(207)=>837,chr(208)=>733,chr(209)=>734,chr(210)=>682,chr(211)=>771,chr(212)=>992,chr(213)=>771,chr(214)=>928,chr(215)=>808,chr(216)=>1235,chr(217)=>1326,chr(218)=>939,chr(219)=>1036,
-	chr(220)=>762,chr(221)=>734,chr(222)=>1174,chr(223)=>770,chr(224)=>675,chr(225)=>698,chr(226)=>633,chr(227)=>522,chr(228)=>808,chr(229)=>678,chr(230)=>995,chr(231)=>581,chr(232)=>701,chr(233)=>701,chr(234)=>679,chr(235)=>732,chr(236)=>817,chr(237)=>691,chr(238)=>687,chr(239)=>691,chr(240)=>716,chr(241)=>593,
-	chr(242)=>580,chr(243)=>652,chr(244)=>992,chr(245)=>645,chr(246)=>741,chr(247)=>687,chr(248)=>1062,chr(249)=>1105,chr(250)=>751,chr(251)=>904,chr(252)=>632,chr(253)=>593,chr(254)=>972,chr(255)=>642);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusansb-win-1251.z';
-$size1=6236;
-$size2=26968;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansb-win-1251.z b/main/inc/lib/mpdf/font/dejavusansb-win-1251.z
deleted file mode 100755
index 3bd7b9b577..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansb-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansb.php b/main/inc/lib/mpdf/font/dejavusansb.php
deleted file mode 100755
index 18bb15f8c1..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansb.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-57 -236 1417 931]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>838,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>696,chr(129)=>600,chr(130)=>380,chr(131)=>435,
-	chr(132)=>657,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1440,chr(138)=>720,chr(139)=>412,chr(140)=>1167,chr(141)=>600,chr(142)=>725,chr(143)=>600,chr(144)=>600,chr(145)=>380,chr(146)=>380,chr(147)=>657,chr(148)=>657,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>595,chr(155)=>412,chr(156)=>1094,chr(157)=>600,chr(158)=>582,chr(159)=>724,chr(160)=>348,chr(161)=>456,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>365,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>564,chr(171)=>646,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>500,chr(185)=>438,chr(186)=>564,chr(187)=>646,chr(188)=>1035,chr(189)=>1035,chr(190)=>1035,chr(191)=>580,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
-	chr(198)=>1085,chr(199)=>734,chr(200)=>683,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>372,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>838,chr(209)=>837,chr(210)=>850,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>724,chr(222)=>738,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>593,chr(232)=>678,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>343,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>687,chr(241)=>712,
-	chr(242)=>687,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>652,chr(254)=>716,chr(255)=>652);
-$enc='win-1252';
-$diff='';
-$file='dejavusansb.z';
-$size1=6094;
-$size2=29324;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansb.z b/main/inc/lib/mpdf/font/dejavusansb.z
deleted file mode 100755
index 90fb24c7ab..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansb.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-2.php
deleted file mode 100755
index 1b7d91db5a..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1143 936]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>696,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>774,chr(162)=>500,chr(163)=>660,chr(164)=>636,chr(165)=>637,chr(166)=>720,chr(167)=>500,chr(168)=>500,chr(169)=>720,chr(170)=>720,chr(171)=>682,chr(172)=>725,chr(173)=>415,chr(174)=>725,chr(175)=>725,
-	chr(176)=>500,chr(177)=>675,chr(178)=>500,chr(179)=>375,chr(180)=>500,chr(181)=>343,chr(182)=>595,chr(183)=>500,chr(184)=>500,chr(185)=>595,chr(186)=>595,chr(187)=>478,chr(188)=>582,chr(189)=>500,chr(190)=>582,chr(191)=>582,chr(192)=>770,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>637,
-	chr(198)=>734,chr(199)=>734,chr(200)=>734,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>683,chr(205)=>372,chr(206)=>372,chr(207)=>830,chr(208)=>845,chr(209)=>837,chr(210)=>837,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>770,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>724,chr(222)=>682,chr(223)=>719,chr(224)=>493,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>343,chr(230)=>593,chr(231)=>593,chr(232)=>593,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>678,chr(237)=>343,chr(238)=>343,chr(239)=>716,chr(240)=>716,chr(241)=>712,
-	chr(242)=>712,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>493,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>652,chr(254)=>478,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusansbi-iso-8859-2.z';
-$size1=6067;
-$size2=26168;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-2.z
deleted file mode 100755
index ac50574f2b..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-4.php
deleted file mode 100755
index acdbe8d957..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1143 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>696,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>774,chr(162)=>665,chr(163)=>770,chr(164)=>636,chr(165)=>372,chr(166)=>637,chr(167)=>500,chr(168)=>500,chr(169)=>720,chr(170)=>683,chr(171)=>821,chr(172)=>682,chr(173)=>415,chr(174)=>725,chr(175)=>500,
-	chr(176)=>500,chr(177)=>675,chr(178)=>500,chr(179)=>493,chr(180)=>500,chr(181)=>343,chr(182)=>343,chr(183)=>500,chr(184)=>500,chr(185)=>595,chr(186)=>678,chr(187)=>716,chr(188)=>478,chr(189)=>837,chr(190)=>582,chr(191)=>712,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
-	chr(198)=>1085,chr(199)=>372,chr(200)=>734,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>683,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>845,chr(209)=>837,chr(210)=>850,chr(211)=>775,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>812,chr(222)=>812,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>343,chr(232)=>593,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>678,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>716,chr(241)=>712,
-	chr(242)=>687,chr(243)=>665,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>712,chr(254)=>712,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusansbi-iso-8859-4.z';
-$size1=6086;
-$size2=26432;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-4.z
deleted file mode 100755
index e35e6b7d8c..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-7.php
deleted file mode 100755
index d9bbb8465c..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1143 978]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>696,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>380,chr(162)=>380,chr(163)=>696,chr(164)=>600,chr(165)=>600,chr(166)=>365,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>650,chr(172)=>838,chr(173)=>415,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>441,chr(181)=>500,chr(182)=>797,chr(183)=>380,chr(184)=>846,chr(185)=>1009,chr(186)=>563,chr(187)=>650,chr(188)=>891,chr(189)=>1035,chr(190)=>980,chr(191)=>894,chr(192)=>390,chr(193)=>774,chr(194)=>762,chr(195)=>637,chr(196)=>774,chr(197)=>683,
-	chr(198)=>725,chr(199)=>837,chr(200)=>850,chr(201)=>372,chr(202)=>775,chr(203)=>774,chr(204)=>995,chr(205)=>837,chr(206)=>632,chr(207)=>850,chr(208)=>837,chr(209)=>733,chr(210)=>600,chr(211)=>683,chr(212)=>682,chr(213)=>724,chr(214)=>850,chr(215)=>771,chr(216)=>850,chr(217)=>850,chr(218)=>372,chr(219)=>724,
-	chr(220)=>687,chr(221)=>557,chr(222)=>712,chr(223)=>390,chr(224)=>675,chr(225)=>687,chr(226)=>716,chr(227)=>681,chr(228)=>687,chr(229)=>557,chr(230)=>591,chr(231)=>712,chr(232)=>687,chr(233)=>390,chr(234)=>710,chr(235)=>633,chr(236)=>736,chr(237)=>681,chr(238)=>591,chr(239)=>687,chr(240)=>791,chr(241)=>716,
-	chr(242)=>593,chr(243)=>779,chr(244)=>638,chr(245)=>675,chr(246)=>782,chr(247)=>645,chr(248)=>794,chr(249)=>869,chr(250)=>390,chr(251)=>675,chr(252)=>687,chr(253)=>675,chr(254)=>869,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusansbi-iso-8859-7.z';
-$size1=6042;
-$size2=22641;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-7.z
deleted file mode 100755
index 0314715d82..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-9.php
deleted file mode 100755
index 496c2bd760..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1143 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>696,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>456,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>365,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>564,chr(171)=>650,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>500,chr(185)=>438,chr(186)=>564,chr(187)=>650,chr(188)=>1035,chr(189)=>1035,chr(190)=>1035,chr(191)=>580,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
-	chr(198)=>1085,chr(199)=>734,chr(200)=>683,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>372,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>821,chr(209)=>837,chr(210)=>850,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>372,chr(222)=>720,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>593,chr(232)=>678,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>343,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>716,chr(241)=>712,
-	chr(242)=>687,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>343,chr(254)=>595,chr(255)=>652);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusansbi-iso-8859-9.z';
-$size1=6121;
-$size2=26516;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-9.z
deleted file mode 100755
index a7a55f1450..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansbi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-win-1251.php b/main/inc/lib/mpdf/font/dejavusansbi-win-1251.php
deleted file mode 100755
index d37561624f..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansbi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1401 927]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>696,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>878,chr(129)=>637,chr(130)=>380,chr(131)=>522,
-	chr(132)=>644,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>696,chr(137)=>1454,chr(138)=>1154,chr(139)=>412,chr(140)=>1130,chr(141)=>817,chr(142)=>878,chr(143)=>837,chr(144)=>714,chr(145)=>380,chr(146)=>380,chr(147)=>644,chr(148)=>644,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>991,chr(155)=>412,chr(156)=>956,chr(157)=>679,chr(158)=>734,chr(159)=>691,chr(160)=>348,chr(161)=>771,chr(162)=>652,chr(163)=>372,chr(164)=>636,chr(165)=>637,chr(166)=>365,chr(167)=>500,chr(168)=>683,chr(169)=>1000,chr(170)=>734,chr(171)=>650,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>372,
-	chr(176)=>500,chr(177)=>838,chr(178)=>372,chr(179)=>343,chr(180)=>522,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>678,chr(185)=>1203,chr(186)=>593,chr(187)=>650,chr(188)=>343,chr(189)=>720,chr(190)=>595,chr(191)=>343,chr(192)=>774,chr(193)=>762,chr(194)=>762,chr(195)=>637,chr(196)=>891,chr(197)=>683,
-	chr(198)=>1224,chr(199)=>710,chr(200)=>837,chr(201)=>837,chr(202)=>817,chr(203)=>831,chr(204)=>995,chr(205)=>837,chr(206)=>850,chr(207)=>837,chr(208)=>733,chr(209)=>734,chr(210)=>682,chr(211)=>771,chr(212)=>992,chr(213)=>771,chr(214)=>928,chr(215)=>808,chr(216)=>1235,chr(217)=>1326,chr(218)=>939,chr(219)=>1036,
-	chr(220)=>762,chr(221)=>734,chr(222)=>1174,chr(223)=>770,chr(224)=>675,chr(225)=>698,chr(226)=>633,chr(227)=>522,chr(228)=>808,chr(229)=>678,chr(230)=>995,chr(231)=>581,chr(232)=>701,chr(233)=>701,chr(234)=>679,chr(235)=>732,chr(236)=>817,chr(237)=>691,chr(238)=>687,chr(239)=>691,chr(240)=>716,chr(241)=>593,
-	chr(242)=>580,chr(243)=>652,chr(244)=>992,chr(245)=>645,chr(246)=>741,chr(247)=>687,chr(248)=>1062,chr(249)=>1105,chr(250)=>751,chr(251)=>904,chr(252)=>632,chr(253)=>593,chr(254)=>972,chr(255)=>642);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusansbi-win-1251.z';
-$size1=6276;
-$size2=27606;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansbi-win-1251.z b/main/inc/lib/mpdf/font/dejavusansbi-win-1251.z
deleted file mode 100755
index a76aee9e9b..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansbi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansbi.php b/main/inc/lib/mpdf/font/dejavusansbi.php
deleted file mode 100755
index cc4557a388..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansbi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1401 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>456,'"'=>521,'#'=>696,'$'=>696,'%'=>1002,'&'=>872,'\''=>306,'('=>457,')'=>457,'*'=>523,'+'=>838,
-	','=>380,'-'=>415,'.'=>380,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>400,';'=>400,'<'=>838,'='=>838,'>'=>838,'?'=>580,'@'=>1000,'A'=>774,
-	'B'=>762,'C'=>734,'D'=>830,'E'=>683,'F'=>683,'G'=>821,'H'=>837,'I'=>372,'J'=>372,'K'=>775,'L'=>637,'M'=>995,'N'=>837,'O'=>850,'P'=>733,'Q'=>850,'R'=>770,'S'=>720,'T'=>682,'U'=>812,'V'=>774,'W'=>1103,
-	'X'=>771,'Y'=>724,'Z'=>725,'['=>457,'\\'=>365,']'=>457,'^'=>838,'_'=>500,'`'=>500,'a'=>675,'b'=>716,'c'=>593,'d'=>716,'e'=>678,'f'=>435,'g'=>716,'h'=>712,'i'=>343,'j'=>343,'k'=>665,'l'=>343,'m'=>1042,
-	'n'=>712,'o'=>687,'p'=>716,'q'=>716,'r'=>493,'s'=>595,'t'=>478,'u'=>712,'v'=>652,'w'=>924,'x'=>645,'y'=>652,'z'=>582,'{'=>712,'|'=>365,'}'=>712,'~'=>838,chr(127)=>600,chr(128)=>696,chr(129)=>600,chr(130)=>380,chr(131)=>435,
-	chr(132)=>644,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1454,chr(138)=>720,chr(139)=>412,chr(140)=>1167,chr(141)=>600,chr(142)=>725,chr(143)=>600,chr(144)=>600,chr(145)=>380,chr(146)=>380,chr(147)=>644,chr(148)=>644,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>595,chr(155)=>412,chr(156)=>1094,chr(157)=>600,chr(158)=>582,chr(159)=>724,chr(160)=>348,chr(161)=>456,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>365,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>564,chr(171)=>650,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>736,chr(182)=>636,chr(183)=>380,chr(184)=>500,chr(185)=>438,chr(186)=>564,chr(187)=>650,chr(188)=>1035,chr(189)=>1035,chr(190)=>1035,chr(191)=>580,chr(192)=>774,chr(193)=>774,chr(194)=>774,chr(195)=>774,chr(196)=>774,chr(197)=>774,
-	chr(198)=>1085,chr(199)=>734,chr(200)=>683,chr(201)=>683,chr(202)=>683,chr(203)=>683,chr(204)=>372,chr(205)=>372,chr(206)=>372,chr(207)=>372,chr(208)=>845,chr(209)=>837,chr(210)=>850,chr(211)=>850,chr(212)=>850,chr(213)=>850,chr(214)=>850,chr(215)=>838,chr(216)=>850,chr(217)=>812,chr(218)=>812,chr(219)=>812,
-	chr(220)=>812,chr(221)=>724,chr(222)=>742,chr(223)=>719,chr(224)=>675,chr(225)=>675,chr(226)=>675,chr(227)=>675,chr(228)=>675,chr(229)=>675,chr(230)=>1048,chr(231)=>593,chr(232)=>678,chr(233)=>678,chr(234)=>678,chr(235)=>678,chr(236)=>343,chr(237)=>343,chr(238)=>343,chr(239)=>343,chr(240)=>687,chr(241)=>712,
-	chr(242)=>687,chr(243)=>687,chr(244)=>687,chr(245)=>687,chr(246)=>687,chr(247)=>838,chr(248)=>687,chr(249)=>712,chr(250)=>712,chr(251)=>712,chr(252)=>712,chr(253)=>652,chr(254)=>716,chr(255)=>652);
-$enc='win-1252';
-$diff='';
-$file='dejavusansbi.z';
-$size1=6134;
-$size2=29744;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansbi.z b/main/inc/lib/mpdf/font/dejavusansbi.z
deleted file mode 100755
index 9a2c917c06..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansbi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-2.php
deleted file mode 100755
index 5e5a680be1..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-46 -236 860 946]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>615,chr(162)=>450,chr(163)=>505,chr(164)=>572,chr(165)=>501,chr(166)=>571,chr(167)=>450,chr(168)=>450,chr(169)=>571,chr(170)=>571,chr(171)=>549,chr(172)=>616,chr(173)=>325,chr(174)=>616,chr(175)=>616,
-	chr(176)=>450,chr(177)=>551,chr(178)=>450,chr(179)=>255,chr(180)=>450,chr(181)=>337,chr(182)=>469,chr(183)=>450,chr(184)=>450,chr(185)=>469,chr(186)=>469,chr(187)=>353,chr(188)=>472,chr(189)=>450,chr(190)=>472,chr(191)=>472,chr(192)=>625,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>501,
-	chr(198)=>628,chr(199)=>628,chr(200)=>628,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>568,chr(205)=>265,chr(206)=>265,chr(207)=>693,chr(208)=>697,chr(209)=>673,chr(210)=>673,chr(211)=>708,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>625,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>549,chr(222)=>549,chr(223)=>567,chr(224)=>370,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>250,chr(230)=>495,chr(231)=>495,chr(232)=>495,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>554,chr(237)=>250,chr(238)=>250,chr(239)=>571,chr(240)=>571,chr(241)=>570,
-	chr(242)=>570,chr(243)=>550,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>370,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>532,chr(254)=>353,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusanscondensed-iso-8859-2.z';
-$size1=6053;
-$size2=24615;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-2.z
deleted file mode 100755
index 04e3e88851..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-4.php
deleted file mode 100755
index 16db10cec9..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-46 -250 860 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>615,chr(162)=>521,chr(163)=>625,chr(164)=>572,chr(165)=>265,chr(166)=>501,chr(167)=>450,chr(168)=>450,chr(169)=>571,chr(170)=>568,chr(171)=>697,chr(172)=>549,chr(173)=>325,chr(174)=>616,chr(175)=>450,
-	chr(176)=>450,chr(177)=>551,chr(178)=>450,chr(179)=>370,chr(180)=>450,chr(181)=>250,chr(182)=>250,chr(183)=>450,chr(184)=>450,chr(185)=>469,chr(186)=>554,chr(187)=>571,chr(188)=>353,chr(189)=>673,chr(190)=>472,chr(191)=>570,chr(192)=>615,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>615,
-	chr(198)=>876,chr(199)=>265,chr(200)=>628,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>568,chr(205)=>265,chr(206)=>265,chr(207)=>265,chr(208)=>697,chr(209)=>673,chr(210)=>708,chr(211)=>590,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>708,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>659,chr(222)=>659,chr(223)=>567,chr(224)=>551,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>551,chr(230)=>883,chr(231)=>250,chr(232)=>495,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>554,chr(237)=>250,chr(238)=>250,chr(239)=>250,chr(240)=>571,chr(241)=>570,
-	chr(242)=>550,chr(243)=>521,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>550,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>570,chr(254)=>570,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusanscondensed-iso-8859-4.z';
-$size1=6072;
-$size2=24882;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-4.z
deleted file mode 100755
index 2f31e0943a..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-7.php
deleted file mode 100755
index b2092082cd..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-46 -236 900 978]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>286,chr(162)=>286,chr(163)=>572,chr(164)=>540,chr(165)=>540,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>550,chr(172)=>754,chr(173)=>325,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>450,chr(182)=>623,chr(183)=>286,chr(184)=>671,chr(185)=>784,chr(186)=>367,chr(187)=>550,chr(188)=>731,chr(189)=>872,chr(190)=>742,chr(191)=>743,chr(192)=>304,chr(193)=>615,chr(194)=>617,chr(195)=>501,chr(196)=>615,chr(197)=>568,
-	chr(198)=>616,chr(199)=>677,chr(200)=>708,chr(201)=>265,chr(202)=>590,chr(203)=>615,chr(204)=>776,chr(205)=>673,chr(206)=>568,chr(207)=>708,chr(208)=>677,chr(209)=>542,chr(210)=>540,chr(211)=>568,chr(212)=>549,chr(213)=>549,chr(214)=>708,chr(215)=>616,chr(216)=>708,chr(217)=>688,chr(218)=>265,chr(219)=>549,
-	chr(220)=>593,chr(221)=>486,chr(222)=>570,chr(223)=>304,chr(224)=>521,chr(225)=>593,chr(226)=>574,chr(227)=>532,chr(228)=>550,chr(229)=>486,chr(230)=>489,chr(231)=>570,chr(232)=>550,chr(233)=>304,chr(234)=>530,chr(235)=>532,chr(236)=>572,chr(237)=>502,chr(238)=>501,chr(239)=>550,chr(240)=>542,chr(241)=>571,
-	chr(242)=>528,chr(243)=>570,chr(244)=>542,chr(245)=>521,chr(246)=>593,chr(247)=>520,chr(248)=>593,chr(249)=>753,chr(250)=>304,chr(251)=>521,chr(252)=>550,chr(253)=>521,chr(254)=>753,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusanscondensed-iso-8859-7.z';
-$size1=6028;
-$size2=21110;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-7.z
deleted file mode 100755
index e5904f7109..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-9.php
deleted file mode 100755
index b38d47c5f6..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-46 -236 860 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>360,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>424,chr(171)=>550,chr(172)=>754,chr(173)=>325,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>572,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>424,chr(187)=>550,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>478,chr(192)=>615,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>615,
-	chr(198)=>876,chr(199)=>628,chr(200)=>568,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>265,chr(205)=>265,chr(206)=>265,chr(207)=>265,chr(208)=>697,chr(209)=>673,chr(210)=>708,chr(211)=>708,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>708,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>265,chr(222)=>571,chr(223)=>567,chr(224)=>551,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>551,chr(230)=>883,chr(231)=>495,chr(232)=>554,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>250,chr(237)=>250,chr(238)=>250,chr(239)=>250,chr(240)=>571,chr(241)=>570,
-	chr(242)=>550,chr(243)=>550,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>550,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>250,chr(254)=>469,chr(255)=>532);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusanscondensed-iso-8859-9.z';
-$size1=6107;
-$size2=25111;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-9.z
deleted file mode 100755
index 7fc9ce2b12..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensed-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-win-1251.php b/main/inc/lib/mpdf/font/dejavusanscondensed-win-1251.php
deleted file mode 100755
index 19af4bcac0..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensed-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-46 -236 1158 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>708,chr(129)=>549,chr(130)=>286,chr(131)=>473,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>572,chr(137)=>1208,chr(138)=>984,chr(139)=>360,chr(140)=>940,chr(141)=>639,chr(142)=>708,chr(143)=>677,chr(144)=>563,chr(145)=>286,chr(146)=>286,chr(147)=>466,chr(148)=>466,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>812,chr(155)=>360,chr(156)=>809,chr(157)=>543,chr(158)=>586,chr(159)=>588,chr(160)=>286,chr(161)=>548,chr(162)=>532,chr(163)=>265,chr(164)=>572,chr(165)=>549,chr(166)=>303,chr(167)=>450,chr(168)=>568,chr(169)=>900,chr(170)=>628,chr(171)=>550,chr(172)=>754,chr(173)=>325,chr(174)=>900,chr(175)=>265,
-	chr(176)=>450,chr(177)=>754,chr(178)=>265,chr(179)=>250,chr(180)=>473,chr(181)=>572,chr(182)=>572,chr(183)=>286,chr(184)=>554,chr(185)=>936,chr(186)=>494,chr(187)=>550,chr(188)=>250,chr(189)=>571,chr(190)=>469,chr(191)=>250,chr(192)=>615,chr(193)=>617,chr(194)=>617,chr(195)=>549,chr(196)=>703,chr(197)=>568,
-	chr(198)=>969,chr(199)=>577,chr(200)=>673,chr(201)=>673,chr(202)=>639,chr(203)=>677,chr(204)=>776,chr(205)=>677,chr(206)=>708,chr(207)=>677,chr(208)=>542,chr(209)=>628,chr(210)=>549,chr(211)=>548,chr(212)=>774,chr(213)=>616,chr(214)=>699,chr(215)=>617,chr(216)=>962,chr(217)=>984,chr(218)=>749,chr(219)=>794,
-	chr(220)=>617,chr(221)=>628,chr(222)=>971,chr(223)=>625,chr(224)=>551,chr(225)=>555,chr(226)=>530,chr(227)=>473,chr(228)=>622,chr(229)=>554,chr(230)=>811,chr(231)=>479,chr(232)=>584,chr(233)=>584,chr(234)=>543,chr(235)=>575,chr(236)=>679,chr(237)=>588,chr(238)=>550,chr(239)=>588,chr(240)=>571,chr(241)=>495,
-	chr(242)=>524,chr(243)=>532,chr(244)=>769,chr(245)=>532,chr(246)=>612,chr(247)=>532,chr(248)=>823,chr(249)=>848,chr(250)=>636,chr(251)=>710,chr(252)=>530,chr(253)=>494,chr(254)=>757,chr(255)=>541);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusanscondensed-win-1251.z';
-$size1=6263;
-$size2=25832;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed-win-1251.z b/main/inc/lib/mpdf/font/dejavusanscondensed-win-1251.z
deleted file mode 100755
index 20d38591a4..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensed-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed.php b/main/inc/lib/mpdf/font/dejavusanscondensed.php
deleted file mode 100755
index c9929a0557..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensed.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-57 -236 1158 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>572,chr(129)=>540,chr(130)=>286,chr(131)=>316,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>450,chr(137)=>1208,chr(138)=>571,chr(139)=>360,chr(140)=>962,chr(141)=>540,chr(142)=>616,chr(143)=>540,chr(144)=>540,chr(145)=>286,chr(146)=>286,chr(147)=>466,chr(148)=>466,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>469,chr(155)=>360,chr(156)=>920,chr(157)=>540,chr(158)=>472,chr(159)=>549,chr(160)=>286,chr(161)=>360,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>424,chr(171)=>550,chr(172)=>754,chr(173)=>325,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>572,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>424,chr(187)=>550,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>478,chr(192)=>615,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>615,
-	chr(198)=>876,chr(199)=>628,chr(200)=>568,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>265,chr(205)=>265,chr(206)=>265,chr(207)=>265,chr(208)=>697,chr(209)=>673,chr(210)=>708,chr(211)=>708,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>708,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>549,chr(222)=>544,chr(223)=>567,chr(224)=>551,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>551,chr(230)=>883,chr(231)=>495,chr(232)=>554,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>250,chr(237)=>250,chr(238)=>250,chr(239)=>250,chr(240)=>550,chr(241)=>570,
-	chr(242)=>550,chr(243)=>550,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>550,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>532,chr(254)=>571,chr(255)=>532);
-$enc='win-1252';
-$diff='';
-$file='dejavusanscondensed.z';
-$size1=6121;
-$size2=28139;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensed.z b/main/inc/lib/mpdf/font/dejavusanscondensed.z
deleted file mode 100755
index 98f38e03fb..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensed.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-2.php
deleted file mode 100755
index 1decd1e8a0..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-51 -236 965 935]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>754,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>696,chr(162)=>450,chr(163)=>578,chr(164)=>572,chr(165)=>573,chr(166)=>648,chr(167)=>450,chr(168)=>450,chr(169)=>648,chr(170)=>648,chr(171)=>614,chr(172)=>652,chr(173)=>374,chr(174)=>652,chr(175)=>652,
-	chr(176)=>450,chr(177)=>607,chr(178)=>450,chr(179)=>334,chr(180)=>450,chr(181)=>431,chr(182)=>536,chr(183)=>450,chr(184)=>450,chr(185)=>536,chr(186)=>536,chr(187)=>430,chr(188)=>523,chr(189)=>450,chr(190)=>523,chr(191)=>523,chr(192)=>693,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>573,
-	chr(198)=>660,chr(199)=>660,chr(200)=>660,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>615,chr(205)=>334,chr(206)=>334,chr(207)=>747,chr(208)=>754,chr(209)=>753,chr(210)=>753,chr(211)=>765,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>693,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>651,chr(222)=>614,chr(223)=>647,chr(224)=>444,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>308,chr(230)=>533,chr(231)=>533,chr(232)=>533,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>610,chr(237)=>308,chr(238)=>308,chr(239)=>644,chr(240)=>644,chr(241)=>641,
-	chr(242)=>641,chr(243)=>618,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>444,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>586,chr(254)=>430,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusanscondensedb-iso-8859-2.z';
-$size1=6073;
-$size2=25304;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-2.z
deleted file mode 100755
index 0e8fec427f..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-4.php
deleted file mode 100755
index e6a3ced478..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-51 -236 965 931]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>754,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>696,chr(162)=>598,chr(163)=>693,chr(164)=>572,chr(165)=>334,chr(166)=>573,chr(167)=>450,chr(168)=>450,chr(169)=>648,chr(170)=>615,chr(171)=>738,chr(172)=>614,chr(173)=>374,chr(174)=>652,chr(175)=>450,
-	chr(176)=>450,chr(177)=>607,chr(178)=>450,chr(179)=>444,chr(180)=>450,chr(181)=>308,chr(182)=>308,chr(183)=>450,chr(184)=>450,chr(185)=>536,chr(186)=>610,chr(187)=>644,chr(188)=>430,chr(189)=>753,chr(190)=>523,chr(191)=>641,chr(192)=>696,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>696,
-	chr(198)=>976,chr(199)=>334,chr(200)=>660,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>615,chr(205)=>334,chr(206)=>334,chr(207)=>334,chr(208)=>754,chr(209)=>753,chr(210)=>765,chr(211)=>697,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>765,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>730,chr(222)=>730,chr(223)=>647,chr(224)=>607,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>607,chr(230)=>943,chr(231)=>308,chr(232)=>533,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>610,chr(237)=>308,chr(238)=>308,chr(239)=>308,chr(240)=>644,chr(241)=>641,
-	chr(242)=>618,chr(243)=>598,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>618,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>641,chr(254)=>641,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusanscondensedb-iso-8859-4.z';
-$size1=6092;
-$size2=25643;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-4.z
deleted file mode 100755
index 088b6b08b3..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-7.php
deleted file mode 100755
index b331fc6bbc..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-51 -236 965 978]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>754,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>342,chr(162)=>342,chr(163)=>626,chr(164)=>540,chr(165)=>540,chr(166)=>329,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>581,chr(172)=>754,chr(173)=>374,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>397,chr(181)=>450,chr(182)=>717,chr(183)=>342,chr(184)=>761,chr(185)=>908,chr(186)=>507,chr(187)=>581,chr(188)=>801,chr(189)=>932,chr(190)=>882,chr(191)=>804,chr(192)=>351,chr(193)=>696,chr(194)=>686,chr(195)=>573,chr(196)=>696,chr(197)=>615,
-	chr(198)=>652,chr(199)=>753,chr(200)=>765,chr(201)=>334,chr(202)=>697,chr(203)=>696,chr(204)=>896,chr(205)=>753,chr(206)=>568,chr(207)=>765,chr(208)=>753,chr(209)=>659,chr(210)=>540,chr(211)=>615,chr(212)=>614,chr(213)=>651,chr(214)=>765,chr(215)=>694,chr(216)=>765,chr(217)=>765,chr(218)=>334,chr(219)=>651,
-	chr(220)=>618,chr(221)=>501,chr(222)=>641,chr(223)=>351,chr(224)=>607,chr(225)=>618,chr(226)=>644,chr(227)=>613,chr(228)=>618,chr(229)=>501,chr(230)=>532,chr(231)=>641,chr(232)=>618,chr(233)=>351,chr(234)=>639,chr(235)=>569,chr(236)=>662,chr(237)=>613,chr(238)=>532,chr(239)=>618,chr(240)=>712,chr(241)=>644,
-	chr(242)=>533,chr(243)=>701,chr(244)=>574,chr(245)=>607,chr(246)=>704,chr(247)=>580,chr(248)=>714,chr(249)=>782,chr(250)=>351,chr(251)=>607,chr(252)=>618,chr(253)=>607,chr(254)=>782,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusanscondensedb-iso-8859-7.z';
-$size1=6048;
-$size2=21791;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-7.z
deleted file mode 100755
index 2e340fe9ef..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-9.php
deleted file mode 100755
index 435b883aa5..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-51 -236 965 931]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>754,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>410,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>329,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>507,chr(171)=>581,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>662,chr(182)=>572,chr(183)=>342,chr(184)=>450,chr(185)=>394,chr(186)=>507,chr(187)=>581,chr(188)=>932,chr(189)=>932,chr(190)=>932,chr(191)=>522,chr(192)=>696,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>696,
-	chr(198)=>976,chr(199)=>660,chr(200)=>615,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>334,chr(205)=>334,chr(206)=>334,chr(207)=>334,chr(208)=>738,chr(209)=>753,chr(210)=>765,chr(211)=>765,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>765,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>334,chr(222)=>648,chr(223)=>647,chr(224)=>607,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>607,chr(230)=>943,chr(231)=>533,chr(232)=>610,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>308,chr(237)=>308,chr(238)=>308,chr(239)=>308,chr(240)=>644,chr(241)=>641,
-	chr(242)=>618,chr(243)=>618,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>618,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>308,chr(254)=>536,chr(255)=>586);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusanscondensedb-iso-8859-9.z';
-$size1=6127;
-$size2=25808;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-9.z
deleted file mode 100755
index 7d7eac9ec7..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedb-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-win-1251.php b/main/inc/lib/mpdf/font/dejavusanscondensedb-win-1251.php
deleted file mode 100755
index df8ea9e9f5..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedb-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-51 -236 1275 928]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>754,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>791,chr(129)=>573,chr(130)=>342,chr(131)=>470,
-	chr(132)=>591,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>626,chr(137)=>1296,chr(138)=>1039,chr(139)=>371,chr(140)=>1017,chr(141)=>735,chr(142)=>791,chr(143)=>753,chr(144)=>642,chr(145)=>342,chr(146)=>342,chr(147)=>591,chr(148)=>591,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>892,chr(155)=>371,chr(156)=>860,chr(157)=>611,chr(158)=>661,chr(159)=>622,chr(160)=>313,chr(161)=>694,chr(162)=>586,chr(163)=>334,chr(164)=>572,chr(165)=>573,chr(166)=>329,chr(167)=>450,chr(168)=>615,chr(169)=>900,chr(170)=>660,chr(171)=>581,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>334,
-	chr(176)=>450,chr(177)=>754,chr(178)=>334,chr(179)=>308,chr(180)=>470,chr(181)=>662,chr(182)=>572,chr(183)=>342,chr(184)=>610,chr(185)=>1083,chr(186)=>533,chr(187)=>581,chr(188)=>308,chr(189)=>648,chr(190)=>536,chr(191)=>308,chr(192)=>696,chr(193)=>686,chr(194)=>686,chr(195)=>573,chr(196)=>801,chr(197)=>615,
-	chr(198)=>1102,chr(199)=>639,chr(200)=>753,chr(201)=>753,chr(202)=>735,chr(203)=>747,chr(204)=>896,chr(205)=>753,chr(206)=>765,chr(207)=>753,chr(208)=>659,chr(209)=>660,chr(210)=>614,chr(211)=>694,chr(212)=>892,chr(213)=>694,chr(214)=>835,chr(215)=>727,chr(216)=>1112,chr(217)=>1193,chr(218)=>845,chr(219)=>932,
-	chr(220)=>686,chr(221)=>660,chr(222)=>1056,chr(223)=>693,chr(224)=>607,chr(225)=>628,chr(226)=>569,chr(227)=>470,chr(228)=>727,chr(229)=>610,chr(230)=>896,chr(231)=>523,chr(232)=>630,chr(233)=>630,chr(234)=>611,chr(235)=>659,chr(236)=>735,chr(237)=>622,chr(238)=>618,chr(239)=>622,chr(240)=>644,chr(241)=>533,
-	chr(242)=>521,chr(243)=>586,chr(244)=>893,chr(245)=>580,chr(246)=>667,chr(247)=>618,chr(248)=>956,chr(249)=>995,chr(250)=>676,chr(251)=>813,chr(252)=>569,chr(253)=>533,chr(254)=>875,chr(255)=>578);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusanscondensedb-win-1251.z';
-$size1=6283;
-$size2=26745;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb-win-1251.z b/main/inc/lib/mpdf/font/dejavusanscondensedb-win-1251.z
deleted file mode 100755
index 6ebe453000..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedb-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb.php b/main/inc/lib/mpdf/font/dejavusanscondensedb.php
deleted file mode 100755
index 5efcc7edf1..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedb.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-51 -236 1275 931]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>754,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>626,chr(129)=>540,chr(130)=>342,chr(131)=>391,
-	chr(132)=>591,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>450,chr(137)=>1296,chr(138)=>648,chr(139)=>371,chr(140)=>1050,chr(141)=>540,chr(142)=>652,chr(143)=>540,chr(144)=>540,chr(145)=>342,chr(146)=>342,chr(147)=>591,chr(148)=>591,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>536,chr(155)=>371,chr(156)=>984,chr(157)=>540,chr(158)=>523,chr(159)=>651,chr(160)=>313,chr(161)=>410,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>329,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>507,chr(171)=>581,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>662,chr(182)=>572,chr(183)=>342,chr(184)=>450,chr(185)=>394,chr(186)=>507,chr(187)=>581,chr(188)=>932,chr(189)=>932,chr(190)=>932,chr(191)=>522,chr(192)=>696,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>696,
-	chr(198)=>976,chr(199)=>660,chr(200)=>615,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>334,chr(205)=>334,chr(206)=>334,chr(207)=>334,chr(208)=>754,chr(209)=>753,chr(210)=>765,chr(211)=>765,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>765,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>651,chr(222)=>664,chr(223)=>647,chr(224)=>607,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>607,chr(230)=>943,chr(231)=>533,chr(232)=>610,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>308,chr(237)=>308,chr(238)=>308,chr(239)=>308,chr(240)=>618,chr(241)=>641,
-	chr(242)=>618,chr(243)=>618,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>618,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>586,chr(254)=>644,chr(255)=>586);
-$enc='win-1252';
-$diff='';
-$file='dejavusanscondensedb.z';
-$size1=6141;
-$size2=28982;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedb.z b/main/inc/lib/mpdf/font/dejavusanscondensedb.z
deleted file mode 100755
index c89597b1a8..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedb.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-2.php
deleted file mode 100755
index 67c5d8ad63..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1029 936]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>626,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>696,chr(162)=>450,chr(163)=>594,chr(164)=>572,chr(165)=>573,chr(166)=>648,chr(167)=>450,chr(168)=>450,chr(169)=>648,chr(170)=>648,chr(171)=>614,chr(172)=>652,chr(173)=>374,chr(174)=>652,chr(175)=>652,
-	chr(176)=>450,chr(177)=>607,chr(178)=>450,chr(179)=>337,chr(180)=>450,chr(181)=>308,chr(182)=>536,chr(183)=>450,chr(184)=>450,chr(185)=>536,chr(186)=>536,chr(187)=>430,chr(188)=>523,chr(189)=>450,chr(190)=>523,chr(191)=>523,chr(192)=>693,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>573,
-	chr(198)=>660,chr(199)=>660,chr(200)=>660,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>615,chr(205)=>334,chr(206)=>334,chr(207)=>747,chr(208)=>760,chr(209)=>753,chr(210)=>753,chr(211)=>765,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>693,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>651,chr(222)=>614,chr(223)=>647,chr(224)=>444,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>308,chr(230)=>533,chr(231)=>533,chr(232)=>533,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>610,chr(237)=>308,chr(238)=>308,chr(239)=>644,chr(240)=>644,chr(241)=>641,
-	chr(242)=>641,chr(243)=>618,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>444,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>586,chr(254)=>430,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusanscondensedbi-iso-8859-2.z';
-$size1=6114;
-$size2=26002;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-2.z
deleted file mode 100755
index 0f24acbfbf..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-4.php
deleted file mode 100755
index 10538fb55d..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1029 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>626,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>696,chr(162)=>598,chr(163)=>693,chr(164)=>572,chr(165)=>334,chr(166)=>573,chr(167)=>450,chr(168)=>450,chr(169)=>648,chr(170)=>615,chr(171)=>738,chr(172)=>614,chr(173)=>374,chr(174)=>652,chr(175)=>450,
-	chr(176)=>450,chr(177)=>607,chr(178)=>450,chr(179)=>444,chr(180)=>450,chr(181)=>308,chr(182)=>308,chr(183)=>450,chr(184)=>450,chr(185)=>536,chr(186)=>610,chr(187)=>644,chr(188)=>430,chr(189)=>753,chr(190)=>523,chr(191)=>641,chr(192)=>696,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>696,
-	chr(198)=>976,chr(199)=>334,chr(200)=>660,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>615,chr(205)=>334,chr(206)=>334,chr(207)=>334,chr(208)=>760,chr(209)=>753,chr(210)=>765,chr(211)=>697,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>765,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>730,chr(222)=>730,chr(223)=>647,chr(224)=>607,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>607,chr(230)=>943,chr(231)=>308,chr(232)=>533,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>610,chr(237)=>308,chr(238)=>308,chr(239)=>308,chr(240)=>644,chr(241)=>641,
-	chr(242)=>618,chr(243)=>598,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>618,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>641,chr(254)=>641,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusanscondensedbi-iso-8859-4.z';
-$size1=6133;
-$size2=26274;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-4.z
deleted file mode 100755
index 16fd37b108..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-7.php
deleted file mode 100755
index ede3564c48..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1029 978]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>626,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>342,chr(162)=>342,chr(163)=>626,chr(164)=>540,chr(165)=>540,chr(166)=>329,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>584,chr(172)=>754,chr(173)=>374,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>397,chr(181)=>450,chr(182)=>717,chr(183)=>342,chr(184)=>761,chr(185)=>908,chr(186)=>507,chr(187)=>584,chr(188)=>801,chr(189)=>932,chr(190)=>882,chr(191)=>804,chr(192)=>351,chr(193)=>696,chr(194)=>686,chr(195)=>573,chr(196)=>696,chr(197)=>615,
-	chr(198)=>652,chr(199)=>753,chr(200)=>765,chr(201)=>334,chr(202)=>697,chr(203)=>696,chr(204)=>896,chr(205)=>753,chr(206)=>568,chr(207)=>765,chr(208)=>753,chr(209)=>659,chr(210)=>540,chr(211)=>615,chr(212)=>614,chr(213)=>651,chr(214)=>765,chr(215)=>694,chr(216)=>765,chr(217)=>765,chr(218)=>334,chr(219)=>651,
-	chr(220)=>618,chr(221)=>501,chr(222)=>641,chr(223)=>351,chr(224)=>607,chr(225)=>618,chr(226)=>644,chr(227)=>613,chr(228)=>618,chr(229)=>501,chr(230)=>532,chr(231)=>641,chr(232)=>618,chr(233)=>351,chr(234)=>639,chr(235)=>569,chr(236)=>662,chr(237)=>613,chr(238)=>532,chr(239)=>618,chr(240)=>712,chr(241)=>644,
-	chr(242)=>533,chr(243)=>701,chr(244)=>574,chr(245)=>607,chr(246)=>704,chr(247)=>580,chr(248)=>714,chr(249)=>782,chr(250)=>351,chr(251)=>607,chr(252)=>618,chr(253)=>607,chr(254)=>782,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusanscondensedbi-iso-8859-7.z';
-$size1=6089;
-$size2=22446;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-7.z
deleted file mode 100755
index 35ea046ea5..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-9.php
deleted file mode 100755
index 4a9d3095eb..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1029 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>626,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>410,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>329,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>507,chr(171)=>584,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>662,chr(182)=>572,chr(183)=>342,chr(184)=>450,chr(185)=>394,chr(186)=>507,chr(187)=>584,chr(188)=>932,chr(189)=>932,chr(190)=>932,chr(191)=>522,chr(192)=>696,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>696,
-	chr(198)=>976,chr(199)=>660,chr(200)=>615,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>334,chr(205)=>334,chr(206)=>334,chr(207)=>334,chr(208)=>738,chr(209)=>753,chr(210)=>765,chr(211)=>765,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>765,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>334,chr(222)=>648,chr(223)=>647,chr(224)=>607,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>607,chr(230)=>943,chr(231)=>533,chr(232)=>610,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>308,chr(237)=>308,chr(238)=>308,chr(239)=>308,chr(240)=>644,chr(241)=>641,
-	chr(242)=>618,chr(243)=>618,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>618,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>308,chr(254)=>536,chr(255)=>586);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusanscondensedbi-iso-8859-9.z';
-$size1=6168;
-$size2=26317;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-9.z
deleted file mode 100755
index f83e96e39a..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedbi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-win-1251.php b/main/inc/lib/mpdf/font/dejavusanscondensedbi-win-1251.php
deleted file mode 100755
index d07a1331c9..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedbi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1261 927]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>626,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>791,chr(129)=>573,chr(130)=>342,chr(131)=>470,
-	chr(132)=>580,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>626,chr(137)=>1309,chr(138)=>1039,chr(139)=>371,chr(140)=>1017,chr(141)=>735,chr(142)=>791,chr(143)=>753,chr(144)=>642,chr(145)=>342,chr(146)=>342,chr(147)=>580,chr(148)=>580,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>892,chr(155)=>371,chr(156)=>860,chr(157)=>611,chr(158)=>661,chr(159)=>622,chr(160)=>313,chr(161)=>694,chr(162)=>586,chr(163)=>334,chr(164)=>572,chr(165)=>573,chr(166)=>329,chr(167)=>450,chr(168)=>615,chr(169)=>900,chr(170)=>660,chr(171)=>584,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>334,
-	chr(176)=>450,chr(177)=>754,chr(178)=>334,chr(179)=>308,chr(180)=>470,chr(181)=>662,chr(182)=>572,chr(183)=>342,chr(184)=>610,chr(185)=>1083,chr(186)=>533,chr(187)=>584,chr(188)=>308,chr(189)=>648,chr(190)=>536,chr(191)=>308,chr(192)=>696,chr(193)=>686,chr(194)=>686,chr(195)=>573,chr(196)=>801,chr(197)=>615,
-	chr(198)=>1102,chr(199)=>639,chr(200)=>753,chr(201)=>753,chr(202)=>735,chr(203)=>747,chr(204)=>896,chr(205)=>753,chr(206)=>765,chr(207)=>753,chr(208)=>659,chr(209)=>660,chr(210)=>614,chr(211)=>694,chr(212)=>892,chr(213)=>694,chr(214)=>835,chr(215)=>727,chr(216)=>1112,chr(217)=>1193,chr(218)=>845,chr(219)=>932,
-	chr(220)=>686,chr(221)=>660,chr(222)=>1056,chr(223)=>693,chr(224)=>607,chr(225)=>628,chr(226)=>569,chr(227)=>470,chr(228)=>727,chr(229)=>610,chr(230)=>896,chr(231)=>523,chr(232)=>630,chr(233)=>630,chr(234)=>611,chr(235)=>659,chr(236)=>735,chr(237)=>622,chr(238)=>618,chr(239)=>622,chr(240)=>644,chr(241)=>533,
-	chr(242)=>521,chr(243)=>586,chr(244)=>893,chr(245)=>580,chr(246)=>667,chr(247)=>618,chr(248)=>956,chr(249)=>995,chr(250)=>676,chr(251)=>813,chr(252)=>569,chr(253)=>533,chr(254)=>875,chr(255)=>578);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusanscondensedbi-win-1251.z';
-$size1=6323;
-$size2=27401;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi-win-1251.z b/main/inc/lib/mpdf/font/dejavusanscondensedbi-win-1251.z
deleted file mode 100755
index 41839fe6c2..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedbi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi.php b/main/inc/lib/mpdf/font/dejavusanscondensedbi.php
deleted file mode 100755
index 7e8615f0a1..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedbi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1261 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>410,'"'=>469,'#'=>626,'$'=>626,'%'=>901,'&'=>785,'\''=>275,'('=>411,')'=>411,'*'=>470,'+'=>754,
-	','=>342,'-'=>374,'.'=>342,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>360,';'=>360,'<'=>754,'='=>754,'>'=>754,'?'=>522,'@'=>900,'A'=>696,
-	'B'=>686,'C'=>660,'D'=>747,'E'=>615,'F'=>615,'G'=>738,'H'=>753,'I'=>334,'J'=>334,'K'=>697,'L'=>573,'M'=>896,'N'=>753,'O'=>765,'P'=>659,'Q'=>765,'R'=>693,'S'=>648,'T'=>614,'U'=>730,'V'=>696,'W'=>993,
-	'X'=>694,'Y'=>651,'Z'=>652,'['=>411,'\\'=>329,']'=>411,'^'=>754,'_'=>450,'`'=>450,'a'=>607,'b'=>644,'c'=>533,'d'=>644,'e'=>610,'f'=>391,'g'=>644,'h'=>641,'i'=>308,'j'=>308,'k'=>598,'l'=>308,'m'=>938,
-	'n'=>641,'o'=>618,'p'=>644,'q'=>644,'r'=>444,'s'=>536,'t'=>430,'u'=>641,'v'=>586,'w'=>831,'x'=>580,'y'=>586,'z'=>523,'{'=>641,'|'=>329,'}'=>641,'~'=>754,chr(127)=>540,chr(128)=>626,chr(129)=>540,chr(130)=>342,chr(131)=>391,
-	chr(132)=>580,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>450,chr(137)=>1309,chr(138)=>648,chr(139)=>371,chr(140)=>1050,chr(141)=>540,chr(142)=>652,chr(143)=>540,chr(144)=>540,chr(145)=>342,chr(146)=>342,chr(147)=>580,chr(148)=>580,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>536,chr(155)=>371,chr(156)=>984,chr(157)=>540,chr(158)=>523,chr(159)=>651,chr(160)=>313,chr(161)=>410,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>329,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>507,chr(171)=>584,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>662,chr(182)=>572,chr(183)=>342,chr(184)=>450,chr(185)=>394,chr(186)=>507,chr(187)=>584,chr(188)=>932,chr(189)=>932,chr(190)=>932,chr(191)=>522,chr(192)=>696,chr(193)=>696,chr(194)=>696,chr(195)=>696,chr(196)=>696,chr(197)=>696,
-	chr(198)=>976,chr(199)=>660,chr(200)=>615,chr(201)=>615,chr(202)=>615,chr(203)=>615,chr(204)=>334,chr(205)=>334,chr(206)=>334,chr(207)=>334,chr(208)=>760,chr(209)=>753,chr(210)=>765,chr(211)=>765,chr(212)=>765,chr(213)=>765,chr(214)=>765,chr(215)=>754,chr(216)=>765,chr(217)=>730,chr(218)=>730,chr(219)=>730,
-	chr(220)=>730,chr(221)=>651,chr(222)=>668,chr(223)=>647,chr(224)=>607,chr(225)=>607,chr(226)=>607,chr(227)=>607,chr(228)=>607,chr(229)=>607,chr(230)=>943,chr(231)=>533,chr(232)=>610,chr(233)=>610,chr(234)=>610,chr(235)=>610,chr(236)=>308,chr(237)=>308,chr(238)=>308,chr(239)=>308,chr(240)=>618,chr(241)=>641,
-	chr(242)=>618,chr(243)=>618,chr(244)=>618,chr(245)=>618,chr(246)=>618,chr(247)=>754,chr(248)=>618,chr(249)=>641,chr(250)=>641,chr(251)=>641,chr(252)=>641,chr(253)=>586,chr(254)=>644,chr(255)=>586);
-$enc='win-1252';
-$diff='';
-$file='dejavusanscondensedbi.z';
-$size1=6181;
-$size2=29521;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedbi.z b/main/inc/lib/mpdf/font/dejavusanscondensedbi.z
deleted file mode 100755
index b4dce01404..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedbi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-2.php
deleted file mode 100755
index a7cd26d44f..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-147 -236 918 929]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>615,chr(162)=>450,chr(163)=>505,chr(164)=>572,chr(165)=>501,chr(166)=>571,chr(167)=>450,chr(168)=>450,chr(169)=>571,chr(170)=>571,chr(171)=>549,chr(172)=>616,chr(173)=>325,chr(174)=>616,chr(175)=>616,
-	chr(176)=>450,chr(177)=>551,chr(178)=>450,chr(179)=>258,chr(180)=>450,chr(181)=>250,chr(182)=>469,chr(183)=>450,chr(184)=>450,chr(185)=>469,chr(186)=>469,chr(187)=>353,chr(188)=>472,chr(189)=>450,chr(190)=>472,chr(191)=>472,chr(192)=>625,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>501,
-	chr(198)=>628,chr(199)=>628,chr(200)=>628,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>568,chr(205)=>265,chr(206)=>265,chr(207)=>693,chr(208)=>697,chr(209)=>673,chr(210)=>673,chr(211)=>708,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>625,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>549,chr(222)=>549,chr(223)=>567,chr(224)=>370,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>250,chr(230)=>495,chr(231)=>495,chr(232)=>495,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>554,chr(237)=>250,chr(238)=>250,chr(239)=>571,chr(240)=>571,chr(241)=>570,
-	chr(242)=>570,chr(243)=>550,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>370,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>532,chr(254)=>353,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusanscondensedi-iso-8859-2.z';
-$size1=6091;
-$size2=25393;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-2.z
deleted file mode 100755
index 0818fb167c..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-4.php
deleted file mode 100755
index 274fe27013..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-147 -250 918 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>615,chr(162)=>521,chr(163)=>625,chr(164)=>572,chr(165)=>265,chr(166)=>501,chr(167)=>450,chr(168)=>450,chr(169)=>571,chr(170)=>568,chr(171)=>697,chr(172)=>549,chr(173)=>325,chr(174)=>616,chr(175)=>450,
-	chr(176)=>450,chr(177)=>551,chr(178)=>450,chr(179)=>370,chr(180)=>450,chr(181)=>250,chr(182)=>250,chr(183)=>450,chr(184)=>450,chr(185)=>469,chr(186)=>554,chr(187)=>571,chr(188)=>353,chr(189)=>673,chr(190)=>472,chr(191)=>570,chr(192)=>615,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>615,
-	chr(198)=>876,chr(199)=>265,chr(200)=>628,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>568,chr(205)=>265,chr(206)=>265,chr(207)=>265,chr(208)=>697,chr(209)=>673,chr(210)=>708,chr(211)=>590,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>708,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>659,chr(222)=>659,chr(223)=>567,chr(224)=>551,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>551,chr(230)=>896,chr(231)=>250,chr(232)=>495,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>554,chr(237)=>250,chr(238)=>250,chr(239)=>250,chr(240)=>571,chr(241)=>570,
-	chr(242)=>550,chr(243)=>521,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>550,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>570,chr(254)=>570,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusanscondensedi-iso-8859-4.z';
-$size1=6110;
-$size2=25707;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-4.z
deleted file mode 100755
index f1bf28b390..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-7.php
deleted file mode 100755
index b99d4ba197..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-147 -236 918 978]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>286,chr(162)=>286,chr(163)=>572,chr(164)=>540,chr(165)=>540,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>555,chr(172)=>754,chr(173)=>325,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>450,chr(182)=>615,chr(183)=>286,chr(184)=>690,chr(185)=>813,chr(186)=>391,chr(187)=>555,chr(188)=>755,chr(189)=>872,chr(190)=>773,chr(191)=>814,chr(192)=>304,chr(193)=>615,chr(194)=>617,chr(195)=>501,chr(196)=>615,chr(197)=>568,
-	chr(198)=>616,chr(199)=>677,chr(200)=>708,chr(201)=>265,chr(202)=>590,chr(203)=>615,chr(204)=>776,chr(205)=>673,chr(206)=>568,chr(207)=>708,chr(208)=>677,chr(209)=>542,chr(210)=>540,chr(211)=>568,chr(212)=>549,chr(213)=>549,chr(214)=>708,chr(215)=>616,chr(216)=>708,chr(217)=>688,chr(218)=>265,chr(219)=>549,
-	chr(220)=>593,chr(221)=>486,chr(222)=>570,chr(223)=>304,chr(224)=>521,chr(225)=>593,chr(226)=>574,chr(227)=>532,chr(228)=>550,chr(229)=>486,chr(230)=>489,chr(231)=>570,chr(232)=>550,chr(233)=>304,chr(234)=>530,chr(235)=>532,chr(236)=>572,chr(237)=>502,chr(238)=>501,chr(239)=>550,chr(240)=>542,chr(241)=>571,
-	chr(242)=>528,chr(243)=>570,chr(244)=>542,chr(245)=>521,chr(246)=>593,chr(247)=>532,chr(248)=>593,chr(249)=>753,chr(250)=>304,chr(251)=>521,chr(252)=>550,chr(253)=>521,chr(254)=>753,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusanscondensedi-iso-8859-7.z';
-$size1=6066;
-$size2=21979;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-7.z
deleted file mode 100755
index f2800751df..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-9.php
deleted file mode 100755
index 5d1ddb64e2..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-147 -236 918 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>360,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>424,chr(171)=>555,chr(172)=>754,chr(173)=>325,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>572,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>424,chr(187)=>555,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>478,chr(192)=>615,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>615,
-	chr(198)=>876,chr(199)=>628,chr(200)=>568,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>265,chr(205)=>265,chr(206)=>265,chr(207)=>265,chr(208)=>697,chr(209)=>673,chr(210)=>708,chr(211)=>708,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>708,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>265,chr(222)=>571,chr(223)=>567,chr(224)=>551,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>551,chr(230)=>896,chr(231)=>495,chr(232)=>554,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>250,chr(237)=>250,chr(238)=>250,chr(239)=>250,chr(240)=>571,chr(241)=>570,
-	chr(242)=>550,chr(243)=>550,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>550,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>250,chr(254)=>469,chr(255)=>532);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusanscondensedi-iso-8859-9.z';
-$size1=6145;
-$size2=25704;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-9.z
deleted file mode 100755
index 4478bcb7d9..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-win-1251.php b/main/inc/lib/mpdf/font/dejavusanscondensedi-win-1251.php
deleted file mode 100755
index 4e49560026..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-147 -236 1133 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>708,chr(129)=>501,chr(130)=>286,chr(131)=>473,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>572,chr(137)=>1215,chr(138)=>984,chr(139)=>360,chr(140)=>940,chr(141)=>639,chr(142)=>708,chr(143)=>677,chr(144)=>563,chr(145)=>286,chr(146)=>286,chr(147)=>466,chr(148)=>466,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>812,chr(155)=>360,chr(156)=>809,chr(157)=>543,chr(158)=>586,chr(159)=>588,chr(160)=>286,chr(161)=>548,chr(162)=>532,chr(163)=>265,chr(164)=>572,chr(165)=>549,chr(166)=>303,chr(167)=>450,chr(168)=>568,chr(169)=>900,chr(170)=>628,chr(171)=>555,chr(172)=>754,chr(173)=>325,chr(174)=>900,chr(175)=>265,
-	chr(176)=>450,chr(177)=>754,chr(178)=>265,chr(179)=>250,chr(180)=>473,chr(181)=>572,chr(182)=>572,chr(183)=>286,chr(184)=>554,chr(185)=>936,chr(186)=>494,chr(187)=>555,chr(188)=>250,chr(189)=>571,chr(190)=>469,chr(191)=>250,chr(192)=>615,chr(193)=>617,chr(194)=>617,chr(195)=>501,chr(196)=>703,chr(197)=>568,
-	chr(198)=>969,chr(199)=>577,chr(200)=>673,chr(201)=>673,chr(202)=>639,chr(203)=>677,chr(204)=>776,chr(205)=>677,chr(206)=>708,chr(207)=>677,chr(208)=>542,chr(209)=>628,chr(210)=>549,chr(211)=>548,chr(212)=>774,chr(213)=>616,chr(214)=>699,chr(215)=>617,chr(216)=>962,chr(217)=>984,chr(218)=>749,chr(219)=>736,
-	chr(220)=>617,chr(221)=>628,chr(222)=>971,chr(223)=>625,chr(224)=>551,chr(225)=>555,chr(226)=>530,chr(227)=>473,chr(228)=>622,chr(229)=>554,chr(230)=>811,chr(231)=>479,chr(232)=>584,chr(233)=>584,chr(234)=>543,chr(235)=>575,chr(236)=>679,chr(237)=>588,chr(238)=>550,chr(239)=>588,chr(240)=>571,chr(241)=>495,
-	chr(242)=>524,chr(243)=>532,chr(244)=>769,chr(245)=>532,chr(246)=>612,chr(247)=>532,chr(248)=>823,chr(249)=>848,chr(250)=>636,chr(251)=>710,chr(252)=>530,chr(253)=>494,chr(254)=>757,chr(255)=>541);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusanscondensedi-win-1251.z';
-$size1=6301;
-$size2=26785;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi-win-1251.z b/main/inc/lib/mpdf/font/dejavusanscondensedi-win-1251.z
deleted file mode 100755
index 74ef8462fe..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi.php b/main/inc/lib/mpdf/font/dejavusanscondensedi.php
deleted file mode 100755
index bd1ca1ceaa..0000000000
--- a/main/inc/lib/mpdf/font/dejavusanscondensedi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-147 -236 1133 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>360,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>702,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>325,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>478,'@'=>900,'A'=>615,
-	'B'=>617,'C'=>628,'D'=>693,'E'=>568,'F'=>518,'G'=>697,'H'=>677,'I'=>265,'J'=>265,'K'=>590,'L'=>501,'M'=>776,'N'=>673,'O'=>708,'P'=>542,'Q'=>708,'R'=>625,'S'=>571,'T'=>549,'U'=>659,'V'=>615,'W'=>890,
-	'X'=>616,'Y'=>549,'Z'=>616,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>551,'b'=>571,'c'=>495,'d'=>571,'e'=>554,'f'=>316,'g'=>571,'h'=>570,'i'=>250,'j'=>250,'k'=>521,'l'=>250,'m'=>876,
-	'n'=>570,'o'=>550,'p'=>571,'q'=>571,'r'=>370,'s'=>469,'t'=>353,'u'=>570,'v'=>532,'w'=>736,'x'=>532,'y'=>532,'z'=>472,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>572,chr(129)=>540,chr(130)=>286,chr(131)=>316,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>450,chr(137)=>1215,chr(138)=>571,chr(139)=>360,chr(140)=>962,chr(141)=>540,chr(142)=>616,chr(143)=>540,chr(144)=>540,chr(145)=>286,chr(146)=>286,chr(147)=>466,chr(148)=>466,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>469,chr(155)=>360,chr(156)=>925,chr(157)=>540,chr(158)=>472,chr(159)=>549,chr(160)=>286,chr(161)=>360,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>424,chr(171)=>555,chr(172)=>754,chr(173)=>325,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>572,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>424,chr(187)=>555,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>478,chr(192)=>615,chr(193)=>615,chr(194)=>615,chr(195)=>615,chr(196)=>615,chr(197)=>615,
-	chr(198)=>876,chr(199)=>628,chr(200)=>568,chr(201)=>568,chr(202)=>568,chr(203)=>568,chr(204)=>265,chr(205)=>265,chr(206)=>265,chr(207)=>265,chr(208)=>697,chr(209)=>673,chr(210)=>708,chr(211)=>708,chr(212)=>708,chr(213)=>708,chr(214)=>708,chr(215)=>754,chr(216)=>708,chr(217)=>659,chr(218)=>659,chr(219)=>659,
-	chr(220)=>659,chr(221)=>549,chr(222)=>547,chr(223)=>567,chr(224)=>551,chr(225)=>551,chr(226)=>551,chr(227)=>551,chr(228)=>551,chr(229)=>551,chr(230)=>896,chr(231)=>495,chr(232)=>554,chr(233)=>554,chr(234)=>554,chr(235)=>554,chr(236)=>250,chr(237)=>250,chr(238)=>250,chr(239)=>250,chr(240)=>550,chr(241)=>570,
-	chr(242)=>550,chr(243)=>550,chr(244)=>550,chr(245)=>550,chr(246)=>550,chr(247)=>754,chr(248)=>550,chr(249)=>570,chr(250)=>570,chr(251)=>570,chr(252)=>570,chr(253)=>532,chr(254)=>571,chr(255)=>532);
-$enc='win-1252';
-$diff='';
-$file='dejavusanscondensedi.z';
-$size1=6159;
-$size2=28796;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusanscondensedi.z b/main/inc/lib/mpdf/font/dejavusanscondensedi.z
deleted file mode 100755
index 374d14f524..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusanscondensedi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-2.php
deleted file mode 100755
index dc06f2ac71..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-164 -236 1020 929]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>684,chr(162)=>500,chr(163)=>562,chr(164)=>636,chr(165)=>557,chr(166)=>635,chr(167)=>500,chr(168)=>500,chr(169)=>635,chr(170)=>635,chr(171)=>611,chr(172)=>685,chr(173)=>361,chr(174)=>685,chr(175)=>685,
-	chr(176)=>500,chr(177)=>613,chr(178)=>500,chr(179)=>287,chr(180)=>500,chr(181)=>278,chr(182)=>521,chr(183)=>500,chr(184)=>500,chr(185)=>521,chr(186)=>521,chr(187)=>392,chr(188)=>525,chr(189)=>500,chr(190)=>525,chr(191)=>525,chr(192)=>695,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>557,
-	chr(198)=>698,chr(199)=>698,chr(200)=>698,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>632,chr(205)=>295,chr(206)=>295,chr(207)=>770,chr(208)=>775,chr(209)=>748,chr(210)=>748,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>695,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>611,chr(222)=>611,chr(223)=>630,chr(224)=>411,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>278,chr(230)=>550,chr(231)=>550,chr(232)=>550,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>615,chr(237)=>278,chr(238)=>278,chr(239)=>635,chr(240)=>635,chr(241)=>634,
-	chr(242)=>634,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>411,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>592,chr(254)=>392,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusansi-iso-8859-2.z';
-$size1=6045;
-$size2=25588;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-2.z
deleted file mode 100755
index b62e9b1fce..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-4.php
deleted file mode 100755
index da7bc54fcf..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-164 -250 1020 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>684,chr(162)=>579,chr(163)=>695,chr(164)=>636,chr(165)=>295,chr(166)=>557,chr(167)=>500,chr(168)=>500,chr(169)=>635,chr(170)=>632,chr(171)=>775,chr(172)=>611,chr(173)=>361,chr(174)=>685,chr(175)=>500,
-	chr(176)=>500,chr(177)=>613,chr(178)=>500,chr(179)=>411,chr(180)=>500,chr(181)=>278,chr(182)=>278,chr(183)=>500,chr(184)=>500,chr(185)=>521,chr(186)=>615,chr(187)=>635,chr(188)=>392,chr(189)=>748,chr(190)=>525,chr(191)=>634,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
-	chr(198)=>974,chr(199)=>295,chr(200)=>698,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>632,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>656,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>732,chr(222)=>732,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>995,chr(231)=>278,chr(232)=>550,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>615,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>635,chr(241)=>634,
-	chr(242)=>612,chr(243)=>579,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>634,chr(254)=>634,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusansi-iso-8859-4.z';
-$size1=6064;
-$size2=25929;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-4.z
deleted file mode 100755
index 09bf1a1b56..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-7.php
deleted file mode 100755
index 3c51cfbcc8..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-164 -236 1020 978]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>318,chr(162)=>318,chr(163)=>636,chr(164)=>600,chr(165)=>600,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>617,chr(172)=>838,chr(173)=>361,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>500,chr(182)=>684,chr(183)=>318,chr(184)=>767,chr(185)=>903,chr(186)=>435,chr(187)=>617,chr(188)=>839,chr(189)=>969,chr(190)=>860,chr(191)=>905,chr(192)=>338,chr(193)=>684,chr(194)=>686,chr(195)=>557,chr(196)=>684,chr(197)=>632,
-	chr(198)=>685,chr(199)=>752,chr(200)=>787,chr(201)=>295,chr(202)=>656,chr(203)=>684,chr(204)=>863,chr(205)=>748,chr(206)=>632,chr(207)=>787,chr(208)=>752,chr(209)=>603,chr(210)=>600,chr(211)=>632,chr(212)=>611,chr(213)=>611,chr(214)=>787,chr(215)=>685,chr(216)=>787,chr(217)=>764,chr(218)=>295,chr(219)=>611,
-	chr(220)=>659,chr(221)=>541,chr(222)=>634,chr(223)=>338,chr(224)=>579,chr(225)=>659,chr(226)=>638,chr(227)=>592,chr(228)=>612,chr(229)=>541,chr(230)=>544,chr(231)=>634,chr(232)=>612,chr(233)=>338,chr(234)=>589,chr(235)=>592,chr(236)=>636,chr(237)=>559,chr(238)=>558,chr(239)=>612,chr(240)=>602,chr(241)=>635,
-	chr(242)=>587,chr(243)=>634,chr(244)=>602,chr(245)=>579,chr(246)=>660,chr(247)=>592,chr(248)=>660,chr(249)=>837,chr(250)=>338,chr(251)=>579,chr(252)=>612,chr(253)=>579,chr(254)=>837,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusansi-iso-8859-7.z';
-$size1=6020;
-$size2=22078;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-7.z
deleted file mode 100755
index 7a9be6d6e2..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-9.php
deleted file mode 100755
index f5e0284b56..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-164 -236 1020 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>401,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>471,chr(171)=>617,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>471,chr(187)=>617,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>531,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
-	chr(198)=>974,chr(199)=>698,chr(200)=>632,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>295,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>295,chr(222)=>635,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>995,chr(231)=>550,chr(232)=>615,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>635,chr(241)=>634,
-	chr(242)=>612,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>278,chr(254)=>521,chr(255)=>592);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusansi-iso-8859-9.z';
-$size1=6099;
-$size2=25915;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusansi-iso-8859-9.z
deleted file mode 100755
index 2c554e7a6f..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansi-win-1251.php b/main/inc/lib/mpdf/font/dejavusansi-win-1251.php
deleted file mode 100755
index ac600e3256..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-164 -236 1259 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>786,chr(129)=>557,chr(130)=>318,chr(131)=>525,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>636,chr(137)=>1350,chr(138)=>1094,chr(139)=>400,chr(140)=>1045,chr(141)=>710,chr(142)=>786,chr(143)=>752,chr(144)=>625,chr(145)=>318,chr(146)=>318,chr(147)=>518,chr(148)=>518,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>902,chr(155)=>400,chr(156)=>898,chr(157)=>604,chr(158)=>652,chr(159)=>654,chr(160)=>318,chr(161)=>609,chr(162)=>592,chr(163)=>295,chr(164)=>636,chr(165)=>610,chr(166)=>337,chr(167)=>500,chr(168)=>632,chr(169)=>1000,chr(170)=>698,chr(171)=>617,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>295,
-	chr(176)=>500,chr(177)=>838,chr(178)=>295,chr(179)=>278,chr(180)=>525,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>615,chr(185)=>1040,chr(186)=>549,chr(187)=>617,chr(188)=>278,chr(189)=>635,chr(190)=>521,chr(191)=>278,chr(192)=>684,chr(193)=>686,chr(194)=>686,chr(195)=>557,chr(196)=>781,chr(197)=>632,
-	chr(198)=>1077,chr(199)=>641,chr(200)=>748,chr(201)=>748,chr(202)=>710,chr(203)=>752,chr(204)=>863,chr(205)=>752,chr(206)=>787,chr(207)=>752,chr(208)=>603,chr(209)=>698,chr(210)=>611,chr(211)=>609,chr(212)=>861,chr(213)=>685,chr(214)=>776,chr(215)=>686,chr(216)=>1069,chr(217)=>1094,chr(218)=>833,chr(219)=>818,
-	chr(220)=>686,chr(221)=>698,chr(222)=>1080,chr(223)=>695,chr(224)=>613,chr(225)=>617,chr(226)=>589,chr(227)=>525,chr(228)=>691,chr(229)=>615,chr(230)=>901,chr(231)=>532,chr(232)=>650,chr(233)=>650,chr(234)=>604,chr(235)=>639,chr(236)=>754,chr(237)=>654,chr(238)=>612,chr(239)=>654,chr(240)=>635,chr(241)=>550,
-	chr(242)=>583,chr(243)=>592,chr(244)=>855,chr(245)=>592,chr(246)=>681,chr(247)=>591,chr(248)=>915,chr(249)=>942,chr(250)=>707,chr(251)=>790,chr(252)=>589,chr(253)=>549,chr(254)=>842,chr(255)=>602);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusansi-win-1251.z';
-$size1=6254;
-$size2=27040;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansi-win-1251.z b/main/inc/lib/mpdf/font/dejavusansi-win-1251.z
deleted file mode 100755
index b3f1775b71..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansi.php b/main/inc/lib/mpdf/font/dejavusansi.php
deleted file mode 100755
index 00ad2a60f7..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-164 -236 1259 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>401,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>780,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>361,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>531,'@'=>1000,'A'=>684,
-	'B'=>686,'C'=>698,'D'=>770,'E'=>632,'F'=>575,'G'=>775,'H'=>752,'I'=>295,'J'=>295,'K'=>656,'L'=>557,'M'=>863,'N'=>748,'O'=>787,'P'=>603,'Q'=>787,'R'=>695,'S'=>635,'T'=>611,'U'=>732,'V'=>684,'W'=>989,
-	'X'=>685,'Y'=>611,'Z'=>685,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>613,'b'=>635,'c'=>550,'d'=>635,'e'=>615,'f'=>352,'g'=>635,'h'=>634,'i'=>278,'j'=>278,'k'=>579,'l'=>278,'m'=>974,
-	'n'=>634,'o'=>612,'p'=>635,'q'=>635,'r'=>411,'s'=>521,'t'=>392,'u'=>634,'v'=>592,'w'=>818,'x'=>592,'y'=>592,'z'=>525,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>636,chr(129)=>600,chr(130)=>318,chr(131)=>352,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1350,chr(138)=>635,chr(139)=>400,chr(140)=>1070,chr(141)=>600,chr(142)=>685,chr(143)=>600,chr(144)=>600,chr(145)=>318,chr(146)=>318,chr(147)=>518,chr(148)=>518,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>521,chr(155)=>400,chr(156)=>1028,chr(157)=>600,chr(158)=>525,chr(159)=>611,chr(160)=>318,chr(161)=>401,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>471,chr(171)=>617,chr(172)=>838,chr(173)=>361,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>636,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>471,chr(187)=>617,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>531,chr(192)=>684,chr(193)=>684,chr(194)=>684,chr(195)=>684,chr(196)=>684,chr(197)=>684,
-	chr(198)=>974,chr(199)=>698,chr(200)=>632,chr(201)=>632,chr(202)=>632,chr(203)=>632,chr(204)=>295,chr(205)=>295,chr(206)=>295,chr(207)=>295,chr(208)=>775,chr(209)=>748,chr(210)=>787,chr(211)=>787,chr(212)=>787,chr(213)=>787,chr(214)=>787,chr(215)=>838,chr(216)=>787,chr(217)=>732,chr(218)=>732,chr(219)=>732,
-	chr(220)=>732,chr(221)=>611,chr(222)=>608,chr(223)=>630,chr(224)=>613,chr(225)=>613,chr(226)=>613,chr(227)=>613,chr(228)=>613,chr(229)=>613,chr(230)=>995,chr(231)=>550,chr(232)=>615,chr(233)=>615,chr(234)=>615,chr(235)=>615,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>612,chr(241)=>634,
-	chr(242)=>612,chr(243)=>612,chr(244)=>612,chr(245)=>612,chr(246)=>612,chr(247)=>838,chr(248)=>612,chr(249)=>634,chr(250)=>634,chr(251)=>634,chr(252)=>634,chr(253)=>592,chr(254)=>635,chr(255)=>592);
-$enc='win-1252';
-$diff='';
-$file='dejavusansi.z';
-$size1=6112;
-$size2=29031;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansi.z b/main/inc/lib/mpdf/font/dejavusansi.z
deleted file mode 100755
index f14bd6185d..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-2.php
deleted file mode 100755
index 9f32c1100b..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-5 -236 641 1042]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusansmono-iso-8859-2.z';
-$size1=5913;
-$size2=24920;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-2.z
deleted file mode 100755
index 274756701d..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-4.php
deleted file mode 100755
index 5308ca8f99..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[0 -280 609 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusansmono-iso-8859-4.z';
-$size1=5930;
-$size2=25257;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-4.z
deleted file mode 100755
index 26ff1dd6f5..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-7.php
deleted file mode 100755
index 59cbaec93f..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[0 -236 602 913]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusansmono-iso-8859-7.z';
-$size1=5886;
-$size2=20825;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-7.z
deleted file mode 100755
index a874ceace7..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-9.php
deleted file mode 100755
index a50aa1095d..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[0 -236 602 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusansmono-iso-8859-9.z';
-$size1=5965;
-$size2=25448;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-9.z
deleted file mode 100755
index 751b18ad88..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmono-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-win-1251.php b/main/inc/lib/mpdf/font/dejavusansmono-win-1251.php
deleted file mode 100755
index b975362514..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmono-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-32 -236 602 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusansmono-win-1251.z';
-$size1=6122;
-$size2=26088;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmono-win-1251.z b/main/inc/lib/mpdf/font/dejavusansmono-win-1251.z
deleted file mode 100755
index e7692bfe80..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmono-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmono.php b/main/inc/lib/mpdf/font/dejavusansmono.php
deleted file mode 100755
index b6dc6fe2cc..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmono.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[0 -236 602 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1252';
-$diff='';
-$file='dejavusansmono.z';
-$size1=5978;
-$size2=28452;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmono.z b/main/inc/lib/mpdf/font/dejavusansmono.z
deleted file mode 100755
index e696d60479..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmono.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-2.php
deleted file mode 100755
index 84da193d98..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-19 -236 717 1052]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusansmonob-iso-8859-2.z';
-$size1=5934;
-$size2=25771;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-2.z
deleted file mode 100755
index ce4bd6cb73..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-4.php
deleted file mode 100755
index 7a2c3194b6..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-3 -241 603 928]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusansmonob-iso-8859-4.z';
-$size1=5951;
-$size2=26236;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-4.z
deleted file mode 100755
index 4b1c862377..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-7.php
deleted file mode 100755
index c1fb2b3d49..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[0 -236 603 927]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusansmonob-iso-8859-7.z';
-$size1=5906;
-$size2=21540;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-7.z
deleted file mode 100755
index 62a30fd601..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-9.php
deleted file mode 100755
index cb88daf72b..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-3 -236 603 928]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusansmonob-iso-8859-9.z';
-$size1=5986;
-$size2=26338;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-9.z
deleted file mode 100755
index 6b4927d490..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonob-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-win-1251.php b/main/inc/lib/mpdf/font/dejavusansmonob-win-1251.php
deleted file mode 100755
index 0b5affd870..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonob-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-17 -236 603 927]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusansmonob-win-1251.z';
-$size1=6142;
-$size2=26962;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob-win-1251.z b/main/inc/lib/mpdf/font/dejavusansmonob-win-1251.z
deleted file mode 100755
index 964bf22689..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonob-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob.php b/main/inc/lib/mpdf/font/dejavusansmonob.php
deleted file mode 100755
index 962a3ab92e..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonob.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>33,'FontBBox'=>'[-3 -236 603 928]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1252';
-$diff='';
-$file='dejavusansmonob.z';
-$size1=5999;
-$size2=29448;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonob.z b/main/inc/lib/mpdf/font/dejavusansmonob.z
deleted file mode 100755
index 8af17737f6..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonob.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-2.php
deleted file mode 100755
index 5e0cac489e..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-70 -236 808 1053]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusansmonobi-iso-8859-2.z';
-$size1=5973;
-$size2=26449;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-2.z
deleted file mode 100755
index 969db2f66f..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-4.php
deleted file mode 100755
index f89c7ad886..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-73 -241 681 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusansmonobi-iso-8859-4.z';
-$size1=5991;
-$size2=26799;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-4.z
deleted file mode 100755
index 45fd78d960..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-7.php
deleted file mode 100755
index 9badc0f921..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-70 -236 685 927]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusansmonobi-iso-8859-7.z';
-$size1=5947;
-$size2=22245;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-7.z
deleted file mode 100755
index f91b67f3fa..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-9.php
deleted file mode 100755
index d5dcdd9a53..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-73 -236 669 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusansmonobi-iso-8859-9.z';
-$size1=6026;
-$size2=26829;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-9.z
deleted file mode 100755
index dd982c4288..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonobi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-win-1251.php b/main/inc/lib/mpdf/font/dejavusansmonobi-win-1251.php
deleted file mode 100755
index c4028c68b6..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonobi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-78 -236 722 927]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusansmonobi-win-1251.z';
-$size1=6181;
-$size2=27582;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi-win-1251.z b/main/inc/lib/mpdf/font/dejavusansmonobi-win-1251.z
deleted file mode 100755
index 5c34dabcb6..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonobi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi.php b/main/inc/lib/mpdf/font/dejavusansmonobi.php
deleted file mode 100755
index c213c73a93..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonobi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-73 -236 669 928]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1252';
-$diff='';
-$file='dejavusansmonobi.z';
-$size1=6039;
-$size2=29980;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonobi.z b/main/inc/lib/mpdf/font/dejavusansmonobi.z
deleted file mode 100755
index c1b6b7fea3..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonobi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-2.php
deleted file mode 100755
index 29344316f7..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-62 -236 703 1028]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavusansmonoi-iso-8859-2.z';
-$size1=5951;
-$size2=25872;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-2.z
deleted file mode 100755
index 1408ec9c56..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-4.php
deleted file mode 100755
index e277c7214d..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-71 -280 691 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavusansmonoi-iso-8859-4.z';
-$size1=5969;
-$size2=26266;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-4.z
deleted file mode 100755
index a569beeb2a..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-7.php
deleted file mode 100755
index 0368f12765..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-62 -236 672 913]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavusansmonoi-iso-8859-7.z';
-$size1=5925;
-$size2=21733;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-7.z
deleted file mode 100755
index 17c37c95cc..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-9.php
deleted file mode 100755
index 33c0330615..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-71 -236 672 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavusansmonoi-iso-8859-9.z';
-$size1=6004;
-$size2=26264;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-9.z
deleted file mode 100755
index c75a1f2c9a..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonoi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-win-1251.php b/main/inc/lib/mpdf/font/dejavusansmonoi-win-1251.php
deleted file mode 100755
index c5add6fff5..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonoi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-80 -236 672 985]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavusansmonoi-win-1251.z';
-$size1=6159;
-$size2=26922;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi-win-1251.z b/main/inc/lib/mpdf/font/dejavusansmonoi-win-1251.z
deleted file mode 100755
index 7469467c9c..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonoi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi.php b/main/inc/lib/mpdf/font/dejavusansmonoi.php
deleted file mode 100755
index bc88e13e92..0000000000
--- a/main/inc/lib/mpdf/font/dejavusansmonoi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>97,'FontBBox'=>'[-71 -236 672 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>602);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1252';
-$diff='';
-$file='dejavusansmonoi.z';
-$size1=6017;
-$size2=29327;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavusansmonoi.z b/main/inc/lib/mpdf/font/dejavusansmonoi.z
deleted file mode 100755
index 0fdd6319ff..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavusansmonoi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-2.php
deleted file mode 100755
index 6e56ce1b07..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-96 -236 1025 1051]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>722,chr(162)=>500,chr(163)=>669,chr(164)=>636,chr(165)=>664,chr(166)=>685,chr(167)=>500,chr(168)=>500,chr(169)=>685,chr(170)=>685,chr(171)=>667,chr(172)=>695,chr(173)=>338,chr(174)=>695,chr(175)=>695,
-	chr(176)=>500,chr(177)=>596,chr(178)=>500,chr(179)=>324,chr(180)=>500,chr(181)=>320,chr(182)=>513,chr(183)=>500,chr(184)=>500,chr(185)=>513,chr(186)=>513,chr(187)=>402,chr(188)=>527,chr(189)=>500,chr(190)=>527,chr(191)=>527,chr(192)=>753,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>664,
-	chr(198)=>765,chr(199)=>765,chr(200)=>765,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>730,chr(205)=>395,chr(206)=>395,chr(207)=>802,chr(208)=>807,chr(209)=>875,chr(210)=>875,chr(211)=>820,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>753,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>660,chr(222)=>667,chr(223)=>668,chr(224)=>478,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>320,chr(230)=>560,chr(231)=>560,chr(232)=>560,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>592,chr(237)=>320,chr(238)=>320,chr(239)=>640,chr(240)=>640,chr(241)=>644,
-	chr(242)=>644,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>478,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>565,chr(254)=>402,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserif-iso-8859-2.z';
-$size1=5899;
-$size2=28392;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-2.z
deleted file mode 100755
index 8b46f401bb..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-4.php
deleted file mode 100755
index e20b7f065d..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-96 -236 1025 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>722,chr(162)=>606,chr(163)=>753,chr(164)=>636,chr(165)=>395,chr(166)=>664,chr(167)=>500,chr(168)=>500,chr(169)=>685,chr(170)=>730,chr(171)=>799,chr(172)=>667,chr(173)=>338,chr(174)=>695,chr(175)=>500,
-	chr(176)=>500,chr(177)=>596,chr(178)=>500,chr(179)=>478,chr(180)=>500,chr(181)=>320,chr(182)=>320,chr(183)=>500,chr(184)=>500,chr(185)=>513,chr(186)=>592,chr(187)=>640,chr(188)=>402,chr(189)=>843,chr(190)=>527,chr(191)=>644,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1001,chr(199)=>395,chr(200)=>765,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>730,chr(205)=>395,chr(206)=>395,chr(207)=>395,chr(208)=>807,chr(209)=>875,chr(210)=>820,chr(211)=>747,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>820,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>843,chr(222)=>843,chr(223)=>668,chr(224)=>596,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>596,chr(230)=>940,chr(231)=>320,chr(232)=>560,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>592,chr(237)=>320,chr(238)=>320,chr(239)=>320,chr(240)=>640,chr(241)=>644,
-	chr(242)=>602,chr(243)=>606,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>602,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>644,chr(254)=>644,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserif-iso-8859-4.z';
-$size1=5917;
-$size2=28874;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-4.z
deleted file mode 100755
index 70183b85d7..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-7.php
deleted file mode 100755
index d00a9a44c1..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-96 -236 1025 996]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>318,chr(162)=>318,chr(163)=>636,chr(164)=>600,chr(165)=>600,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>500,chr(182)=>722,chr(183)=>318,chr(184)=>900,chr(185)=>1039,chr(186)=>562,chr(187)=>612,chr(188)=>835,chr(189)=>969,chr(190)=>897,chr(191)=>853,chr(192)=>392,chr(193)=>722,chr(194)=>735,chr(195)=>694,chr(196)=>722,chr(197)=>730,
-	chr(198)=>695,chr(199)=>872,chr(200)=>820,chr(201)=>395,chr(202)=>747,chr(203)=>722,chr(204)=>1024,chr(205)=>875,chr(206)=>704,chr(207)=>820,chr(208)=>872,chr(209)=>673,chr(210)=>600,chr(211)=>707,chr(212)=>667,chr(213)=>660,chr(214)=>820,chr(215)=>712,chr(216)=>877,chr(217)=>829,chr(218)=>395,chr(219)=>660,
-	chr(220)=>675,chr(221)=>518,chr(222)=>599,chr(223)=>392,chr(224)=>608,chr(225)=>675,chr(226)=>578,chr(227)=>598,chr(228)=>602,chr(229)=>518,chr(230)=>542,chr(231)=>599,chr(232)=>602,chr(233)=>392,chr(234)=>625,chr(235)=>634,chr(236)=>650,chr(237)=>608,chr(238)=>551,chr(239)=>602,chr(240)=>657,chr(241)=>588,
-	chr(242)=>560,chr(243)=>683,chr(244)=>553,chr(245)=>608,chr(246)=>700,chr(247)=>606,chr(248)=>784,chr(249)=>815,chr(250)=>392,chr(251)=>608,chr(252)=>602,chr(253)=>608,chr(254)=>815,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserif-iso-8859-7.z';
-$size1=5873;
-$size2=24578;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-7.z
deleted file mode 100755
index 6ec993222d..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-9.php
deleted file mode 100755
index 724eab0694..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-96 -236 1025 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>402,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>475,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>650,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>470,chr(187)=>612,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>536,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1001,chr(199)=>765,chr(200)=>730,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>395,chr(205)=>395,chr(206)=>395,chr(207)=>395,chr(208)=>799,chr(209)=>875,chr(210)=>820,chr(211)=>820,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>820,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>395,chr(222)=>685,chr(223)=>668,chr(224)=>596,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>596,chr(230)=>940,chr(231)=>560,chr(232)=>592,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>320,chr(237)=>320,chr(238)=>320,chr(239)=>320,chr(240)=>640,chr(241)=>644,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>602,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>320,chr(254)=>513,chr(255)=>565);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserif-iso-8859-9.z';
-$size1=5952;
-$size2=28642;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserif-iso-8859-9.z
deleted file mode 100755
index 1fc13d7145..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserif-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserif-win-1251.php b/main/inc/lib/mpdf/font/dejavuserif-win-1251.php
deleted file mode 100755
index fc4f75b4c1..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserif-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-96 -236 1287 957]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>799,chr(129)=>662,chr(130)=>318,chr(131)=>524,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>636,chr(137)=>1342,chr(138)=>1084,chr(139)=>400,chr(140)=>1118,chr(141)=>774,chr(142)=>872,chr(143)=>872,chr(144)=>624,chr(145)=>318,chr(146)=>318,chr(147)=>511,chr(148)=>511,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>843,chr(155)=>400,chr(156)=>860,chr(157)=>625,chr(158)=>644,chr(159)=>656,chr(160)=>318,chr(161)=>723,chr(162)=>588,chr(163)=>401,chr(164)=>636,chr(165)=>672,chr(166)=>337,chr(167)=>500,chr(168)=>730,chr(169)=>1000,chr(170)=>765,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>1000,chr(175)=>395,
-	chr(176)=>500,chr(177)=>838,chr(178)=>395,chr(179)=>320,chr(180)=>529,chr(181)=>650,chr(182)=>636,chr(183)=>318,chr(184)=>592,chr(185)=>946,chr(186)=>560,chr(187)=>612,chr(188)=>310,chr(189)=>685,chr(190)=>513,chr(191)=>320,chr(192)=>757,chr(193)=>735,chr(194)=>735,chr(195)=>662,chr(196)=>813,chr(197)=>730,
-	chr(198)=>1124,chr(199)=>623,chr(200)=>872,chr(201)=>872,chr(202)=>774,chr(203)=>834,chr(204)=>1024,chr(205)=>872,chr(206)=>820,chr(207)=>872,chr(208)=>673,chr(209)=>765,chr(210)=>667,chr(211)=>723,chr(212)=>830,chr(213)=>712,chr(214)=>872,chr(215)=>773,chr(216)=>1141,chr(217)=>1141,chr(218)=>794,chr(219)=>984,
-	chr(220)=>674,chr(221)=>765,chr(222)=>1193,chr(223)=>808,chr(224)=>596,chr(225)=>602,chr(226)=>563,chr(227)=>524,chr(228)=>616,chr(229)=>592,chr(230)=>920,chr(231)=>545,chr(232)=>667,chr(233)=>667,chr(234)=>625,chr(235)=>635,chr(236)=>778,chr(237)=>667,chr(238)=>602,chr(239)=>667,chr(240)=>640,chr(241)=>560,
-	chr(242)=>553,chr(243)=>588,chr(244)=>783,chr(245)=>564,chr(246)=>643,chr(247)=>661,chr(248)=>930,chr(249)=>930,chr(250)=>636,chr(251)=>796,chr(252)=>544,chr(253)=>560,chr(254)=>871,chr(255)=>631);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserif-win-1251.z';
-$size1=6107;
-$size2=31492;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserif-win-1251.z b/main/inc/lib/mpdf/font/dejavuserif-win-1251.z
deleted file mode 100755
index b6f89a065a..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserif-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserif.php b/main/inc/lib/mpdf/font/dejavuserif.php
deleted file mode 100755
index 7a8edb5c29..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserif.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-96 -236 1287 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>636,chr(129)=>600,chr(130)=>318,chr(131)=>370,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1342,chr(138)=>685,chr(139)=>400,chr(140)=>1137,chr(141)=>600,chr(142)=>695,chr(143)=>600,chr(144)=>600,chr(145)=>318,chr(146)=>318,chr(147)=>511,chr(148)=>511,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>513,chr(155)=>400,chr(156)=>989,chr(157)=>600,chr(158)=>527,chr(159)=>660,chr(160)=>318,chr(161)=>402,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>475,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>650,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>470,chr(187)=>612,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>536,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1001,chr(199)=>765,chr(200)=>730,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>395,chr(205)=>395,chr(206)=>395,chr(207)=>395,chr(208)=>807,chr(209)=>875,chr(210)=>820,chr(211)=>820,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>820,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>660,chr(222)=>676,chr(223)=>668,chr(224)=>596,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>596,chr(230)=>940,chr(231)=>560,chr(232)=>592,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>320,chr(237)=>320,chr(238)=>320,chr(239)=>320,chr(240)=>602,chr(241)=>644,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>602,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>565,chr(254)=>640,chr(255)=>565);
-$enc='win-1252';
-$diff='';
-$file='dejavuserif.z';
-$size1=5965;
-$size2=32096;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserif.z b/main/inc/lib/mpdf/font/dejavuserif.z
deleted file mode 100755
index 40ea0acde6..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserif.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-2.php
deleted file mode 100755
index 4d3873731b..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-74 -236 1135 1057]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>776,chr(162)=>500,chr(163)=>710,chr(164)=>636,chr(165)=>703,chr(166)=>722,chr(167)=>523,chr(168)=>500,chr(169)=>722,chr(170)=>722,chr(171)=>744,chr(172)=>730,chr(173)=>415,chr(174)=>730,chr(175)=>730,
-	chr(176)=>500,chr(177)=>648,chr(178)=>500,chr(179)=>385,chr(180)=>500,chr(181)=>380,chr(182)=>563,chr(183)=>500,chr(184)=>500,chr(185)=>563,chr(186)=>563,chr(187)=>462,chr(188)=>568,chr(189)=>500,chr(190)=>568,chr(191)=>568,chr(192)=>831,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>703,
-	chr(198)=>796,chr(199)=>796,chr(200)=>796,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>762,chr(205)=>468,chr(206)=>468,chr(207)=>867,chr(208)=>874,chr(209)=>914,chr(210)=>914,chr(211)=>871,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>831,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>714,chr(222)=>744,chr(223)=>760,chr(224)=>527,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>380,chr(230)=>609,chr(231)=>609,chr(232)=>609,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>636,chr(237)=>380,chr(238)=>380,chr(239)=>699,chr(240)=>699,chr(241)=>727,
-	chr(242)=>727,chr(243)=>667,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>527,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>581,chr(254)=>462,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserifb-iso-8859-2.z';
-$size1=5919;
-$size2=28464;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-2.z
deleted file mode 100755
index 5e3cd2ce0f..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-4.php
deleted file mode 100755
index 23b41a222c..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-74 -240 1135 939]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>776,chr(162)=>693,chr(163)=>831,chr(164)=>636,chr(165)=>468,chr(166)=>703,chr(167)=>523,chr(168)=>500,chr(169)=>722,chr(170)=>762,chr(171)=>854,chr(172)=>744,chr(173)=>415,chr(174)=>730,chr(175)=>500,
-	chr(176)=>500,chr(177)=>648,chr(178)=>500,chr(179)=>527,chr(180)=>500,chr(181)=>380,chr(182)=>380,chr(183)=>500,chr(184)=>500,chr(185)=>563,chr(186)=>636,chr(187)=>699,chr(188)=>462,chr(189)=>872,chr(190)=>568,chr(191)=>727,chr(192)=>776,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>776,
-	chr(198)=>1034,chr(199)=>468,chr(200)=>796,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>762,chr(205)=>468,chr(206)=>468,chr(207)=>468,chr(208)=>874,chr(209)=>914,chr(210)=>871,chr(211)=>869,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>871,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>872,chr(222)=>872,chr(223)=>760,chr(224)=>648,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>648,chr(230)=>975,chr(231)=>380,chr(232)=>609,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>636,chr(237)=>380,chr(238)=>380,chr(239)=>380,chr(240)=>699,chr(241)=>727,
-	chr(242)=>667,chr(243)=>693,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>667,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>727,chr(254)=>727,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserifb-iso-8859-4.z';
-$size1=5937;
-$size2=29073;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-4.z
deleted file mode 100755
index 08493d6bc7..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-7.php
deleted file mode 100755
index db36882521..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-74 -236 1135 996]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>348,chr(162)=>348,chr(163)=>696,chr(164)=>600,chr(165)=>600,chr(166)=>364,chr(167)=>523,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>500,chr(182)=>776,chr(183)=>348,chr(184)=>947,chr(185)=>1118,chr(186)=>662,chr(187)=>625,chr(188)=>887,chr(189)=>1043,chr(190)=>953,chr(191)=>911,chr(192)=>484,chr(193)=>776,chr(194)=>845,chr(195)=>710,chr(196)=>776,chr(197)=>762,
-	chr(198)=>730,chr(199)=>945,chr(200)=>871,chr(201)=>468,chr(202)=>869,chr(203)=>776,chr(204)=>1107,chr(205)=>914,chr(206)=>704,chr(207)=>871,chr(208)=>944,chr(209)=>752,chr(210)=>600,chr(211)=>707,chr(212)=>744,chr(213)=>714,chr(214)=>871,chr(215)=>776,chr(216)=>913,chr(217)=>890,chr(218)=>468,chr(219)=>714,
-	chr(220)=>770,chr(221)=>608,chr(222)=>727,chr(223)=>484,chr(224)=>694,chr(225)=>770,chr(226)=>664,chr(227)=>660,chr(228)=>667,chr(229)=>608,chr(230)=>592,chr(231)=>727,chr(232)=>667,chr(233)=>484,chr(234)=>750,chr(235)=>701,chr(236)=>732,chr(237)=>694,chr(238)=>592,chr(239)=>667,chr(240)=>732,chr(241)=>665,
-	chr(242)=>609,chr(243)=>737,chr(244)=>673,chr(245)=>694,chr(246)=>905,chr(247)=>658,chr(248)=>941,chr(249)=>952,chr(250)=>484,chr(251)=>694,chr(252)=>667,chr(253)=>694,chr(254)=>952,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserifb-iso-8859-7.z';
-$size1=5893;
-$size2=24654;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-7.z
deleted file mode 100755
index 773b2d515e..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-9.php
deleted file mode 100755
index 81ca29d49a..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-74 -236 1135 939]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>439,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>364,chr(167)=>523,chr(168)=>500,chr(169)=>1000,chr(170)=>487,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>732,chr(182)=>636,chr(183)=>348,chr(184)=>500,chr(185)=>438,chr(186)=>500,chr(187)=>625,chr(188)=>1043,chr(189)=>1043,chr(190)=>1043,chr(191)=>586,chr(192)=>776,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>776,
-	chr(198)=>1034,chr(199)=>796,chr(200)=>762,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>468,chr(205)=>468,chr(206)=>468,chr(207)=>468,chr(208)=>854,chr(209)=>914,chr(210)=>871,chr(211)=>871,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>871,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>468,chr(222)=>722,chr(223)=>760,chr(224)=>648,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>648,chr(230)=>975,chr(231)=>609,chr(232)=>636,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>380,chr(237)=>380,chr(238)=>380,chr(239)=>380,chr(240)=>699,chr(241)=>727,
-	chr(242)=>667,chr(243)=>667,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>667,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>380,chr(254)=>563,chr(255)=>581);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserifb-iso-8859-9.z';
-$size1=5972;
-$size2=28835;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-9.z
deleted file mode 100755
index 298d7ea287..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifb-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-win-1251.php b/main/inc/lib/mpdf/font/dejavuserifb-win-1251.php
deleted file mode 100755
index dcc0bb1767..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifb-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-74 -236 1361 999]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>901,chr(129)=>690,chr(130)=>348,chr(131)=>613,
-	chr(132)=>575,chr(133)=>1000,chr(134)=>523,chr(135)=>523,chr(136)=>696,chr(137)=>1385,chr(138)=>1202,chr(139)=>400,chr(140)=>1262,chr(141)=>910,chr(142)=>963,chr(143)=>945,chr(144)=>719,chr(145)=>348,chr(146)=>348,chr(147)=>575,chr(148)=>575,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>988,chr(155)=>400,chr(156)=>1015,chr(157)=>722,chr(158)=>727,chr(159)=>732,chr(160)=>348,chr(161)=>812,chr(162)=>640,chr(163)=>473,chr(164)=>636,chr(165)=>700,chr(166)=>364,chr(167)=>523,chr(168)=>762,chr(169)=>1000,chr(170)=>795,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>468,
-	chr(176)=>500,chr(177)=>838,chr(178)=>468,chr(179)=>380,chr(180)=>618,chr(181)=>732,chr(182)=>636,chr(183)=>348,chr(184)=>636,chr(185)=>1087,chr(186)=>609,chr(187)=>625,chr(188)=>362,chr(189)=>722,chr(190)=>563,chr(191)=>380,chr(192)=>814,chr(193)=>854,chr(194)=>845,chr(195)=>690,chr(196)=>889,chr(197)=>762,
-	chr(198)=>1312,chr(199)=>721,chr(200)=>945,chr(201)=>945,chr(202)=>910,chr(203)=>884,chr(204)=>1107,chr(205)=>945,chr(206)=>871,chr(207)=>944,chr(208)=>752,chr(209)=>796,chr(210)=>744,chr(211)=>812,chr(212)=>949,chr(213)=>776,chr(214)=>966,chr(215)=>913,chr(216)=>1268,chr(217)=>1293,chr(218)=>957,chr(219)=>1202,
-	chr(220)=>825,chr(221)=>795,chr(222)=>1287,chr(223)=>882,chr(224)=>648,chr(225)=>667,chr(226)=>695,chr(227)=>613,chr(228)=>667,chr(229)=>636,chr(230)=>1010,chr(231)=>638,chr(232)=>742,chr(233)=>742,chr(234)=>722,chr(235)=>705,chr(236)=>869,chr(237)=>732,chr(238)=>667,chr(239)=>732,chr(240)=>699,chr(241)=>609,
-	chr(242)=>620,chr(243)=>640,chr(244)=>902,chr(245)=>596,chr(246)=>739,chr(247)=>732,chr(248)=>1075,chr(249)=>1082,chr(250)=>767,chr(251)=>1002,chr(252)=>679,chr(253)=>609,chr(254)=>1025,chr(255)=>739);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserifb-win-1251.z';
-$size1=6127;
-$size2=31731;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifb-win-1251.z b/main/inc/lib/mpdf/font/dejavuserifb-win-1251.z
deleted file mode 100755
index b06d55f701..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifb-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifb.php b/main/inc/lib/mpdf/font/dejavuserifb.php
deleted file mode 100755
index 9d595e4bbf..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifb.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-95 -236 1361 939]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>696,chr(129)=>600,chr(130)=>348,chr(131)=>430,
-	chr(132)=>575,chr(133)=>1000,chr(134)=>523,chr(135)=>523,chr(136)=>500,chr(137)=>1385,chr(138)=>722,chr(139)=>400,chr(140)=>1180,chr(141)=>600,chr(142)=>730,chr(143)=>600,chr(144)=>600,chr(145)=>348,chr(146)=>348,chr(147)=>575,chr(148)=>575,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>563,chr(155)=>400,chr(156)=>1028,chr(157)=>600,chr(158)=>568,chr(159)=>714,chr(160)=>348,chr(161)=>439,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>364,chr(167)=>523,chr(168)=>500,chr(169)=>1000,chr(170)=>487,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>732,chr(182)=>636,chr(183)=>348,chr(184)=>500,chr(185)=>438,chr(186)=>500,chr(187)=>625,chr(188)=>1043,chr(189)=>1043,chr(190)=>1043,chr(191)=>586,chr(192)=>776,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>776,
-	chr(198)=>1034,chr(199)=>796,chr(200)=>762,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>468,chr(205)=>468,chr(206)=>468,chr(207)=>468,chr(208)=>874,chr(209)=>914,chr(210)=>871,chr(211)=>871,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>871,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>714,chr(222)=>757,chr(223)=>760,chr(224)=>648,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>648,chr(230)=>975,chr(231)=>609,chr(232)=>636,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>380,chr(237)=>380,chr(238)=>380,chr(239)=>380,chr(240)=>667,chr(241)=>727,
-	chr(242)=>667,chr(243)=>667,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>667,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>581,chr(254)=>699,chr(255)=>581);
-$enc='win-1252';
-$diff='';
-$file='dejavuserifb.z';
-$size1=5985;
-$size2=32405;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifb.z b/main/inc/lib/mpdf/font/dejavuserifb.z
deleted file mode 100755
index 7da1269de9..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifb.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-2.php
deleted file mode 100755
index fd1381ba43..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1206 1057]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>776,chr(162)=>500,chr(163)=>710,chr(164)=>636,chr(165)=>703,chr(166)=>722,chr(167)=>523,chr(168)=>500,chr(169)=>722,chr(170)=>722,chr(171)=>744,chr(172)=>730,chr(173)=>415,chr(174)=>730,chr(175)=>730,
-	chr(176)=>500,chr(177)=>648,chr(178)=>500,chr(179)=>385,chr(180)=>500,chr(181)=>508,chr(182)=>563,chr(183)=>500,chr(184)=>500,chr(185)=>563,chr(186)=>563,chr(187)=>462,chr(188)=>568,chr(189)=>500,chr(190)=>568,chr(191)=>568,chr(192)=>831,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>703,
-	chr(198)=>796,chr(199)=>796,chr(200)=>796,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>762,chr(205)=>468,chr(206)=>468,chr(207)=>867,chr(208)=>874,chr(209)=>914,chr(210)=>914,chr(211)=>871,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>831,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>714,chr(222)=>744,chr(223)=>760,chr(224)=>527,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>380,chr(230)=>609,chr(231)=>609,chr(232)=>609,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>636,chr(237)=>380,chr(238)=>380,chr(239)=>699,chr(240)=>699,chr(241)=>727,
-	chr(242)=>727,chr(243)=>667,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>527,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>581,chr(254)=>462,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserifbi-iso-8859-2.z';
-$size1=5954;
-$size2=28955;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-2.z
deleted file mode 100755
index c2acc18597..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-4.php
deleted file mode 100755
index b5064aedc4..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -240 1206 939]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>776,chr(162)=>693,chr(163)=>831,chr(164)=>636,chr(165)=>468,chr(166)=>703,chr(167)=>523,chr(168)=>500,chr(169)=>722,chr(170)=>762,chr(171)=>854,chr(172)=>744,chr(173)=>415,chr(174)=>730,chr(175)=>500,
-	chr(176)=>500,chr(177)=>648,chr(178)=>500,chr(179)=>527,chr(180)=>500,chr(181)=>380,chr(182)=>380,chr(183)=>500,chr(184)=>500,chr(185)=>563,chr(186)=>636,chr(187)=>699,chr(188)=>462,chr(189)=>872,chr(190)=>568,chr(191)=>727,chr(192)=>776,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>776,
-	chr(198)=>1034,chr(199)=>468,chr(200)=>796,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>762,chr(205)=>468,chr(206)=>468,chr(207)=>468,chr(208)=>874,chr(209)=>914,chr(210)=>871,chr(211)=>869,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>871,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>872,chr(222)=>872,chr(223)=>760,chr(224)=>648,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>648,chr(230)=>932,chr(231)=>380,chr(232)=>609,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>636,chr(237)=>380,chr(238)=>380,chr(239)=>380,chr(240)=>699,chr(241)=>727,
-	chr(242)=>667,chr(243)=>693,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>667,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>727,chr(254)=>727,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserifbi-iso-8859-4.z';
-$size1=5972;
-$size2=29155;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-4.z
deleted file mode 100755
index 46b20fe0c1..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-7.php
deleted file mode 100755
index 5ef2fbd9ce..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1206 996]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>348,chr(162)=>348,chr(163)=>696,chr(164)=>600,chr(165)=>600,chr(166)=>364,chr(167)=>523,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>500,chr(182)=>776,chr(183)=>348,chr(184)=>947,chr(185)=>1136,chr(186)=>662,chr(187)=>625,chr(188)=>887,chr(189)=>1043,chr(190)=>953,chr(191)=>911,chr(192)=>484,chr(193)=>776,chr(194)=>845,chr(195)=>710,chr(196)=>776,chr(197)=>762,
-	chr(198)=>730,chr(199)=>945,chr(200)=>871,chr(201)=>468,chr(202)=>869,chr(203)=>776,chr(204)=>1107,chr(205)=>914,chr(206)=>704,chr(207)=>871,chr(208)=>945,chr(209)=>752,chr(210)=>600,chr(211)=>707,chr(212)=>744,chr(213)=>714,chr(214)=>871,chr(215)=>776,chr(216)=>913,chr(217)=>890,chr(218)=>468,chr(219)=>714,
-	chr(220)=>770,chr(221)=>608,chr(222)=>727,chr(223)=>484,chr(224)=>694,chr(225)=>770,chr(226)=>664,chr(227)=>660,chr(228)=>667,chr(229)=>608,chr(230)=>592,chr(231)=>727,chr(232)=>667,chr(233)=>484,chr(234)=>750,chr(235)=>701,chr(236)=>732,chr(237)=>694,chr(238)=>592,chr(239)=>667,chr(240)=>732,chr(241)=>665,
-	chr(242)=>609,chr(243)=>737,chr(244)=>673,chr(245)=>694,chr(246)=>905,chr(247)=>658,chr(248)=>941,chr(249)=>952,chr(250)=>484,chr(251)=>694,chr(252)=>667,chr(253)=>694,chr(254)=>952,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserifbi-iso-8859-7.z';
-$size1=5928;
-$size2=25018;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-7.z
deleted file mode 100755
index 8afea80372..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-9.php
deleted file mode 100755
index f9f5d1d255..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1206 939]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>348,chr(161)=>439,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>364,chr(167)=>523,chr(168)=>500,chr(169)=>1000,chr(170)=>487,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>732,chr(182)=>636,chr(183)=>348,chr(184)=>500,chr(185)=>438,chr(186)=>500,chr(187)=>625,chr(188)=>1043,chr(189)=>1043,chr(190)=>1043,chr(191)=>586,chr(192)=>776,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>776,
-	chr(198)=>1034,chr(199)=>796,chr(200)=>762,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>468,chr(205)=>468,chr(206)=>468,chr(207)=>468,chr(208)=>854,chr(209)=>914,chr(210)=>871,chr(211)=>871,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>871,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>468,chr(222)=>722,chr(223)=>760,chr(224)=>648,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>648,chr(230)=>932,chr(231)=>609,chr(232)=>636,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>380,chr(237)=>380,chr(238)=>380,chr(239)=>380,chr(240)=>699,chr(241)=>727,
-	chr(242)=>667,chr(243)=>667,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>667,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>380,chr(254)=>563,chr(255)=>581);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserifbi-iso-8859-9.z';
-$size1=6007;
-$size2=28854;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-9.z
deleted file mode 100755
index 56305b26b9..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifbi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-win-1251.php b/main/inc/lib/mpdf/font/dejavuserifbi-win-1251.php
deleted file mode 100755
index 72b5de20e2..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifbi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1326 999]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>901,chr(129)=>690,chr(130)=>348,chr(131)=>563,
-	chr(132)=>575,chr(133)=>1000,chr(134)=>523,chr(135)=>523,chr(136)=>696,chr(137)=>1385,chr(138)=>1202,chr(139)=>400,chr(140)=>1262,chr(141)=>910,chr(142)=>963,chr(143)=>945,chr(144)=>719,chr(145)=>348,chr(146)=>348,chr(147)=>575,chr(148)=>575,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>1014,chr(155)=>400,chr(156)=>1011,chr(157)=>677,chr(158)=>727,chr(159)=>727,chr(160)=>348,chr(161)=>812,chr(162)=>598,chr(163)=>473,chr(164)=>636,chr(165)=>700,chr(166)=>364,chr(167)=>523,chr(168)=>762,chr(169)=>1000,chr(170)=>795,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>468,
-	chr(176)=>500,chr(177)=>838,chr(178)=>468,chr(179)=>380,chr(180)=>618,chr(181)=>732,chr(182)=>636,chr(183)=>348,chr(184)=>636,chr(185)=>1087,chr(186)=>609,chr(187)=>625,chr(188)=>362,chr(189)=>722,chr(190)=>563,chr(191)=>380,chr(192)=>814,chr(193)=>854,chr(194)=>845,chr(195)=>690,chr(196)=>889,chr(197)=>762,
-	chr(198)=>1312,chr(199)=>721,chr(200)=>945,chr(201)=>945,chr(202)=>910,chr(203)=>884,chr(204)=>1107,chr(205)=>945,chr(206)=>871,chr(207)=>945,chr(208)=>752,chr(209)=>796,chr(210)=>744,chr(211)=>812,chr(212)=>949,chr(213)=>776,chr(214)=>966,chr(215)=>913,chr(216)=>1268,chr(217)=>1293,chr(218)=>957,chr(219)=>1202,
-	chr(220)=>825,chr(221)=>795,chr(222)=>1287,chr(223)=>882,chr(224)=>648,chr(225)=>722,chr(226)=>657,chr(227)=>563,chr(228)=>695,chr(229)=>636,chr(230)=>1306,chr(231)=>638,chr(232)=>727,chr(233)=>727,chr(234)=>677,chr(235)=>732,chr(236)=>951,chr(237)=>729,chr(238)=>667,chr(239)=>727,chr(240)=>699,chr(241)=>609,
-	chr(242)=>1058,chr(243)=>598,chr(244)=>902,chr(245)=>596,chr(246)=>803,chr(247)=>715,chr(248)=>1058,chr(249)=>1134,chr(250)=>727,chr(251)=>1018,chr(252)=>660,chr(253)=>645,chr(254)=>1001,chr(255)=>796);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserifbi-win-1251.z';
-$size1=6162;
-$size2=32122;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi-win-1251.z b/main/inc/lib/mpdf/font/dejavuserifbi-win-1251.z
deleted file mode 100755
index 26f17c5374..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifbi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi.php b/main/inc/lib/mpdf/font/dejavuserifbi.php
deleted file mode 100755
index f29974b4ee..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifbi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-184 -236 1326 939]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>348,'!'=>439,'"'=>521,'#'=>838,'$'=>696,'%'=>950,'&'=>903,'\''=>306,'('=>473,')'=>473,'*'=>523,'+'=>838,
-	','=>348,'-'=>415,'.'=>348,'/'=>365,'0'=>696,'1'=>696,'2'=>696,'3'=>696,'4'=>696,'5'=>696,'6'=>696,'7'=>696,'8'=>696,'9'=>696,':'=>369,';'=>369,'<'=>838,'='=>838,'>'=>838,'?'=>586,'@'=>1000,'A'=>776,
-	'B'=>845,'C'=>796,'D'=>867,'E'=>762,'F'=>710,'G'=>854,'H'=>945,'I'=>468,'J'=>473,'K'=>869,'L'=>703,'M'=>1107,'N'=>914,'O'=>871,'P'=>752,'Q'=>871,'R'=>831,'S'=>722,'T'=>744,'U'=>872,'V'=>776,'W'=>1123,
-	'X'=>776,'Y'=>714,'Z'=>730,'['=>473,'\\'=>365,']'=>473,'^'=>838,'_'=>500,'`'=>500,'a'=>648,'b'=>699,'c'=>609,'d'=>699,'e'=>636,'f'=>430,'g'=>699,'h'=>727,'i'=>380,'j'=>362,'k'=>693,'l'=>380,'m'=>1058,
-	'n'=>727,'o'=>667,'p'=>699,'q'=>699,'r'=>527,'s'=>563,'t'=>462,'u'=>727,'v'=>581,'w'=>861,'x'=>596,'y'=>581,'z'=>568,'{'=>643,'|'=>364,'}'=>643,'~'=>838,chr(127)=>600,chr(128)=>696,chr(129)=>600,chr(130)=>348,chr(131)=>430,
-	chr(132)=>575,chr(133)=>1000,chr(134)=>523,chr(135)=>523,chr(136)=>500,chr(137)=>1385,chr(138)=>722,chr(139)=>400,chr(140)=>1180,chr(141)=>600,chr(142)=>730,chr(143)=>600,chr(144)=>600,chr(145)=>348,chr(146)=>348,chr(147)=>575,chr(148)=>575,chr(149)=>639,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>563,chr(155)=>400,chr(156)=>1028,chr(157)=>600,chr(158)=>568,chr(159)=>714,chr(160)=>348,chr(161)=>439,chr(162)=>696,chr(163)=>696,chr(164)=>636,chr(165)=>696,chr(166)=>364,chr(167)=>523,chr(168)=>500,chr(169)=>1000,chr(170)=>487,chr(171)=>625,chr(172)=>838,chr(173)=>415,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>438,chr(179)=>438,chr(180)=>500,chr(181)=>732,chr(182)=>636,chr(183)=>348,chr(184)=>500,chr(185)=>438,chr(186)=>500,chr(187)=>625,chr(188)=>1043,chr(189)=>1043,chr(190)=>1043,chr(191)=>586,chr(192)=>776,chr(193)=>776,chr(194)=>776,chr(195)=>776,chr(196)=>776,chr(197)=>776,
-	chr(198)=>1034,chr(199)=>796,chr(200)=>762,chr(201)=>762,chr(202)=>762,chr(203)=>762,chr(204)=>468,chr(205)=>468,chr(206)=>468,chr(207)=>468,chr(208)=>874,chr(209)=>914,chr(210)=>871,chr(211)=>871,chr(212)=>871,chr(213)=>871,chr(214)=>871,chr(215)=>838,chr(216)=>871,chr(217)=>872,chr(218)=>872,chr(219)=>872,
-	chr(220)=>872,chr(221)=>714,chr(222)=>757,chr(223)=>760,chr(224)=>648,chr(225)=>648,chr(226)=>648,chr(227)=>648,chr(228)=>648,chr(229)=>648,chr(230)=>932,chr(231)=>609,chr(232)=>636,chr(233)=>636,chr(234)=>636,chr(235)=>636,chr(236)=>380,chr(237)=>380,chr(238)=>380,chr(239)=>380,chr(240)=>667,chr(241)=>727,
-	chr(242)=>667,chr(243)=>667,chr(244)=>667,chr(245)=>667,chr(246)=>667,chr(247)=>838,chr(248)=>667,chr(249)=>727,chr(250)=>727,chr(251)=>727,chr(252)=>727,chr(253)=>581,chr(254)=>699,chr(255)=>581);
-$enc='win-1252';
-$diff='';
-$file='dejavuserifbi.z';
-$size1=6020;
-$size2=32566;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifbi.z b/main/inc/lib/mpdf/font/dejavuserifbi.z
deleted file mode 100755
index d67799d593..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifbi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-2.php
deleted file mode 100755
index d9b82797e4..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-86 -236 922 1051]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>650,chr(162)=>450,chr(163)=>602,chr(164)=>572,chr(165)=>598,chr(166)=>616,chr(167)=>450,chr(168)=>450,chr(169)=>616,chr(170)=>616,chr(171)=>600,chr(172)=>625,chr(173)=>304,chr(174)=>625,chr(175)=>625,
-	chr(176)=>450,chr(177)=>536,chr(178)=>450,chr(179)=>292,chr(180)=>450,chr(181)=>288,chr(182)=>461,chr(183)=>450,chr(184)=>450,chr(185)=>461,chr(186)=>461,chr(187)=>361,chr(188)=>474,chr(189)=>450,chr(190)=>474,chr(191)=>474,chr(192)=>677,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>598,
-	chr(198)=>688,chr(199)=>688,chr(200)=>688,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>657,chr(205)=>355,chr(206)=>355,chr(207)=>721,chr(208)=>726,chr(209)=>787,chr(210)=>787,chr(211)=>738,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>677,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>594,chr(222)=>600,chr(223)=>601,chr(224)=>430,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>288,chr(230)=>504,chr(231)=>504,chr(232)=>504,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>532,chr(237)=>288,chr(238)=>288,chr(239)=>576,chr(240)=>576,chr(241)=>580,
-	chr(242)=>580,chr(243)=>542,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>430,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>508,chr(254)=>361,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserifcondensed-iso-8859-2.z';
-$size1=5945;
-$size2=28172;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-2.z
deleted file mode 100755
index f857b5ed1b..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-4.php
deleted file mode 100755
index 6f03f80494..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-86 -236 922 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>650,chr(162)=>545,chr(163)=>677,chr(164)=>572,chr(165)=>355,chr(166)=>598,chr(167)=>450,chr(168)=>450,chr(169)=>616,chr(170)=>657,chr(171)=>719,chr(172)=>600,chr(173)=>304,chr(174)=>625,chr(175)=>450,
-	chr(176)=>450,chr(177)=>536,chr(178)=>450,chr(179)=>430,chr(180)=>450,chr(181)=>288,chr(182)=>288,chr(183)=>450,chr(184)=>450,chr(185)=>461,chr(186)=>532,chr(187)=>576,chr(188)=>361,chr(189)=>758,chr(190)=>474,chr(191)=>580,chr(192)=>650,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>650,
-	chr(198)=>901,chr(199)=>355,chr(200)=>688,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>657,chr(205)=>355,chr(206)=>355,chr(207)=>355,chr(208)=>726,chr(209)=>787,chr(210)=>738,chr(211)=>672,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>738,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>758,chr(222)=>758,chr(223)=>601,chr(224)=>536,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>536,chr(230)=>846,chr(231)=>288,chr(232)=>504,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>532,chr(237)=>288,chr(238)=>288,chr(239)=>288,chr(240)=>576,chr(241)=>580,
-	chr(242)=>542,chr(243)=>545,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>542,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>580,chr(254)=>580,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserifcondensed-iso-8859-4.z';
-$size1=5963;
-$size2=28672;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-4.z
deleted file mode 100755
index a3808ae4fd..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-7.php
deleted file mode 100755
index 182a78b630..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-86 -236 922 996]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>286,chr(162)=>286,chr(163)=>572,chr(164)=>540,chr(165)=>540,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>450,chr(182)=>650,chr(183)=>286,chr(184)=>810,chr(185)=>935,chr(186)=>505,chr(187)=>550,chr(188)=>751,chr(189)=>872,chr(190)=>808,chr(191)=>767,chr(192)=>353,chr(193)=>650,chr(194)=>661,chr(195)=>624,chr(196)=>650,chr(197)=>657,
-	chr(198)=>625,chr(199)=>785,chr(200)=>738,chr(201)=>355,chr(202)=>672,chr(203)=>650,chr(204)=>921,chr(205)=>787,chr(206)=>633,chr(207)=>738,chr(208)=>785,chr(209)=>605,chr(210)=>540,chr(211)=>636,chr(212)=>600,chr(213)=>594,chr(214)=>738,chr(215)=>641,chr(216)=>789,chr(217)=>746,chr(218)=>355,chr(219)=>594,
-	chr(220)=>607,chr(221)=>466,chr(222)=>539,chr(223)=>353,chr(224)=>547,chr(225)=>607,chr(226)=>520,chr(227)=>538,chr(228)=>542,chr(229)=>466,chr(230)=>488,chr(231)=>539,chr(232)=>542,chr(233)=>353,chr(234)=>563,chr(235)=>570,chr(236)=>584,chr(237)=>547,chr(238)=>496,chr(239)=>542,chr(240)=>591,chr(241)=>529,
-	chr(242)=>504,chr(243)=>614,chr(244)=>498,chr(245)=>547,chr(246)=>630,chr(247)=>545,chr(248)=>706,chr(249)=>734,chr(250)=>353,chr(251)=>547,chr(252)=>542,chr(253)=>547,chr(254)=>734,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserifcondensed-iso-8859-7.z';
-$size1=5919;
-$size2=24463;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-7.z
deleted file mode 100755
index c1b417a3ce..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-9.php
deleted file mode 100755
index 7328cf3845..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-86 -236 922 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>361,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>427,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>584,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>423,chr(187)=>550,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>482,chr(192)=>650,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>650,
-	chr(198)=>901,chr(199)=>688,chr(200)=>657,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>355,chr(205)=>355,chr(206)=>355,chr(207)=>355,chr(208)=>719,chr(209)=>787,chr(210)=>738,chr(211)=>738,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>738,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>355,chr(222)=>616,chr(223)=>601,chr(224)=>536,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>536,chr(230)=>846,chr(231)=>504,chr(232)=>532,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>288,chr(237)=>288,chr(238)=>288,chr(239)=>288,chr(240)=>576,chr(241)=>580,
-	chr(242)=>542,chr(243)=>542,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>542,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>288,chr(254)=>461,chr(255)=>508);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserifcondensed-iso-8859-9.z';
-$size1=5998;
-$size2=28457;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-9.z
deleted file mode 100755
index baf5737f66..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensed-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-win-1251.php b/main/inc/lib/mpdf/font/dejavuserifcondensed-win-1251.php
deleted file mode 100755
index 52a0823538..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensed-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-86 -236 1158 957]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>719,chr(129)=>596,chr(130)=>286,chr(131)=>471,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>572,chr(137)=>1208,chr(138)=>976,chr(139)=>360,chr(140)=>1006,chr(141)=>696,chr(142)=>785,chr(143)=>785,chr(144)=>561,chr(145)=>286,chr(146)=>286,chr(147)=>460,chr(148)=>460,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>759,chr(155)=>360,chr(156)=>774,chr(157)=>563,chr(158)=>580,chr(159)=>590,chr(160)=>286,chr(161)=>650,chr(162)=>529,chr(163)=>360,chr(164)=>572,chr(165)=>604,chr(166)=>303,chr(167)=>450,chr(168)=>657,chr(169)=>900,chr(170)=>688,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>900,chr(175)=>355,
-	chr(176)=>450,chr(177)=>754,chr(178)=>355,chr(179)=>288,chr(180)=>476,chr(181)=>584,chr(182)=>572,chr(183)=>286,chr(184)=>532,chr(185)=>852,chr(186)=>504,chr(187)=>550,chr(188)=>279,chr(189)=>616,chr(190)=>461,chr(191)=>288,chr(192)=>681,chr(193)=>661,chr(194)=>661,chr(195)=>596,chr(196)=>731,chr(197)=>657,
-	chr(198)=>1011,chr(199)=>561,chr(200)=>785,chr(201)=>785,chr(202)=>696,chr(203)=>751,chr(204)=>921,chr(205)=>785,chr(206)=>738,chr(207)=>785,chr(208)=>605,chr(209)=>688,chr(210)=>600,chr(211)=>650,chr(212)=>747,chr(213)=>641,chr(214)=>785,chr(215)=>695,chr(216)=>1027,chr(217)=>1027,chr(218)=>715,chr(219)=>885,
-	chr(220)=>606,chr(221)=>688,chr(222)=>1074,chr(223)=>727,chr(224)=>536,chr(225)=>542,chr(226)=>506,chr(227)=>471,chr(228)=>554,chr(229)=>532,chr(230)=>828,chr(231)=>491,chr(232)=>600,chr(233)=>600,chr(234)=>563,chr(235)=>571,chr(236)=>700,chr(237)=>600,chr(238)=>542,chr(239)=>600,chr(240)=>576,chr(241)=>504,
-	chr(242)=>498,chr(243)=>529,chr(244)=>704,chr(245)=>507,chr(246)=>579,chr(247)=>595,chr(248)=>836,chr(249)=>836,chr(250)=>572,chr(251)=>716,chr(252)=>490,chr(253)=>504,chr(254)=>783,chr(255)=>567);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserifcondensed-win-1251.z';
-$size1=6154;
-$size2=31267;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed-win-1251.z b/main/inc/lib/mpdf/font/dejavuserifcondensed-win-1251.z
deleted file mode 100755
index d1b4d12887..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensed-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed.php b/main/inc/lib/mpdf/font/dejavuserifcondensed.php
deleted file mode 100755
index 2af8c8ac29..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensed.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-86 -236 1158 928]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>572,chr(129)=>540,chr(130)=>286,chr(131)=>333,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>450,chr(137)=>1208,chr(138)=>616,chr(139)=>360,chr(140)=>1023,chr(141)=>540,chr(142)=>625,chr(143)=>540,chr(144)=>540,chr(145)=>286,chr(146)=>286,chr(147)=>460,chr(148)=>460,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>461,chr(155)=>360,chr(156)=>890,chr(157)=>540,chr(158)=>474,chr(159)=>594,chr(160)=>286,chr(161)=>361,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>427,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>584,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>423,chr(187)=>550,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>482,chr(192)=>650,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>650,
-	chr(198)=>901,chr(199)=>688,chr(200)=>657,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>355,chr(205)=>355,chr(206)=>355,chr(207)=>355,chr(208)=>726,chr(209)=>787,chr(210)=>738,chr(211)=>738,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>738,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>594,chr(222)=>608,chr(223)=>601,chr(224)=>536,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>536,chr(230)=>846,chr(231)=>504,chr(232)=>532,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>288,chr(237)=>288,chr(238)=>288,chr(239)=>288,chr(240)=>542,chr(241)=>580,
-	chr(242)=>542,chr(243)=>542,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>542,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>508,chr(254)=>576,chr(255)=>508);
-$enc='win-1252';
-$diff='';
-$file='dejavuserifcondensed.z';
-$size1=6012;
-$size2=31887;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensed.z b/main/inc/lib/mpdf/font/dejavuserifcondensed.z
deleted file mode 100755
index 89978faef8..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensed.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-2.php
deleted file mode 100755
index cfadafc188..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-67 -236 1021 1057]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>698,chr(162)=>450,chr(163)=>639,chr(164)=>572,chr(165)=>633,chr(166)=>650,chr(167)=>470,chr(168)=>450,chr(169)=>650,chr(170)=>650,chr(171)=>669,chr(172)=>657,chr(173)=>374,chr(174)=>657,chr(175)=>657,
-	chr(176)=>450,chr(177)=>583,chr(178)=>450,chr(179)=>346,chr(180)=>450,chr(181)=>342,chr(182)=>506,chr(183)=>450,chr(184)=>450,chr(185)=>506,chr(186)=>506,chr(187)=>416,chr(188)=>511,chr(189)=>450,chr(190)=>511,chr(191)=>511,chr(192)=>748,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>633,
-	chr(198)=>716,chr(199)=>716,chr(200)=>716,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>686,chr(205)=>421,chr(206)=>421,chr(207)=>780,chr(208)=>787,chr(209)=>822,chr(210)=>822,chr(211)=>784,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>748,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>642,chr(222)=>669,chr(223)=>684,chr(224)=>474,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>342,chr(230)=>548,chr(231)=>548,chr(232)=>548,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>572,chr(237)=>342,chr(238)=>342,chr(239)=>629,chr(240)=>629,chr(241)=>654,
-	chr(242)=>654,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>474,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>523,chr(254)=>416,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserifcondensedb-iso-8859-2.z';
-$size1=5966;
-$size2=28238;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-2.z
deleted file mode 100755
index a20b411aa0..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-4.php
deleted file mode 100755
index 4a742f400c..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-67 -240 1021 939]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>698,chr(162)=>624,chr(163)=>748,chr(164)=>572,chr(165)=>421,chr(166)=>633,chr(167)=>470,chr(168)=>450,chr(169)=>650,chr(170)=>686,chr(171)=>769,chr(172)=>669,chr(173)=>374,chr(174)=>657,chr(175)=>450,
-	chr(176)=>450,chr(177)=>583,chr(178)=>450,chr(179)=>474,chr(180)=>450,chr(181)=>342,chr(182)=>342,chr(183)=>450,chr(184)=>450,chr(185)=>506,chr(186)=>572,chr(187)=>629,chr(188)=>416,chr(189)=>785,chr(190)=>511,chr(191)=>654,chr(192)=>698,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>698,
-	chr(198)=>931,chr(199)=>421,chr(200)=>716,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>686,chr(205)=>421,chr(206)=>421,chr(207)=>421,chr(208)=>787,chr(209)=>822,chr(210)=>784,chr(211)=>782,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>784,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>785,chr(222)=>785,chr(223)=>684,chr(224)=>583,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>583,chr(230)=>877,chr(231)=>342,chr(232)=>548,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>572,chr(237)=>342,chr(238)=>342,chr(239)=>342,chr(240)=>629,chr(241)=>654,
-	chr(242)=>600,chr(243)=>624,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>600,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>654,chr(254)=>654,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserifcondensedb-iso-8859-4.z';
-$size1=5984;
-$size2=28856;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-4.z
deleted file mode 100755
index 753fe9488c..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-7.php
deleted file mode 100755
index a00d3dd79a..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-67 -236 1021 996]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>313,chr(162)=>313,chr(163)=>626,chr(164)=>540,chr(165)=>540,chr(166)=>327,chr(167)=>470,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>450,chr(182)=>698,chr(183)=>313,chr(184)=>852,chr(185)=>1006,chr(186)=>595,chr(187)=>563,chr(188)=>798,chr(189)=>938,chr(190)=>857,chr(191)=>820,chr(192)=>435,chr(193)=>698,chr(194)=>760,chr(195)=>639,chr(196)=>698,chr(197)=>686,
-	chr(198)=>657,chr(199)=>850,chr(200)=>784,chr(201)=>421,chr(202)=>782,chr(203)=>698,chr(204)=>996,chr(205)=>822,chr(206)=>633,chr(207)=>784,chr(208)=>850,chr(209)=>677,chr(210)=>540,chr(211)=>636,chr(212)=>669,chr(213)=>642,chr(214)=>784,chr(215)=>698,chr(216)=>822,chr(217)=>801,chr(218)=>421,chr(219)=>642,
-	chr(220)=>692,chr(221)=>547,chr(222)=>654,chr(223)=>435,chr(224)=>624,chr(225)=>692,chr(226)=>598,chr(227)=>594,chr(228)=>600,chr(229)=>547,chr(230)=>533,chr(231)=>654,chr(232)=>600,chr(233)=>435,chr(234)=>674,chr(235)=>631,chr(236)=>659,chr(237)=>624,chr(238)=>533,chr(239)=>600,chr(240)=>659,chr(241)=>598,
-	chr(242)=>548,chr(243)=>664,chr(244)=>605,chr(245)=>624,chr(246)=>814,chr(247)=>592,chr(248)=>847,chr(249)=>857,chr(250)=>435,chr(251)=>624,chr(252)=>600,chr(253)=>624,chr(254)=>857,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserifcondensedb-iso-8859-7.z';
-$size1=5940;
-$size2=24484;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-7.z
deleted file mode 100755
index a06b2ec052..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-9.php
deleted file mode 100755
index 580ed42e3c..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-67 -236 1021 939]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>395,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>327,chr(167)=>470,chr(168)=>450,chr(169)=>900,chr(170)=>438,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>659,chr(182)=>572,chr(183)=>313,chr(184)=>450,chr(185)=>394,chr(186)=>450,chr(187)=>563,chr(188)=>938,chr(189)=>938,chr(190)=>938,chr(191)=>527,chr(192)=>698,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>698,
-	chr(198)=>931,chr(199)=>716,chr(200)=>686,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>421,chr(205)=>421,chr(206)=>421,chr(207)=>421,chr(208)=>769,chr(209)=>822,chr(210)=>784,chr(211)=>784,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>784,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>421,chr(222)=>650,chr(223)=>684,chr(224)=>583,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>583,chr(230)=>877,chr(231)=>548,chr(232)=>572,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>342,chr(237)=>342,chr(238)=>342,chr(239)=>342,chr(240)=>629,chr(241)=>654,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>600,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>342,chr(254)=>506,chr(255)=>523);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserifcondensedb-iso-8859-9.z';
-$size1=6019;
-$size2=28599;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-9.z
deleted file mode 100755
index 2e827fe6ea..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedb-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-win-1251.php b/main/inc/lib/mpdf/font/dejavuserifcondensedb-win-1251.php
deleted file mode 100755
index 4a1762313f..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedb-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-67 -236 1225 999]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>811,chr(129)=>621,chr(130)=>313,chr(131)=>551,
-	chr(132)=>518,chr(133)=>900,chr(134)=>470,chr(135)=>470,chr(136)=>626,chr(137)=>1246,chr(138)=>1081,chr(139)=>360,chr(140)=>1135,chr(141)=>818,chr(142)=>866,chr(143)=>850,chr(144)=>646,chr(145)=>313,chr(146)=>313,chr(147)=>518,chr(148)=>518,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>889,chr(155)=>360,chr(156)=>913,chr(157)=>650,chr(158)=>654,chr(159)=>659,chr(160)=>313,chr(161)=>730,chr(162)=>576,chr(163)=>426,chr(164)=>572,chr(165)=>630,chr(166)=>327,chr(167)=>470,chr(168)=>686,chr(169)=>900,chr(170)=>716,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>421,
-	chr(176)=>450,chr(177)=>754,chr(178)=>421,chr(179)=>342,chr(180)=>556,chr(181)=>659,chr(182)=>572,chr(183)=>313,chr(184)=>572,chr(185)=>978,chr(186)=>548,chr(187)=>563,chr(188)=>325,chr(189)=>650,chr(190)=>506,chr(191)=>342,chr(192)=>733,chr(193)=>769,chr(194)=>760,chr(195)=>621,chr(196)=>800,chr(197)=>686,
-	chr(198)=>1181,chr(199)=>649,chr(200)=>850,chr(201)=>850,chr(202)=>818,chr(203)=>795,chr(204)=>996,chr(205)=>850,chr(206)=>784,chr(207)=>850,chr(208)=>677,chr(209)=>716,chr(210)=>669,chr(211)=>730,chr(212)=>854,chr(213)=>698,chr(214)=>870,chr(215)=>822,chr(216)=>1141,chr(217)=>1164,chr(218)=>861,chr(219)=>1081,
-	chr(220)=>743,chr(221)=>716,chr(222)=>1158,chr(223)=>793,chr(224)=>583,chr(225)=>600,chr(226)=>625,chr(227)=>551,chr(228)=>600,chr(229)=>572,chr(230)=>909,chr(231)=>574,chr(232)=>667,chr(233)=>667,chr(234)=>650,chr(235)=>634,chr(236)=>782,chr(237)=>659,chr(238)=>600,chr(239)=>659,chr(240)=>629,chr(241)=>548,
-	chr(242)=>558,chr(243)=>576,chr(244)=>812,chr(245)=>536,chr(246)=>665,chr(247)=>659,chr(248)=>967,chr(249)=>974,chr(250)=>690,chr(251)=>902,chr(252)=>611,chr(253)=>548,chr(254)=>923,chr(255)=>665);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserifcondensedb-win-1251.z';
-$size1=6174;
-$size2=31480;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb-win-1251.z b/main/inc/lib/mpdf/font/dejavuserifcondensedb-win-1251.z
deleted file mode 100755
index 8715c0501f..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedb-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb.php b/main/inc/lib/mpdf/font/dejavuserifcondensedb.php
deleted file mode 100755
index 1bd2d2ece9..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedb.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-86 -236 1225 939]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>626,chr(129)=>540,chr(130)=>313,chr(131)=>387,
-	chr(132)=>518,chr(133)=>900,chr(134)=>470,chr(135)=>470,chr(136)=>450,chr(137)=>1246,chr(138)=>650,chr(139)=>360,chr(140)=>1062,chr(141)=>540,chr(142)=>657,chr(143)=>540,chr(144)=>540,chr(145)=>313,chr(146)=>313,chr(147)=>518,chr(148)=>518,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>506,chr(155)=>360,chr(156)=>925,chr(157)=>540,chr(158)=>511,chr(159)=>642,chr(160)=>313,chr(161)=>395,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>327,chr(167)=>470,chr(168)=>450,chr(169)=>900,chr(170)=>438,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>659,chr(182)=>572,chr(183)=>313,chr(184)=>450,chr(185)=>394,chr(186)=>450,chr(187)=>563,chr(188)=>938,chr(189)=>938,chr(190)=>938,chr(191)=>527,chr(192)=>698,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>698,
-	chr(198)=>931,chr(199)=>716,chr(200)=>686,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>421,chr(205)=>421,chr(206)=>421,chr(207)=>421,chr(208)=>787,chr(209)=>822,chr(210)=>784,chr(211)=>784,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>784,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>642,chr(222)=>681,chr(223)=>684,chr(224)=>583,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>583,chr(230)=>877,chr(231)=>548,chr(232)=>572,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>342,chr(237)=>342,chr(238)=>342,chr(239)=>342,chr(240)=>600,chr(241)=>654,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>600,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>523,chr(254)=>629,chr(255)=>523);
-$enc='win-1252';
-$diff='';
-$file='dejavuserifcondensedb.z';
-$size1=6032;
-$size2=32120;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedb.z b/main/inc/lib/mpdf/font/dejavuserifcondensedb.z
deleted file mode 100755
index e176ace2a0..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedb.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-2.php
deleted file mode 100755
index 1657532f5c..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1085 1057]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>698,chr(162)=>450,chr(163)=>639,chr(164)=>572,chr(165)=>633,chr(166)=>650,chr(167)=>470,chr(168)=>450,chr(169)=>650,chr(170)=>650,chr(171)=>669,chr(172)=>657,chr(173)=>374,chr(174)=>657,chr(175)=>657,
-	chr(176)=>450,chr(177)=>583,chr(178)=>450,chr(179)=>346,chr(180)=>450,chr(181)=>457,chr(182)=>506,chr(183)=>450,chr(184)=>450,chr(185)=>506,chr(186)=>506,chr(187)=>416,chr(188)=>511,chr(189)=>450,chr(190)=>511,chr(191)=>511,chr(192)=>748,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>633,
-	chr(198)=>716,chr(199)=>716,chr(200)=>716,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>686,chr(205)=>421,chr(206)=>421,chr(207)=>780,chr(208)=>787,chr(209)=>822,chr(210)=>822,chr(211)=>784,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>748,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>642,chr(222)=>669,chr(223)=>684,chr(224)=>474,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>342,chr(230)=>548,chr(231)=>548,chr(232)=>548,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>572,chr(237)=>342,chr(238)=>342,chr(239)=>629,chr(240)=>629,chr(241)=>654,
-	chr(242)=>654,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>474,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>523,chr(254)=>416,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserifcondensedbi-iso-8859-2.z';
-$size1=6001;
-$size2=28680;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-2.z
deleted file mode 100755
index a41dac7c80..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-4.php
deleted file mode 100755
index 9a37d66250..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -240 1085 939]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>698,chr(162)=>624,chr(163)=>748,chr(164)=>572,chr(165)=>421,chr(166)=>633,chr(167)=>470,chr(168)=>450,chr(169)=>650,chr(170)=>686,chr(171)=>769,chr(172)=>669,chr(173)=>374,chr(174)=>657,chr(175)=>450,
-	chr(176)=>450,chr(177)=>583,chr(178)=>450,chr(179)=>474,chr(180)=>450,chr(181)=>342,chr(182)=>342,chr(183)=>450,chr(184)=>450,chr(185)=>506,chr(186)=>572,chr(187)=>629,chr(188)=>416,chr(189)=>785,chr(190)=>511,chr(191)=>654,chr(192)=>698,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>698,
-	chr(198)=>931,chr(199)=>421,chr(200)=>716,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>686,chr(205)=>421,chr(206)=>421,chr(207)=>421,chr(208)=>787,chr(209)=>822,chr(210)=>784,chr(211)=>782,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>784,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>785,chr(222)=>785,chr(223)=>684,chr(224)=>583,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>583,chr(230)=>838,chr(231)=>342,chr(232)=>548,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>572,chr(237)=>342,chr(238)=>342,chr(239)=>342,chr(240)=>629,chr(241)=>654,
-	chr(242)=>600,chr(243)=>624,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>600,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>654,chr(254)=>654,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserifcondensedbi-iso-8859-4.z';
-$size1=6019;
-$size2=28909;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-4.z
deleted file mode 100755
index fec3a1dd22..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-7.php
deleted file mode 100755
index 7dbd09e3e0..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1085 996]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>313,chr(162)=>313,chr(163)=>626,chr(164)=>540,chr(165)=>540,chr(166)=>327,chr(167)=>470,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>450,chr(182)=>698,chr(183)=>313,chr(184)=>852,chr(185)=>1022,chr(186)=>595,chr(187)=>563,chr(188)=>798,chr(189)=>938,chr(190)=>857,chr(191)=>820,chr(192)=>435,chr(193)=>698,chr(194)=>760,chr(195)=>639,chr(196)=>698,chr(197)=>686,
-	chr(198)=>657,chr(199)=>850,chr(200)=>784,chr(201)=>421,chr(202)=>782,chr(203)=>698,chr(204)=>996,chr(205)=>822,chr(206)=>633,chr(207)=>784,chr(208)=>850,chr(209)=>677,chr(210)=>540,chr(211)=>636,chr(212)=>669,chr(213)=>642,chr(214)=>784,chr(215)=>698,chr(216)=>822,chr(217)=>801,chr(218)=>421,chr(219)=>642,
-	chr(220)=>692,chr(221)=>547,chr(222)=>654,chr(223)=>435,chr(224)=>624,chr(225)=>692,chr(226)=>598,chr(227)=>594,chr(228)=>600,chr(229)=>547,chr(230)=>533,chr(231)=>654,chr(232)=>600,chr(233)=>435,chr(234)=>674,chr(235)=>631,chr(236)=>659,chr(237)=>624,chr(238)=>533,chr(239)=>600,chr(240)=>659,chr(241)=>598,
-	chr(242)=>548,chr(243)=>664,chr(244)=>605,chr(245)=>624,chr(246)=>814,chr(247)=>592,chr(248)=>847,chr(249)=>857,chr(250)=>435,chr(251)=>624,chr(252)=>600,chr(253)=>624,chr(254)=>857,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserifcondensedbi-iso-8859-7.z';
-$size1=5975;
-$size2=24849;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-7.z
deleted file mode 100755
index 79877fcc13..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-9.php
deleted file mode 100755
index cf81868483..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1085 939]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>313,chr(161)=>395,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>327,chr(167)=>470,chr(168)=>450,chr(169)=>900,chr(170)=>438,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>659,chr(182)=>572,chr(183)=>313,chr(184)=>450,chr(185)=>394,chr(186)=>450,chr(187)=>563,chr(188)=>938,chr(189)=>938,chr(190)=>938,chr(191)=>527,chr(192)=>698,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>698,
-	chr(198)=>931,chr(199)=>716,chr(200)=>686,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>421,chr(205)=>421,chr(206)=>421,chr(207)=>421,chr(208)=>769,chr(209)=>822,chr(210)=>784,chr(211)=>784,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>784,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>421,chr(222)=>650,chr(223)=>684,chr(224)=>583,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>583,chr(230)=>838,chr(231)=>548,chr(232)=>572,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>342,chr(237)=>342,chr(238)=>342,chr(239)=>342,chr(240)=>629,chr(241)=>654,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>600,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>342,chr(254)=>506,chr(255)=>523);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserifcondensedbi-iso-8859-9.z';
-$size1=6054;
-$size2=28604;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-9.z
deleted file mode 100755
index e4cf7b2b62..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-win-1251.php b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-win-1251.php
deleted file mode 100755
index 98a3cd3e99..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-149 -236 1193 999]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>811,chr(129)=>621,chr(130)=>313,chr(131)=>506,
-	chr(132)=>518,chr(133)=>900,chr(134)=>470,chr(135)=>470,chr(136)=>626,chr(137)=>1246,chr(138)=>1081,chr(139)=>360,chr(140)=>1135,chr(141)=>818,chr(142)=>866,chr(143)=>850,chr(144)=>646,chr(145)=>313,chr(146)=>313,chr(147)=>518,chr(148)=>518,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>913,chr(155)=>360,chr(156)=>910,chr(157)=>609,chr(158)=>654,chr(159)=>654,chr(160)=>313,chr(161)=>730,chr(162)=>538,chr(163)=>426,chr(164)=>572,chr(165)=>630,chr(166)=>327,chr(167)=>470,chr(168)=>686,chr(169)=>900,chr(170)=>716,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>421,
-	chr(176)=>450,chr(177)=>754,chr(178)=>421,chr(179)=>342,chr(180)=>556,chr(181)=>659,chr(182)=>572,chr(183)=>313,chr(184)=>572,chr(185)=>978,chr(186)=>548,chr(187)=>563,chr(188)=>325,chr(189)=>650,chr(190)=>506,chr(191)=>342,chr(192)=>733,chr(193)=>769,chr(194)=>760,chr(195)=>621,chr(196)=>800,chr(197)=>686,
-	chr(198)=>1181,chr(199)=>649,chr(200)=>850,chr(201)=>850,chr(202)=>818,chr(203)=>795,chr(204)=>996,chr(205)=>850,chr(206)=>784,chr(207)=>850,chr(208)=>677,chr(209)=>716,chr(210)=>669,chr(211)=>730,chr(212)=>854,chr(213)=>698,chr(214)=>870,chr(215)=>822,chr(216)=>1141,chr(217)=>1164,chr(218)=>861,chr(219)=>1081,
-	chr(220)=>743,chr(221)=>716,chr(222)=>1158,chr(223)=>793,chr(224)=>583,chr(225)=>650,chr(226)=>591,chr(227)=>506,chr(228)=>625,chr(229)=>572,chr(230)=>1175,chr(231)=>574,chr(232)=>654,chr(233)=>654,chr(234)=>609,chr(235)=>659,chr(236)=>855,chr(237)=>656,chr(238)=>600,chr(239)=>654,chr(240)=>629,chr(241)=>548,
-	chr(242)=>952,chr(243)=>538,chr(244)=>812,chr(245)=>536,chr(246)=>723,chr(247)=>643,chr(248)=>952,chr(249)=>1021,chr(250)=>654,chr(251)=>916,chr(252)=>593,chr(253)=>580,chr(254)=>901,chr(255)=>716);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserifcondensedbi-win-1251.z';
-$size1=6209;
-$size2=31810;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-win-1251.z b/main/inc/lib/mpdf/font/dejavuserifcondensedbi-win-1251.z
deleted file mode 100755
index bea8b60dc0..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedbi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi.php b/main/inc/lib/mpdf/font/dejavuserifcondensedbi.php
deleted file mode 100755
index 568d072bf5..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedbi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-939,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-166 -236 1193 939]','ItalicAngle'=>-11,'StemV'=>120,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>313,'!'=>395,'"'=>469,'#'=>754,'$'=>626,'%'=>855,'&'=>813,'\''=>275,'('=>426,')'=>426,'*'=>470,'+'=>754,
-	','=>313,'-'=>374,'.'=>313,'/'=>329,'0'=>626,'1'=>626,'2'=>626,'3'=>626,'4'=>626,'5'=>626,'6'=>626,'7'=>626,'8'=>626,'9'=>626,':'=>332,';'=>332,'<'=>754,'='=>754,'>'=>754,'?'=>527,'@'=>900,'A'=>698,
-	'B'=>760,'C'=>716,'D'=>780,'E'=>686,'F'=>639,'G'=>769,'H'=>850,'I'=>421,'J'=>426,'K'=>782,'L'=>633,'M'=>996,'N'=>822,'O'=>784,'P'=>677,'Q'=>784,'R'=>748,'S'=>650,'T'=>669,'U'=>785,'V'=>698,'W'=>1011,
-	'X'=>698,'Y'=>642,'Z'=>657,'['=>426,'\\'=>329,']'=>426,'^'=>754,'_'=>450,'`'=>450,'a'=>583,'b'=>629,'c'=>548,'d'=>629,'e'=>572,'f'=>387,'g'=>629,'h'=>654,'i'=>342,'j'=>325,'k'=>624,'l'=>342,'m'=>952,
-	'n'=>654,'o'=>600,'p'=>629,'q'=>629,'r'=>474,'s'=>506,'t'=>416,'u'=>654,'v'=>523,'w'=>774,'x'=>536,'y'=>523,'z'=>511,'{'=>579,'|'=>327,'}'=>579,'~'=>754,chr(127)=>540,chr(128)=>626,chr(129)=>540,chr(130)=>313,chr(131)=>387,
-	chr(132)=>518,chr(133)=>900,chr(134)=>470,chr(135)=>470,chr(136)=>450,chr(137)=>1246,chr(138)=>650,chr(139)=>360,chr(140)=>1062,chr(141)=>540,chr(142)=>657,chr(143)=>540,chr(144)=>540,chr(145)=>313,chr(146)=>313,chr(147)=>518,chr(148)=>518,chr(149)=>575,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>506,chr(155)=>360,chr(156)=>925,chr(157)=>540,chr(158)=>511,chr(159)=>642,chr(160)=>313,chr(161)=>395,chr(162)=>626,chr(163)=>626,chr(164)=>572,chr(165)=>626,chr(166)=>327,chr(167)=>470,chr(168)=>450,chr(169)=>900,chr(170)=>438,chr(171)=>563,chr(172)=>754,chr(173)=>374,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>394,chr(179)=>394,chr(180)=>450,chr(181)=>659,chr(182)=>572,chr(183)=>313,chr(184)=>450,chr(185)=>394,chr(186)=>450,chr(187)=>563,chr(188)=>938,chr(189)=>938,chr(190)=>938,chr(191)=>527,chr(192)=>698,chr(193)=>698,chr(194)=>698,chr(195)=>698,chr(196)=>698,chr(197)=>698,
-	chr(198)=>931,chr(199)=>716,chr(200)=>686,chr(201)=>686,chr(202)=>686,chr(203)=>686,chr(204)=>421,chr(205)=>421,chr(206)=>421,chr(207)=>421,chr(208)=>787,chr(209)=>822,chr(210)=>784,chr(211)=>784,chr(212)=>784,chr(213)=>784,chr(214)=>784,chr(215)=>754,chr(216)=>784,chr(217)=>785,chr(218)=>785,chr(219)=>785,
-	chr(220)=>785,chr(221)=>642,chr(222)=>681,chr(223)=>684,chr(224)=>583,chr(225)=>583,chr(226)=>583,chr(227)=>583,chr(228)=>583,chr(229)=>583,chr(230)=>838,chr(231)=>548,chr(232)=>572,chr(233)=>572,chr(234)=>572,chr(235)=>572,chr(236)=>342,chr(237)=>342,chr(238)=>342,chr(239)=>342,chr(240)=>600,chr(241)=>654,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>754,chr(248)=>600,chr(249)=>654,chr(250)=>654,chr(251)=>654,chr(252)=>654,chr(253)=>523,chr(254)=>629,chr(255)=>523);
-$enc='win-1252';
-$diff='';
-$file='dejavuserifcondensedbi.z';
-$size1=6067;
-$size2=32273;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedbi.z b/main/inc/lib/mpdf/font/dejavuserifcondensedbi.z
deleted file mode 100755
index 3636e50f75..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedbi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-2.php
deleted file mode 100755
index cbcd959bd2..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-165 -236 986 1051]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>650,chr(162)=>450,chr(163)=>602,chr(164)=>572,chr(165)=>598,chr(166)=>616,chr(167)=>450,chr(168)=>450,chr(169)=>616,chr(170)=>616,chr(171)=>600,chr(172)=>625,chr(173)=>304,chr(174)=>625,chr(175)=>625,
-	chr(176)=>450,chr(177)=>536,chr(178)=>450,chr(179)=>292,chr(180)=>450,chr(181)=>360,chr(182)=>461,chr(183)=>450,chr(184)=>450,chr(185)=>461,chr(186)=>461,chr(187)=>361,chr(188)=>474,chr(189)=>450,chr(190)=>474,chr(191)=>474,chr(192)=>677,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>598,
-	chr(198)=>688,chr(199)=>688,chr(200)=>688,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>657,chr(205)=>355,chr(206)=>355,chr(207)=>721,chr(208)=>726,chr(209)=>787,chr(210)=>787,chr(211)=>738,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>677,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>594,chr(222)=>600,chr(223)=>601,chr(224)=>430,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>288,chr(230)=>504,chr(231)=>504,chr(232)=>504,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>532,chr(237)=>288,chr(238)=>288,chr(239)=>576,chr(240)=>576,chr(241)=>580,
-	chr(242)=>580,chr(243)=>542,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>430,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>508,chr(254)=>361,chr(255)=>450);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserifcondensedi-iso-8859-2.z';
-$size1=5976;
-$size2=28616;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-2.z
deleted file mode 100755
index 06a7c2a11a..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-4.php
deleted file mode 100755
index 1d5e29ffc8..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-165 -236 986 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>650,chr(162)=>545,chr(163)=>677,chr(164)=>572,chr(165)=>355,chr(166)=>598,chr(167)=>450,chr(168)=>450,chr(169)=>616,chr(170)=>657,chr(171)=>719,chr(172)=>600,chr(173)=>304,chr(174)=>625,chr(175)=>450,
-	chr(176)=>450,chr(177)=>536,chr(178)=>450,chr(179)=>430,chr(180)=>450,chr(181)=>288,chr(182)=>288,chr(183)=>450,chr(184)=>450,chr(185)=>461,chr(186)=>532,chr(187)=>576,chr(188)=>361,chr(189)=>758,chr(190)=>474,chr(191)=>580,chr(192)=>650,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>650,
-	chr(198)=>901,chr(199)=>355,chr(200)=>688,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>657,chr(205)=>355,chr(206)=>355,chr(207)=>355,chr(208)=>726,chr(209)=>787,chr(210)=>738,chr(211)=>672,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>738,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>758,chr(222)=>758,chr(223)=>601,chr(224)=>536,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>536,chr(230)=>846,chr(231)=>288,chr(232)=>504,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>532,chr(237)=>288,chr(238)=>288,chr(239)=>288,chr(240)=>576,chr(241)=>580,
-	chr(242)=>542,chr(243)=>545,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>542,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>580,chr(254)=>580,chr(255)=>450);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserifcondensedi-iso-8859-4.z';
-$size1=5994;
-$size2=28783;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-4.z
deleted file mode 100755
index 59dfd1a0bb..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-7.php
deleted file mode 100755
index 163997adcc..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-165 -236 986 996]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>286,chr(162)=>286,chr(163)=>572,chr(164)=>540,chr(165)=>540,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>540,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>540,chr(175)=>900,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>450,chr(182)=>650,chr(183)=>286,chr(184)=>810,chr(185)=>935,chr(186)=>505,chr(187)=>550,chr(188)=>751,chr(189)=>872,chr(190)=>808,chr(191)=>767,chr(192)=>353,chr(193)=>650,chr(194)=>661,chr(195)=>624,chr(196)=>650,chr(197)=>657,
-	chr(198)=>625,chr(199)=>785,chr(200)=>738,chr(201)=>355,chr(202)=>672,chr(203)=>650,chr(204)=>921,chr(205)=>787,chr(206)=>633,chr(207)=>738,chr(208)=>785,chr(209)=>605,chr(210)=>540,chr(211)=>636,chr(212)=>600,chr(213)=>594,chr(214)=>738,chr(215)=>641,chr(216)=>789,chr(217)=>746,chr(218)=>355,chr(219)=>594,
-	chr(220)=>607,chr(221)=>483,chr(222)=>539,chr(223)=>353,chr(224)=>547,chr(225)=>607,chr(226)=>520,chr(227)=>538,chr(228)=>542,chr(229)=>483,chr(230)=>488,chr(231)=>539,chr(232)=>542,chr(233)=>353,chr(234)=>590,chr(235)=>570,chr(236)=>584,chr(237)=>547,chr(238)=>496,chr(239)=>542,chr(240)=>591,chr(241)=>529,
-	chr(242)=>504,chr(243)=>614,chr(244)=>498,chr(245)=>547,chr(246)=>630,chr(247)=>545,chr(248)=>706,chr(249)=>734,chr(250)=>353,chr(251)=>547,chr(252)=>542,chr(253)=>547,chr(254)=>734,chr(255)=>540);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserifcondensedi-iso-8859-7.z';
-$size1=5950;
-$size2=24807;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-7.z
deleted file mode 100755
index c91699fa97..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-9.php
deleted file mode 100755
index 0b9a371739..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-165 -236 986 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>540,chr(129)=>540,chr(130)=>540,chr(131)=>540,
-	chr(132)=>540,chr(133)=>540,chr(134)=>540,chr(135)=>540,chr(136)=>540,chr(137)=>540,chr(138)=>540,chr(139)=>540,chr(140)=>540,chr(141)=>540,chr(142)=>540,chr(143)=>540,chr(144)=>540,chr(145)=>540,chr(146)=>540,chr(147)=>540,chr(148)=>540,chr(149)=>540,chr(150)=>540,chr(151)=>540,chr(152)=>540,chr(153)=>540,
-	chr(154)=>540,chr(155)=>540,chr(156)=>540,chr(157)=>540,chr(158)=>540,chr(159)=>540,chr(160)=>286,chr(161)=>361,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>427,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>584,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>423,chr(187)=>550,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>482,chr(192)=>650,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>650,
-	chr(198)=>901,chr(199)=>688,chr(200)=>657,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>355,chr(205)=>355,chr(206)=>355,chr(207)=>355,chr(208)=>719,chr(209)=>787,chr(210)=>738,chr(211)=>738,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>738,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>355,chr(222)=>616,chr(223)=>601,chr(224)=>536,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>536,chr(230)=>846,chr(231)=>504,chr(232)=>532,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>288,chr(237)=>288,chr(238)=>288,chr(239)=>288,chr(240)=>576,chr(241)=>580,
-	chr(242)=>542,chr(243)=>542,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>542,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>288,chr(254)=>461,chr(255)=>508);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserifcondensedi-iso-8859-9.z';
-$size1=6029;
-$size2=28440;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-9.z
deleted file mode 100755
index 3a11c54dbc..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-win-1251.php b/main/inc/lib/mpdf/font/dejavuserifcondensedi-win-1251.php
deleted file mode 100755
index d83bc3b0a9..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-165 -236 1131 970]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>719,chr(129)=>596,chr(130)=>286,chr(131)=>455,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>572,chr(137)=>1208,chr(138)=>976,chr(139)=>360,chr(140)=>1006,chr(141)=>696,chr(142)=>785,chr(143)=>785,chr(144)=>561,chr(145)=>286,chr(146)=>286,chr(147)=>460,chr(148)=>460,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>540,chr(153)=>900,
-	chr(154)=>773,chr(155)=>360,chr(156)=>790,chr(157)=>537,chr(158)=>580,chr(159)=>580,chr(160)=>286,chr(161)=>650,chr(162)=>522,chr(163)=>360,chr(164)=>572,chr(165)=>604,chr(166)=>303,chr(167)=>450,chr(168)=>657,chr(169)=>900,chr(170)=>688,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>900,chr(175)=>355,
-	chr(176)=>450,chr(177)=>754,chr(178)=>355,chr(179)=>288,chr(180)=>476,chr(181)=>584,chr(182)=>572,chr(183)=>286,chr(184)=>532,chr(185)=>852,chr(186)=>504,chr(187)=>550,chr(188)=>279,chr(189)=>616,chr(190)=>461,chr(191)=>288,chr(192)=>681,chr(193)=>661,chr(194)=>661,chr(195)=>596,chr(196)=>731,chr(197)=>657,
-	chr(198)=>1011,chr(199)=>561,chr(200)=>785,chr(201)=>785,chr(202)=>696,chr(203)=>751,chr(204)=>921,chr(205)=>785,chr(206)=>738,chr(207)=>785,chr(208)=>605,chr(209)=>688,chr(210)=>600,chr(211)=>650,chr(212)=>747,chr(213)=>641,chr(214)=>785,chr(215)=>695,chr(216)=>1027,chr(217)=>1027,chr(218)=>715,chr(219)=>885,
-	chr(220)=>606,chr(221)=>688,chr(222)=>1074,chr(223)=>727,chr(224)=>536,chr(225)=>549,chr(226)=>523,chr(227)=>455,chr(228)=>570,chr(229)=>532,chr(230)=>1023,chr(231)=>491,chr(232)=>580,chr(233)=>580,chr(234)=>537,chr(235)=>573,chr(236)=>746,chr(237)=>593,chr(238)=>542,chr(239)=>580,chr(240)=>576,chr(241)=>504,
-	chr(242)=>853,chr(243)=>522,chr(244)=>704,chr(245)=>507,chr(246)=>628,chr(247)=>560,chr(248)=>853,chr(249)=>901,chr(250)=>600,chr(251)=>733,chr(252)=>490,chr(253)=>504,chr(254)=>792,chr(255)=>596);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserifcondensedi-win-1251.z';
-$size1=6185;
-$size2=31520;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi-win-1251.z b/main/inc/lib/mpdf/font/dejavuserifcondensedi-win-1251.z
deleted file mode 100755
index fe904cb36d..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi.php b/main/inc/lib/mpdf/font/dejavuserifcondensedi.php
deleted file mode 100755
index 93aaa9b669..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifcondensedi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-165 -236 1131 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>540);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>540,chr(1)=>540,chr(2)=>540,chr(3)=>540,chr(4)=>540,chr(5)=>540,chr(6)=>540,chr(7)=>540,chr(8)=>540,chr(9)=>540,chr(10)=>540,chr(11)=>540,chr(12)=>540,chr(13)=>540,chr(14)=>540,chr(15)=>540,chr(16)=>540,chr(17)=>540,chr(18)=>540,chr(19)=>540,chr(20)=>540,chr(21)=>540,
-	chr(22)=>540,chr(23)=>540,chr(24)=>540,chr(25)=>540,chr(26)=>540,chr(27)=>540,chr(28)=>540,chr(29)=>540,chr(30)=>540,chr(31)=>540,' '=>286,'!'=>361,'"'=>414,'#'=>754,'$'=>572,'%'=>855,'&'=>801,'\''=>247,'('=>351,')'=>351,'*'=>450,'+'=>754,
-	','=>286,'-'=>304,'.'=>286,'/'=>303,'0'=>572,'1'=>572,'2'=>572,'3'=>572,'4'=>572,'5'=>572,'6'=>572,'7'=>572,'8'=>572,'9'=>572,':'=>303,';'=>303,'<'=>754,'='=>754,'>'=>754,'?'=>482,'@'=>900,'A'=>650,
-	'B'=>661,'C'=>688,'D'=>721,'E'=>657,'F'=>624,'G'=>719,'H'=>785,'I'=>355,'J'=>360,'K'=>672,'L'=>598,'M'=>921,'N'=>787,'O'=>738,'P'=>605,'Q'=>738,'R'=>677,'S'=>616,'T'=>600,'U'=>758,'V'=>650,'W'=>925,
-	'X'=>641,'Y'=>594,'Z'=>625,'['=>351,'\\'=>303,']'=>351,'^'=>754,'_'=>450,'`'=>450,'a'=>536,'b'=>576,'c'=>504,'d'=>576,'e'=>532,'f'=>333,'g'=>576,'h'=>580,'i'=>288,'j'=>279,'k'=>545,'l'=>288,'m'=>853,
-	'n'=>580,'o'=>542,'p'=>576,'q'=>576,'r'=>430,'s'=>461,'t'=>361,'u'=>580,'v'=>508,'w'=>770,'x'=>507,'y'=>508,'z'=>474,'{'=>572,'|'=>303,'}'=>572,'~'=>754,chr(127)=>540,chr(128)=>572,chr(129)=>540,chr(130)=>286,chr(131)=>333,
-	chr(132)=>466,chr(133)=>900,chr(134)=>450,chr(135)=>450,chr(136)=>450,chr(137)=>1208,chr(138)=>616,chr(139)=>360,chr(140)=>1023,chr(141)=>540,chr(142)=>625,chr(143)=>540,chr(144)=>540,chr(145)=>286,chr(146)=>286,chr(147)=>460,chr(148)=>460,chr(149)=>531,chr(150)=>450,chr(151)=>900,chr(152)=>450,chr(153)=>900,
-	chr(154)=>461,chr(155)=>360,chr(156)=>890,chr(157)=>540,chr(158)=>474,chr(159)=>594,chr(160)=>286,chr(161)=>361,chr(162)=>572,chr(163)=>572,chr(164)=>572,chr(165)=>572,chr(166)=>303,chr(167)=>450,chr(168)=>450,chr(169)=>900,chr(170)=>427,chr(171)=>550,chr(172)=>754,chr(173)=>304,chr(174)=>900,chr(175)=>450,
-	chr(176)=>450,chr(177)=>754,chr(178)=>360,chr(179)=>360,chr(180)=>450,chr(181)=>584,chr(182)=>572,chr(183)=>286,chr(184)=>450,chr(185)=>360,chr(186)=>423,chr(187)=>550,chr(188)=>872,chr(189)=>872,chr(190)=>872,chr(191)=>482,chr(192)=>650,chr(193)=>650,chr(194)=>650,chr(195)=>650,chr(196)=>650,chr(197)=>650,
-	chr(198)=>901,chr(199)=>688,chr(200)=>657,chr(201)=>657,chr(202)=>657,chr(203)=>657,chr(204)=>355,chr(205)=>355,chr(206)=>355,chr(207)=>355,chr(208)=>726,chr(209)=>787,chr(210)=>738,chr(211)=>738,chr(212)=>738,chr(213)=>738,chr(214)=>738,chr(215)=>754,chr(216)=>738,chr(217)=>758,chr(218)=>758,chr(219)=>758,
-	chr(220)=>758,chr(221)=>594,chr(222)=>608,chr(223)=>601,chr(224)=>536,chr(225)=>536,chr(226)=>536,chr(227)=>536,chr(228)=>536,chr(229)=>536,chr(230)=>846,chr(231)=>504,chr(232)=>532,chr(233)=>532,chr(234)=>532,chr(235)=>532,chr(236)=>288,chr(237)=>288,chr(238)=>288,chr(239)=>288,chr(240)=>542,chr(241)=>580,
-	chr(242)=>542,chr(243)=>542,chr(244)=>542,chr(245)=>542,chr(246)=>542,chr(247)=>754,chr(248)=>542,chr(249)=>580,chr(250)=>580,chr(251)=>580,chr(252)=>580,chr(253)=>508,chr(254)=>576,chr(255)=>508);
-$enc='win-1252';
-$diff='';
-$file='dejavuserifcondensedi.z';
-$size1=6043;
-$size2=32047;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifcondensedi.z b/main/inc/lib/mpdf/font/dejavuserifcondensedi.z
deleted file mode 100755
index 56d112f5ac..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifcondensedi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-2.php b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-2.php
deleted file mode 100755
index f1207f020b..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-183 -236 1096 1051]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>722,chr(162)=>500,chr(163)=>669,chr(164)=>636,chr(165)=>664,chr(166)=>685,chr(167)=>500,chr(168)=>500,chr(169)=>685,chr(170)=>685,chr(171)=>667,chr(172)=>695,chr(173)=>338,chr(174)=>695,chr(175)=>695,
-	chr(176)=>500,chr(177)=>596,chr(178)=>500,chr(179)=>324,chr(180)=>500,chr(181)=>400,chr(182)=>513,chr(183)=>500,chr(184)=>500,chr(185)=>513,chr(186)=>513,chr(187)=>402,chr(188)=>527,chr(189)=>500,chr(190)=>527,chr(191)=>527,chr(192)=>753,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>664,
-	chr(198)=>765,chr(199)=>765,chr(200)=>765,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>730,chr(205)=>395,chr(206)=>395,chr(207)=>802,chr(208)=>807,chr(209)=>875,chr(210)=>875,chr(211)=>820,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>753,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>660,chr(222)=>667,chr(223)=>668,chr(224)=>478,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>320,chr(230)=>560,chr(231)=>560,chr(232)=>560,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>592,chr(237)=>320,chr(238)=>320,chr(239)=>640,chr(240)=>640,chr(241)=>644,
-	chr(242)=>644,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>478,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>565,chr(254)=>402,chr(255)=>500);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='dejavuserifi-iso-8859-2.z';
-$size1=5932;
-$size2=28951;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-2.z b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-2.z
deleted file mode 100755
index 6fd0f804ba..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-4.php b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-4.php
deleted file mode 100755
index 8cfce77fc8..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-183 -236 1096 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>722,chr(162)=>606,chr(163)=>753,chr(164)=>636,chr(165)=>395,chr(166)=>664,chr(167)=>500,chr(168)=>500,chr(169)=>685,chr(170)=>730,chr(171)=>799,chr(172)=>667,chr(173)=>338,chr(174)=>695,chr(175)=>500,
-	chr(176)=>500,chr(177)=>596,chr(178)=>500,chr(179)=>478,chr(180)=>500,chr(181)=>320,chr(182)=>320,chr(183)=>500,chr(184)=>500,chr(185)=>513,chr(186)=>592,chr(187)=>640,chr(188)=>402,chr(189)=>843,chr(190)=>527,chr(191)=>644,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1001,chr(199)=>395,chr(200)=>765,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>730,chr(205)=>395,chr(206)=>395,chr(207)=>395,chr(208)=>807,chr(209)=>875,chr(210)=>820,chr(211)=>747,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>820,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>843,chr(222)=>843,chr(223)=>668,chr(224)=>596,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>596,chr(230)=>940,chr(231)=>320,chr(232)=>560,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>592,chr(237)=>320,chr(238)=>320,chr(239)=>320,chr(240)=>640,chr(241)=>644,
-	chr(242)=>602,chr(243)=>606,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>602,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>644,chr(254)=>644,chr(255)=>500);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='dejavuserifi-iso-8859-4.z';
-$size1=5950;
-$size2=29080;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-4.z b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-4.z
deleted file mode 100755
index 660e85d417..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-7.php b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-7.php
deleted file mode 100755
index 4a372d7cd9..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-183 -236 1096 996]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>318,chr(162)=>318,chr(163)=>636,chr(164)=>600,chr(165)=>600,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>600,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>600,chr(175)=>1000,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>500,chr(182)=>722,chr(183)=>318,chr(184)=>900,chr(185)=>1039,chr(186)=>562,chr(187)=>612,chr(188)=>835,chr(189)=>969,chr(190)=>897,chr(191)=>853,chr(192)=>392,chr(193)=>722,chr(194)=>735,chr(195)=>694,chr(196)=>722,chr(197)=>730,
-	chr(198)=>695,chr(199)=>872,chr(200)=>820,chr(201)=>395,chr(202)=>747,chr(203)=>722,chr(204)=>1024,chr(205)=>875,chr(206)=>704,chr(207)=>820,chr(208)=>872,chr(209)=>673,chr(210)=>600,chr(211)=>707,chr(212)=>667,chr(213)=>660,chr(214)=>820,chr(215)=>712,chr(216)=>877,chr(217)=>829,chr(218)=>395,chr(219)=>660,
-	chr(220)=>675,chr(221)=>537,chr(222)=>599,chr(223)=>392,chr(224)=>608,chr(225)=>675,chr(226)=>578,chr(227)=>598,chr(228)=>602,chr(229)=>537,chr(230)=>542,chr(231)=>599,chr(232)=>602,chr(233)=>392,chr(234)=>656,chr(235)=>634,chr(236)=>650,chr(237)=>608,chr(238)=>551,chr(239)=>602,chr(240)=>657,chr(241)=>588,
-	chr(242)=>560,chr(243)=>683,chr(244)=>553,chr(245)=>608,chr(246)=>700,chr(247)=>606,chr(248)=>784,chr(249)=>815,chr(250)=>392,chr(251)=>608,chr(252)=>602,chr(253)=>608,chr(254)=>815,chr(255)=>600);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='dejavuserifi-iso-8859-7.z';
-$size1=5906;
-$size2=24973;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-7.z b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-7.z
deleted file mode 100755
index e3cf75c616..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-9.php b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-9.php
deleted file mode 100755
index 4ef2fb17fb..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-183 -236 1096 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>318,chr(161)=>402,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>475,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>650,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>470,chr(187)=>612,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>536,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1001,chr(199)=>765,chr(200)=>730,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>395,chr(205)=>395,chr(206)=>395,chr(207)=>395,chr(208)=>799,chr(209)=>875,chr(210)=>820,chr(211)=>820,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>820,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>395,chr(222)=>685,chr(223)=>668,chr(224)=>596,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>596,chr(230)=>940,chr(231)=>560,chr(232)=>592,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>320,chr(237)=>320,chr(238)=>320,chr(239)=>320,chr(240)=>640,chr(241)=>644,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>602,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>320,chr(254)=>513,chr(255)=>565);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='dejavuserifi-iso-8859-9.z';
-$size1=5985;
-$size2=28758;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-9.z b/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-9.z
deleted file mode 100755
index cdcc6a1da2..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-win-1251.php b/main/inc/lib/mpdf/font/dejavuserifi-win-1251.php
deleted file mode 100755
index 50d75cb295..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-183 -236 1257 970]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>799,chr(129)=>662,chr(130)=>318,chr(131)=>505,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>636,chr(137)=>1342,chr(138)=>1084,chr(139)=>400,chr(140)=>1118,chr(141)=>774,chr(142)=>872,chr(143)=>872,chr(144)=>624,chr(145)=>318,chr(146)=>318,chr(147)=>511,chr(148)=>511,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>600,chr(153)=>1000,
-	chr(154)=>859,chr(155)=>400,chr(156)=>878,chr(157)=>597,chr(158)=>644,chr(159)=>644,chr(160)=>318,chr(161)=>723,chr(162)=>580,chr(163)=>401,chr(164)=>636,chr(165)=>672,chr(166)=>337,chr(167)=>500,chr(168)=>730,chr(169)=>1000,chr(170)=>765,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>1000,chr(175)=>395,
-	chr(176)=>500,chr(177)=>838,chr(178)=>395,chr(179)=>320,chr(180)=>529,chr(181)=>650,chr(182)=>636,chr(183)=>318,chr(184)=>592,chr(185)=>946,chr(186)=>560,chr(187)=>612,chr(188)=>310,chr(189)=>685,chr(190)=>513,chr(191)=>320,chr(192)=>757,chr(193)=>735,chr(194)=>735,chr(195)=>662,chr(196)=>813,chr(197)=>730,
-	chr(198)=>1124,chr(199)=>623,chr(200)=>872,chr(201)=>872,chr(202)=>774,chr(203)=>834,chr(204)=>1024,chr(205)=>872,chr(206)=>820,chr(207)=>872,chr(208)=>673,chr(209)=>765,chr(210)=>667,chr(211)=>723,chr(212)=>830,chr(213)=>712,chr(214)=>872,chr(215)=>773,chr(216)=>1141,chr(217)=>1141,chr(218)=>794,chr(219)=>984,
-	chr(220)=>674,chr(221)=>765,chr(222)=>1193,chr(223)=>808,chr(224)=>596,chr(225)=>610,chr(226)=>582,chr(227)=>505,chr(228)=>634,chr(229)=>592,chr(230)=>1137,chr(231)=>545,chr(232)=>644,chr(233)=>644,chr(234)=>597,chr(235)=>637,chr(236)=>829,chr(237)=>659,chr(238)=>602,chr(239)=>644,chr(240)=>640,chr(241)=>560,
-	chr(242)=>948,chr(243)=>580,chr(244)=>783,chr(245)=>564,chr(246)=>698,chr(247)=>622,chr(248)=>947,chr(249)=>1001,chr(250)=>667,chr(251)=>814,chr(252)=>544,chr(253)=>560,chr(254)=>880,chr(255)=>662);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='dejavuserifi-win-1251.z';
-$size1=6140;
-$size2=31770;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifi-win-1251.z b/main/inc/lib/mpdf/font/dejavuserifi-win-1251.z
deleted file mode 100755
index 43afcd8766..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/dejavuserifi.php b/main/inc/lib/mpdf/font/dejavuserifi.php
deleted file mode 100755
index a690b3d40f..0000000000
--- a/main/inc/lib/mpdf/font/dejavuserifi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-928,'Descent'=>-236,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-184 -236 1257 928]','ItalicAngle'=>-11,'StemV'=>70,'MissingWidth'=>600);
-$up=-63;
-$ut=44;
-$cw=array(
-	chr(0)=>600,chr(1)=>600,chr(2)=>600,chr(3)=>600,chr(4)=>600,chr(5)=>600,chr(6)=>600,chr(7)=>600,chr(8)=>600,chr(9)=>600,chr(10)=>600,chr(11)=>600,chr(12)=>600,chr(13)=>600,chr(14)=>600,chr(15)=>600,chr(16)=>600,chr(17)=>600,chr(18)=>600,chr(19)=>600,chr(20)=>600,chr(21)=>600,
-	chr(22)=>600,chr(23)=>600,chr(24)=>600,chr(25)=>600,chr(26)=>600,chr(27)=>600,chr(28)=>600,chr(29)=>600,chr(30)=>600,chr(31)=>600,' '=>318,'!'=>402,'"'=>460,'#'=>838,'$'=>636,'%'=>950,'&'=>890,'\''=>275,'('=>390,')'=>390,'*'=>500,'+'=>838,
-	','=>318,'-'=>338,'.'=>318,'/'=>337,'0'=>636,'1'=>636,'2'=>636,'3'=>636,'4'=>636,'5'=>636,'6'=>636,'7'=>636,'8'=>636,'9'=>636,':'=>337,';'=>337,'<'=>838,'='=>838,'>'=>838,'?'=>536,'@'=>1000,'A'=>722,
-	'B'=>735,'C'=>765,'D'=>802,'E'=>730,'F'=>694,'G'=>799,'H'=>872,'I'=>395,'J'=>401,'K'=>747,'L'=>664,'M'=>1024,'N'=>875,'O'=>820,'P'=>673,'Q'=>820,'R'=>753,'S'=>685,'T'=>667,'U'=>843,'V'=>722,'W'=>1028,
-	'X'=>712,'Y'=>660,'Z'=>695,'['=>390,'\\'=>337,']'=>390,'^'=>838,'_'=>500,'`'=>500,'a'=>596,'b'=>640,'c'=>560,'d'=>640,'e'=>592,'f'=>370,'g'=>640,'h'=>644,'i'=>320,'j'=>310,'k'=>606,'l'=>320,'m'=>948,
-	'n'=>644,'o'=>602,'p'=>640,'q'=>640,'r'=>478,'s'=>513,'t'=>402,'u'=>644,'v'=>565,'w'=>856,'x'=>564,'y'=>565,'z'=>527,'{'=>636,'|'=>337,'}'=>636,'~'=>838,chr(127)=>600,chr(128)=>636,chr(129)=>600,chr(130)=>318,chr(131)=>370,
-	chr(132)=>518,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1342,chr(138)=>685,chr(139)=>400,chr(140)=>1137,chr(141)=>600,chr(142)=>695,chr(143)=>600,chr(144)=>600,chr(145)=>318,chr(146)=>318,chr(147)=>511,chr(148)=>511,chr(149)=>590,chr(150)=>500,chr(151)=>1000,chr(152)=>500,chr(153)=>1000,
-	chr(154)=>513,chr(155)=>400,chr(156)=>989,chr(157)=>600,chr(158)=>527,chr(159)=>660,chr(160)=>318,chr(161)=>402,chr(162)=>636,chr(163)=>636,chr(164)=>636,chr(165)=>636,chr(166)=>337,chr(167)=>500,chr(168)=>500,chr(169)=>1000,chr(170)=>475,chr(171)=>612,chr(172)=>838,chr(173)=>338,chr(174)=>1000,chr(175)=>500,
-	chr(176)=>500,chr(177)=>838,chr(178)=>401,chr(179)=>401,chr(180)=>500,chr(181)=>650,chr(182)=>636,chr(183)=>318,chr(184)=>500,chr(185)=>401,chr(186)=>470,chr(187)=>612,chr(188)=>969,chr(189)=>969,chr(190)=>969,chr(191)=>536,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1001,chr(199)=>765,chr(200)=>730,chr(201)=>730,chr(202)=>730,chr(203)=>730,chr(204)=>395,chr(205)=>395,chr(206)=>395,chr(207)=>395,chr(208)=>807,chr(209)=>875,chr(210)=>820,chr(211)=>820,chr(212)=>820,chr(213)=>820,chr(214)=>820,chr(215)=>838,chr(216)=>820,chr(217)=>843,chr(218)=>843,chr(219)=>843,
-	chr(220)=>843,chr(221)=>660,chr(222)=>676,chr(223)=>668,chr(224)=>596,chr(225)=>596,chr(226)=>596,chr(227)=>596,chr(228)=>596,chr(229)=>596,chr(230)=>940,chr(231)=>560,chr(232)=>592,chr(233)=>592,chr(234)=>592,chr(235)=>592,chr(236)=>320,chr(237)=>320,chr(238)=>320,chr(239)=>320,chr(240)=>602,chr(241)=>644,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>838,chr(248)=>602,chr(249)=>644,chr(250)=>644,chr(251)=>644,chr(252)=>644,chr(253)=>565,chr(254)=>640,chr(255)=>565);
-$enc='win-1252';
-$diff='';
-$file='dejavuserifi.z';
-$size1=5998;
-$size2=32438;
-?>
diff --git a/main/inc/lib/mpdf/font/dejavuserifi.z b/main/inc/lib/mpdf/font/dejavuserifi.z
deleted file mode 100755
index b314aeeddf..0000000000
Binary files a/main/inc/lib/mpdf/font/dejavuserifi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-2.php b/main/inc/lib/mpdf/font/freemono-iso-8859-2.php
deleted file mode 100755
index 69ce1d3026..0000000000
--- a/main/inc/lib/mpdf/font/freemono-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1057,'Descent'=>-319,'CapHeight'=>563,'Flags'=>32,'FontBBox'=>'[-12 -189 650 811]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freemono-iso-8859-2.z';
-$size1=5812;
-$size2=37668;
-?>
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-2.z b/main/inc/lib/mpdf/font/freemono-iso-8859-2.z
deleted file mode 100755
index 3adb92a28a..0000000000
Binary files a/main/inc/lib/mpdf/font/freemono-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-4.php b/main/inc/lib/mpdf/font/freemono-iso-8859-4.php
deleted file mode 100755
index 81412a29d5..0000000000
--- a/main/inc/lib/mpdf/font/freemono-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1057,'Descent'=>-319,'CapHeight'=>563,'Flags'=>32,'FontBBox'=>'[-12 -237 612 811]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freemono-iso-8859-4.z';
-$size1=5831;
-$size2=37259;
-?>
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-4.z b/main/inc/lib/mpdf/font/freemono-iso-8859-4.z
deleted file mode 100755
index 253e5053ff..0000000000
Binary files a/main/inc/lib/mpdf/font/freemono-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-7.php b/main/inc/lib/mpdf/font/freemono-iso-8859-7.php
deleted file mode 100755
index 56af83c21c..0000000000
--- a/main/inc/lib/mpdf/font/freemono-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1057,'Descent'=>-319,'CapHeight'=>563,'Flags'=>32,'FontBBox'=>'[-12 -190 612 716]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>432,chr(165)=>432,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>432,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>432,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>432,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freemono-iso-8859-7.z';
-$size1=5787;
-$size2=33285;
-?>
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-7.z b/main/inc/lib/mpdf/font/freemono-iso-8859-7.z
deleted file mode 100755
index 0609ead91f..0000000000
Binary files a/main/inc/lib/mpdf/font/freemono-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-9.php b/main/inc/lib/mpdf/font/freemono-iso-8859-9.php
deleted file mode 100755
index 5406f5749b..0000000000
--- a/main/inc/lib/mpdf/font/freemono-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1057,'Descent'=>-319,'CapHeight'=>563,'Flags'=>32,'FontBBox'=>'[-12 -216 612 811]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freemono-iso-8859-9.z';
-$size1=5866;
-$size2=37166;
-?>
diff --git a/main/inc/lib/mpdf/font/freemono-iso-8859-9.z b/main/inc/lib/mpdf/font/freemono-iso-8859-9.z
deleted file mode 100755
index 4944c7f16e..0000000000
Binary files a/main/inc/lib/mpdf/font/freemono-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemono-win-1251.php b/main/inc/lib/mpdf/font/freemono-win-1251.php
deleted file mode 100755
index 1dad158592..0000000000
--- a/main/inc/lib/mpdf/font/freemono-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1057,'Descent'=>-319,'CapHeight'=>563,'Flags'=>32,'FontBBox'=>'[-60 -200 660 771]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>432,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freemono-win-1251.z';
-$size1=6038;
-$size2=41685;
-?>
diff --git a/main/inc/lib/mpdf/font/freemono-win-1251.z b/main/inc/lib/mpdf/font/freemono-win-1251.z
deleted file mode 100755
index 4f0f33cd78..0000000000
Binary files a/main/inc/lib/mpdf/font/freemono-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemono.php b/main/inc/lib/mpdf/font/freemono.php
deleted file mode 100755
index df88eec6ad..0000000000
--- a/main/inc/lib/mpdf/font/freemono.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1057,'Descent'=>-319,'CapHeight'=>563,'Flags'=>32,'FontBBox'=>'[-12 -216 612 811]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>432,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>432,chr(142)=>600,chr(143)=>432,chr(144)=>432,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>432,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1252';
-$diff='';
-$file='freemono.z';
-$size1=5879;
-$size2=41584;
-?>
diff --git a/main/inc/lib/mpdf/font/freemono.z b/main/inc/lib/mpdf/font/freemono.z
deleted file mode 100755
index 59fba2107e..0000000000
Binary files a/main/inc/lib/mpdf/font/freemono.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-2.php b/main/inc/lib/mpdf/font/freemonob-iso-8859-2.php
deleted file mode 100755
index 045f822b9d..0000000000
--- a/main/inc/lib/mpdf/font/freemonob-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1155,'Descent'=>-365,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-21 -245 681 871]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freemonob-iso-8859-2.z';
-$size1=5826;
-$size2=37076;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-2.z b/main/inc/lib/mpdf/font/freemonob-iso-8859-2.z
deleted file mode 100755
index 2761f89254..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonob-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-4.php b/main/inc/lib/mpdf/font/freemonob-iso-8859-4.php
deleted file mode 100755
index 7f9572bfca..0000000000
--- a/main/inc/lib/mpdf/font/freemonob-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1155,'Descent'=>-365,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-21 -278 623 871]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freemonob-iso-8859-4.z';
-$size1=5845;
-$size2=36788;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-4.z b/main/inc/lib/mpdf/font/freemonob-iso-8859-4.z
deleted file mode 100755
index 1f486b3e03..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonob-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-7.php b/main/inc/lib/mpdf/font/freemonob-iso-8859-7.php
deleted file mode 100755
index 7b09b63a52..0000000000
--- a/main/inc/lib/mpdf/font/freemonob-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1155,'Descent'=>-365,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-656 -224 629 757]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>432,chr(165)=>432,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>432,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>432,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>432,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freemonob-iso-8859-7.z';
-$size1=5802;
-$size2=32946;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-7.z b/main/inc/lib/mpdf/font/freemonob-iso-8859-7.z
deleted file mode 100755
index e524dba5f4..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonob-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-9.php b/main/inc/lib/mpdf/font/freemonob-iso-8859-9.php
deleted file mode 100755
index b4c66482e8..0000000000
--- a/main/inc/lib/mpdf/font/freemonob-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1155,'Descent'=>-365,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-43 -229 630 871]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freemonob-iso-8859-9.z';
-$size1=5880;
-$size2=37004;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonob-iso-8859-9.z b/main/inc/lib/mpdf/font/freemonob-iso-8859-9.z
deleted file mode 100755
index 4283c76ee3..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonob-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonob-win-1251.php b/main/inc/lib/mpdf/font/freemonob-win-1251.php
deleted file mode 100755
index 80c513a995..0000000000
--- a/main/inc/lib/mpdf/font/freemonob-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1155,'Descent'=>-365,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-60 -205 654 823]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>432,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freemonob-win-1251.z';
-$size1=6052;
-$size2=41553;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonob-win-1251.z b/main/inc/lib/mpdf/font/freemonob-win-1251.z
deleted file mode 100755
index 43adbad2b9..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonob-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonob.php b/main/inc/lib/mpdf/font/freemonob.php
deleted file mode 100755
index 70ab171f06..0000000000
--- a/main/inc/lib/mpdf/font/freemonob.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1155,'Descent'=>-365,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-43 -229 630 871]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>432,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>432,chr(142)=>600,chr(143)=>432,chr(144)=>432,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>432,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1252';
-$diff='';
-$file='freemonob.z';
-$size1=5893;
-$size2=41529;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonob.z b/main/inc/lib/mpdf/font/freemonob.z
deleted file mode 100755
index 99f52e7498..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonob.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-2.php b/main/inc/lib/mpdf/font/freemonobi-iso-8859-2.php
deleted file mode 100755
index 7c4848df87..0000000000
--- a/main/inc/lib/mpdf/font/freemonobi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1111,'Descent'=>-278,'CapHeight'=>583,'Flags'=>96,'FontBBox'=>'[-235 -245 840 871]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>0);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freemonobi-iso-8859-2.z';
-$size1=5865;
-$size2=38827;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-2.z b/main/inc/lib/mpdf/font/freemonobi-iso-8859-2.z
deleted file mode 100755
index 789c3b11a1..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonobi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-4.php b/main/inc/lib/mpdf/font/freemonobi-iso-8859-4.php
deleted file mode 100755
index 44e050217b..0000000000
--- a/main/inc/lib/mpdf/font/freemonobi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1111,'Descent'=>-278,'CapHeight'=>583,'Flags'=>96,'FontBBox'=>'[-235 -278 735 871]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>0);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freemonobi-iso-8859-4.z';
-$size1=5884;
-$size2=38249;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-4.z b/main/inc/lib/mpdf/font/freemonobi-iso-8859-4.z
deleted file mode 100755
index 486423df96..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonobi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-7.php b/main/inc/lib/mpdf/font/freemonobi-iso-8859-7.php
deleted file mode 100755
index 581642641b..0000000000
--- a/main/inc/lib/mpdf/font/freemonobi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1111,'Descent'=>-278,'CapHeight'=>583,'Flags'=>96,'FontBBox'=>'[-73 -205 735 813]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>432,chr(165)=>432,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>432,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>432,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>432,chr(186)=>432,chr(187)=>600,chr(188)=>432,chr(189)=>600,chr(190)=>432,chr(191)=>432,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>432,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>432,chr(221)=>432,chr(222)=>432,chr(223)=>432,chr(224)=>432,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>432,chr(229)=>432,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>432,chr(239)=>600,chr(240)=>432,chr(241)=>432,
-	chr(242)=>432,chr(243)=>432,chr(244)=>432,chr(245)=>432,chr(246)=>432,chr(247)=>432,chr(248)=>432,chr(249)=>432,chr(250)=>600,chr(251)=>432,chr(252)=>432,chr(253)=>432,chr(254)=>432,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freemonobi-iso-8859-7.z';
-$size1=5815;
-$size2=28101;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-7.z b/main/inc/lib/mpdf/font/freemonobi-iso-8859-7.z
deleted file mode 100755
index 70ad53b642..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonobi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-9.php b/main/inc/lib/mpdf/font/freemonobi-iso-8859-9.php
deleted file mode 100755
index 56a7422697..0000000000
--- a/main/inc/lib/mpdf/font/freemonobi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1111,'Descent'=>-278,'CapHeight'=>583,'Flags'=>96,'FontBBox'=>'[-61 -229 735 871]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freemonobi-iso-8859-9.z';
-$size1=5918;
-$size2=38348;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonobi-iso-8859-9.z b/main/inc/lib/mpdf/font/freemonobi-iso-8859-9.z
deleted file mode 100755
index 8ce3bcc8c2..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonobi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonobi-win-1251.php b/main/inc/lib/mpdf/font/freemonobi-win-1251.php
deleted file mode 100755
index e9e1119e6f..0000000000
--- a/main/inc/lib/mpdf/font/freemonobi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1111,'Descent'=>-278,'CapHeight'=>583,'Flags'=>96,'FontBBox'=>'[-112 -205 735 823]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>432,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freemonobi-win-1251.z';
-$size1=6091;
-$size2=43305;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonobi-win-1251.z b/main/inc/lib/mpdf/font/freemonobi-win-1251.z
deleted file mode 100755
index 0276835c65..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonobi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonobi.php b/main/inc/lib/mpdf/font/freemonobi.php
deleted file mode 100755
index 9bd3ea3e78..0000000000
--- a/main/inc/lib/mpdf/font/freemonobi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1111,'Descent'=>-278,'CapHeight'=>583,'Flags'=>96,'FontBBox'=>'[-61 -229 735 871]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>432,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>432,chr(142)=>600,chr(143)=>432,chr(144)=>432,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>432,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1252';
-$diff='';
-$file='freemonobi.z';
-$size1=5931;
-$size2=42981;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonobi.z b/main/inc/lib/mpdf/font/freemonobi.z
deleted file mode 100755
index 932afa4689..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonobi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-2.php b/main/inc/lib/mpdf/font/freemonoi-iso-8859-2.php
deleted file mode 100755
index 2a127968ba..0000000000
--- a/main/inc/lib/mpdf/font/freemonoi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1000,'Descent'=>-273,'CapHeight'=>563,'Flags'=>96,'FontBBox'=>'[-61 -189 774 807]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freemonoi-iso-8859-2.z';
-$size1=5843;
-$size2=38524;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-2.z b/main/inc/lib/mpdf/font/freemonoi-iso-8859-2.z
deleted file mode 100755
index f6e7b6ba2e..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonoi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-4.php b/main/inc/lib/mpdf/font/freemonoi-iso-8859-4.php
deleted file mode 100755
index 4f25a45fd4..0000000000
--- a/main/inc/lib/mpdf/font/freemonoi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1000,'Descent'=>-273,'CapHeight'=>563,'Flags'=>96,'FontBBox'=>'[-61 -237 707 811]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freemonoi-iso-8859-4.z';
-$size1=5862;
-$size2=38216;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-4.z b/main/inc/lib/mpdf/font/freemonoi-iso-8859-4.z
deleted file mode 100755
index 2936929135..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonoi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-7.php b/main/inc/lib/mpdf/font/freemonoi-iso-8859-7.php
deleted file mode 100755
index 819f019c60..0000000000
--- a/main/inc/lib/mpdf/font/freemonoi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1000,'Descent'=>-273,'CapHeight'=>563,'Flags'=>96,'FontBBox'=>'[-80 -202 707 757]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>432,chr(165)=>432,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>432,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>432,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>432,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>432,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freemonoi-iso-8859-7.z';
-$size1=5820;
-$size2=34904;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-7.z b/main/inc/lib/mpdf/font/freemonoi-iso-8859-7.z
deleted file mode 100755
index e18ef94454..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonoi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-9.php b/main/inc/lib/mpdf/font/freemonoi-iso-8859-9.php
deleted file mode 100755
index afbe7fe20a..0000000000
--- a/main/inc/lib/mpdf/font/freemonoi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1000,'Descent'=>-273,'CapHeight'=>563,'Flags'=>96,'FontBBox'=>'[-61 -216 707 811]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freemonoi-iso-8859-9.z';
-$size1=5897;
-$size2=38132;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonoi-iso-8859-9.z b/main/inc/lib/mpdf/font/freemonoi-iso-8859-9.z
deleted file mode 100755
index 3ceb5de553..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonoi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonoi-win-1251.php b/main/inc/lib/mpdf/font/freemonoi-win-1251.php
deleted file mode 100755
index 5c9acd344a..0000000000
--- a/main/inc/lib/mpdf/font/freemonoi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1000,'Descent'=>-273,'CapHeight'=>563,'Flags'=>96,'FontBBox'=>'[-61 -200 710 752]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>600,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>600,chr(142)=>600,chr(143)=>600,chr(144)=>600,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>432,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>600,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freemonoi-win-1251.z';
-$size1=6069;
-$size2=43768;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonoi-win-1251.z b/main/inc/lib/mpdf/font/freemonoi-win-1251.z
deleted file mode 100755
index 9ae3e91913..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonoi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freemonoi.php b/main/inc/lib/mpdf/font/freemonoi.php
deleted file mode 100755
index 0299b1341c..0000000000
--- a/main/inc/lib/mpdf/font/freemonoi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1000,'Descent'=>-273,'CapHeight'=>563,'Flags'=>96,'FontBBox'=>'[-61 -216 710 811]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>600,'!'=>600,'"'=>600,'#'=>600,'$'=>600,'%'=>600,'&'=>600,'\''=>600,'('=>600,')'=>600,'*'=>600,'+'=>600,
-	','=>600,'-'=>600,'.'=>600,'/'=>600,'0'=>600,'1'=>600,'2'=>600,'3'=>600,'4'=>600,'5'=>600,'6'=>600,'7'=>600,'8'=>600,'9'=>600,':'=>600,';'=>600,'<'=>600,'='=>600,'>'=>600,'?'=>600,'@'=>600,'A'=>600,
-	'B'=>600,'C'=>600,'D'=>600,'E'=>600,'F'=>600,'G'=>600,'H'=>600,'I'=>600,'J'=>600,'K'=>600,'L'=>600,'M'=>600,'N'=>600,'O'=>600,'P'=>600,'Q'=>600,'R'=>600,'S'=>600,'T'=>600,'U'=>600,'V'=>600,'W'=>600,
-	'X'=>600,'Y'=>600,'Z'=>600,'['=>600,'\\'=>600,']'=>600,'^'=>600,'_'=>600,'`'=>600,'a'=>600,'b'=>600,'c'=>600,'d'=>600,'e'=>600,'f'=>600,'g'=>600,'h'=>600,'i'=>600,'j'=>600,'k'=>600,'l'=>600,'m'=>600,
-	'n'=>600,'o'=>600,'p'=>600,'q'=>600,'r'=>600,'s'=>600,'t'=>600,'u'=>600,'v'=>600,'w'=>600,'x'=>600,'y'=>600,'z'=>600,'{'=>600,'|'=>600,'}'=>600,'~'=>600,chr(127)=>432,chr(128)=>600,chr(129)=>432,chr(130)=>600,chr(131)=>600,
-	chr(132)=>600,chr(133)=>600,chr(134)=>600,chr(135)=>600,chr(136)=>600,chr(137)=>600,chr(138)=>600,chr(139)=>600,chr(140)=>600,chr(141)=>432,chr(142)=>600,chr(143)=>432,chr(144)=>432,chr(145)=>600,chr(146)=>600,chr(147)=>600,chr(148)=>600,chr(149)=>600,chr(150)=>600,chr(151)=>600,chr(152)=>600,chr(153)=>600,
-	chr(154)=>600,chr(155)=>600,chr(156)=>600,chr(157)=>432,chr(158)=>600,chr(159)=>600,chr(160)=>600,chr(161)=>600,chr(162)=>600,chr(163)=>600,chr(164)=>600,chr(165)=>600,chr(166)=>600,chr(167)=>600,chr(168)=>600,chr(169)=>600,chr(170)=>600,chr(171)=>600,chr(172)=>600,chr(173)=>600,chr(174)=>600,chr(175)=>600,
-	chr(176)=>600,chr(177)=>600,chr(178)=>600,chr(179)=>600,chr(180)=>600,chr(181)=>600,chr(182)=>600,chr(183)=>600,chr(184)=>600,chr(185)=>600,chr(186)=>600,chr(187)=>600,chr(188)=>600,chr(189)=>600,chr(190)=>600,chr(191)=>600,chr(192)=>600,chr(193)=>600,chr(194)=>600,chr(195)=>600,chr(196)=>600,chr(197)=>600,
-	chr(198)=>600,chr(199)=>600,chr(200)=>600,chr(201)=>600,chr(202)=>600,chr(203)=>600,chr(204)=>600,chr(205)=>600,chr(206)=>600,chr(207)=>600,chr(208)=>600,chr(209)=>600,chr(210)=>600,chr(211)=>600,chr(212)=>600,chr(213)=>600,chr(214)=>600,chr(215)=>600,chr(216)=>600,chr(217)=>600,chr(218)=>600,chr(219)=>600,
-	chr(220)=>600,chr(221)=>600,chr(222)=>600,chr(223)=>600,chr(224)=>600,chr(225)=>600,chr(226)=>600,chr(227)=>600,chr(228)=>600,chr(229)=>600,chr(230)=>600,chr(231)=>600,chr(232)=>600,chr(233)=>600,chr(234)=>600,chr(235)=>600,chr(236)=>600,chr(237)=>600,chr(238)=>600,chr(239)=>600,chr(240)=>600,chr(241)=>600,
-	chr(242)=>600,chr(243)=>600,chr(244)=>600,chr(245)=>600,chr(246)=>600,chr(247)=>600,chr(248)=>600,chr(249)=>600,chr(250)=>600,chr(251)=>600,chr(252)=>600,chr(253)=>600,chr(254)=>600,chr(255)=>600);
-$enc='win-1252';
-$diff='';
-$file='freemonoi.z';
-$size1=5910;
-$size2=42758;
-?>
diff --git a/main/inc/lib/mpdf/font/freemonoi.z b/main/inc/lib/mpdf/font/freemonoi.z
deleted file mode 100755
index 0f188b1e06..0000000000
Binary files a/main/inc/lib/mpdf/font/freemonoi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-2.php b/main/inc/lib/mpdf/font/freesans-iso-8859-2.php
deleted file mode 100755
index 7805c47c98..0000000000
--- a/main/inc/lib/mpdf/font/freesans-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-459,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-35 -237 951 953]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>292,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>308,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
-	chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>666,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>635,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freesans-iso-8859-2.z';
-$size1=5806;
-$size2=26127;
-?>
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-2.z b/main/inc/lib/mpdf/font/freesans-iso-8859-2.z
deleted file mode 100755
index fdf4e80bfe..0000000000
Binary files a/main/inc/lib/mpdf/font/freesans-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-4.php b/main/inc/lib/mpdf/font/freesans-iso-8859-4.php
deleted file mode 100755
index 0ddc5d4438..0000000000
--- a/main/inc/lib/mpdf/font/freesans-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-459,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-22 -284 951 953]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>667,chr(162)=>500,chr(163)=>722,chr(164)=>556,chr(165)=>278,chr(166)=>556,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>778,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>333,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>278,chr(182)=>222,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>556,chr(187)=>556,chr(188)=>278,chr(189)=>722,chr(190)=>500,chr(191)=>556,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>278,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>667,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>222,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>222,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>500,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>556,chr(254)=>556,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freesans-iso-8859-4.z';
-$size1=5825;
-$size2=26158;
-?>
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-4.z b/main/inc/lib/mpdf/font/freesans-iso-8859-4.z
deleted file mode 100755
index 374cdf6a1b..0000000000
Binary files a/main/inc/lib/mpdf/font/freesans-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-7.php b/main/inc/lib/mpdf/font/freesans-iso-8859-7.php
deleted file mode 100755
index 9b57505a14..0000000000
--- a/main/inc/lib/mpdf/font/freesans-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-459,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-98 -218 951 904]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>222,chr(162)=>221,chr(163)=>556,chr(164)=>432,chr(165)=>432,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>432,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>606,chr(177)=>584,chr(178)=>351,chr(179)=>351,chr(180)=>414,chr(181)=>747,chr(182)=>730,chr(183)=>278,chr(184)=>664,chr(185)=>681,chr(186)=>230,chr(187)=>556,chr(188)=>792,chr(189)=>869,chr(190)=>710,chr(191)=>758,chr(192)=>286,chr(193)=>684,chr(194)=>628,chr(195)=>582,chr(196)=>684,chr(197)=>650,
-	chr(198)=>628,chr(199)=>683,chr(200)=>750,chr(201)=>236,chr(202)=>684,chr(203)=>684,chr(204)=>800,chr(205)=>654,chr(206)=>630,chr(207)=>750,chr(208)=>721,chr(209)=>638,chr(210)=>432,chr(211)=>628,chr(212)=>628,chr(213)=>684,chr(214)=>717,chr(215)=>723,chr(216)=>745,chr(217)=>720,chr(218)=>236,chr(219)=>684,
-	chr(220)=>608,chr(221)=>528,chr(222)=>547,chr(223)=>307,chr(224)=>515,chr(225)=>596,chr(226)=>516,chr(227)=>531,chr(228)=>560,chr(229)=>510,chr(230)=>462,chr(231)=>526,chr(232)=>526,chr(233)=>286,chr(234)=>516,chr(235)=>560,chr(236)=>574,chr(237)=>504,chr(238)=>470,chr(239)=>550,chr(240)=>661,chr(241)=>566,
-	chr(242)=>535,chr(243)=>616,chr(244)=>532,chr(245)=>515,chr(246)=>741,chr(247)=>572,chr(248)=>662,chr(249)=>740,chr(250)=>286,chr(251)=>515,chr(252)=>553,chr(253)=>518,chr(254)=>740,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freesans-iso-8859-7.z';
-$size1=5779;
-$size2=23062;
-?>
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-7.z b/main/inc/lib/mpdf/font/freesans-iso-8859-7.z
deleted file mode 100755
index 1d4defa73a..0000000000
Binary files a/main/inc/lib/mpdf/font/freesans-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-9.php b/main/inc/lib/mpdf/font/freesans-iso-8859-9.php
deleted file mode 100755
index 228e6d8a67..0000000000
--- a/main/inc/lib/mpdf/font/freesans-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-459,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-22 -220 951 953]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>351,chr(179)=>351,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>351,chr(186)=>365,chr(187)=>556,chr(188)=>869,chr(189)=>869,chr(190)=>869,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>778,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>278,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>278,chr(254)=>500,chr(255)=>500);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freesans-iso-8859-9.z';
-$size1=5860;
-$size2=26548;
-?>
diff --git a/main/inc/lib/mpdf/font/freesans-iso-8859-9.z b/main/inc/lib/mpdf/font/freesans-iso-8859-9.z
deleted file mode 100755
index f43236b3c7..0000000000
Binary files a/main/inc/lib/mpdf/font/freesans-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesans-win-1251.php b/main/inc/lib/mpdf/font/freesans-win-1251.php
deleted file mode 100755
index 86d15c101d..0000000000
--- a/main/inc/lib/mpdf/font/freesans-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-459,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-22 -220 1022 924]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>766,chr(129)=>611,chr(130)=>222,chr(131)=>430,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>556,chr(137)=>1000,chr(138)=>1080,chr(139)=>333,chr(140)=>1014,chr(141)=>667,chr(142)=>766,chr(143)=>722,chr(144)=>568,chr(145)=>222,chr(146)=>221,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>432,chr(153)=>1000,
-	chr(154)=>840,chr(155)=>333,chr(156)=>850,chr(157)=>500,chr(158)=>568,chr(159)=>556,chr(160)=>278,chr(161)=>650,chr(162)=>500,chr(163)=>500,chr(164)=>556,chr(165)=>611,chr(166)=>260,chr(167)=>556,chr(168)=>667,chr(169)=>737,chr(170)=>722,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>278,
-	chr(176)=>606,chr(177)=>584,chr(178)=>278,chr(179)=>222,chr(180)=>430,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>556,chr(185)=>1008,chr(186)=>500,chr(187)=>556,chr(188)=>222,chr(189)=>667,chr(190)=>500,chr(191)=>278,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>611,chr(196)=>812,chr(197)=>667,
-	chr(198)=>1023,chr(199)=>667,chr(200)=>728,chr(201)=>728,chr(202)=>667,chr(203)=>673,chr(204)=>844,chr(205)=>719,chr(206)=>778,chr(207)=>719,chr(208)=>667,chr(209)=>722,chr(210)=>611,chr(211)=>650,chr(212)=>936,chr(213)=>667,chr(214)=>741,chr(215)=>648,chr(216)=>828,chr(217)=>850,chr(218)=>897,chr(219)=>872,
-	chr(220)=>667,chr(221)=>722,chr(222)=>1032,chr(223)=>702,chr(224)=>556,chr(225)=>556,chr(226)=>522,chr(227)=>430,chr(228)=>602,chr(229)=>556,chr(230)=>837,chr(231)=>500,chr(232)=>567,chr(233)=>567,chr(234)=>510,chr(235)=>557,chr(236)=>618,chr(237)=>558,chr(238)=>556,chr(239)=>557,chr(240)=>576,chr(241)=>500,
-	chr(242)=>496,chr(243)=>500,chr(244)=>912,chr(245)=>500,chr(246)=>578,chr(247)=>520,chr(248)=>692,chr(249)=>712,chr(250)=>734,chr(251)=>690,chr(252)=>552,chr(253)=>500,chr(254)=>758,chr(255)=>543);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freesans-win-1251.z';
-$size1=6033;
-$size2=27366;
-?>
diff --git a/main/inc/lib/mpdf/font/freesans-win-1251.z b/main/inc/lib/mpdf/font/freesans-win-1251.z
deleted file mode 100755
index 4334016a6b..0000000000
Binary files a/main/inc/lib/mpdf/font/freesans-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesans.php b/main/inc/lib/mpdf/font/freesans.php
deleted file mode 100755
index eb37193443..0000000000
--- a/main/inc/lib/mpdf/font/freesans.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-459,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-22 -220 1001 953]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>556,chr(129)=>432,chr(130)=>222,chr(131)=>556,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>432,chr(142)=>611,chr(143)=>432,chr(144)=>432,chr(145)=>222,chr(146)=>221,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>432,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>351,chr(179)=>351,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>351,chr(186)=>365,chr(187)=>556,chr(188)=>869,chr(189)=>869,chr(190)=>869,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>666,chr(222)=>666,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>555,chr(255)=>500);
-$enc='win-1252';
-$diff='';
-$file='freesans.z';
-$size1=5874;
-$size2=29741;
-?>
diff --git a/main/inc/lib/mpdf/font/freesans.z b/main/inc/lib/mpdf/font/freesans.z
deleted file mode 100755
index d08abab83d..0000000000
Binary files a/main/inc/lib/mpdf/font/freesans.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-2.php b/main/inc/lib/mpdf/font/freesansb-iso-8859-2.php
deleted file mode 100755
index 6e7308c116..0000000000
--- a/main/inc/lib/mpdf/font/freesansb-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1159,'Descent'=>-355,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-44 -243 947 949]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-155;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>278,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>333,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
-	chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>611,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freesansb-iso-8859-2.z';
-$size1=5824;
-$size2=27151;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-2.z b/main/inc/lib/mpdf/font/freesansb-iso-8859-2.z
deleted file mode 100755
index af58a5d2e6..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansb-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-4.php b/main/inc/lib/mpdf/font/freesansb-iso-8859-4.php
deleted file mode 100755
index 4fced12517..0000000000
--- a/main/inc/lib/mpdf/font/freesansb-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1159,'Descent'=>-355,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-40 -307 966 957]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-155;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>722,chr(162)=>573,chr(163)=>722,chr(164)=>556,chr(165)=>278,chr(166)=>611,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>778,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>333,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>389,chr(180)=>333,chr(181)=>278,chr(182)=>278,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>611,chr(188)=>333,chr(189)=>722,chr(190)=>500,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>278,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>722,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>278,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>556,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>611,chr(254)=>611,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freesansb-iso-8859-4.z';
-$size1=5843;
-$size2=27360;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-4.z b/main/inc/lib/mpdf/font/freesansb-iso-8859-4.z
deleted file mode 100755
index 340ebf47ab..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansb-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-7.php b/main/inc/lib/mpdf/font/freesansb-iso-8859-7.php
deleted file mode 100755
index d6b0e80237..0000000000
--- a/main/inc/lib/mpdf/font/freesansb-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1159,'Descent'=>-355,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-166 -219 947 945]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-155;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>278,chr(162)=>278,chr(163)=>556,chr(164)=>432,chr(165)=>432,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>432,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>606,chr(177)=>584,chr(178)=>351,chr(179)=>351,chr(180)=>325,chr(181)=>658,chr(182)=>761,chr(183)=>278,chr(184)=>706,chr(185)=>733,chr(186)=>285,chr(187)=>556,chr(188)=>785,chr(189)=>869,chr(190)=>823,chr(191)=>819,chr(192)=>432,chr(193)=>722,chr(194)=>722,chr(195)=>642,chr(196)=>726,chr(197)=>667,
-	chr(198)=>611,chr(199)=>722,chr(200)=>810,chr(201)=>278,chr(202)=>722,chr(203)=>744,chr(204)=>860,chr(205)=>714,chr(206)=>690,chr(207)=>822,chr(208)=>781,chr(209)=>698,chr(210)=>432,chr(211)=>688,chr(212)=>688,chr(213)=>804,chr(214)=>777,chr(215)=>783,chr(216)=>805,chr(217)=>780,chr(218)=>278,chr(219)=>804,
-	chr(220)=>660,chr(221)=>559,chr(222)=>560,chr(223)=>356,chr(224)=>575,chr(225)=>656,chr(226)=>576,chr(227)=>591,chr(228)=>620,chr(229)=>570,chr(230)=>522,chr(231)=>586,chr(232)=>586,chr(233)=>346,chr(234)=>576,chr(235)=>620,chr(236)=>667,chr(237)=>564,chr(238)=>530,chr(239)=>610,chr(240)=>721,chr(241)=>626,
-	chr(242)=>595,chr(243)=>676,chr(244)=>592,chr(245)=>575,chr(246)=>801,chr(247)=>632,chr(248)=>722,chr(249)=>800,chr(250)=>346,chr(251)=>575,chr(252)=>599,chr(253)=>567,chr(254)=>1125,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freesansb-iso-8859-7.z';
-$size1=5788;
-$size2=24034;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-7.z b/main/inc/lib/mpdf/font/freesansb-iso-8859-7.z
deleted file mode 100755
index 600e8e220b..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansb-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-9.php b/main/inc/lib/mpdf/font/freesansb-iso-8859-9.php
deleted file mode 100755
index 97409dddc7..0000000000
--- a/main/inc/lib/mpdf/font/freesansb-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1159,'Descent'=>-355,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-22 -220 966 949]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-155;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>351,chr(179)=>351,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>351,chr(186)=>365,chr(187)=>556,chr(188)=>869,chr(189)=>869,chr(190)=>869,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>778,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>278,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>278,chr(254)=>556,chr(255)=>556);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freesansb-iso-8859-9.z';
-$size1=5878;
-$size2=27734;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansb-iso-8859-9.z b/main/inc/lib/mpdf/font/freesansb-iso-8859-9.z
deleted file mode 100755
index 06e3c71932..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansb-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansb-win-1251.php b/main/inc/lib/mpdf/font/freesansb-win-1251.php
deleted file mode 100755
index 83d5d8cfeb..0000000000
--- a/main/inc/lib/mpdf/font/freesansb-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1159,'Descent'=>-355,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-22 -220 1097 979]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-155;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>790,chr(129)=>611,chr(130)=>278,chr(131)=>454,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>556,chr(137)=>1000,chr(138)=>1110,chr(139)=>333,chr(140)=>1113,chr(141)=>722,chr(142)=>790,chr(143)=>722,chr(144)=>606,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>432,chr(153)=>1000,
-	chr(154)=>900,chr(155)=>333,chr(156)=>611,chr(157)=>573,chr(158)=>606,chr(159)=>608,chr(160)=>278,chr(161)=>718,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>611,chr(166)=>280,chr(167)=>556,chr(168)=>709,chr(169)=>737,chr(170)=>722,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>278,
-	chr(176)=>606,chr(177)=>584,chr(178)=>278,chr(179)=>278,chr(180)=>454,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>556,chr(185)=>432,chr(186)=>556,chr(187)=>556,chr(188)=>278,chr(189)=>667,chr(190)=>556,chr(191)=>278,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>611,chr(196)=>900,chr(197)=>709,
-	chr(198)=>1093,chr(199)=>672,chr(200)=>757,chr(201)=>757,chr(202)=>750,chr(203)=>729,chr(204)=>874,chr(205)=>753,chr(206)=>778,chr(207)=>753,chr(208)=>671,chr(209)=>722,chr(210)=>611,chr(211)=>718,chr(212)=>892,chr(213)=>667,chr(214)=>816,chr(215)=>685,chr(216)=>1057,chr(217)=>1183,chr(218)=>928,chr(219)=>949,
-	chr(220)=>687,chr(221)=>722,chr(222)=>1109,chr(223)=>698,chr(224)=>556,chr(225)=>606,chr(226)=>572,chr(227)=>454,chr(228)=>685,chr(229)=>556,chr(230)=>809,chr(231)=>546,chr(232)=>615,chr(233)=>615,chr(234)=>573,chr(235)=>577,chr(236)=>666,chr(237)=>603,chr(238)=>611,chr(239)=>603,chr(240)=>611,chr(241)=>556,
-	chr(242)=>454,chr(243)=>556,chr(244)=>957,chr(245)=>556,chr(246)=>652,chr(247)=>578,chr(248)=>886,chr(249)=>968,chr(250)=>693,chr(251)=>811,chr(252)=>562,chr(253)=>564,chr(254)=>908,chr(255)=>596);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freesansb-win-1251.z';
-$size1=6049;
-$size2=28553;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansb-win-1251.z b/main/inc/lib/mpdf/font/freesansb-win-1251.z
deleted file mode 100755
index 52c1a3a922..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansb-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansb.php b/main/inc/lib/mpdf/font/freesansb.php
deleted file mode 100755
index 287e6b4f31..0000000000
--- a/main/inc/lib/mpdf/font/freesansb.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1159,'Descent'=>-355,'CapHeight'=>729,'Flags'=>32,'FontBBox'=>'[-22 -220 1003 949]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-155;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>556,chr(129)=>432,chr(130)=>278,chr(131)=>556,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>432,chr(142)=>611,chr(143)=>432,chr(144)=>432,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>432,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>351,chr(179)=>351,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>351,chr(186)=>365,chr(187)=>556,chr(188)=>869,chr(189)=>869,chr(190)=>869,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-$enc='win-1252';
-$diff='';
-$file='freesansb.z';
-$size1=5892;
-$size2=31175;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansb.z b/main/inc/lib/mpdf/font/freesansb.z
deleted file mode 100755
index eb2f7a1897..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansb.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-2.php b/main/inc/lib/mpdf/font/freesansbi-iso-8859-2.php
deleted file mode 100755
index 596b18e36e..0000000000
--- a/main/inc/lib/mpdf/font/freesansbi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-979,'Descent'=>-309,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -243 1087 953]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-111;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>384,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>404,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
-	chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>722,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freesansbi-iso-8859-2.z';
-$size1=5863;
-$size2=28198;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-2.z b/main/inc/lib/mpdf/font/freesansbi-iso-8859-2.z
deleted file mode 100755
index 3419881a9b..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansbi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-4.php b/main/inc/lib/mpdf/font/freesansbi-iso-8859-4.php
deleted file mode 100755
index 7bd1b170b2..0000000000
--- a/main/inc/lib/mpdf/font/freesansbi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-979,'Descent'=>-309,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -309 1104 953]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-111;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>722,chr(162)=>529,chr(163)=>722,chr(164)=>556,chr(165)=>278,chr(166)=>611,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>778,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>333,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>389,chr(180)=>333,chr(181)=>278,chr(182)=>278,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>611,chr(188)=>333,chr(189)=>722,chr(190)=>500,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>278,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>722,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>268,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>556,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>611,chr(254)=>611,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freesansbi-iso-8859-4.z';
-$size1=5882;
-$size2=28399;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-4.z b/main/inc/lib/mpdf/font/freesansbi-iso-8859-4.z
deleted file mode 100755
index eb057a9cda..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansbi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-7.php b/main/inc/lib/mpdf/font/freesansbi-iso-8859-7.php
deleted file mode 100755
index 0e61c72fd2..0000000000
--- a/main/inc/lib/mpdf/font/freesansbi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-979,'Descent'=>-309,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-203 -237 1087 940]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-111;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>278,chr(162)=>278,chr(163)=>556,chr(164)=>432,chr(165)=>432,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>432,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>606,chr(177)=>584,chr(178)=>444,chr(179)=>444,chr(180)=>308,chr(181)=>446,chr(182)=>688,chr(183)=>278,chr(184)=>642,chr(185)=>743,chr(186)=>228,chr(187)=>556,chr(188)=>754,chr(189)=>1055,chr(190)=>736,chr(191)=>743,chr(192)=>346,chr(193)=>764,chr(194)=>688,chr(195)=>642,chr(196)=>744,chr(197)=>710,
-	chr(198)=>688,chr(199)=>743,chr(200)=>810,chr(201)=>296,chr(202)=>744,chr(203)=>744,chr(204)=>860,chr(205)=>714,chr(206)=>690,chr(207)=>822,chr(208)=>781,chr(209)=>698,chr(210)=>432,chr(211)=>688,chr(212)=>688,chr(213)=>744,chr(214)=>777,chr(215)=>783,chr(216)=>805,chr(217)=>780,chr(218)=>296,chr(219)=>744,
-	chr(220)=>640,chr(221)=>530,chr(222)=>597,chr(223)=>339,chr(224)=>575,chr(225)=>656,chr(226)=>576,chr(227)=>591,chr(228)=>620,chr(229)=>570,chr(230)=>522,chr(231)=>586,chr(232)=>586,chr(233)=>346,chr(234)=>576,chr(235)=>620,chr(236)=>667,chr(237)=>564,chr(238)=>530,chr(239)=>610,chr(240)=>721,chr(241)=>626,
-	chr(242)=>595,chr(243)=>676,chr(244)=>592,chr(245)=>575,chr(246)=>801,chr(247)=>632,chr(248)=>722,chr(249)=>800,chr(250)=>346,chr(251)=>575,chr(252)=>609,chr(253)=>604,chr(254)=>769,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freesansbi-iso-8859-7.z';
-$size1=5837;
-$size2=24809;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-7.z b/main/inc/lib/mpdf/font/freesansbi-iso-8859-7.z
deleted file mode 100755
index 7825974db7..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansbi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-9.php b/main/inc/lib/mpdf/font/freesansbi-iso-8859-9.php
deleted file mode 100755
index 6dddeb4e58..0000000000
--- a/main/inc/lib/mpdf/font/freesansbi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-979,'Descent'=>-309,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -220 1104 953]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-111;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>444,chr(179)=>444,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>444,chr(186)=>365,chr(187)=>556,chr(188)=>1055,chr(189)=>1055,chr(190)=>1055,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>778,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>278,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>278,chr(254)=>556,chr(255)=>556);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freesansbi-iso-8859-9.z';
-$size1=5917;
-$size2=28717;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansbi-iso-8859-9.z b/main/inc/lib/mpdf/font/freesansbi-iso-8859-9.z
deleted file mode 100755
index 1edc0df01d..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansbi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansbi-win-1251.php b/main/inc/lib/mpdf/font/freesansbi-win-1251.php
deleted file mode 100755
index 365d1ec660..0000000000
--- a/main/inc/lib/mpdf/font/freesansbi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-979,'Descent'=>-309,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -220 1199 934]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-111;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>790,chr(129)=>611,chr(130)=>278,chr(131)=>454,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>556,chr(137)=>1000,chr(138)=>1110,chr(139)=>333,chr(140)=>1088,chr(141)=>722,chr(142)=>790,chr(143)=>722,chr(144)=>606,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>432,chr(153)=>1000,
-	chr(154)=>900,chr(155)=>333,chr(156)=>611,chr(157)=>556,chr(158)=>606,chr(159)=>636,chr(160)=>278,chr(161)=>718,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>611,chr(166)=>280,chr(167)=>556,chr(168)=>666,chr(169)=>737,chr(170)=>722,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>278,
-	chr(176)=>606,chr(177)=>584,chr(178)=>278,chr(179)=>278,chr(180)=>454,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>552,chr(185)=>432,chr(186)=>556,chr(187)=>556,chr(188)=>278,chr(189)=>667,chr(190)=>556,chr(191)=>278,chr(192)=>722,chr(193)=>722,chr(194)=>723,chr(195)=>611,chr(196)=>918,chr(197)=>666,
-	chr(198)=>1054,chr(199)=>659,chr(200)=>722,chr(201)=>722,chr(202)=>720,chr(203)=>722,chr(204)=>843,chr(205)=>722,chr(206)=>778,chr(207)=>722,chr(208)=>649,chr(209)=>837,chr(210)=>611,chr(211)=>698,chr(212)=>902,chr(213)=>664,chr(214)=>730,chr(215)=>671,chr(216)=>1101,chr(217)=>1179,chr(218)=>816,chr(219)=>939,
-	chr(220)=>639,chr(221)=>737,chr(222)=>1080,chr(223)=>690,chr(224)=>554,chr(225)=>611,chr(226)=>621,chr(227)=>475,chr(228)=>804,chr(229)=>552,chr(230)=>775,chr(231)=>556,chr(232)=>636,chr(233)=>636,chr(234)=>529,chr(235)=>608,chr(236)=>697,chr(237)=>636,chr(238)=>611,chr(239)=>636,chr(240)=>611,chr(241)=>554,
-	chr(242)=>454,chr(243)=>552,chr(244)=>989,chr(245)=>554,chr(246)=>690,chr(247)=>606,chr(248)=>934,chr(249)=>987,chr(250)=>741,chr(251)=>839,chr(252)=>619,chr(253)=>575,chr(254)=>908,chr(255)=>636);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freesansbi-win-1251.z';
-$size1=6087;
-$size2=29348;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansbi-win-1251.z b/main/inc/lib/mpdf/font/freesansbi-win-1251.z
deleted file mode 100755
index fd426367aa..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansbi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansbi.php b/main/inc/lib/mpdf/font/freesansbi.php
deleted file mode 100755
index d34cb92a57..0000000000
--- a/main/inc/lib/mpdf/font/freesansbi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-979,'Descent'=>-309,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -220 1107 953]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>432);
-$up=-111;
-$ut=69;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>432,chr(128)=>556,chr(129)=>432,chr(130)=>278,chr(131)=>556,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>432,chr(142)=>611,chr(143)=>432,chr(144)=>432,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>432,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>444,chr(179)=>444,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>444,chr(186)=>365,chr(187)=>556,chr(188)=>1055,chr(189)=>1055,chr(190)=>1055,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-$enc='win-1252';
-$diff='';
-$file='freesansbi.z';
-$size1=5930;
-$size2=32030;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansbi.z b/main/inc/lib/mpdf/font/freesansbi.z
deleted file mode 100755
index 075c2a0a46..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansbi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-2.php b/main/inc/lib/mpdf/font/freesansi-iso-8859-2.php
deleted file mode 100755
index e3a60d92cf..0000000000
--- a/main/inc/lib/mpdf/font/freesansi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-419,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -237 1084 953]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>307,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>319,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
-	chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>650,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freesansi-iso-8859-2.z';
-$size1=5841;
-$size2=27785;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-2.z b/main/inc/lib/mpdf/font/freesansi-iso-8859-2.z
deleted file mode 100755
index dcd6030f2a..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-4.php b/main/inc/lib/mpdf/font/freesansi-iso-8859-4.php
deleted file mode 100755
index 688766810a..0000000000
--- a/main/inc/lib/mpdf/font/freesansi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-419,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -284 1087 953]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>667,chr(162)=>510,chr(163)=>722,chr(164)=>556,chr(165)=>278,chr(166)=>556,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>778,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>333,
-	chr(176)=>606,chr(177)=>556,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>278,chr(182)=>222,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>556,chr(187)=>527,chr(188)=>278,chr(189)=>722,chr(190)=>500,chr(191)=>556,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>278,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>667,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>222,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>222,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>500,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>556,chr(254)=>556,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freesansi-iso-8859-4.z';
-$size1=5860;
-$size2=27974;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-4.z b/main/inc/lib/mpdf/font/freesansi-iso-8859-4.z
deleted file mode 100755
index bf584ac63c..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-7.php b/main/inc/lib/mpdf/font/freesansi-iso-8859-7.php
deleted file mode 100755
index 16a82b006b..0000000000
--- a/main/inc/lib/mpdf/font/freesansi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-419,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-96 -218 1084 906]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>222,chr(162)=>222,chr(163)=>556,chr(164)=>432,chr(165)=>432,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>432,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>606,chr(177)=>584,chr(178)=>390,chr(179)=>390,chr(180)=>291,chr(181)=>624,chr(182)=>659,chr(183)=>278,chr(184)=>657,chr(185)=>678,chr(186)=>183,chr(187)=>556,chr(188)=>729,chr(189)=>947,chr(190)=>699,chr(191)=>747,chr(192)=>286,chr(193)=>684,chr(194)=>628,chr(195)=>582,chr(196)=>684,chr(197)=>650,
-	chr(198)=>628,chr(199)=>683,chr(200)=>750,chr(201)=>236,chr(202)=>684,chr(203)=>684,chr(204)=>800,chr(205)=>654,chr(206)=>630,chr(207)=>750,chr(208)=>721,chr(209)=>638,chr(210)=>432,chr(211)=>628,chr(212)=>628,chr(213)=>684,chr(214)=>717,chr(215)=>723,chr(216)=>745,chr(217)=>720,chr(218)=>236,chr(219)=>684,
-	chr(220)=>593,chr(221)=>519,chr(222)=>595,chr(223)=>271,chr(224)=>515,chr(225)=>596,chr(226)=>516,chr(227)=>531,chr(228)=>560,chr(229)=>510,chr(230)=>462,chr(231)=>526,chr(232)=>526,chr(233)=>286,chr(234)=>516,chr(235)=>560,chr(236)=>607,chr(237)=>504,chr(238)=>470,chr(239)=>550,chr(240)=>661,chr(241)=>566,
-	chr(242)=>535,chr(243)=>616,chr(244)=>532,chr(245)=>515,chr(246)=>741,chr(247)=>572,chr(248)=>662,chr(249)=>740,chr(250)=>286,chr(251)=>515,chr(252)=>535,chr(253)=>503,chr(254)=>725,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freesansi-iso-8859-7.z';
-$size1=5814;
-$size2=24415;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-7.z b/main/inc/lib/mpdf/font/freesansi-iso-8859-7.z
deleted file mode 100755
index 88fdd9bc0b..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-9.php b/main/inc/lib/mpdf/font/freesansi-iso-8859-9.php
deleted file mode 100755
index ba9e500f5d..0000000000
--- a/main/inc/lib/mpdf/font/freesansi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-419,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -220 1087 953]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>390,chr(179)=>390,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>390,chr(186)=>365,chr(187)=>556,chr(188)=>947,chr(189)=>947,chr(190)=>947,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>778,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>278,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>278,chr(254)=>500,chr(255)=>500);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freesansi-iso-8859-9.z';
-$size1=5895;
-$size2=28325;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansi-iso-8859-9.z b/main/inc/lib/mpdf/font/freesansi-iso-8859-9.z
deleted file mode 100755
index 6d667cc7fb..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansi-win-1251.php b/main/inc/lib/mpdf/font/freesansi-win-1251.php
deleted file mode 100755
index 4e434f89f7..0000000000
--- a/main/inc/lib/mpdf/font/freesansi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-419,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -220 1129 947]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>766,chr(129)=>611,chr(130)=>222,chr(131)=>430,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>556,chr(137)=>1000,chr(138)=>968,chr(139)=>333,chr(140)=>1173,chr(141)=>667,chr(142)=>766,chr(143)=>722,chr(144)=>568,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>432,chr(153)=>1000,
-	chr(154)=>840,chr(155)=>333,chr(156)=>850,chr(157)=>500,chr(158)=>568,chr(159)=>560,chr(160)=>278,chr(161)=>650,chr(162)=>500,chr(163)=>500,chr(164)=>556,chr(165)=>611,chr(166)=>260,chr(167)=>556,chr(168)=>667,chr(169)=>737,chr(170)=>722,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>278,
-	chr(176)=>606,chr(177)=>584,chr(178)=>278,chr(179)=>222,chr(180)=>430,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>556,chr(185)=>432,chr(186)=>500,chr(187)=>556,chr(188)=>222,chr(189)=>667,chr(190)=>500,chr(191)=>278,chr(192)=>667,chr(193)=>639,chr(194)=>667,chr(195)=>611,chr(196)=>816,chr(197)=>667,
-	chr(198)=>897,chr(199)=>652,chr(200)=>731,chr(201)=>731,chr(202)=>664,chr(203)=>646,chr(204)=>833,chr(205)=>722,chr(206)=>778,chr(207)=>722,chr(208)=>667,chr(209)=>722,chr(210)=>611,chr(211)=>530,chr(212)=>891,chr(213)=>667,chr(214)=>722,chr(215)=>642,chr(216)=>836,chr(217)=>837,chr(218)=>866,chr(219)=>886,
-	chr(220)=>698,chr(221)=>717,chr(222)=>1079,chr(223)=>691,chr(224)=>556,chr(225)=>556,chr(226)=>538,chr(227)=>430,chr(228)=>640,chr(229)=>556,chr(230)=>818,chr(231)=>495,chr(232)=>560,chr(233)=>560,chr(234)=>510,chr(235)=>556,chr(236)=>621,chr(237)=>561,chr(238)=>556,chr(239)=>560,chr(240)=>556,chr(241)=>500,
-	chr(242)=>400,chr(243)=>500,chr(244)=>916,chr(245)=>500,chr(246)=>560,chr(247)=>497,chr(248)=>695,chr(249)=>695,chr(250)=>640,chr(251)=>734,chr(252)=>523,chr(253)=>534,chr(254)=>788,chr(255)=>564);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freesansi-win-1251.z';
-$size1=6065;
-$size2=28765;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansi-win-1251.z b/main/inc/lib/mpdf/font/freesansi-win-1251.z
deleted file mode 100755
index 543850f233..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freesansi.php b/main/inc/lib/mpdf/font/freesansi.php
deleted file mode 100755
index ee19099377..0000000000
--- a/main/inc/lib/mpdf/font/freesansi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1141,'Descent'=>-419,'CapHeight'=>729,'Flags'=>96,'FontBBox'=>'[-65 -220 1108 953]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>432);
-$up=-151;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>432,chr(128)=>556,chr(129)=>432,chr(130)=>222,chr(131)=>556,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>432,chr(142)=>611,chr(143)=>432,chr(144)=>432,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>432,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>606,chr(177)=>584,chr(178)=>390,chr(179)=>390,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>390,chr(186)=>365,chr(187)=>556,chr(188)=>947,chr(189)=>947,chr(190)=>947,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-$enc='win-1252';
-$diff='';
-$file='freesansi.z';
-$size1=5908;
-$size2=31570;
-?>
diff --git a/main/inc/lib/mpdf/font/freesansi.z b/main/inc/lib/mpdf/font/freesansi.z
deleted file mode 100755
index d37178940f..0000000000
Binary files a/main/inc/lib/mpdf/font/freesansi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-2.php b/main/inc/lib/mpdf/font/freeserif-iso-8859-2.php
deleted file mode 100755
index f06dd103b8..0000000000
--- a/main/inc/lib/mpdf/font/freeserif-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1166,'Descent'=>-446,'CapHeight'=>662,'Flags'=>32,'FontBBox'=>'[-70 -218 932 923]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>500,chr(165)=>611,chr(166)=>556,chr(167)=>500,chr(168)=>333,chr(169)=>556,chr(170)=>556,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
-	chr(176)=>400,chr(177)=>444,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>348,chr(182)=>389,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>389,chr(187)=>278,chr(188)=>444,chr(189)=>333,chr(190)=>444,chr(191)=>444,chr(192)=>667,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
-	chr(198)=>667,chr(199)=>667,chr(200)=>667,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>611,chr(205)=>333,chr(206)=>333,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>667,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>500,chr(224)=>333,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>278,chr(230)=>444,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>600,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>333,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>278,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freeserif-iso-8859-2.z';
-$size1=5814;
-$size2=33906;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-2.z b/main/inc/lib/mpdf/font/freeserif-iso-8859-2.z
deleted file mode 100755
index d5f6049825..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserif-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-4.php b/main/inc/lib/mpdf/font/freeserif-iso-8859-4.php
deleted file mode 100755
index e7785aab29..0000000000
--- a/main/inc/lib/mpdf/font/freeserif-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1166,'Descent'=>-446,'CapHeight'=>662,'Flags'=>32,'FontBBox'=>'[-70 -281 932 915]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>722,chr(162)=>500,chr(163)=>667,chr(164)=>500,chr(165)=>333,chr(166)=>611,chr(167)=>500,chr(168)=>333,chr(169)=>556,chr(170)=>611,chr(171)=>722,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>333,
-	chr(176)=>400,chr(177)=>444,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>278,chr(182)=>278,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>444,chr(187)=>500,chr(188)=>278,chr(189)=>722,chr(190)=>444,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>889,chr(199)=>333,chr(200)=>667,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>611,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>278,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freeserif-iso-8859-4.z';
-$size1=5833;
-$size2=34217;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-4.z b/main/inc/lib/mpdf/font/freeserif-iso-8859-4.z
deleted file mode 100755
index af991cc13c..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserif-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-7.php b/main/inc/lib/mpdf/font/freeserif-iso-8859-7.php
deleted file mode 100755
index 02e8ff7097..0000000000
--- a/main/inc/lib/mpdf/font/freeserif-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1166,'Descent'=>-446,'CapHeight'=>662,'Flags'=>32,'FontBBox'=>'[-96 -233 932 809]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>333,chr(162)=>333,chr(163)=>500,chr(164)=>432,chr(165)=>432,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>432,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>186,chr(181)=>332,chr(182)=>722,chr(183)=>250,chr(184)=>611,chr(185)=>722,chr(186)=>333,chr(187)=>500,chr(188)=>722,chr(189)=>750,chr(190)=>696,chr(191)=>757,chr(192)=>267,chr(193)=>722,chr(194)=>667,chr(195)=>586,chr(196)=>660,chr(197)=>611,
-	chr(198)=>611,chr(199)=>722,chr(200)=>726,chr(201)=>333,chr(202)=>722,chr(203)=>722,chr(204)=>889,chr(205)=>722,chr(206)=>628,chr(207)=>722,chr(208)=>722,chr(209)=>556,chr(210)=>432,chr(211)=>627,chr(212)=>611,chr(213)=>696,chr(214)=>742,chr(215)=>722,chr(216)=>863,chr(217)=>757,chr(218)=>333,chr(219)=>656,
-	chr(220)=>587,chr(221)=>426,chr(222)=>534,chr(223)=>267,chr(224)=>534,chr(225)=>587,chr(226)=>534,chr(227)=>480,chr(228)=>534,chr(229)=>426,chr(230)=>480,chr(231)=>534,chr(232)=>534,chr(233)=>267,chr(234)=>527,chr(235)=>480,chr(236)=>534,chr(237)=>480,chr(238)=>480,chr(239)=>534,chr(240)=>587,chr(241)=>534,
-	chr(242)=>439,chr(243)=>534,chr(244)=>426,chr(245)=>534,chr(246)=>640,chr(247)=>480,chr(248)=>693,chr(249)=>693,chr(250)=>267,chr(251)=>534,chr(252)=>534,chr(253)=>534,chr(254)=>693,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freeserif-iso-8859-7.z';
-$size1=5787;
-$size2=31375;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-7.z b/main/inc/lib/mpdf/font/freeserif-iso-8859-7.z
deleted file mode 100755
index 28e1184a83..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserif-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-9.php b/main/inc/lib/mpdf/font/freeserif-iso-8859-9.php
deleted file mode 100755
index 5e8c440a6f..0000000000
--- a/main/inc/lib/mpdf/font/freeserif-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1166,'Descent'=>-446,'CapHeight'=>662,'Flags'=>32,'FontBBox'=>'[-70 -218 932 915]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>333,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>278,chr(254)=>389,chr(255)=>500);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freeserif-iso-8859-9.z';
-$size1=5868;
-$size2=33958;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserif-iso-8859-9.z b/main/inc/lib/mpdf/font/freeserif-iso-8859-9.z
deleted file mode 100755
index 1f0404a4fa..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserif-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserif-win-1251.php b/main/inc/lib/mpdf/font/freeserif-win-1251.php
deleted file mode 100755
index a6d2f3af62..0000000000
--- a/main/inc/lib/mpdf/font/freeserif-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1166,'Descent'=>-446,'CapHeight'=>662,'Flags'=>32,'FontBBox'=>'[-70 -218 1086 883]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>432,chr(128)=>768,chr(129)=>556,chr(130)=>333,chr(131)=>418,
-	chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1000,chr(138)=>969,chr(139)=>333,chr(140)=>980,chr(141)=>722,chr(142)=>698,chr(143)=>722,chr(144)=>548,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>432,chr(153)=>980,
-	chr(154)=>714,chr(155)=>333,chr(156)=>706,chr(157)=>500,chr(158)=>548,chr(159)=>500,chr(160)=>250,chr(161)=>746,chr(162)=>500,chr(163)=>389,chr(164)=>500,chr(165)=>556,chr(166)=>200,chr(167)=>500,chr(168)=>667,chr(169)=>760,chr(170)=>667,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>564,chr(178)=>333,chr(179)=>278,chr(180)=>418,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>438,chr(185)=>954,chr(186)=>444,chr(187)=>500,chr(188)=>278,chr(189)=>556,chr(190)=>389,chr(191)=>278,chr(192)=>771,chr(193)=>646,chr(194)=>667,chr(195)=>626,chr(196)=>747,chr(197)=>667,
-	chr(198)=>997,chr(199)=>532,chr(200)=>824,chr(201)=>715,chr(202)=>750,chr(203)=>750,chr(204)=>990,chr(205)=>823,chr(206)=>771,chr(207)=>818,chr(208)=>604,chr(209)=>719,chr(210)=>667,chr(211)=>731,chr(212)=>869,chr(213)=>771,chr(214)=>823,chr(215)=>747,chr(216)=>1122,chr(217)=>1122,chr(218)=>757,chr(219)=>981,
-	chr(220)=>646,chr(221)=>698,chr(222)=>1104,chr(223)=>749,chr(224)=>500,chr(225)=>552,chr(226)=>500,chr(227)=>443,chr(228)=>531,chr(229)=>438,chr(230)=>716,chr(231)=>417,chr(232)=>527,chr(233)=>527,chr(234)=>525,chr(235)=>530,chr(236)=>666,chr(237)=>565,chr(238)=>552,chr(239)=>565,chr(240)=>552,chr(241)=>438,
-	chr(242)=>476,chr(243)=>500,chr(244)=>667,chr(245)=>500,chr(246)=>497,chr(247)=>531,chr(248)=>810,chr(249)=>810,chr(250)=>556,chr(251)=>719,chr(252)=>491,chr(253)=>445,chr(254)=>783,chr(255)=>487);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freeserif-win-1251.z';
-$size1=6041;
-$size2=38426;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserif-win-1251.z b/main/inc/lib/mpdf/font/freeserif-win-1251.z
deleted file mode 100755
index f2b34c8fb6..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserif-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserif.php b/main/inc/lib/mpdf/font/freeserif.php
deleted file mode 100755
index e086007fc2..0000000000
--- a/main/inc/lib/mpdf/font/freeserif.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1166,'Descent'=>-446,'CapHeight'=>662,'Flags'=>32,'FontBBox'=>'[-70 -218 1000 915]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>432,chr(128)=>500,chr(129)=>432,chr(130)=>333,chr(131)=>432,
-	chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>432,chr(142)=>611,chr(143)=>432,chr(144)=>432,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>432,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
-$enc='win-1252';
-$diff='';
-$file='freeserif.z';
-$size1=5883;
-$size2=38487;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserif.z b/main/inc/lib/mpdf/font/freeserif.z
deleted file mode 100755
index 4d00662d6e..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserif.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-2.php b/main/inc/lib/mpdf/font/freeserifb-iso-8859-2.php
deleted file mode 100755
index c121d29d2f..0000000000
--- a/main/inc/lib/mpdf/font/freeserifb-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1173,'Descent'=>-488,'CapHeight'=>676,'Flags'=>32,'FontBBox'=>'[-57 -230 981 960]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>724,'E'=>667,'F'=>611,'G'=>778,'H'=>774,'I'=>386,'J'=>500,'K'=>764,'L'=>664,'M'=>943,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>712,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>722,chr(162)=>333,chr(163)=>667,chr(164)=>500,chr(165)=>667,chr(166)=>556,chr(167)=>500,chr(168)=>333,chr(169)=>556,chr(170)=>556,chr(171)=>667,chr(172)=>667,chr(173)=>333,chr(174)=>667,chr(175)=>667,
-	chr(176)=>400,chr(177)=>500,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>278,chr(182)=>389,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>389,chr(187)=>333,chr(188)=>444,chr(189)=>333,chr(190)=>444,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>667,
-	chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>389,chr(206)=>389,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>667,chr(223)=>556,chr(224)=>444,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>278,chr(230)=>444,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>556,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>444,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>333,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freeserifb-iso-8859-2.z';
-$size1=5828;
-$size2=34364;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-2.z b/main/inc/lib/mpdf/font/freeserifb-iso-8859-2.z
deleted file mode 100755
index 67e0c4a72c..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifb-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-4.php b/main/inc/lib/mpdf/font/freeserifb-iso-8859-4.php
deleted file mode 100755
index 7ac76535a9..0000000000
--- a/main/inc/lib/mpdf/font/freeserifb-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1173,'Descent'=>-488,'CapHeight'=>676,'Flags'=>32,'FontBBox'=>'[-57 -341 981 948]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>724,'E'=>667,'F'=>611,'G'=>778,'H'=>774,'I'=>386,'J'=>500,'K'=>764,'L'=>664,'M'=>943,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>712,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>722,chr(162)=>534,chr(163)=>722,chr(164)=>500,chr(165)=>389,chr(166)=>667,chr(167)=>500,chr(168)=>333,chr(169)=>556,chr(170)=>667,chr(171)=>778,chr(172)=>667,chr(173)=>333,chr(174)=>667,chr(175)=>333,
-	chr(176)=>400,chr(177)=>500,chr(178)=>333,chr(179)=>444,chr(180)=>333,chr(181)=>278,chr(182)=>278,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>444,chr(187)=>500,chr(188)=>333,chr(189)=>722,chr(190)=>444,chr(191)=>556,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>389,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>278,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>500,chr(243)=>556,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>556,chr(254)=>556,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freeserifb-iso-8859-4.z';
-$size1=5847;
-$size2=34638;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-4.z b/main/inc/lib/mpdf/font/freeserifb-iso-8859-4.z
deleted file mode 100755
index bc47c838cf..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifb-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-7.php b/main/inc/lib/mpdf/font/freeserifb-iso-8859-7.php
deleted file mode 100755
index acecf2beb2..0000000000
--- a/main/inc/lib/mpdf/font/freeserifb-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1173,'Descent'=>-488,'CapHeight'=>676,'Flags'=>32,'FontBBox'=>'[-57 -231 981 849]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>724,'E'=>667,'F'=>611,'G'=>778,'H'=>774,'I'=>386,'J'=>500,'K'=>764,'L'=>664,'M'=>943,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>712,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>333,chr(162)=>333,chr(163)=>500,chr(164)=>432,chr(165)=>432,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>432,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>180,chr(181)=>330,chr(182)=>722,chr(183)=>250,chr(184)=>811,chr(185)=>958,chr(186)=>569,chr(187)=>500,chr(188)=>811,chr(189)=>750,chr(190)=>902,chr(191)=>811,chr(192)=>330,chr(193)=>722,chr(194)=>667,chr(195)=>611,chr(196)=>759,chr(197)=>667,
-	chr(198)=>667,chr(199)=>778,chr(200)=>778,chr(201)=>389,chr(202)=>778,chr(203)=>722,chr(204)=>944,chr(205)=>722,chr(206)=>650,chr(207)=>778,chr(208)=>812,chr(209)=>611,chr(210)=>432,chr(211)=>650,chr(212)=>667,chr(213)=>722,chr(214)=>868,chr(215)=>722,chr(216)=>868,chr(217)=>811,chr(218)=>0,chr(219)=>722,
-	chr(220)=>605,chr(221)=>440,chr(222)=>605,chr(223)=>330,chr(224)=>550,chr(225)=>605,chr(226)=>550,chr(227)=>550,chr(228)=>550,chr(229)=>440,chr(230)=>495,chr(231)=>605,chr(232)=>550,chr(233)=>330,chr(234)=>608,chr(235)=>495,chr(236)=>605,chr(237)=>495,chr(238)=>495,chr(239)=>550,chr(240)=>605,chr(241)=>550,
-	chr(242)=>440,chr(243)=>550,chr(244)=>440,chr(245)=>550,chr(246)=>660,chr(247)=>495,chr(248)=>715,chr(249)=>715,chr(250)=>330,chr(251)=>550,chr(252)=>550,chr(253)=>550,chr(254)=>715,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freeserifb-iso-8859-7.z';
-$size1=5801;
-$size2=31325;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-7.z b/main/inc/lib/mpdf/font/freeserifb-iso-8859-7.z
deleted file mode 100755
index 3f2e5e01d2..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifb-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-9.php b/main/inc/lib/mpdf/font/freeserifb-iso-8859-9.php
deleted file mode 100755
index eb800c8909..0000000000
--- a/main/inc/lib/mpdf/font/freeserifb-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1173,'Descent'=>-488,'CapHeight'=>676,'Flags'=>32,'FontBBox'=>'[-64 -218 981 948]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>724,'E'=>667,'F'=>611,'G'=>778,'H'=>774,'I'=>386,'J'=>500,'K'=>764,'L'=>664,'M'=>943,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>712,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>778,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>389,chr(222)=>556,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>278,chr(254)=>389,chr(255)=>500);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freeserifb-iso-8859-9.z';
-$size1=5882;
-$size2=34464;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifb-iso-8859-9.z b/main/inc/lib/mpdf/font/freeserifb-iso-8859-9.z
deleted file mode 100755
index dfce83d28d..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifb-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifb-win-1251.php b/main/inc/lib/mpdf/font/freeserifb-win-1251.php
deleted file mode 100755
index 248797a922..0000000000
--- a/main/inc/lib/mpdf/font/freeserifb-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1173,'Descent'=>-488,'CapHeight'=>676,'Flags'=>32,'FontBBox'=>'[-57 -228 1093 911]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>724,'E'=>667,'F'=>611,'G'=>778,'H'=>774,'I'=>386,'J'=>500,'K'=>764,'L'=>664,'M'=>943,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>712,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>432,chr(128)=>667,chr(129)=>611,chr(130)=>333,chr(131)=>458,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1000,chr(138)=>1032,chr(139)=>333,chr(140)=>1032,chr(141)=>778,chr(142)=>808,chr(143)=>778,chr(144)=>556,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>432,chr(153)=>1000,
-	chr(154)=>792,chr(155)=>333,chr(156)=>786,chr(157)=>534,chr(158)=>556,chr(159)=>556,chr(160)=>250,chr(161)=>722,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>611,chr(166)=>220,chr(167)=>500,chr(168)=>667,chr(169)=>747,chr(170)=>722,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>389,
-	chr(176)=>400,chr(177)=>570,chr(178)=>389,chr(179)=>278,chr(180)=>458,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>444,chr(185)=>954,chr(186)=>444,chr(187)=>500,chr(188)=>333,chr(189)=>556,chr(190)=>389,chr(191)=>278,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>591,chr(196)=>778,chr(197)=>667,
-	chr(198)=>1107,chr(199)=>564,chr(200)=>773,chr(201)=>773,chr(202)=>764,chr(203)=>778,chr(204)=>944,chr(205)=>778,chr(206)=>778,chr(207)=>774,chr(208)=>611,chr(209)=>722,chr(210)=>667,chr(211)=>722,chr(212)=>800,chr(213)=>722,chr(214)=>773,chr(215)=>778,chr(216)=>1113,chr(217)=>1112,chr(218)=>867,chr(219)=>970,
-	chr(220)=>630,chr(221)=>722,chr(222)=>1114,chr(223)=>735,chr(224)=>500,chr(225)=>500,chr(226)=>502,chr(227)=>443,chr(228)=>556,chr(229)=>444,chr(230)=>750,chr(231)=>408,chr(232)=>574,chr(233)=>574,chr(234)=>534,chr(235)=>544,chr(236)=>676,chr(237)=>556,chr(238)=>500,chr(239)=>556,chr(240)=>556,chr(241)=>444,
-	chr(242)=>494,chr(243)=>500,chr(244)=>825,chr(245)=>500,chr(246)=>556,chr(247)=>556,chr(248)=>818,chr(249)=>818,chr(250)=>612,chr(251)=>762,chr(252)=>512,chr(253)=>444,chr(254)=>790,chr(255)=>512);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freeserifb-win-1251.z';
-$size1=6055;
-$size2=39486;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifb-win-1251.z b/main/inc/lib/mpdf/font/freeserifb-win-1251.z
deleted file mode 100755
index 3b31bfa832..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifb-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifb.php b/main/inc/lib/mpdf/font/freeserifb.php
deleted file mode 100755
index e2af9a5062..0000000000
--- a/main/inc/lib/mpdf/font/freeserifb.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1173,'Descent'=>-488,'CapHeight'=>676,'Flags'=>32,'FontBBox'=>'[-64 -218 1000 948]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>724,'E'=>667,'F'=>611,'G'=>778,'H'=>774,'I'=>386,'J'=>500,'K'=>764,'L'=>664,'M'=>943,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>712,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>432,chr(128)=>500,chr(129)=>432,chr(130)=>333,chr(131)=>432,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>432,chr(142)=>667,chr(143)=>432,chr(144)=>432,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>432,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-$enc='win-1252';
-$diff='';
-$file='freeserifb.z';
-$size1=5897;
-$size2=38982;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifb.z b/main/inc/lib/mpdf/font/freeserifb.z
deleted file mode 100755
index 6b000e78d2..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifb.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-2.php b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-2.php
deleted file mode 100755
index 00edfdf7df..0000000000
--- a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1171,'Descent'=>-488,'CapHeight'=>669,'Flags'=>96,'FontBBox'=>'[-200 -232 940 964]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>744,'E'=>670,'F'=>656,'G'=>722,'H'=>778,'I'=>393,'J'=>500,'K'=>664,'L'=>609,'M'=>896,'N'=>722,'O'=>722,'P'=>614,'Q'=>722,'R'=>672,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>667,chr(162)=>333,chr(163)=>611,chr(164)=>500,chr(165)=>638,chr(166)=>556,chr(167)=>500,chr(168)=>333,chr(169)=>556,chr(170)=>556,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
-	chr(176)=>400,chr(177)=>500,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>424,chr(182)=>389,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>389,chr(187)=>278,chr(188)=>389,chr(189)=>333,chr(190)=>389,chr(191)=>389,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>611,
-	chr(198)=>667,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>389,chr(206)=>389,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>667,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>389,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>278,chr(230)=>444,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>644,chr(240)=>500,chr(241)=>556,
-	chr(242)=>556,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>389,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>278,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freeserifbi-iso-8859-2.z';
-$size1=5862;
-$size2=36428;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-2.z b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-2.z
deleted file mode 100755
index 930a2bc5d4..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-4.php b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-4.php
deleted file mode 100755
index de8c1e2a68..0000000000
--- a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1171,'Descent'=>-488,'CapHeight'=>669,'Flags'=>96,'FontBBox'=>'[-200 -324 940 950]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>744,'E'=>670,'F'=>656,'G'=>722,'H'=>778,'I'=>393,'J'=>500,'K'=>664,'L'=>609,'M'=>896,'N'=>722,'O'=>722,'P'=>614,'Q'=>722,'R'=>672,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>667,chr(162)=>534,chr(163)=>667,chr(164)=>500,chr(165)=>389,chr(166)=>611,chr(167)=>500,chr(168)=>333,chr(169)=>556,chr(170)=>667,chr(171)=>722,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>333,
-	chr(176)=>400,chr(177)=>500,chr(178)=>333,chr(179)=>389,chr(180)=>333,chr(181)=>278,chr(182)=>278,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>444,chr(187)=>500,chr(188)=>278,chr(189)=>722,chr(190)=>389,chr(191)=>556,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>944,chr(199)=>389,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>667,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>278,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>556,chr(254)=>556,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freeserifbi-iso-8859-4.z';
-$size1=5881;
-$size2=36777;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-4.z b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-4.z
deleted file mode 100755
index b069980d9a..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-7.php b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-7.php
deleted file mode 100755
index 75be48fa63..0000000000
--- a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1171,'Descent'=>-488,'CapHeight'=>669,'Flags'=>96,'FontBBox'=>'[-189 -231 940 839]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>744,'E'=>670,'F'=>656,'G'=>722,'H'=>778,'I'=>393,'J'=>500,'K'=>664,'L'=>609,'M'=>896,'N'=>722,'O'=>722,'P'=>614,'Q'=>722,'R'=>672,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>333,chr(162)=>333,chr(163)=>500,chr(164)=>432,chr(165)=>432,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>432,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>180,chr(181)=>330,chr(182)=>667,chr(183)=>250,chr(184)=>667,chr(185)=>778,chr(186)=>389,chr(187)=>500,chr(188)=>722,chr(189)=>750,chr(190)=>722,chr(191)=>741,chr(192)=>330,chr(193)=>667,chr(194)=>667,chr(195)=>637,chr(196)=>740,chr(197)=>667,
-	chr(198)=>611,chr(199)=>778,chr(200)=>722,chr(201)=>389,chr(202)=>677,chr(203)=>667,chr(204)=>889,chr(205)=>722,chr(206)=>650,chr(207)=>722,chr(208)=>778,chr(209)=>611,chr(210)=>432,chr(211)=>730,chr(212)=>621,chr(213)=>722,chr(214)=>748,chr(215)=>667,chr(216)=>868,chr(217)=>741,chr(218)=>389,chr(219)=>722,
-	chr(220)=>605,chr(221)=>440,chr(222)=>605,chr(223)=>330,chr(224)=>550,chr(225)=>605,chr(226)=>550,chr(227)=>550,chr(228)=>550,chr(229)=>440,chr(230)=>495,chr(231)=>605,chr(232)=>550,chr(233)=>330,chr(234)=>608,chr(235)=>495,chr(236)=>605,chr(237)=>495,chr(238)=>495,chr(239)=>550,chr(240)=>605,chr(241)=>550,
-	chr(242)=>440,chr(243)=>550,chr(244)=>440,chr(245)=>550,chr(246)=>660,chr(247)=>495,chr(248)=>715,chr(249)=>715,chr(250)=>330,chr(251)=>550,chr(252)=>550,chr(253)=>550,chr(254)=>715,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freeserifbi-iso-8859-7.z';
-$size1=5835;
-$size2=32955;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-7.z b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-7.z
deleted file mode 100755
index 815c85cfe6..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-9.php b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-9.php
deleted file mode 100755
index dda988abfd..0000000000
--- a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1171,'Descent'=>-488,'CapHeight'=>669,'Flags'=>96,'FontBBox'=>'[-200 -218 940 950]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>744,'E'=>670,'F'=>656,'G'=>722,'H'=>778,'I'=>393,'J'=>500,'K'=>664,'L'=>609,'M'=>896,'N'=>722,'O'=>722,'P'=>614,'Q'=>722,'R'=>672,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>389,chr(222)=>556,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>278,chr(254)=>389,chr(255)=>444);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freeserifbi-iso-8859-9.z';
-$size1=5916;
-$size2=36119;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-9.z b/main/inc/lib/mpdf/font/freeserifbi-iso-8859-9.z
deleted file mode 100755
index cab4e3ba92..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifbi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifbi-win-1251.php b/main/inc/lib/mpdf/font/freeserifbi-win-1251.php
deleted file mode 100755
index af6ee8acb0..0000000000
--- a/main/inc/lib/mpdf/font/freeserifbi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1171,'Descent'=>-488,'CapHeight'=>669,'Flags'=>96,'FontBBox'=>'[-189 -208 1230 937]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>744,'E'=>670,'F'=>656,'G'=>722,'H'=>778,'I'=>393,'J'=>500,'K'=>664,'L'=>609,'M'=>896,'N'=>722,'O'=>722,'P'=>614,'Q'=>722,'R'=>672,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>432,chr(128)=>611,chr(129)=>667,chr(130)=>333,chr(131)=>458,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1000,chr(138)=>778,chr(139)=>333,chr(140)=>778,chr(141)=>778,chr(142)=>611,chr(143)=>869,chr(144)=>494,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>432,chr(153)=>1000,
-	chr(154)=>637,chr(155)=>333,chr(156)=>556,chr(157)=>558,chr(158)=>494,chr(159)=>556,chr(160)=>250,chr(161)=>722,chr(162)=>444,chr(163)=>500,chr(164)=>500,chr(165)=>611,chr(166)=>220,chr(167)=>500,chr(168)=>667,chr(169)=>747,chr(170)=>722,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>389,
-	chr(176)=>400,chr(177)=>570,chr(178)=>389,chr(179)=>278,chr(180)=>458,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>444,chr(185)=>981,chr(186)=>444,chr(187)=>500,chr(188)=>278,chr(189)=>556,chr(190)=>389,chr(191)=>278,chr(192)=>667,chr(193)=>733,chr(194)=>667,chr(195)=>656,chr(196)=>864,chr(197)=>667,
-	chr(198)=>1107,chr(199)=>564,chr(200)=>870,chr(201)=>870,chr(202)=>775,chr(203)=>855,chr(204)=>889,chr(205)=>778,chr(206)=>722,chr(207)=>869,chr(208)=>611,chr(209)=>667,chr(210)=>611,chr(211)=>766,chr(212)=>833,chr(213)=>667,chr(214)=>869,chr(215)=>823,chr(216)=>1208,chr(217)=>1209,chr(218)=>796,chr(219)=>1060,
-	chr(220)=>712,chr(221)=>732,chr(222)=>1195,chr(223)=>821,chr(224)=>500,chr(225)=>500,chr(226)=>444,chr(227)=>389,chr(228)=>534,chr(229)=>444,chr(230)=>1051,chr(231)=>408,chr(232)=>556,chr(233)=>556,chr(234)=>534,chr(235)=>637,chr(236)=>859,chr(237)=>560,chr(238)=>500,chr(239)=>556,chr(240)=>500,chr(241)=>444,
-	chr(242)=>778,chr(243)=>444,chr(244)=>764,chr(245)=>500,chr(246)=>556,chr(247)=>556,chr(248)=>806,chr(249)=>806,chr(250)=>591,chr(251)=>744,chr(252)=>444,chr(253)=>451,chr(254)=>765,chr(255)=>594);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freeserifbi-win-1251.z';
-$size1=6089;
-$size2=41379;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifbi-win-1251.z b/main/inc/lib/mpdf/font/freeserifbi-win-1251.z
deleted file mode 100755
index 4ee7875c84..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifbi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifbi.php b/main/inc/lib/mpdf/font/freeserifbi.php
deleted file mode 100755
index 63ede528ef..0000000000
--- a/main/inc/lib/mpdf/font/freeserifbi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1171,'Descent'=>-488,'CapHeight'=>669,'Flags'=>96,'FontBBox'=>'[-200 -218 996 950]','ItalicAngle'=>-16.3,'StemV'=>120,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>744,'E'=>670,'F'=>656,'G'=>722,'H'=>778,'I'=>393,'J'=>500,'K'=>664,'L'=>609,'M'=>896,'N'=>722,'O'=>722,'P'=>614,'Q'=>722,'R'=>672,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>432,chr(128)=>500,chr(129)=>432,chr(130)=>333,chr(131)=>432,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>432,chr(142)=>611,chr(143)=>432,chr(144)=>432,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>432,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
-$enc='win-1252';
-$diff='';
-$file='freeserifbi.z';
-$size1=5930;
-$size2=40672;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifbi.z b/main/inc/lib/mpdf/font/freeserifbi.z
deleted file mode 100755
index 339c775ea3..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifbi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-2.php b/main/inc/lib/mpdf/font/freeserifi-iso-8859-2.php
deleted file mode 100755
index e4af1074db..0000000000
--- a/main/inc/lib/mpdf/font/freeserifi-iso-8859-2.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1122,'Descent'=>-438,'CapHeight'=>653,'Flags'=>96,'FontBBox'=>'[-168 -228 906 919]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>604,'F'=>611,'G'=>722,'H'=>722,'I'=>339,'J'=>444,'K'=>652,'L'=>556,'M'=>828,'N'=>657,'O'=>722,'P'=>603,'Q'=>722,'R'=>616,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>611,chr(162)=>333,chr(163)=>556,chr(164)=>500,chr(165)=>556,chr(166)=>500,chr(167)=>500,chr(168)=>333,chr(169)=>500,chr(170)=>500,chr(171)=>556,chr(172)=>556,chr(173)=>333,chr(174)=>556,chr(175)=>556,
-	chr(176)=>400,chr(177)=>500,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>278,chr(182)=>389,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>389,chr(187)=>278,chr(188)=>389,chr(189)=>333,chr(190)=>389,chr(191)=>389,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>556,
-	chr(198)=>667,chr(199)=>667,chr(200)=>667,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>611,chr(205)=>333,chr(206)=>333,chr(207)=>722,chr(208)=>722,chr(209)=>667,chr(210)=>667,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>611,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>556,chr(222)=>556,chr(223)=>500,chr(224)=>389,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>278,chr(230)=>444,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>500,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>389,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>278,chr(255)=>333);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='freeserifi-iso-8859-2.z';
-$size1=5842;
-$size2=36259;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-2.z b/main/inc/lib/mpdf/font/freeserifi-iso-8859-2.z
deleted file mode 100755
index 637ac7e37b..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifi-iso-8859-2.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-4.php b/main/inc/lib/mpdf/font/freeserifi-iso-8859-4.php
deleted file mode 100755
index be1befe1d5..0000000000
--- a/main/inc/lib/mpdf/font/freeserifi-iso-8859-4.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1122,'Descent'=>-438,'CapHeight'=>653,'Flags'=>96,'FontBBox'=>'[-168 -270 911 904]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>604,'F'=>611,'G'=>722,'H'=>722,'I'=>339,'J'=>444,'K'=>652,'L'=>556,'M'=>828,'N'=>657,'O'=>722,'P'=>603,'Q'=>722,'R'=>616,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>611,chr(162)=>491,chr(163)=>611,chr(164)=>500,chr(165)=>333,chr(166)=>556,chr(167)=>500,chr(168)=>333,chr(169)=>500,chr(170)=>611,chr(171)=>722,chr(172)=>556,chr(173)=>333,chr(174)=>556,chr(175)=>333,
-	chr(176)=>400,chr(177)=>500,chr(178)=>333,chr(179)=>389,chr(180)=>333,chr(181)=>278,chr(182)=>278,chr(183)=>333,chr(184)=>333,chr(185)=>389,chr(186)=>444,chr(187)=>500,chr(188)=>278,chr(189)=>667,chr(190)=>389,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
-	chr(198)=>889,chr(199)=>333,chr(200)=>667,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>611,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>667,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>722,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>278,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>444,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>444,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>333);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='freeserifi-iso-8859-4.z';
-$size1=5861;
-$size2=36320;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-4.z b/main/inc/lib/mpdf/font/freeserifi-iso-8859-4.z
deleted file mode 100755
index 4035c6aba0..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifi-iso-8859-4.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-7.php b/main/inc/lib/mpdf/font/freeserifi-iso-8859-7.php
deleted file mode 100755
index 0263c3d77b..0000000000
--- a/main/inc/lib/mpdf/font/freeserifi-iso-8859-7.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1122,'Descent'=>-438,'CapHeight'=>653,'Flags'=>96,'FontBBox'=>'[-147 -224 944 809]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>604,'F'=>611,'G'=>722,'H'=>722,'I'=>339,'J'=>444,'K'=>652,'L'=>556,'M'=>828,'N'=>657,'O'=>722,'P'=>603,'Q'=>722,'R'=>616,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>333,chr(162)=>333,chr(163)=>500,chr(164)=>432,chr(165)=>432,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>432,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>432,chr(175)=>432,
-	chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>186,chr(181)=>332,chr(182)=>641,chr(183)=>250,chr(184)=>611,chr(185)=>742,chr(186)=>333,chr(187)=>500,chr(188)=>682,chr(189)=>750,chr(190)=>676,chr(191)=>744,chr(192)=>267,chr(193)=>641,chr(194)=>581,chr(195)=>611,chr(196)=>660,chr(197)=>611,
-	chr(198)=>606,chr(199)=>742,chr(200)=>672,chr(201)=>333,chr(202)=>667,chr(203)=>641,chr(204)=>833,chr(205)=>657,chr(206)=>678,chr(207)=>682,chr(208)=>749,chr(209)=>611,chr(210)=>432,chr(211)=>657,chr(212)=>596,chr(213)=>676,chr(214)=>722,chr(215)=>611,chr(216)=>863,chr(217)=>744,chr(218)=>333,chr(219)=>696,
-	chr(220)=>587,chr(221)=>426,chr(222)=>534,chr(223)=>267,chr(224)=>534,chr(225)=>587,chr(226)=>534,chr(227)=>480,chr(228)=>534,chr(229)=>426,chr(230)=>480,chr(231)=>534,chr(232)=>534,chr(233)=>267,chr(234)=>534,chr(235)=>480,chr(236)=>534,chr(237)=>480,chr(238)=>480,chr(239)=>534,chr(240)=>587,chr(241)=>534,
-	chr(242)=>426,chr(243)=>534,chr(244)=>426,chr(245)=>534,chr(246)=>640,chr(247)=>480,chr(248)=>693,chr(249)=>693,chr(250)=>267,chr(251)=>534,chr(252)=>534,chr(253)=>534,chr(254)=>693,chr(255)=>432);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='freeserifi-iso-8859-7.z';
-$size1=5815;
-$size2=33025;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-7.z b/main/inc/lib/mpdf/font/freeserifi-iso-8859-7.z
deleted file mode 100755
index 6b05c323d0..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifi-iso-8859-7.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-9.php b/main/inc/lib/mpdf/font/freeserifi-iso-8859-9.php
deleted file mode 100755
index 9c39f4a6c2..0000000000
--- a/main/inc/lib/mpdf/font/freeserifi-iso-8859-9.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1122,'Descent'=>-438,'CapHeight'=>653,'Flags'=>96,'FontBBox'=>'[-168 -217 911 904]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>604,'F'=>611,'G'=>722,'H'=>722,'I'=>339,'J'=>444,'K'=>652,'L'=>556,'M'=>828,'N'=>657,'O'=>722,'P'=>603,'Q'=>722,'R'=>616,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>432,chr(128)=>432,chr(129)=>432,chr(130)=>432,chr(131)=>432,
-	chr(132)=>432,chr(133)=>432,chr(134)=>432,chr(135)=>432,chr(136)=>432,chr(137)=>432,chr(138)=>432,chr(139)=>432,chr(140)=>432,chr(141)=>432,chr(142)=>432,chr(143)=>432,chr(144)=>432,chr(145)=>432,chr(146)=>432,chr(147)=>432,chr(148)=>432,chr(149)=>432,chr(150)=>432,chr(151)=>432,chr(152)=>432,chr(153)=>432,
-	chr(154)=>432,chr(155)=>432,chr(156)=>432,chr(157)=>432,chr(158)=>432,chr(159)=>432,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>333,chr(222)=>500,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>278,chr(254)=>389,chr(255)=>444);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='freeserifi-iso-8859-9.z';
-$size1=5896;
-$size2=36147;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifi-iso-8859-9.z b/main/inc/lib/mpdf/font/freeserifi-iso-8859-9.z
deleted file mode 100755
index 48b9ccc380..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifi-iso-8859-9.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifi-win-1251.php b/main/inc/lib/mpdf/font/freeserifi-win-1251.php
deleted file mode 100755
index 833517e1a9..0000000000
--- a/main/inc/lib/mpdf/font/freeserifi-win-1251.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1122,'Descent'=>-438,'CapHeight'=>653,'Flags'=>96,'FontBBox'=>'[-147 -209 1109 873]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>604,'F'=>611,'G'=>722,'H'=>722,'I'=>339,'J'=>444,'K'=>652,'L'=>556,'M'=>828,'N'=>657,'O'=>722,'P'=>603,'Q'=>722,'R'=>616,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>432,chr(128)=>556,chr(129)=>556,chr(130)=>333,chr(131)=>454,
-	chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>500,chr(137)=>1000,chr(138)=>722,chr(139)=>333,chr(140)=>722,chr(141)=>743,chr(142)=>556,chr(143)=>814,chr(144)=>484,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>432,chr(153)=>980,
-	chr(154)=>538,chr(155)=>333,chr(156)=>500,chr(157)=>491,chr(158)=>500,chr(159)=>500,chr(160)=>250,chr(161)=>730,chr(162)=>444,chr(163)=>444,chr(164)=>500,chr(165)=>556,chr(166)=>275,chr(167)=>500,chr(168)=>611,chr(169)=>760,chr(170)=>667,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>675,chr(178)=>333,chr(179)=>278,chr(180)=>418,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>444,chr(185)=>1023,chr(186)=>444,chr(187)=>500,chr(188)=>278,chr(189)=>500,chr(190)=>389,chr(191)=>278,chr(192)=>611,chr(193)=>682,chr(194)=>611,chr(195)=>640,chr(196)=>747,chr(197)=>611,
-	chr(198)=>1073,chr(199)=>508,chr(200)=>814,chr(201)=>814,chr(202)=>729,chr(203)=>755,chr(204)=>833,chr(205)=>722,chr(206)=>722,chr(207)=>805,chr(208)=>611,chr(209)=>667,chr(210)=>556,chr(211)=>730,chr(212)=>801,chr(213)=>611,chr(214)=>807,chr(215)=>772,chr(216)=>1063,chr(217)=>1065,chr(218)=>731,chr(219)=>961,
-	chr(220)=>645,chr(221)=>671,chr(222)=>1191,chr(223)=>746,chr(224)=>500,chr(225)=>500,chr(226)=>429,chr(227)=>354,chr(228)=>552,chr(229)=>444,chr(230)=>1058,chr(231)=>363,chr(232)=>500,chr(233)=>500,chr(234)=>491,chr(235)=>538,chr(236)=>731,chr(237)=>500,chr(238)=>500,chr(239)=>500,chr(240)=>500,chr(241)=>444,
-	chr(242)=>722,chr(243)=>444,chr(244)=>771,chr(245)=>444,chr(246)=>500,chr(247)=>500,chr(248)=>750,chr(249)=>750,chr(250)=>492,chr(251)=>684,chr(252)=>420,chr(253)=>457,chr(254)=>700,chr(255)=>560);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='freeserifi-win-1251.z';
-$size1=6069;
-$size2=41762;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifi-win-1251.z b/main/inc/lib/mpdf/font/freeserifi-win-1251.z
deleted file mode 100755
index 10729f2bdf..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifi-win-1251.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/freeserifi.php b/main/inc/lib/mpdf/font/freeserifi.php
deleted file mode 100755
index 16eca5403f..0000000000
--- a/main/inc/lib/mpdf/font/freeserifi.php
+++ /dev/null
@@ -1,25 +0,0 @@
-1122,'Descent'=>-438,'CapHeight'=>653,'Flags'=>96,'FontBBox'=>'[-168 -217 1010 904]','ItalicAngle'=>-16.5,'StemV'=>70,'MissingWidth'=>432);
-$up=-100;
-$ut=50;
-$cw=array(
-	chr(0)=>432,chr(1)=>432,chr(2)=>432,chr(3)=>432,chr(4)=>432,chr(5)=>432,chr(6)=>432,chr(7)=>432,chr(8)=>432,chr(9)=>432,chr(10)=>432,chr(11)=>432,chr(12)=>432,chr(13)=>432,chr(14)=>432,chr(15)=>432,chr(16)=>432,chr(17)=>432,chr(18)=>432,chr(19)=>432,chr(20)=>432,chr(21)=>432,
-	chr(22)=>432,chr(23)=>432,chr(24)=>432,chr(25)=>432,chr(26)=>432,chr(27)=>432,chr(28)=>432,chr(29)=>432,chr(30)=>432,chr(31)=>432,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>604,'F'=>611,'G'=>722,'H'=>722,'I'=>339,'J'=>444,'K'=>652,'L'=>556,'M'=>828,'N'=>657,'O'=>722,'P'=>603,'Q'=>722,'R'=>616,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>432,chr(128)=>500,chr(129)=>432,chr(130)=>333,chr(131)=>432,
-	chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>432,chr(142)=>556,chr(143)=>432,chr(144)=>432,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
-	chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>432,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
-$enc='win-1252';
-$diff='';
-$file='freeserifi.z';
-$size1=5911;
-$size2=40858;
-?>
diff --git a/main/inc/lib/mpdf/font/freeserifi.z b/main/inc/lib/mpdf/font/freeserifi.z
deleted file mode 100755
index 0091c3f571..0000000000
Binary files a/main/inc/lib/mpdf/font/freeserifi.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/helvetica.php b/main/inc/lib/mpdf/font/helvetica.php
deleted file mode 100755
index 54234f3199..0000000000
--- a/main/inc/lib/mpdf/font/helvetica.php
+++ /dev/null
@@ -1,20 +0,0 @@
-278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-
-$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-166 -225 1000 931]');
-$up=-100;
-$ut=50;
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/helveticab.php b/main/inc/lib/mpdf/font/helveticab.php
deleted file mode 100755
index a4ab505654..0000000000
--- a/main/inc/lib/mpdf/font/helveticab.php
+++ /dev/null
@@ -1,21 +0,0 @@
-278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-
-$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-170 -228 1003 962]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/helveticabi.php b/main/inc/lib/mpdf/font/helveticabi.php
deleted file mode 100755
index 716f40fda0..0000000000
--- a/main/inc/lib/mpdf/font/helveticabi.php
+++ /dev/null
@@ -1,21 +0,0 @@
-278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-
-$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-174 -228 1114 962]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/helveticai.php b/main/inc/lib/mpdf/font/helveticai.php
deleted file mode 100755
index 8e9ae1872e..0000000000
--- a/main/inc/lib/mpdf/font/helveticai.php
+++ /dev/null
@@ -1,21 +0,0 @@
-278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-
-$desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'FontBBox'=>'[-170 -225 1116 931]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/index.html b/main/inc/lib/mpdf/font/index.html
deleted file mode 100755
index aa7b9c934b..0000000000
--- a/main/inc/lib/mpdf/font/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/ocrb-iso-8859-2.php b/main/inc/lib/mpdf/font/ocrb-iso-8859-2.php
deleted file mode 100755
index ab86177e8d..0000000000
--- a/main/inc/lib/mpdf/font/ocrb-iso-8859-2.php
+++ /dev/null
@@ -1,24 +0,0 @@
-741,'Descent'=>-289,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-4 -289 1803 741]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-78;
-$ut=60;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>1806,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-2';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
-$file='ocrb.z';
-$originalsize=20632;
-?>
diff --git a/main/inc/lib/mpdf/font/ocrb-iso-8859-4.php b/main/inc/lib/mpdf/font/ocrb-iso-8859-4.php
deleted file mode 100755
index 892bc19a0f..0000000000
--- a/main/inc/lib/mpdf/font/ocrb-iso-8859-4.php
+++ /dev/null
@@ -1,24 +0,0 @@
-741,'Descent'=>-289,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-4 -289 1803 741]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-78;
-$ut=60;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>1806,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-4';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /kgreenlandic /Rcommaaccent 165 /Itilde /Lcommaaccent 169 /Scaron /Emacron /Gcommaaccent /Tbar 174 /Zcaron 177 /aogonek /ogonek /rcommaaccent 181 /itilde /lcommaaccent /caron 185 /scaron /emacron /gcommaaccent /tbar /Eng /zcaron /eng /Amacron 199 /Iogonek /Ccaron 202 /Eogonek 204 /Edotaccent 207 /Imacron /Dcroat /Ncommaaccent /Omacron /Kcommaaccent 217 /Uogonek 221 /Utilde /Umacron 224 /amacron 231 /iogonek /ccaron 234 /eogonek 236 /edotaccent 239 /imacron /dcroat /ncommaaccent /omacron /kcommaaccent 249 /uogonek 253 /utilde /umacron /dotaccent';
-$file='ocrb.z';
-$originalsize=20632;
-?>
diff --git a/main/inc/lib/mpdf/font/ocrb-iso-8859-7.php b/main/inc/lib/mpdf/font/ocrb-iso-8859-7.php
deleted file mode 100755
index 663b05e636..0000000000
--- a/main/inc/lib/mpdf/font/ocrb-iso-8859-7.php
+++ /dev/null
@@ -1,24 +0,0 @@
-741,'Descent'=>-289,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-4 -289 1803 741]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-78;
-$ut=60;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>602,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>765,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-7';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /quoteleft /quoteright 164 /.notdef /.notdef 170 /.notdef 174 /.notdef /afii00208 180 /tonos /dieresistonos /Alphatonos 184 /Epsilontonos /Etatonos /Iotatonos 188 /Omicrontonos 190 /Upsilontonos /Omegatonos /iotadieresistonos /Alpha /Beta /Gamma /Delta /Epsilon /Zeta /Eta /Theta /Iota /Kappa /Lambda /Mu /Nu /Xi /Omicron /Pi /Rho /.notdef /Sigma /Tau /Upsilon /Phi /Chi /Psi /Omega /Iotadieresis /Upsilondieresis /alphatonos /epsilontonos /etatonos /iotatonos /upsilondieresistonos /alpha /beta /gamma /delta /epsilon /zeta /eta /theta /iota /kappa /lambda /mu /nu /xi /omicron /pi /rho /sigma1 /sigma /tau /upsilon /phi /chi /psi /omega /iotadieresis /upsilondieresis /omicrontonos /upsilontonos /omegatonos /.notdef';
-$file='ocrb.z';
-$originalsize=20632;
-?>
diff --git a/main/inc/lib/mpdf/font/ocrb-iso-8859-9.php b/main/inc/lib/mpdf/font/ocrb-iso-8859-9.php
deleted file mode 100755
index 70e6adc9ad..0000000000
--- a/main/inc/lib/mpdf/font/ocrb-iso-8859-9.php
+++ /dev/null
@@ -1,24 +0,0 @@
-741,'Descent'=>-289,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-4 -289 1803 741]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-78;
-$ut=60;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>765,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>1806,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='iso-8859-9';
-$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 208 /Gbreve 221 /Idotaccent /Scedilla 240 /gbreve 253 /dotlessi /scedilla';
-$file='ocrb.z';
-$originalsize=20632;
-?>
diff --git a/main/inc/lib/mpdf/font/ocrb-win-1251.php b/main/inc/lib/mpdf/font/ocrb-win-1251.php
deleted file mode 100755
index 2b93436a37..0000000000
--- a/main/inc/lib/mpdf/font/ocrb-win-1251.php
+++ /dev/null
@@ -1,24 +0,0 @@
-741,'Descent'=>-289,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-4 -289 1803 741]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-78;
-$ut=60;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>765,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>602,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1251';
-$diff='128 /afii10051 /afii10052 131 /afii10100 136 /Euro 138 /afii10058 140 /afii10059 /afii10061 /afii10060 /afii10145 /afii10099 152 /.notdef 154 /afii10106 156 /afii10107 /afii10109 /afii10108 /afii10193 161 /afii10062 /afii10110 /afii10057 165 /afii10050 168 /afii10023 170 /afii10053 175 /afii10056 178 /afii10055 /afii10103 /afii10098 184 /afii10071 /afii61352 /afii10101 188 /afii10105 /afii10054 /afii10102 /afii10104 /afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033 /afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041 /afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049 /afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081 /afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089 /afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097';
-$file='ocrb.z';
-$originalsize=20632;
-?>
diff --git a/main/inc/lib/mpdf/font/ocrb.php b/main/inc/lib/mpdf/font/ocrb.php
deleted file mode 100755
index cb13ade2db..0000000000
--- a/main/inc/lib/mpdf/font/ocrb.php
+++ /dev/null
@@ -1,24 +0,0 @@
-741,'Descent'=>-289,'CapHeight'=>583,'Flags'=>32,'FontBBox'=>'[-4 -289 1803 741]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>602);
-$up=-78;
-$ut=60;
-$cw=array(
-	chr(0)=>602,chr(1)=>602,chr(2)=>602,chr(3)=>602,chr(4)=>602,chr(5)=>602,chr(6)=>602,chr(7)=>602,chr(8)=>602,chr(9)=>602,chr(10)=>602,chr(11)=>602,chr(12)=>602,chr(13)=>602,chr(14)=>602,chr(15)=>602,chr(16)=>602,chr(17)=>602,chr(18)=>602,chr(19)=>602,chr(20)=>602,chr(21)=>602,
-	chr(22)=>602,chr(23)=>602,chr(24)=>602,chr(25)=>602,chr(26)=>602,chr(27)=>602,chr(28)=>602,chr(29)=>602,chr(30)=>602,chr(31)=>602,' '=>602,'!'=>602,'"'=>602,'#'=>602,'$'=>602,'%'=>602,'&'=>602,'\''=>602,'('=>602,')'=>602,'*'=>602,'+'=>602,
-	','=>602,'-'=>602,'.'=>602,'/'=>602,'0'=>602,'1'=>602,'2'=>602,'3'=>602,'4'=>602,'5'=>602,'6'=>602,'7'=>602,'8'=>602,'9'=>602,':'=>602,';'=>602,'<'=>602,'='=>602,'>'=>602,'?'=>602,'@'=>602,'A'=>602,
-	'B'=>602,'C'=>602,'D'=>602,'E'=>602,'F'=>602,'G'=>602,'H'=>602,'I'=>602,'J'=>602,'K'=>602,'L'=>602,'M'=>602,'N'=>602,'O'=>602,'P'=>602,'Q'=>602,'R'=>602,'S'=>602,'T'=>602,'U'=>602,'V'=>602,'W'=>602,
-	'X'=>602,'Y'=>602,'Z'=>602,'['=>602,'\\'=>602,']'=>602,'^'=>602,'_'=>602,'`'=>602,'a'=>602,'b'=>602,'c'=>602,'d'=>602,'e'=>602,'f'=>602,'g'=>602,'h'=>602,'i'=>602,'j'=>602,'k'=>602,'l'=>602,'m'=>602,
-	'n'=>602,'o'=>602,'p'=>602,'q'=>602,'r'=>602,'s'=>602,'t'=>602,'u'=>602,'v'=>602,'w'=>602,'x'=>602,'y'=>602,'z'=>602,'{'=>602,'|'=>602,'}'=>602,'~'=>602,chr(127)=>602,chr(128)=>602,chr(129)=>602,chr(130)=>602,chr(131)=>602,
-	chr(132)=>602,chr(133)=>602,chr(134)=>602,chr(135)=>602,chr(136)=>602,chr(137)=>602,chr(138)=>602,chr(139)=>602,chr(140)=>602,chr(141)=>602,chr(142)=>602,chr(143)=>602,chr(144)=>602,chr(145)=>602,chr(146)=>602,chr(147)=>602,chr(148)=>602,chr(149)=>602,chr(150)=>602,chr(151)=>602,chr(152)=>602,chr(153)=>602,
-	chr(154)=>602,chr(155)=>602,chr(156)=>602,chr(157)=>602,chr(158)=>602,chr(159)=>602,chr(160)=>602,chr(161)=>602,chr(162)=>602,chr(163)=>602,chr(164)=>602,chr(165)=>602,chr(166)=>602,chr(167)=>602,chr(168)=>602,chr(169)=>602,chr(170)=>602,chr(171)=>602,chr(172)=>602,chr(173)=>602,chr(174)=>602,chr(175)=>602,
-	chr(176)=>602,chr(177)=>602,chr(178)=>602,chr(179)=>602,chr(180)=>602,chr(181)=>765,chr(182)=>602,chr(183)=>602,chr(184)=>602,chr(185)=>602,chr(186)=>602,chr(187)=>602,chr(188)=>602,chr(189)=>602,chr(190)=>602,chr(191)=>602,chr(192)=>602,chr(193)=>602,chr(194)=>1806,chr(195)=>602,chr(196)=>602,chr(197)=>602,
-	chr(198)=>602,chr(199)=>602,chr(200)=>602,chr(201)=>602,chr(202)=>602,chr(203)=>602,chr(204)=>602,chr(205)=>602,chr(206)=>602,chr(207)=>602,chr(208)=>602,chr(209)=>602,chr(210)=>602,chr(211)=>602,chr(212)=>602,chr(213)=>602,chr(214)=>602,chr(215)=>602,chr(216)=>602,chr(217)=>602,chr(218)=>602,chr(219)=>602,
-	chr(220)=>602,chr(221)=>602,chr(222)=>602,chr(223)=>602,chr(224)=>602,chr(225)=>602,chr(226)=>602,chr(227)=>602,chr(228)=>602,chr(229)=>602,chr(230)=>602,chr(231)=>602,chr(232)=>602,chr(233)=>602,chr(234)=>602,chr(235)=>602,chr(236)=>602,chr(237)=>602,chr(238)=>602,chr(239)=>602,chr(240)=>602,chr(241)=>602,
-	chr(242)=>602,chr(243)=>602,chr(244)=>602,chr(245)=>602,chr(246)=>602,chr(247)=>602,chr(248)=>602,chr(249)=>602,chr(250)=>602,chr(251)=>602,chr(252)=>602,chr(253)=>602,chr(254)=>602,chr(255)=>602);
-$enc='win-1252';
-$diff='';
-$file='ocrb.z';
-$originalsize=20632;
-?>
diff --git a/main/inc/lib/mpdf/font/ocrb.z b/main/inc/lib/mpdf/font/ocrb.z
deleted file mode 100755
index 62868d9e69..0000000000
Binary files a/main/inc/lib/mpdf/font/ocrb.z and /dev/null differ
diff --git a/main/inc/lib/mpdf/font/symbol.php b/main/inc/lib/mpdf/font/symbol.php
deleted file mode 100755
index 771052a773..0000000000
--- a/main/inc/lib/mpdf/font/symbol.php
+++ /dev/null
@@ -1,21 +0,0 @@
-250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
-	','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
-	'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
-	'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
-	chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
-	chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
-	chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
-	chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
-	chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
-	chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
-
-$desc=array('FontBBox'=>'[-180 -293 1090 1010]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/times.php b/main/inc/lib/mpdf/font/times.php
deleted file mode 100755
index 771d9bd367..0000000000
--- a/main/inc/lib/mpdf/font/times.php
+++ /dev/null
@@ -1,21 +0,0 @@
-250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
-
-$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>662,'FontBBox'=>'[-168 -218 1000 898]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/timesb.php b/main/inc/lib/mpdf/font/timesb.php
deleted file mode 100755
index 738026bcdd..0000000000
--- a/main/inc/lib/mpdf/font/timesb.php
+++ /dev/null
@@ -1,21 +0,0 @@
-250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-
-$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>676,'FontBBox'=>'[-168 -218 1000 935]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/timesbi.php b/main/inc/lib/mpdf/font/timesbi.php
deleted file mode 100755
index 364ae0a615..0000000000
--- a/main/inc/lib/mpdf/font/timesbi.php
+++ /dev/null
@@ -1,21 +0,0 @@
-250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
-
-$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>669,'FontBBox'=>'[-200 -218 996 921]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/timesi.php b/main/inc/lib/mpdf/font/timesi.php
deleted file mode 100755
index 9b56f632a0..0000000000
--- a/main/inc/lib/mpdf/font/timesi.php
+++ /dev/null
@@ -1,21 +0,0 @@
-250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
-	chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
-
-$desc=array('Ascent'=>683,'Descent'=>-217,'CapHeight'=>653,'FontBBox'=>'[-169 -217 1010 883]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/font/zapfdingbats.php b/main/inc/lib/mpdf/font/zapfdingbats.php
deleted file mode 100755
index 099d34b4e2..0000000000
--- a/main/inc/lib/mpdf/font/zapfdingbats.php
+++ /dev/null
@@ -1,21 +0,0 @@
-0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
-	chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
-	','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
-	'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
-	'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
-	'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
-	chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
-	chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
-	chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
-	chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
-	chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
-	chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
-
-$desc=array('FontBBox'=>'[-1 -143 981 820]');
-$up=-100;
-$ut=50;
-
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/graph.php b/main/inc/lib/mpdf/graph.php
deleted file mode 100755
index 143b923a72..0000000000
--- a/main/inc/lib/mpdf/graph.php
+++ /dev/null
@@ -1,733 +0,0 @@
-1 hrs old
-	$interval = 3600;
-	// Modified by Ivan Tcholakov, 28-JAN-2010.
-	//if ($handle = opendir(_MPDF_PATH.'graph_cache')) {
-	//   while (false !== ($file = readdir($handle))) {
-	//	if (((filemtime(_MPDF_PATH.'graph_cache/'.$file)+$interval) < time()) && ($file != "..") && ($file != ".")) {
-	//		unlink(_MPDF_PATH.'graph_cache/'.$file);
-	//	}
-	//   }
-	//   closedir($handle);
-	//}
-	if ($handle = opendir(_MPDF_GRAPH_CHACHE_PATH)) {
-	   while (false !== ($file = readdir($handle))) {
-		if (((filemtime(_MPDF_GRAPH_CHACHE_PATH.$file)+$interval) < time()) && ($file != "..") && ($file != ".")) {
-			unlink(_MPDF_GRAPH_CHACHE_PATH.$file);
-		}
-	   }
-	   closedir($handle);
-	}
-	//
-//==============================================================================================================
-// LOAD GRAPHS
-
-	include_once(_JPGRAPH_PATH.'jpgraph.php');
-	include_once(_JPGRAPH_PATH.'jpgraph_line.php' );
-	include_once(_JPGRAPH_PATH.'jpgraph_log.php' );
-	include_once(_JPGRAPH_PATH.'jpgraph_scatter.php' );
-	include_once(_JPGRAPH_PATH.'jpgraph_regstat.php' );
-	include_once(_JPGRAPH_PATH.'jpgraph_pie.php');
-	include_once(_JPGRAPH_PATH.'jpgraph_pie3d.php');
-	include_once(_JPGRAPH_PATH.'jpgraph_bar.php');
-	include_once(_JPGRAPH_PATH.'jpgraph_radar.php');
-
-
-//======================================================================================================
-//*****************************************************************************************************
-//*****************************************************************************************************
-//*****************************************************************************************************
-//*****************************************************************************************************
-//*****************************************************************************************************
-//*****************************************************************************************************
-//======================================================================================================
-//======================================================================================================
-
-//======================================================================================================
-//======================================================================================================
-
-//======================================================================================================
-function print_graph($g,$pgwidth) {
-	$splines = false;
-	$bandw = false;
-	$percent = false;
-	$show_percent = false;
-	$stacked = false;
-	$h = false;
-	$show_values = false;
-	$hide_grid = false;
-	$hide_y_axis = false;
-
-	if (isset($g['attr']['TYPE']) && $g['attr']['TYPE']) { $type = strtolower($g['attr']['TYPE']); }
-	if (!in_array($type,array('bar','horiz_bar','line','radar','pie','pie3d','xy','scatter'))) { $type = 'bar'; } // Default=bar
-
-	if (isset($g['attr']['STACKED']) && $g['attr']['STACKED']) { $stacked = true; }	// stacked for bar or horiz_bar
-	if (isset($g['attr']['SPLINES']) && $g['attr']['SPLINES'] && $type=='xy') { $splines = true; }	// splines for XY line graphs
-	if (isset($g['attr']['BANDW']) && $g['attr']['BANDW']) { $bandw = true; }	// black and white
-	if (isset($g['attr']['LEGEND-OVERLAP']) && $g['attr']['LEGEND-OVERLAP']) { $overlap = true; } // avoid overlap of Legends over graph (line, bar, horiz_bar only)
-	if (isset($g['attr']['PERCENT']) && $g['attr']['PERCENT'] && $type != 'xy' && $type != 'scatter') { $percent = true; }	// Show data series as percent of total in series
-	if (isset($g['attr']['SHOW-VALUES']) && $g['attr']['SHOW-VALUES']) { $show_values = true; }	// Show the individual data values
-	if (isset($g['attr']['HIDE-GRID']) && $g['attr']['HIDE-GRID']) { $hide_grid = true; }	// Hide the y-axis gridlines
-	if (isset($g['attr']['HIDE-Y-AXIS']) && $g['attr']['HIDE-Y-AXIS']) { $hide_y_axis = true; }	// Hide the y-axis
-
-
-	// Antialias: If true - better quality curves, but graph line will only be 1px even in PDF 300dpi
-	// default=true for most except line and radar
-	if (isset($g['attr']['ANTIALIAS']) && ($g['attr']['ANTIALIAS']=='' || $g['attr']['ANTIALIAS']==0)) { $antialias = false; }
-	else if (isset($g['attr']['ANTIALIAS']) && $g['attr']['ANTIALIAS'] > 0) { $antialias = true; }
-	else if ($type=='line' || $type=='radar') { $antialias = false; }
-	else { $antialias = true; }
-
-	if ($g['attr']['DPI']) { $dpi = intval($g['attr']['DPI']); }
-	if (!$dpi || $dpi < 50 || $dpi > 2400) { $dpi = 150; } 	// Default dpi 150
-	$k = (0.2645/25.4 * $dpi);
-
-	$img_type = 'png'; 	// Can use jpeg or gif (gif is very slow)
-
-	if (isset($g['attr']['TITLE']) && $g['attr']['TITLE']) { $title = $g['attr']['TITLE']; }
-
-	if (isset($g['attr']['LABEL-X']) && $g['attr']['LABEL-X']) { $xlabel = $g['attr']['LABEL-X']; }		// NOT IMPLEMENTED??????
-	if (isset($g['attr']['LABEL-Y']) && $g['attr']['LABEL-Y']) { $ylabel = $g['attr']['LABEL-Y']; }
-
-	if (isset($g['attr']['AXIS-X']) && $g['attr']['AXIS-X']) { $xaxis = strtolower($g['attr']['AXIS-X']); }
-	if (!in_array($xaxis,array('text','lin','linear','log'))) { $xaxis = 'text'; }	// Default=text
-	if ($xaxis == 'linear') { $xaxis = 'lin'; }
-
-	if (isset($g['attr']['AXIS-Y']) && $g['attr']['AXIS-Y']) { $yaxis = strtolower($g['attr']['AXIS-Y']); }
-	if (!in_array($yaxis,array('lin','linear','log','percent'))) { $yaxis = 'lin'; }			// Default=lin
-	if ($yaxis == 'percent') { $show_percent = true; $yaxis = 'lin'; }	// Show percent sign on scales
-	if ($yaxis == 'linear') { $yaxis = 'lin'; }
-
-	if ($splines) { $xaxis = 'lin'; }
-	$axes = $xaxis.$yaxis;	// e.g.textlin, textlog, loglog, loglin, linlog (XY)
-
-	// mPDF 4.0
-	if (isset($g['attr']['cWIDTH']) && $g['attr']['cWIDTH']) { $w=($g['attr']['cWIDTH'] / 0.2645); }	// pixels
-	if (isset($g['attr']['cHEIGHT']) && $g['attr']['cHEIGHT']) { $h=($g['attr']['cHEIGHT'] / 0.2645); }
-
-
-	if (isset($g['attr']['SERIES']) && strtolower($g['attr']['SERIES']) == 'rows') { $dataseries = 'rows'; }
-	else { $dataseries = 'cols'; }
-
-	// Defaults - define data
-	$rowbegin = 2;
-	$colbegin = 2;
-	if($type=='scatter' || $type=='xy') {
-		if ($dataseries == 'rows') { $rowbegin = 1; }
-		else { $colbegin = 1; }
-	}
-	$rowend = 0;
-	$colend = 0;
-
-	if (isset($g['attr']['DATA-ROW-BEGIN']) && ($g['attr']['DATA-ROW-BEGIN'] === '0' || $g['attr']['DATA-ROW-BEGIN'] > 0)) { $rowbegin = $g['attr']['DATA-ROW-BEGIN']; }
-
-	if (isset($g['attr']['DATA-COL-BEGIN']) && ($g['attr']['DATA-COL-BEGIN'] === '0' || $g['attr']['DATA-COL-BEGIN'] > 0)) { $colbegin = $g['attr']['DATA-COL-BEGIN']; }
-
-	if (isset($g['attr']['DATA-ROW-END']) && ($g['attr']['DATA-ROW-END'] === '0' || $g['attr']['DATA-ROW-END'] <> 0)) { $rowend = $g['attr']['DATA-ROW-END']; }
-	if (isset($g['attr']['DATA-COL-END']) && ($g['attr']['DATA-COL-END'] === '0' || $g['attr']['DATA-COL-END'] <> 0)) { $colend = $g['attr']['DATA-COL-END']; }
-
-	$nr = count($g['data']);
-	$nc = 0;
-	foreach($g['data'] AS $r) {
-		$cc=0;
-		foreach($r AS $c) { $cc++; }
-		$nc = max($nc,$cc);
-	}
-	if ($colend == 0) { $colend = $nc; }
-	else if ($colend < 0) { $colend = $nc+$colend; }
-
-	if ($rowend == 0) { $rowend = $nr; }
-	else if ($rowend < 0) { $rowend = $nr+$rowend; }
-
-	if ($colend < $colbegin) { $colend = $colbegin; }
-	if ($rowend < $rowbegin) { $rowend = $rowbegin; }
-
-//	if ($type == 'xy' || $type=='scatter') { $colstart=0; }
-
-	// Get Data + Totals
-	$data = array();
-	$totals = array();
-	for ($r=($rowbegin-1);$r<$rowend;$r++) {
-		for ($c=($colbegin-1);$c<$colend;$c++) {
-		    if (isset($g['data'][$r][$c])) { $g['data'][$r][$c] = floatval($g['data'][$r][$c] ); }
-		    else { $g['data'][$r][$c] = 0; }
-		    if ($dataseries=='rows') {
-			$data[($r+1-$rowbegin)][($c+1-$colbegin)] = $g['data'][$r][$c] ;
-			$totals[($r+1-$rowbegin)] += $g['data'][$r][$c] ;
-		    }
-		    else {
-			$data[($c+1-$colbegin)][($r+1-$rowbegin)] = $g['data'][$r][$c] ;
-			if (isset($totals[($c+1-$colbegin)])) { $totals[($c+1-$colbegin)] += $g['data'][$r][$c] ; }
-			else { $totals[($c+1-$colbegin)] = $g['data'][$r][$c] ; }
-		    }
-		}
-	}
-	// PERCENT
-	if ($percent && $type != 'pie' && $type != 'pie3d') {
-		for ($r=0;$r1) {
-			for ($r=($rowbegin-1);$r<$rowend;$r++) {
-				$legends[($r+1-$rowbegin)] = $g['data'][$r][0] ;
-				$longestlegend = max($longestlegend, strlen( $g['data'][$r][0] ));
-			}
-		}
-		if ($rowbegin>1) {
-			for ($c=($colbegin-1);$c<$colend;$c++) {
-				$labels[($c+1-$colbegin)] = $g['data'][0][$c] ;
-				$longestlabel = max($longestlabel , strlen( $g['data'][0][$c] ));
-			}
-		}
-	}
-	else if ($dataseries=='rows') {
-		if ($colbegin>1) {
-			for ($r=($rowbegin-1);$r<$rowend;$r++) {
-				$labels[($r+1-$rowbegin)] = $g['data'][$r][0] ;
-				$longestlabel = max($longestlabel , strlen( $g['data'][$r][0] ));
-			}
-		}
-		if ($rowbegin>1) {
-			for ($c=($colbegin-1);$c<$colend;$c++) {
-				$legends[($c+1-$colbegin)] = $g['data'][0][$c] ;
-				$longestlegend = max($longestlegend, strlen( $g['data'][0][$c] ));
-			}
-		}
-	}
-   // Default sizes
-   $defsize = array();
-   $defsize['pie'] = array('w' => 600, 'h' => 300);
-   $defsize['pie3d'] = array('w' => 600, 'h' => 300);
-   $defsize['radar'] = array('w' => 600, 'h' => 300);
-   $defsize['line'] = array('w' => 600, 'h' => 400);
-   $defsize['xy'] = array('w' => 600, 'h' => 400);
-   $defsize['scatter'] = array('w' => 600, 'h' => 400);
-   $defsize['bar'] = array('w' => 600, 'h' => 400);
-   $defsize['horiz_bar'] = array('w' => 600, 'h' => 500);
-
-
-   // Use default ratios
-   if ($w && !$h) { $h = $w*$defsize[$type]['h']/$defsize[$type]['w']; }
-   if ($h && !$w) { $w = $h*$defsize[$type]['w']/$defsize[$type]['h']; }
-   if (!$h && !$w) { $w = $defsize[$type]['w']; $h = $defsize[$type]['h']; }
-
-
-   if (count($data)>0 && $type) {
-   	// Modified by Ivan Tcholakov, 28-JAN-2010.
-	//$figure_file = "graph_cache/".rand(11111,999999999).".".$img_type;
-	$figure_file = _MPDF_GRAPH_CHACHE_PATH.rand(11111,999999999).".".$img_type;
-	//
-	if ($bandw) { $colours = array('snow1','black','snow4','snow3','snow2','cadetblue4','cadetblue3','cadetblue1','bisque4','bisque2','beige'); }
-	else { $colours = array('cyan','darkorchid4','cadetblue3','khaki1','darkolivegreen2','cadetblue4','coral','cyan4','rosybrown3','wheat1'); }
-	$fills = array('navy','orange','red','yellow','purple','navy','orange','red','yellow','purple');
-	$patterns = array(PATTERN_DIAG1,PATTERN_CROSS1,PATTERN_STRIPE1,PATTERN_DIAG3,PATTERN_CROSS2,PATTERN_DIAG2,PATTERN_DIAG4,PATTERN_CROSS3, PATTERN_CROSS4,PATTERN_STRIPE1);
-	$markers = array(MARK_DIAMOND, MARK_SQUARE, MARK_CIRCLE, MARK_UTRIANGLE, MARK_DTRIANGLE, MARK_FILLEDCIRCLE, MARK_CROSS, MARK_STAR, MARK_X);
-
-	// LEGENDS
-	if ($type == 'pie' || $type == 'pie3d') {
-		$graph = new PieGraph (($w*$k),($h*$k));
-	}
-	else if ($type == 'radar') {
-		$graph = new RadarGraph(($w*$k),($h*$k));
-	}
-	else {
-		$graph = new Graph(($w*$k),($h*$k));
-	}
-
-	$graph->SetUserFont(_TTF_FONT_NORMAL,_TTF_FONT_BOLD,_TTF_FONT_ITALIC,_TTF_FONT_BOLDITALIC);
-
-	$graph->img->SetImgFormat($img_type) ;
-	if (strtoupper($img_type)=='JPEG') { $graph->img->SetQuality(90); }
-	if ($antialias) { $graph->img->SetAntiAliasing(); }
-	$graph->SetShadow(true, 2*$k);
-	$graph->SetMarginColor("white");
-	// TITLE
-	$graph->title->Set($title);
-	$graph->title->SetMargin(10*$k);
-	$graph->title->SetFont(FF_USERFONT,FS_BOLD,11*$k);
-	$graph->title->SetColor("black");
-	$graph->legend->SetLineSpacing(3*$k);
-	$graph->legend->SetMarkAbsSize(6*$k);
-	$graph->legend->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-
-	// Set GRAPH IMAGE MARGINS
-	if ($type == 'pie' || $type == 'pie3d') {
-		$psize = 0.3;
-		$pposxabs = ($w/2);
-		$pposy = 0.55;
-		if ($longestlegend) {	// if legend showing
-			$pposxabs -= ((($longestlegend * 5) + 20) / 2);
-		}
-		$pposx = ($pposxabs / $w);
-		$graph->legend->Pos(0.02,0.5,'right','center');
-	}
-	else if ($type == 'radar') {
-		$psize = 0.5;
-		$pposxabs = ($w/2);
-		$pposy = 0.55;
-		if ($longestlabel) {	// if legend showing
-			$pposxabs -= ((($longestlabel * 5) + 20) / 2);
-		}
-		$pposx = ($pposxabs / $w);
-		$graph->legend->Pos(0.02,0.5,'right','center');
-	}
-	else if ($type == 'xy' || $type == 'scatter') {
-		$pml = 50;
-		$pmr = 20;
-		$pmt = 60;
-		$pmb = 50;
-		$xaxislblmargin = $pmb - 30;
-		$yaxislblmargin = $pml - 15;
-		$graph->legend->Pos(0.02,0.1,'right','top');
-	}
-	else if ($type == 'line' || $type == 'bar') {
-		$pml = 50;
-		$pmr = 20;
-		$pmt = 60;
-		$pmb = 50;
-		$xlangle = 0;
-		$ll = ($longestlegend * 5);	// 45 degrees 8pt fontsize
-		if ($ll > 5 || ($ll>3 && count($data)>10)) {
-			$pmb = max($pmb, $ll + 30);
-			$xlangle = 50;
-		}
-		$xaxislblmargin = $pmb - 30;
-		$yaxislblmargin = $pml - 15;
-		if ($longestlabel && !$overlap) {	// if legend showing
-			$pmr = ((($longestlabel * 5) + 40));
-		}
-		$graph->legend->Pos(0.02,0.1,'right','top');
-	}
-	else if ($type == 'horiz_bar') {
-		$pml = 50;
-		$pmr = 20;
-		$pmt = 50;
-		$pmb = 45;
-		$ll = ($longestlegend * 6.5);	// 8pt fontsize
-		$pml = max($pml, $ll + 20);
-		$xaxislblmargin = $pml - 20;
-		$yaxislblmargin = $pmb - 15;
-		if ($longestlabel && !$overlap) {	// if legend showing
-			$pmr = ((($longestlabel * 5) + 40));
-		}
-		$graph->legend->Pos(0.02,0.1,'right','top');
-	}
-
-
-	// DRAW THE GRAPHS
-	if ($type == 'pie') {
-			$p1 = new PiePlot($data[0]);
-			$p1->SetSliceColors($colours);
-
-			if ($show_values) {
-				$p1->value->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				if ($percent) { $p1->SetLabelType(PIE_VALUE_PERADJ); }   //PIE_VAL_PER = default
-				else { $p1->SetLabelType(PIE_VALUE_ABS); }
-				if ($percent || $show_percent) { $p1->value->SetFormat("%d%%"); }
-				else { $p1->value->SetFormat("%s"); }
-				// Enable and set policy for guide-lines. Make labels line up vertically
-				$p1->SetGuideLines(true);
-				$p1->SetGuideLinesAdjust(1.5);
-			}
-			else { $p1->value->Show(false); }
-			$p1->SetLegends($legends);
-			$p1->SetSize($psize);
-			$p1->SetCenter($pposx, $pposy);
-			if ($labels[0]) {
-				$graph->subtitle->Set($labels[0]);
-				$graph->subtitle->SetMargin(10*$k);
-				$graph->subtitle->SetFont(FF_USERFONT,FS_BOLD,11*$k);
-				$graph->subtitle->SetColor("black");
-			}
-			$graph->Add($p1);
-	}
-	else if ($type == 'pie3d') {
-			$p1 = new PiePlot3d($data[0]);
-			$p1->SetSliceColors($colours);
-			if ($show_values) {
-				$p1->value->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				if ($percent) { $p1->SetLabelType(PIE_VALUE_PERADJ); }   //PIE_VAL_PER = default
-				else { $p1->SetLabelType(PIE_VALUE_ABS); }
-				if ($percent || $show_percent) { $p1->value->SetFormat("%d%%"); }
-				else { $p1->value->SetFormat("%s"); }
-			}
-			else { $p1->value->Show(false); }
-			$p1->SetLegends($legends);
-			$p1->SetEdge();
-			$p1->SetSize($psize);
-			$p1->SetCenter($pposx, $pposy);
-
-			if ($labels[0]) {
-				$graph->subtitle->Set($labels[0]);
-				$graph->subtitle->SetMargin(10*$k);
-				$graph->subtitle->SetFont(FF_USERFONT,FS_BOLD,11*$k);
-				$graph->subtitle->SetColor("black");
-			}
-
-			$graph->Add( $p1);
-	}
-	// RADAR
-	else if ($type == 'radar') {
-			$graph->SetSize($psize);
-			$graph->SetPos($pposx, $pposy);
-
-			$graph->SetTitles( $legends);	// labels each axis
-
-			$graph->axis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-			$graph->axis->title->SetMargin(5*$k);
-			$graph->axis->SetWeight(1*$k);
-			$graph->axis->HideLabels();
-			$graph->axis->SetFont(FF_USERFONT,FS_NORMAL,6*$k);
-			$graph->HideTickMarks();
-
-			$group = array();
-			foreach($data AS $series => $dat) {
-				$rdata = array();
-				foreach($data[$series] AS $row) { $rdata[] = $row;  }
-				if (count($rdata)<3) { die("ERROR::Graph::Cannot create a Radar Plot with less than 3 data points."); }
-				// Create the radar plot
-				$bplot = new RadarPlot($rdata);
-				$bplot->mark->SetType($markers[$series]);
-				$bplot->mark->SetFillColor($colours[$series]);
-				$bplot->mark->SetWidth(3*$k);
-				$bplot->SetColor($colours[$series]);
-				if ($series == 0) { $bplot->SetFillColor('lightred'); }
-				else { $bplot->SetFill(false); }
-				$bplot->SetLineWeight(1*$k);
-				$bplot->SetLegend($labels[$series]);
-				if ($bandw) { $bplot->SetShadow("gray5"); }
-				$graph->Add($bplot);
-			}
-	}
-	// LINE
-	else if ($type == 'line') {
-			// Setup the graph.
-			$graph->img->SetMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k);	// LRTB
-			$graph->SetScale($axes);
-			$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-
-			if ($ylabel) {
-				$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->yaxis->SetTitle($ylabel,'middle');
-				$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
-			}
-
-			$graph->yaxis->SetLabelMargin(4*$k);
-			if ($percent || $show_percent) { $graph->yaxis->SetLabelFormat('%d%%'); }	// Percent
-
-			// Show 0 label on Y-axis (default is not to show)
-			$graph->yscale->ticks->SupressZeroLabel(true);
-			if ($hide_y_axis) { $graph->yaxis->Hide(); }
-			if ($hide_grid) { $graph->ygrid->Show(false); }
-
-			// Setup X-axis labels
-			$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-			$graph->xaxis->SetTickLabels($legends);
-			$graph->xaxis->SetLabelAngle($xlangle);
-			$graph->xaxis->SetLabelMargin(4*$k);
-			// X-axis title
-			if ($xlabel) {
-				$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->xaxis->SetTitle($xlabel,'middle');
-				$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
-			}
-			foreach($data AS $series => $rdata) {
-				$bplot = new LinePlot($rdata);
-				$bplot->mark->SetType($markers[$series]);
-				$bplot->mark->SetFillColor($colours[$series]);
-				$bplot->mark->SetWidth(4*$k);
-				if ($show_values) {
-					$bplot->value-> Show();	// Not if scatter
-					$bplot->value->SetMargin(6*$k);
-					$bplot->value->SetColor("darkred");
-					$bplot->value->SetFont( FF_USERFONT, FS_NORMAL, 8*$k);
-					if ($percent || $show_percent) { $bplot->value->SetFormat( '%d%%'); }
-					else { $bplot->value->SetFormat("%s"); }
-				}
-				// Set color for each line
-				$bplot->SetColor($colours[$series]);
-				$bplot->SetWeight(2*$k);
-				$bplot->SetLegend($labels[$series]);
-				if ($bandw) { $bplot->SetShadow("gray5"); }
-				// Indent the X-scale so the first and last point doesn't fall on the edges
-				$bplot->SetCenter();
-				$graph->Add($bplot);
-			}
-
-	}
-	// XY or SCATTER
-	else if ($type == 'xy' || $type == 'scatter') {
-			// Setup the graph.
-			$graph->img->SetMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k);	// LRTB
-			$graph->SetScale($axes);
-			// Setup font for axis
-			$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-			// Y-axis title
-			if ($labels[1]) {
-				$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
-				$graph->yaxis->SetTitle($labels[1],'middle');
-			}
-
-
-			$graph->yaxis->SetLabelMargin(4*$k);
-			if ($percent || $show_percent) { $graph->yaxis->SetLabelFormat('%d%%'); }	// Percent
-
-			// Show 0 label on Y-axis (default is not to show)
-			$graph->yscale->ticks->SupressZeroLabel(true);
-			// Just let the maximum be autoscaled
-			$graph->yaxis->scale->SetAutoMin(0);
-			if ($hide_y_axis) { $graph->yaxis->Hide(); }
-			if ($hide_grid) { $graph->ygrid->Show(false); }
-
-			// Setup X-axis labels
-			$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-// mPDF 2.5 Corrects labelling of x-axis
-//			$graph->xaxis->SetTickLabels($legends);
-			$graph->xaxis->SetLabelAngle(50);
-			$graph->xaxis->SetLabelMargin(4*$k);
-			// X-axis title
-			if ($labels[0]) {
-				$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
-				$graph->xaxis->SetTitle($labels[0],'middle');
-			}
-
-			// Create the bar plot
-			// SPLINES
-			if ($splines && $type=='xy') {
-				$spline = new Spline($data[0],$data[1]);
-				list($newx,$newy) = $spline->Get(100);
-			}
-			else {
-				$newx = $data[0];
-				$newy = $data[1];
-			}
-
-			if ($type=='xy') {
-				// LINE PLOT
-				$bplot = new LinePlot($newy, $newx);
-				// Set color for each line
-				$bplot->SetColor($fills[0]);
-				$bplot->SetWeight(4*$k);
-				if ($bandw) { $bplot->SetShadow("gray5"); }
-				$graph->Add($bplot);
-			}
-
-			// SCATTER PLOT
-			$cplot = new ScatterPlot($data[1], $data[0]);
-
-			$cplot->mark->SetType($markers[0]);
-			$cplot->mark->SetFillColor($fills[0]);
-			$cplot->mark->SetWidth(8*$k);
-			if ($show_values) {
-// mPDF 2.5
-				if ($type=='xy') { $cplot->value->Show(); }	// Not if scatter
-				$cplot->value->SetMargin(8*$k);
-				$cplot->value->SetColor("darkred");
-				$cplot->value->SetFont( FF_USERFONT, FS_NORMAL, 6*$k);
-
-				if ($percent || $show_percent) { $cplot->value->SetFormat( '%d%%'); }
-				else { $cplot->value->SetFormat("%s"); }
-			}
-
-			// Set color for each line
-			$cplot->SetColor($fills[0]);
-			$cplot->SetWeight(4*$k);
-			if ($bandw) { $cplot->SetShadow("gray5"); }
-			$graph->Add($cplot);
-
-	}
-	// BAR
-	else if ($type == 'bar') {
-			// Setup the graph.
-			$graph->img->SetMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k);	// LRTB
-			$graph->SetScale($axes);
-			// Setup y-axis
-			$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-			if ($hide_y_axis) { $graph->yaxis->Hide(); }
-			if ($hide_grid) { $graph->ygrid->Show(false); }
-			$graph->yaxis->SetLabelMargin(4*$k);
-			if ($ylabel) {
-				$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->yaxis->SetTitle($ylabel,'middle');
-				$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
-			}
-			// Show 0 label on Y-axis (default is not to show)
-			$graph->yscale->ticks->SupressZeroLabel(false);
-			// Setup X-axis labels
-			$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-			$graph->xaxis->SetTickLabels($legends);
-			$graph->xaxis->SetLabelAngle($xlangle);
-			$graph->xaxis->SetLabelMargin(4*$k);
-			// X-axis title
-			if ($xlabel) {
-				$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->xaxis->SetTitle($xlabel,'middle');
-				$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
-			}
-
-			$group = array();
-			foreach($data AS $series => $dat) {
-				$rdata = array();
-				foreach($data[$series] AS $row) { $rdata[] = $row;  }
-
-				// Create the bar plot
-				$bplot = new BarPlot($rdata);
-				$bplot->SetWidth(0.6);	// for SINGLE??
-				// Setup color for gradient fill style
-				if ($bandw) { $bplot->SetPattern( $patterns[$series]); }
-				else { $bplot->SetFillGradient($fills[$series],"#EEEEEE",GRAD_LEFT_REFLECTION); }
-
-				// Set color for the frame of each bar
-				$bplot->SetColor("darkgray");
-				$bplot->SetLegend($labels[$series]);
-				if ($bandw) { $bplot->SetShadow("gray5"); }
-				if ($show_values) {
-					$bplot->value->Show();
-					$bplot->value->SetMargin(6*$k);
-					$bplot->value->SetColor("darkred");
-					$bplot->value->SetFont( FF_USERFONT, FS_NORMAL, 8*$k);
-					if ($percent || $show_percent) { $bplot->value->SetFormat( '%d%%'); }
-					else { $bplot->value->SetFormat("%s"); }
-				}
-
-				$group[] = $bplot;
-			}
-			if (count($data)==1) {
-				$graph->Add($group[0]);
-			}
-			else {
-				// Create the grouped bar plot
-				if ($stacked) {
-					$gbplot = new AccBarPlot ($group);
-				}
-				else {
-					$gbplot = new GroupBarPlot ($group);
-				}
-				$graph->Add($gbplot);
-			}
-	}
-	else if ($type == 'horiz_bar') {
-			$graph->SetScale($axes);
-			$graph->Set90AndMargin($pml*$k,$pmr*$k,$pmt*$k,$pmb*$k);	// LRTB
-
-			// Setup y-axis
-			$graph->yaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-			$graph->yaxis->SetLabelMargin(4*$k);
-
-			$graph->yaxis->SetPos('max');	// Intersect at top of x-axis i.e. y axis is at bottom
-			// First make the labels look right
-			$graph->yaxis->SetLabelAlign('center','top');
-			if ($percent || $show_percent) { $graph->yaxis->SetLabelFormat('%d%%'); }
-			$graph->yaxis->SetLabelSide(SIDE_RIGHT);
-			$graph->yaxis->scale->SetGrace(10); 	// sets 10% headroom
-			if ($hide_y_axis) { $graph->yaxis->Hide(); }
-			if ($hide_grid) { $graph->ygrid->Show(false); }
-
-			// The fix the tick marks
-			$graph->yaxis->SetTickSide(SIDE_LEFT);
-			if ($ylabel) {
-				$graph->yaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->yaxis->SetTitle($ylabel,'middle');
-				$graph->yaxis->SetTitleMargin($yaxislblmargin*$k);
-				// Finally setup the title
-				$graph->yaxis->SetTitleSide(SIDE_RIGHT);
-				// To align the title to the right use :
-				$graph->yaxis->title->Align('right');
-				$graph->yaxis->title->SetAngle(0);
-
-			}
-
-			// Show 0 label on Y-axis (default is not to show)
-			$graph->yscale->ticks->SupressZeroLabel(false);
-			// Setup X-axis labels
-			$graph->xaxis->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-			$graph->xaxis->title->SetAngle(90);
-			$graph->xaxis->SetTickLabels($legends);
-			$graph->xaxis->SetLabelMargin(4*$k);
-			// X-axis title
-			if ($xlabel) {
-				$graph->xaxis->title->SetFont(FF_USERFONT,FS_NORMAL,8*$k);
-				$graph->xaxis->SetTitleMargin($xaxislblmargin*$k);
-				$graph->xaxis->SetTitle($xlabel,'middle');
-			}
-			$group = array();
-			foreach($data AS $series => $dat) {
-				$rdata = array();
-				foreach($data[$series] AS $row) { $rdata[] = $row;  }
-				// Create the bar pot
-				$bplot = new BarPlot($rdata);
-				$bplot->SetWidth(0.6);	// for SINGLE??
-				// Setup color for gradient fill style
-				if ($bandw) { $bplot->SetPattern( $patterns[$series]); }
-				else { $bplot->SetFillGradient($fills[$series],"#EEEEEE",GRAD_LEFT_REFLECTION); }
-
-				// Set color for the frame of each bar
-				$bplot->SetColor("darkgray");
-				$bplot->SetLegend($labels[$series]);
-				if ($bandw) { $bplot->SetShadow("gray5"); }
-				if ($show_values) {
-					$bplot->value-> Show();
-					$bplot->value->SetMargin(6*$k);
-					$bplot->value->SetColor("darkred");
-					$bplot->value->SetFont( FF_USERFONT, FS_NORMAL, 8*$k);
-					if ($percent || $show_percent) { $bplot->value->SetFormat( '%d%%'); }
-					else { $bplot->value->SetFormat("%s"); }
-				}
-
-				$group[] = $bplot;
-			}
-			if (count($data)==1) {
-				$graph->Add($group[0]);
-			}
-			else {
-				// Create the grouped bar plot
-				if ($stacked) {
-					$gbplot = new AccBarPlot ($group);
-				}
-				else {
-					$gbplot = new GroupBarPlot ($group);
-				}
-				$graph->Add($gbplot);
-			}
-	}
-	// Modified by Ivan Tcholakov, 28-JAN-2010.
-	//if ($graph) {
-	//	$graph->Stroke( _MPDF_PATH.$figure_file);
-	//	$srcpath = str_replace("\\","/",dirname(__FILE__)) . "/";
-	//	$srcpath .= $figure_file;
-	//	return array('file'=>$srcpath, 'w'=>$w, 'h'=>$h);
-	//}
-	if ($graph) {
-		$graph->Stroke($figure_file);
-		$srcpath = $figure_file;
-		return array('file'=>$srcpath, 'w'=>$w, 'h'=>$h);
-	}
-	//
-   }
-   return false;
-}
-//======================================================================================================
-//======================================================================================================
-//======================================================================================================
-//======================================================================================================
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/iccprofiles/index.html b/main/inc/lib/mpdf/iccprofiles/index.html
deleted file mode 100755
index aa7b9c934b..0000000000
--- a/main/inc/lib/mpdf/iccprofiles/index.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/iccprofiles/sRGB_IEC61966-2-1.icc b/main/inc/lib/mpdf/iccprofiles/sRGB_IEC61966-2-1.icc
deleted file mode 100755
index d0ef5738a8..0000000000
Binary files a/main/inc/lib/mpdf/iccprofiles/sRGB_IEC61966-2-1.icc and /dev/null differ
diff --git a/main/inc/lib/mpdf/includes/CJKdata.php b/main/inc/lib/mpdf/includes/CJKdata.php
deleted file mode 100755
index 15f34d31c6..0000000000
--- a/main/inc/lib/mpdf/includes/CJKdata.php
+++ /dev/null
@@ -1,101 +0,0 @@
- 250, 33 => 250, 34 => 408, 35 => 668, 36 => 490, 37 => 875, 38 => 698, 39 => 250, 40 => 240, 41 => 240,
-	42 => 417, 43 => 667, 44 => 250, 45 => 313, 46 => 250, 47 => 520, 48 => 500, 49 => 500, 50 => 500, 51 => 500,
-	52 => 500, 53 => 500, 54 => 500, 55 => 500, 56 => 500, 57 => 500, 58 => 250, 59 => 250, 60 => 667, 61 => 667,
-	62 => 667, 63 => 396, 64 => 921, 65 => 677, 66 => 615, 67 => 719, 68 => 760, 69 => 625, 70 => 552, 71 => 771,
-	72 => 802, 73 => 354, 74 => 354, 75 => 781, 76 => 604, 77 => 927, 78 => 750, 79 => 823, 80 => 563, 81 => 823,
-	82 => 729, 83 => 542, 84 => 698, 85 => 771, 86 => 729, 87 => 948, 88 => 771, 89 => 677, 90 => 635, 91 => 344,
-	92 => 520, 93 => 344, 94 => 469, 95 => 500, 96 => 250, 97 => 469, 98 => 521, 99 => 427, 100 => 521, 101 => 438,
-	102 => 271, 103 => 469, 104 => 531, 105 => 250, 106 => 250, 107 => 458, 108 => 240, 109 => 802, 110 => 531, 111 => 500,
-	112 => 521, 113 => 521, 114 => 365, 115 => 333, 116 => 292, 117 => 521, 118 => 458, 119 => 677, 120 => 479, 121 => 458,
-	122 => 427, 123 => 480, 124 => 496, 125 => 480, 126 => 667,
-	17601 => 500,
-);
-$this->Big5_widths=$cw;
-
-
-// GB
-$cw = array(
-	32 => 207, 33 => 270, 34 => 342, 35 => 467, 36 => 462, 37 => 797, 38 => 710, 39 => 239, 40 => 374, 41 => 374,
-	42 => 423, 43 => 605, 44 => 238, 45 => 375, 46 => 238, 47 => 334, 48 => 462, 49 => 462, 50 => 462, 51 => 462,
-	52 => 462, 53 => 462, 54 => 462, 55 => 462, 56 => 462, 57 => 462, 58 => 238, 59 => 238, 60 => 605, 61 => 605,
-	62 => 605, 63 => 344, 64 => 748, 65 => 684, 66 => 560, 67 => 695, 68 => 739, 69 => 563, 70 => 511, 71 => 729,
-	72 => 793, 73 => 318, 74 => 312, 75 => 666, 76 => 526, 77 => 896, 78 => 758, 79 => 772, 80 => 544, 81 => 772,
-	82 => 628, 83 => 465, 84 => 607, 85 => 753, 86 => 711, 87 => 972, 88 => 647, 89 => 620, 90 => 607, 91 => 374,
-	92 => 333, 93 => 374, 94 => 606, 95 => 500, 96 => 239, 97 => 417, 98 => 503, 99 => 427, 100 => 529, 101 => 415,
-	102 => 264, 103 => 444, 104 => 518, 105 => 241, 106 => 230, 107 => 495, 108 => 228, 109 => 793, 110 => 527, 111 => 524,
-	112 => 524, 113 => 504, 114 => 338, 115 => 336, 116 => 277, 117 => 517, 118 => 450, 119 => 652, 120 => 466, 121 => 452,
-	122 => 407, 123 => 370, 124 => 258, 125 => 370, 126 => 605,
-);
-$this->GB_widths=$cw;
-
-// Japanese
-$cw = array(
-	32 => 278, 33 => 299, 34 => 353, 35 => 614, 36 => 614, 37 => 721, 38 => 735, 39 => 216, 40 => 323, 41 => 323,
-	42 => 449, 43 => 529, 44 => 219, 45 => 306, 46 => 219, 47 => 453, 48 => 614, 49 => 614, 50 => 614, 51 => 614,
-	52 => 614, 53 => 614, 54 => 614, 55 => 614, 56 => 614, 57 => 614, 58 => 219, 59 => 219, 60 => 529, 61 => 529,
-	62 => 529, 63 => 486, 64 => 744, 65 => 646, 66 => 604, 67 => 617, 68 => 681, 69 => 567, 70 => 537, 71 => 647,
-	72 => 738, 73 => 320, 74 => 433, 75 => 637, 76 => 566, 77 => 904, 78 => 710, 79 => 716, 80 => 605, 81 => 716,
-	82 => 623, 83 => 517, 84 => 601, 85 => 690, 86 => 668, 87 => 990, 88 => 681, 89 => 634, 90 => 578, 91 => 316,
-	92 => 614, 93 => 316, 94 => 529, 95 => 500, 96 => 387, 97 => 509, 98 => 566, 99 => 478, 100 => 565, 101 => 503,
-	102 => 337, 103 => 549, 104 => 580, 105 => 275, 106 => 266, 107 => 544, 108 => 276, 109 => 854, 110 => 579, 111 => 550,
-	112 => 578, 113 => 566, 114 => 410, 115 => 444, 116 => 340, 117 => 575, 118 => 512, 119 => 760, 120 => 503, 121 => 529,
-	122 => 453, 123 => 326, 124 => 380, 125 => 326, 126 => 387, 127 => 216, 128 => 453, 129 => 216, 130 => 380, 131 => 529,
-	132 => 299, 133 => 614, 134 => 614, 135 => 265, 136 => 614, 137 => 475, 138 => 614, 139 => 353, 140 => 451, 141 => 291,
-	142 => 291, 143 => 588, 144 => 589, 145 => 500, 146 => 476, 147 => 476, 148 => 219, 149 => 494, 150 => 452, 151 => 216,
-	152 => 353, 153 => 353, 154 => 451, 156 => 1075, 157 => 486, 158 => 387, 159 => 387, 160 => 387, 161 => 387,
-	162 => 387,	163 => 387, 164 => 387, 165 => 387, 166 => 387, 167 => 387, 168 => 387, 170 => 880, 171 => 448,
-	172 => 566, 173 => 716,	174 => 903, 175 => 460, 176 => 805, 177 => 275, 178 => 276, 179 => 550, 180 => 886, 181 => 582,
-	182 => 529, 183 => 738,	184 => 529, 185 => 738, 186 => 357, 187 => 529, 188 => 406, 189 => 406, 190 => 575, 191 => 406,
-	192 => 934, 193 => 934,	194 => 934, 195 => 646, 196 => 646, 197 => 646, 198 => 646, 199 => 646, 200 => 646, 201 => 617,
-	202 => 567, 203 => 567, 204 => 567, 205 => 567, 206 => 320, 207 => 320, 208 => 320, 209 => 320, 210 => 681, 211 => 710,
-	212 => 716, 213 => 716, 214 => 716, 215 => 716, 216 => 716, 217 => 529, 218 => 690, 219 => 690, 220 => 690, 221 => 690,
-	222 => 634, 223 => 605, 224 => 509, 225 => 509, 226 => 509, 227 => 509, 228 => 509, 229 => 509, 230 => 478, 231 => 503,
-	232 => 503, 233 => 503, 234 => 503, 235 => 275, 236 => 275, 237 => 275, 238 => 275, 239 => 550, 240 => 579, 241 => 550,
-	242 => 550, 243 => 550, 244 => 550, 245 => 550, 246 => 529, 247 => 575, 248 => 575, 249 => 575, 250 => 575, 251 => 529,
-	252 => 578, 253 => 529, 254 => 517, 255 => 634, 256 => 578, 257 => 445, 258 => 444, 259 => 842, 260 => 453, 261 => 614,
-);
-
-
-$_cr = array(
-	array(231, 632, 500), // half-width
-	array(8718, 8718, 500),
-	array(9738, 9757, 250), // quarter-width
-	array(9758, 9778, 333), // third-width
-	array(12063, 12087, 500),
-);
-foreach($_cr as $_r) {
-	for($i = $_r[0]; $i <= $_r[1]; $i++) {
-		$cw[$i+31] = $_r[2];
-	}
-}
-$this->SJIS_widths=$cw;
-
-// Korean
-$cw = array(
-	32 => 333, 33 => 416, 34 => 416, 35 => 833, 36 => 625, 37 => 916, 38 => 833, 39 => 250, 40 => 500, 41 => 500,
-	42 => 500, 43 => 833, 44 => 291, 45 => 450, 46 => 291, 47 => 375, 48 => 625, 49 => 625, 50 => 625, 51 => 625,
-	52 => 625, 53 => 625, 54 => 625, 55 => 625, 56 => 625, 57 => 625, 58 => 333, 59 => 333, 60 => 833, 61 => 833,
-	62 => 916, 63 => 500, 64 => 1000, 65 => 791, 66 => 708, 67 => 708, 68 => 750, 69 => 708, 70 => 666, 71 => 750,
-	72 => 791, 73 => 375, 74 => 500, 75 => 791, 76 => 666, 77 => 916, 78 => 791, 79 => 750, 80 => 666, 81 => 750,
-	82 => 708, 83 => 666, 84 => 791, 85 => 791, 86 => 750, 87 => 1000, 88 => 708, 89 => 708, 90 => 666, 91 => 500,
-	92 => 375, 93 => 500, 94 => 500, 95 => 500, 96 => 333, 97 => 541, 98 => 583, 99 => 541, 100 => 583, 101 => 583,
-	102 => 375, 103 => 583, 104 => 583, 105 => 291, 106 => 333, 107 => 583, 108 => 291, 109 => 875, 110 => 583, 111 => 583,
-	112 => 583, 113 => 583, 114 => 458, 115 => 541, 116 => 375, 117 => 583, 118 => 583, 119 => 833, 120 => 625, 121 => 625,
-	122 => 500, 123 => 583, 124 => 583, 125 => 583, 126 => 750,
-);
-$_cr = array(
-	array(8094, 8190, 500)
-);
-foreach($_cr as $_r) {
-	for($i = $_r[0]; $i <= $_r[1]; $i++) {
-		$cw[$i+31] = $_r[2];
-	}
-}
-$this->UHC_widths=$cw;
-
-?>
\ No newline at end of file
diff --git a/main/inc/lib/mpdf/includes/functions.php b/main/inc/lib/mpdf/includes/functions.php
deleted file mode 100755
index 6c63905805..0000000000
--- a/main/inc/lib/mpdf/includes/functions.php
+++ /dev/null
@@ -1,98 +0,0 @@
-
',$text); }
-	return ('
'.$text.'
'); -} - -if(!function_exists('strcode2utf')){ - function strcode2utf($str,$lo=true) { - //converts all the &#nnn; and &#xhhh; in a string to Unicode - if ($lo) { $lo = 1; } else { $lo = 0; } - $str = preg_replace('/\&\#([0-9]+)\;/me', "code2utf('\\1',{$lo})",$str); - $str = preg_replace('/\&\#x([0-9a-fA-F]+)\;/me', "codeHex2utf('\\1',{$lo})",$str); - return $str; - } -} - -if(!function_exists('code2utf')){ - function code2utf($num,$lo=true){ - //Returns the utf string corresponding to the unicode value - //added notes - http://uk.php.net/utf8_encode - // NB this code initially had 1024 (->2048) and 38000 (-> 65536) - if ($num<128) { - if ($lo) return chr($num); - else return '&#'.$num.';'; // i.e. no change - } - if ($num<2048) return chr(($num>>6)+192).chr(($num&63)+128); - if ($num<65536) return chr(($num>>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128); - // mPDF 3.0 - if ($num<2097152) return chr(($num>>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128) .chr(($num&63)+128); - return '?'; - } -} - -if(!function_exists('codeHex2utf')){ - function codeHex2utf($hex,$lo=true){ - $num = hexdec($hex); - if (($num<128) && !$lo) return '&#x'.$hex.';'; // i.e. no change - return code2utf($num,$lo); - } -} - - - - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/index.html b/main/inc/lib/mpdf/includes/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/includes/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/no_image.jpg b/main/inc/lib/mpdf/includes/no_image.jpg deleted file mode 100755 index a690485ec1..0000000000 Binary files a/main/inc/lib/mpdf/includes/no_image.jpg and /dev/null differ diff --git a/main/inc/lib/mpdf/includes/subs_big5.php b/main/inc/lib/mpdf/includes/subs_big5.php deleted file mode 100755 index 65842b1653..0000000000 --- a/main/inc/lib/mpdf/includes/subs_big5.php +++ /dev/null @@ -1,330 +0,0 @@ - '227', - 170 => '170', -171 => '171', - 172 => '216', - 173 => '173', -174 => '226', - 175 => '175', - 178 => '178', - 179 => '179', - 180 => '180', - 181 => '109', - 182 => '182', - 184 => '184', - 185 => '185', - 186 => '186', -187 => '187', -188 => '188', -189 => '189', -190 => '190', - 191 => '191', - 192 => '192', - 193 => '193', -194 => '194', -195 => '195', -196 => '196', -197 => '197', -198 => '198', -199 => '199', - 200 => '200', - 201 => '201', - 202 => '202', -203 => '203', -204 => '204', -205 => '205', -206 => '206', -207 => '207', -208 => '208', -209 => '209', - 210 => '210', - 211 => '211', -212 => '212', -213 => '213', -214 => '214', -216 => '216', -217 => '217', -218 => '218', -219 => '219', -220 => '220', -221 => '221', - 222 => '222', -223 => '223', - 224 => '224', - 225 => '225', -226 => '226', -227 => '227', -228 => '228', -229 => '229', -230 => '230', -231 => '231', - 232 => '232', - 233 => '233', - 234 => '234', -235 => '235', - 236 => '236', - 237 => '237', -238 => '238', -239 => '239', -240 => '240', -241 => '241', - 242 => '242', - 243 => '243', -244 => '244', -245 => '245', -246 => '246', - 248 => '248', - 249 => '249', - 250 => '250', -251 => '251', - 252 => '252', -253 => '253', -254 => '254', -255 => '255', - 338 => '140', - 339 => '156', -352 => '138', -353 => '154', -376 => '159', - 381 => '142', - 382 => '158', -402 => '166', - 710 => '136', -732 => '152', -962 => '86', -977 => '74', -978 => '161', -981 => '106', -982 => '118', -8218 => '130', -8222 => '132', -8224 => '134', -8225 => '135', -8240 => '137', -8243 => '178', -8249 => '139', -8250 => '155', -8260 => '164', - 8364 => '128', -8465 => '193', -8472 => '195', -8476 => '194', -8482 => '228', - 8486 => '87', -8501 => '192', -8596 => '171', -8597 => '215', -8629 => '191', -8656 => '220', -8657 => '221', -8658 => '222', -8659 => '223', -8660 => '219', -8704 => '34', -8706 => '182', -8707 => '36', -8709 => '198', - 8710 => '68', -8711 => '209', -8712 => '206', -8713 => '207', -8715 => '39', - 8719 => '213', - 8721 => '229', -8722 => '45', - 8725 => '164', -8727 => '42', -8733 => '181', -8743 => '217', -8744 => '218', -8773 => '64', -8776 => '187', -8804 => '163', -8805 => '179', -8834 => '204', -8835 => '201', -8836 => '203', -8838 => '205', -8839 => '202', - 8853 => '197', -8855 => '196', -8901 => '215', -8992 => '243', -8993 => '245', -9001 => '225', -9002 => '241', -9674 => '224', -9687 => '119', -9742 => '37', -9755 => '42', -9758 => '43', -9824 => '170', -9827 => '167', -9829 => '169', -9830 => '168', -9985 => '33', -9986 => '34', -9987 => '35', -9988 => '36', - -9990 => '38', -9991 => '39', -9992 => '40', -9993 => '41', -9996 => '44', -9997 => '45', -9998 => '46', -9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_core.php b/main/inc/lib/mpdf/includes/subs_core.php deleted file mode 100755 index 8101d809d0..0000000000 --- a/main/inc/lib/mpdf/includes/subs_core.php +++ /dev/null @@ -1,454 +0,0 @@ - 160, -161 => 161, -162 => 162, -163 => 163, -164 => 164, -165 => 165, -166 => 166, -167 => 167, -168 => 168, -169 => 169, -170 => 170, -171 => 171, -172 => 172, -173 => 173, -174 => 174, -175 => 175, -176 => 176, -177 => 177, -178 => 178, -179 => 179, -180 => 180, -181 => 181, -182 => 182, -183 => 183, -184 => 184, -185 => 185, -186 => 186, -187 => 187, -188 => 188, -189 => 189, -190 => 190, -191 => 191, -192 => 192, -193 => 193, -194 => 194, -195 => 195, -196 => 196, -197 => 197, -198 => 198, -199 => 199, -200 => 200, -201 => 201, -202 => 202, -203 => 203, -204 => 204, -205 => 205, -206 => 206, -207 => 207, -208 => 208, -209 => 209, -210 => 210, -211 => 211, -212 => 212, -213 => 213, -214 => 214, -215 => 215, -216 => 216, -217 => 217, -218 => 218, -219 => 219, -220 => 220, -221 => 221, -222 => 222, -223 => 223, -224 => 224, -225 => 225, -226 => 226, -227 => 227, -228 => 228, -229 => 229, -230 => 230, -231 => 231, -232 => 232, -233 => 233, -234 => 234, -235 => 235, -236 => 236, -237 => 237, -238 => 238, -239 => 239, -240 => 240, -241 => 241, -242 => 242, -243 => 243, -244 => 244, -245 => 245, -246 => 246, -247 => 247, -248 => 248, -249 => 249, -250 => 250, -251 => 251, -252 => 252, -253 => 253, -254 => 254, -255 => 255, -338 => 140, -339 => 156, -352 => 138, -353 => 154, -376 => 159, -381 => 142, -382 => 158, -402 => 131, -710 => 136, -732 => 152, -8211 => 150, -8212 => 151, -8216 => 145, -8217 => 146, -8218 => 130, -8220 => 147, -8221 => 148, -8222 => 132, -8224 => 134, -8225 => 135, -8226 => 149, -8230 => 133, -8240 => 137, -8249 => 139, -8250 => 155, -8364 => 128, -8482 => 153 -); - -$zarr = array( -8594 => 213, -8596 => 214, -8597 => 215, -9312 => 172, -9313 => 173, -9314 => 174, -9315 => 175, -9316 => 176, -9317 => 177, -9318 => 178, -9319 => 179, -9320 => 180, -9321 => 181, -9632 => 110, -9650 => 115, -9660 => 116, -9670 => 117, -9679 => 108, -9687 => 119, -9733 => 72, -9742 => 37, -9755 => 42, -9758 => 43, -9824 => 171, -9827 => 168, -9829 => 170, -9830 => 169, -9985 => 33, -9986 => 34, -9987 => 35, -9988 => 36, -9990 => 38, -9991 => 39, -9992 => 40, -9993 => 41, -9996 => 44, -9997 => 45, -9998 => 46, -9999 => 47, -10000 => 48, -10001 => 49, -10002 => 50, -10003 => 51, -10004 => 52, -10005 => 53, -10006 => 54, -10007 => 55, -10008 => 56, -10009 => 57, -10010 => 58, -10011 => 59, -10012 => 60, -10013 => 61, -10014 => 62, -10015 => 63, -10016 => 64, -10017 => 65, -10018 => 66, -10019 => 67, -10020 => 68, -10021 => 69, -10022 => 70, -10023 => 71, -10025 => 73, -10026 => 74, -10027 => 75, -10028 => 76, -10029 => 77, -10030 => 78, -10031 => 79, -10032 => 80, -10033 => 81, -10034 => 82, -10035 => 83, -10036 => 84, -10037 => 85, -10038 => 86, -10039 => 87, -10040 => 88, -10041 => 89, -10042 => 90, -10043 => 91, -10044 => 92, -10045 => 93, -10046 => 94, -10047 => 95, -10048 => 96, -10049 => 97, -10050 => 98, -10051 => 99, -10052 => 100, -10053 => 101, -10054 => 102, -10055 => 103, -10056 => 104, -10057 => 105, -10058 => 106, -10059 => 107, -10061 => 109, -10063 => 111, -10064 => 112, -10065 => 113, -10066 => 114, -10070 => 118, -10072 => 120, -10073 => 121, -10074 => 122, -10075 => 123, -10076 => 124, -10077 => 125, -10078 => 126, -10081 => 161, -10082 => 162, -10083 => 163, -10084 => 164, -10085 => 165, -10086 => 166, -10087 => 167, -10102 => 182, -10103 => 183, -10104 => 184, -10105 => 185, -10106 => 186, -10107 => 187, -10108 => 188, -10109 => 189, -10110 => 190, -10111 => 191, -10112 => 192, -10113 => 193, -10114 => 194, -10115 => 195, -10116 => 196, -10117 => 197, -10118 => 198, -10119 => 199, -10120 => 200, -10121 => 201, -10122 => 202, -10123 => 203, -10124 => 204, -10125 => 205, -10126 => 206, -10127 => 207, -10128 => 208, -10129 => 209, -10130 => 210, -10131 => 211, -10132 => 212, -10136 => 216, -10137 => 217, -10138 => 218, -10139 => 219, -10140 => 220, -10141 => 221, -10142 => 222, -10143 => 223, -10144 => 224, -10145 => 225, -10146 => 226, -10147 => 227, -10148 => 228, -10149 => 229, -10150 => 230, -10151 => 231, -10152 => 232, -10153 => 233, -10154 => 234, -10155 => 235, -10156 => 236, -10157 => 237, -10158 => 238, -10159 => 239, -10161 => 241, -10162 => 242, -10163 => 243, -10164 => 244, -10165 => 245, -10166 => 246, -10167 => 247, -10168 => 248, -10169 => 249, -10170 => 250, -10171 => 251, -10172 => 252, -10173 => 253, -10174 => 254 -); - -$sarr = array( -169 => 227, -172 => 216, -174 => 226, -176 => 176, -177 => 177, -181 => 109, -215 => 180, -247 => 184, -402 => 166, -913 => 65, -914 => 66, -915 => 71, -916 => 68, -917 => 69, -918 => 90, -919 => 72, -920 => 81, -921 => 73, -922 => 75, -923 => 76, -924 => 77, -925 => 78, -926 => 88, -927 => 79, -928 => 80, -929 => 82, -931 => 83, -932 => 84, -933 => 85, -934 => 70, -935 => 67, -936 => 89, -937 => 87, -945 => 97, -946 => 98, -947 => 103, -948 => 100, -949 => 101, -950 => 122, -951 => 104, -952 => 113, -953 => 105, -954 => 107, -955 => 108, -956 => 109, -957 => 110, -958 => 120, -959 => 111, -960 => 112, -961 => 114, -962 => 86, -963 => 115, -964 => 116, -965 => 117, -966 => 102, -967 => 99, -968 => 121, -969 => 119, -977 => 74, -978 => 161, -981 => 106, -982 => 118, -8226 => 183, -8230 => 188, -8242 => 162, -8243 => 178, -8260 => 164, -8465 => 193, -8472 => 195, -8476 => 194, -8482 => 228, -8486 => 87, -8501 => 192, -8592 => 172, -8593 => 173, -8594 => 174, -8595 => 175, -8596 => 171, -8629 => 191, -8656 => 220, -8657 => 221, -8658 => 222, -8659 => 223, -8660 => 219, -8704 => 34, -8706 => 182, -8707 => 36, -8709 => 198, -8710 => 68, -8711 => 209, -8712 => 206, -8713 => 207, -8715 => 39, -8719 => 213, -8721 => 229, -8722 => 45, -8725 => 164, -8727 => 42, -8730 => 214, -8733 => 181, -8734 => 165, -8736 => 208, -8743 => 217, -8744 => 218, -8745 => 199, -8746 => 200, -8747 => 242, -8756 => 92, -8764 => 126, -8773 => 64, -8776 => 187, -8800 => 185, -8801 => 186, -8804 => 163, -8805 => 179, -8834 => 204, -8835 => 201, -8836 => 203, -8838 => 205, -8839 => 202, -8853 => 197, -8855 => 196, -8869 => 94, -8901 => 215, -8992 => 243, -8993 => 245, -9001 => 225, -9002 => 241, -9674 => 224, -9824 => 170, -9827 => 167, -9829 => 169, -9830 => 168 -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_gbk.php b/main/inc/lib/mpdf/includes/subs_gbk.php deleted file mode 100755 index 7fcd36f876..0000000000 --- a/main/inc/lib/mpdf/includes/subs_gbk.php +++ /dev/null @@ -1,312 +0,0 @@ - '160', - 161 => '161', - 162 => '162', - 163 => '163', - 165 => '165', - 166 => '166', - 169 => '227', - 170 => '170', - 171 => '171', - 172 => '216', - 173 => '173', - 174 => '226', - 175 => '175', - 178 => '178', - 179 => '179', - 180 => '180', - 181 => '109', - 182 => '182', - 184 => '184', - 185 => '185', - 186 => '186', - 187 => '187', - 188 => '188', - 189 => '189', - 190 => '190', - 191 => '191', - 192 => '192', - 193 => '193', - 194 => '194', - 195 => '195', - 196 => '196', - 197 => '197', - 198 => '198', - 199 => '199', - 200 => '200', - 201 => '201', - 202 => '202', - 203 => '203', - 204 => '204', - 205 => '205', - 206 => '206', - 207 => '207', - 208 => '208', - 209 => '209', - 210 => '210', - 211 => '211', - 212 => '212', - 213 => '213', - 214 => '214', - 216 => '216', - 217 => '217', - 218 => '218', - 219 => '219', - 220 => '220', - 221 => '221', - 222 => '222', - 223 => '223', - 226 => '226', - 227 => '227', - 228 => '228', - 229 => '229', - 230 => '230', - 231 => '231', - 235 => '235', - 238 => '238', - 239 => '239', - 240 => '240', - 241 => '241', - 244 => '244', - 245 => '245', - 246 => '246', - 248 => '248', - 251 => '251', - 253 => '253', - 254 => '254', - 255 => '255', - 338 => '140', - 339 => '156', - 352 => '138', - 353 => '154', - 376 => '159', - 381 => '142', - 382 => '158', - 402 => '166', - 710 => '136', - 732 => '152', - 962 => '86', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8218 => '130', - 8222 => '132', - 8224 => '134', - 8225 => '135', - 8226 => '183', - 8249 => '139', - 8250 => '155', - 8260 => '164', - 8364 => '128', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8482 => '228', - 8486 => '87', - 8501 => '192', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8658 => '222', - 8659 => '223', - 8660 => '219', - 8704 => '34', - 8706 => '182', - 8707 => '36', - 8709 => '198', - 8710 => '68', - 8711 => '209', - 8713 => '207', - 8715 => '39', - 8722 => '45', - 8727 => '42', - 8764 => '126', - 8773 => '64', - 8834 => '204', - 8835 => '201', - 8836 => '203', - 8838 => '205', - 8839 => '202', - 8855 => '196', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9674 => '224', - 9687 => '119', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_iso-8859-2.php b/main/inc/lib/mpdf/includes/subs_iso-8859-2.php deleted file mode 100755 index 24453d1602..0000000000 --- a/main/inc/lib/mpdf/includes/subs_iso-8859-2.php +++ /dev/null @@ -1,388 +0,0 @@ - '161', - 162 => '162', - 163 => '163', - 165 => '165', - 166 => '166', - 169 => '227', - 170 => '170', - 171 => '171', - 172 => '216', - 174 => '226', - 175 => '175', - 177 => '177', - 178 => '178', - 179 => '179', - 181 => '109', - 182 => '182', - 183 => '183', - 185 => '185', - 186 => '186', - 187 => '187', - 188 => '188', - 189 => '189', - 190 => '190', - 191 => '191', - 192 => '192', - 195 => '195', - 197 => '197', - 198 => '198', - 200 => '200', - 202 => '202', - 204 => '204', - 207 => '207', - 208 => '208', - 209 => '209', - 210 => '210', - 213 => '213', - 216 => '216', - 217 => '217', - 219 => '219', - 222 => '222', - 224 => '224', - 227 => '227', - 229 => '229', - 230 => '230', - 232 => '232', - 234 => '234', - 236 => '236', - 239 => '239', - 240 => '240', - 241 => '241', - 242 => '242', - 245 => '245', - 248 => '248', - 249 => '249', - 251 => '251', - 254 => '254', - 255 => '255', - 338 => '140', - 339 => '156', - 376 => '159', - 402 => '166', - 710 => '136', - 732 => '152', - 913 => '65', - 914 => '66', - 915 => '71', - 916 => '68', - 917 => '69', - 918 => '90', - 919 => '72', - 920 => '81', - 921 => '73', - 922 => '75', - 923 => '76', - 924 => '77', - 925 => '78', - 926 => '88', - 927 => '79', - 928 => '80', - 929 => '82', - 931 => '83', - 932 => '84', - 933 => '85', - 934 => '70', - 935 => '67', - 936 => '89', - 937 => '87', - 945 => '97', - 946 => '98', - 947 => '103', - 948 => '100', - 949 => '101', - 950 => '122', - 951 => '104', - 952 => '113', - 953 => '105', - 954 => '107', - 955 => '108', - 956 => '109', - 957 => '110', - 958 => '120', - 959 => '111', - 960 => '112', - 961 => '114', - 962 => '86', - 963 => '115', - 964 => '116', - 965 => '117', - 966 => '102', - 967 => '99', - 968 => '121', - 969 => '119', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8211 => '150', - 8212 => '151', - 8216 => '145', - 8217 => '146', - 8218 => '130', - 8220 => '147', - 8221 => '148', - 8222 => '132', - 8224 => '134', - 8225 => '135', - 8226 => '183', - 8230 => '188', - 8240 => '137', - 8242 => '162', - 8243 => '178', - 8249 => '139', - 8250 => '155', - 8260 => '164', - 8364 => '128', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8482 => '228', - 8486 => '87', - 8501 => '192', - 8592 => '172', - 8593 => '173', - 8594 => '174', - 8595 => '175', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8658 => '222', - 8659 => '223', - 8660 => '219', - 8704 => '34', - 8706 => '182', - 8707 => '36', - 8709 => '198', - 8710 => '68', - 8711 => '209', - 8712 => '206', - 8713 => '207', - 8715 => '39', - 8719 => '213', - 8721 => '229', - 8722 => '45', - 8725 => '164', - 8727 => '42', - 8730 => '214', - 8733 => '181', - 8734 => '165', - 8736 => '208', - 8743 => '217', - 8744 => '218', - 8745 => '199', - 8746 => '200', - 8747 => '242', - 8756 => '92', - 8764 => '126', - 8773 => '64', - 8776 => '187', - 8800 => '185', - 8801 => '186', - 8804 => '163', - 8805 => '179', - 8834 => '204', - 8835 => '201', - 8836 => '203', - 8838 => '205', - 8839 => '202', - 8853 => '197', - 8855 => '196', - 8869 => '94', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9312 => '172', - 9313 => '173', - 9314 => '174', - 9315 => '175', - 9316 => '176', - 9317 => '177', - 9318 => '178', - 9319 => '179', - 9320 => '180', - 9321 => '181', - 9632 => '110', - 9650 => '115', - 9660 => '116', - 9670 => '117', - 9674 => '224', - 9679 => '108', - 9687 => '119', - 9733 => '72', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_iso-8859-4.php b/main/inc/lib/mpdf/includes/subs_iso-8859-4.php deleted file mode 100755 index 10d99cad3e..0000000000 --- a/main/inc/lib/mpdf/includes/subs_iso-8859-4.php +++ /dev/null @@ -1,381 +0,0 @@ - '161', - 162 => '162', - 163 => '163', - 165 => '165', - 166 => '166', - 169 => '227', - 170 => '170', - 171 => '171', - 172 => '216', - 174 => '226', - 177 => '177', - 178 => '178', - 179 => '179', - 181 => '109', - 182 => '182', - 183 => '183', - 185 => '185', - 186 => '186', - 187 => '187', - 188 => '188', - 189 => '189', - 190 => '190', - 191 => '191', - 192 => '192', - 199 => '199', - 200 => '200', - 202 => '202', - 204 => '204', - 207 => '207', - 208 => '208', - 209 => '209', - 210 => '210', - 211 => '211', - 217 => '217', - 221 => '221', - 222 => '222', - 224 => '224', - 231 => '231', - 232 => '232', - 234 => '234', - 236 => '236', - 239 => '239', - 240 => '240', - 241 => '241', - 242 => '242', - 243 => '243', - 249 => '249', - 253 => '253', - 254 => '254', - 255 => '255', - 338 => '140', - 339 => '156', - 376 => '159', - 402 => '166', - 710 => '136', - 732 => '152', - 913 => '65', - 914 => '66', - 915 => '71', - 916 => '68', - 917 => '69', - 918 => '90', - 919 => '72', - 920 => '81', - 921 => '73', - 922 => '75', - 923 => '76', - 924 => '77', - 925 => '78', - 926 => '88', - 927 => '79', - 928 => '80', - 929 => '82', - 931 => '83', - 932 => '84', - 933 => '85', - 934 => '70', - 935 => '67', - 936 => '89', - 937 => '87', - 945 => '97', - 946 => '98', - 947 => '103', - 948 => '100', - 949 => '101', - 950 => '122', - 951 => '104', - 952 => '113', - 953 => '105', - 954 => '107', - 955 => '108', - 956 => '109', - 957 => '110', - 958 => '120', - 959 => '111', - 960 => '112', - 961 => '114', - 962 => '86', - 963 => '115', - 964 => '116', - 965 => '117', - 966 => '102', - 967 => '99', - 968 => '121', - 969 => '119', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8211 => '150', - 8212 => '151', - 8216 => '145', - 8217 => '146', - 8218 => '130', - 8220 => '147', - 8221 => '148', - 8222 => '132', - 8224 => '134', - 8225 => '135', - 8226 => '183', - 8230 => '188', - 8240 => '137', - 8242 => '162', - 8243 => '178', - 8249 => '139', - 8250 => '155', - 8260 => '164', - 8364 => '128', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8482 => '228', - 8486 => '87', - 8501 => '192', - 8592 => '172', - 8593 => '173', - 8594 => '174', - 8595 => '175', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8658 => '222', - 8659 => '223', - 8660 => '219', - 8704 => '34', - 8706 => '182', - 8707 => '36', - 8709 => '198', - 8710 => '68', - 8711 => '209', - 8712 => '206', - 8713 => '207', - 8715 => '39', - 8719 => '213', - 8721 => '229', - 8722 => '45', - 8725 => '164', - 8727 => '42', - 8730 => '214', - 8733 => '181', - 8734 => '165', - 8736 => '208', - 8743 => '217', - 8744 => '218', - 8745 => '199', - 8746 => '200', - 8747 => '242', - 8756 => '92', - 8764 => '126', - 8773 => '64', - 8776 => '187', - 8800 => '185', - 8801 => '186', - 8804 => '163', - 8805 => '179', - 8834 => '204', - 8835 => '201', - 8836 => '203', - 8838 => '205', - 8839 => '202', - 8853 => '197', - 8855 => '196', - 8869 => '94', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9312 => '172', - 9313 => '173', - 9314 => '174', - 9315 => '175', - 9316 => '176', - 9317 => '177', - 9318 => '178', - 9319 => '179', - 9320 => '180', - 9321 => '181', - 9632 => '110', - 9650 => '115', - 9660 => '116', - 9670 => '117', - 9674 => '224', - 9679 => '108', - 9687 => '119', - 9733 => '72', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_iso-8859-7.php b/main/inc/lib/mpdf/includes/subs_iso-8859-7.php deleted file mode 100755 index ffb8eb9763..0000000000 --- a/main/inc/lib/mpdf/includes/subs_iso-8859-7.php +++ /dev/null @@ -1,366 +0,0 @@ - '161', - 162 => '162', - 164 => '164', - 165 => '165', - 170 => '170', - 174 => '226', - 175 => '175', - 180 => '180', - 181 => '109', - 182 => '182', - 184 => '184', - 185 => '185', - 186 => '186', - 188 => '188', - 190 => '190', - 191 => '191', - 192 => '192', - 193 => '193', - 194 => '194', - 195 => '195', - 196 => '196', - 197 => '197', - 198 => '198', - 199 => '199', - 200 => '200', - 201 => '201', - 202 => '202', - 203 => '203', - 204 => '204', - 205 => '205', - 206 => '206', - 207 => '207', - 208 => '208', - 209 => '209', - 210 => '210', - 211 => '211', - 212 => '212', - 213 => '213', - 214 => '214', - 215 => '180', - 216 => '216', - 217 => '217', - 218 => '218', - 219 => '219', - 220 => '220', - 221 => '221', - 222 => '222', - 223 => '223', - 224 => '224', - 225 => '225', - 226 => '226', - 227 => '227', - 228 => '228', - 229 => '229', - 230 => '230', - 231 => '231', - 232 => '232', - 233 => '233', - 234 => '234', - 235 => '235', - 236 => '236', - 237 => '237', - 238 => '238', - 239 => '239', - 240 => '240', - 241 => '241', - 242 => '242', - 243 => '243', - 244 => '244', - 245 => '245', - 246 => '246', - 247 => '184', - 248 => '248', - 249 => '249', - 250 => '250', - 251 => '251', - 252 => '252', - 253 => '253', - 254 => '254', - 255 => '255', - 338 => '140', - 339 => '156', - 352 => '138', - 353 => '154', - 376 => '159', - 381 => '142', - 382 => '158', - 402 => '166', - 710 => '136', - 732 => '152', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8211 => '150', - 8212 => '151', - 8216 => '145', - 8217 => '146', - 8218 => '130', - 8220 => '147', - 8221 => '148', - 8222 => '132', - 8224 => '134', - 8225 => '135', - 8226 => '183', - 8230 => '188', - 8240 => '137', - 8242 => '162', - 8243 => '178', - 8249 => '139', - 8250 => '155', - 8260 => '164', - 8364 => '128', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8482 => '228', - 8486 => '87', - 8501 => '192', - 8592 => '172', - 8593 => '173', - 8594 => '174', - 8595 => '175', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8658 => '222', - 8659 => '223', - 8660 => '219', - 8704 => '34', - 8706 => '182', - 8707 => '36', - 8709 => '198', - 8710 => '68', - 8711 => '209', - 8712 => '206', - 8713 => '207', - 8715 => '39', - 8719 => '213', - 8721 => '229', - 8722 => '45', - 8725 => '164', - 8727 => '42', - 8730 => '214', - 8733 => '181', - 8734 => '165', - 8736 => '208', - 8743 => '217', - 8744 => '218', - 8745 => '199', - 8746 => '200', - 8747 => '242', - 8756 => '92', - 8764 => '126', - 8773 => '64', - 8776 => '187', - 8800 => '185', - 8801 => '186', - 8804 => '163', - 8805 => '179', - 8834 => '204', - 8835 => '201', - 8836 => '203', - 8838 => '205', - 8839 => '202', - 8853 => '197', - 8855 => '196', - 8869 => '94', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9312 => '172', - 9313 => '173', - 9314 => '174', - 9315 => '175', - 9316 => '176', - 9317 => '177', - 9318 => '178', - 9319 => '179', - 9320 => '180', - 9321 => '181', - 9632 => '110', - 9650 => '115', - 9660 => '116', - 9670 => '117', - 9674 => '224', - 9679 => '108', - 9687 => '119', - 9733 => '72', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_iso-8859-9.php b/main/inc/lib/mpdf/includes/subs_iso-8859-9.php deleted file mode 100755 index c5dfd3c4bd..0000000000 --- a/main/inc/lib/mpdf/includes/subs_iso-8859-9.php +++ /dev/null @@ -1,341 +0,0 @@ - '208', - 221 => '221', - 222 => '222', - 240 => '240', - 253 => '253', - 254 => '254', - 338 => '140', - 339 => '156', - 352 => '138', - 353 => '154', - 376 => '159', - 381 => '142', - 382 => '158', - 402 => '166', - 710 => '136', - 732 => '152', - 913 => '65', - 914 => '66', - 915 => '71', - 916 => '68', - 917 => '69', - 918 => '90', - 919 => '72', - 920 => '81', - 921 => '73', - 922 => '75', - 923 => '76', - 924 => '77', - 925 => '78', - 926 => '88', - 927 => '79', - 928 => '80', - 929 => '82', - 931 => '83', - 932 => '84', - 933 => '85', - 934 => '70', - 935 => '67', - 936 => '89', - 937 => '87', - 945 => '97', - 946 => '98', - 947 => '103', - 948 => '100', - 949 => '101', - 950 => '122', - 951 => '104', - 952 => '113', - 953 => '105', - 954 => '107', - 955 => '108', - 956 => '109', - 957 => '110', - 958 => '120', - 959 => '111', - 960 => '112', - 961 => '114', - 962 => '86', - 963 => '115', - 964 => '116', - 965 => '117', - 966 => '102', - 967 => '99', - 968 => '121', - 969 => '119', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8211 => '150', - 8212 => '151', - 8216 => '145', - 8217 => '146', - 8218 => '130', - 8220 => '147', - 8221 => '148', - 8222 => '132', - 8224 => '134', - 8225 => '135', - 8226 => '183', - 8230 => '188', - 8240 => '137', - 8242 => '162', - 8243 => '178', - 8249 => '139', - 8250 => '155', - 8260 => '164', - 8364 => '128', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8482 => '228', - 8486 => '87', - 8501 => '192', - 8592 => '172', - 8593 => '173', - 8594 => '174', - 8595 => '175', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8658 => '222', - 8659 => '223', - 8660 => '219', - 8704 => '34', - 8706 => '182', - 8707 => '36', - 8709 => '198', - 8710 => '68', - 8711 => '209', - 8712 => '206', - 8713 => '207', - 8715 => '39', - 8719 => '213', - 8721 => '229', - 8722 => '45', - 8725 => '164', - 8727 => '42', - 8730 => '214', - 8733 => '181', - 8734 => '165', - 8736 => '208', - 8743 => '217', - 8744 => '218', - 8745 => '199', - 8746 => '200', - 8747 => '242', - 8756 => '92', - 8764 => '126', - 8773 => '64', - 8776 => '187', - 8800 => '185', - 8801 => '186', - 8804 => '163', - 8805 => '179', - 8834 => '204', - 8835 => '201', - 8836 => '203', - 8838 => '205', - 8839 => '202', - 8853 => '197', - 8855 => '196', - 8869 => '94', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9312 => '172', - 9313 => '173', - 9314 => '174', - 9315 => '175', - 9316 => '176', - 9317 => '177', - 9318 => '178', - 9319 => '179', - 9320 => '180', - 9321 => '181', - 9632 => '110', - 9650 => '115', - 9660 => '116', - 9670 => '117', - 9674 => '224', - 9679 => '108', - 9687 => '119', - 9733 => '72', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_shift_jis.php b/main/inc/lib/mpdf/includes/subs_shift_jis.php deleted file mode 100755 index 3d0fd6b898..0000000000 --- a/main/inc/lib/mpdf/includes/subs_shift_jis.php +++ /dev/null @@ -1,326 +0,0 @@ - '160', - 161 => '161', - 164 => '164', - 166 => '166', - 169 => '227', - 170 => '170', - 171 => '171', - 173 => '173', - 174 => '226', - 175 => '175', - 178 => '178', - 179 => '179', - 181 => '109', - 183 => '183', - 184 => '184', - 185 => '185', - 186 => '186', - 187 => '187', - 188 => '188', - 189 => '189', - 190 => '190', - 191 => '191', - 192 => '192', - 193 => '193', - 194 => '194', - 195 => '195', - 196 => '196', - 197 => '197', - 198 => '198', - 199 => '199', - 200 => '200', - 201 => '201', - 202 => '202', - 203 => '203', - 204 => '204', - 205 => '205', - 206 => '206', - 207 => '207', - 208 => '208', - 209 => '209', - 210 => '210', - 211 => '211', - 212 => '212', - 213 => '213', - 214 => '214', - 216 => '216', - 217 => '217', - 218 => '218', - 219 => '219', - 220 => '220', - 221 => '221', - 222 => '222', - 223 => '223', - 224 => '224', - 225 => '225', - 226 => '226', - 227 => '227', - 228 => '228', - 229 => '229', - 230 => '230', - 231 => '231', - 232 => '232', - 233 => '233', - 234 => '234', - 235 => '235', - 236 => '236', - 237 => '237', - 238 => '238', - 239 => '239', - 240 => '240', - 241 => '241', - 242 => '242', - 243 => '243', - 244 => '244', - 245 => '245', - 246 => '246', - 248 => '248', - 249 => '249', - 250 => '250', - 251 => '251', - 252 => '252', - 253 => '253', - 254 => '254', - 255 => '255', - 338 => '140', - 339 => '156', - 352 => '138', - 353 => '154', - 376 => '159', - 381 => '142', - 382 => '158', - 402 => '166', - 710 => '136', - 732 => '152', - 914 => '66', - 962 => '86', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8211 => '150', - 8212 => '151', - 8218 => '130', - 8222 => '132', - 8226 => '183', - 8249 => '139', - 8250 => '155', - 8260 => '164', - 8364 => '128', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8482 => '228', - 8486 => '87', - 8501 => '192', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8659 => '223', - 8709 => '198', - 8710 => '68', - 8713 => '207', - 8719 => '213', - 8721 => '229', - 8725 => '164', - 8727 => '42', - 8764 => '126', - 8773 => '64', - 8776 => '187', - 8804 => '163', - 8805 => '179', - 8836 => '203', - 8853 => '197', - 8855 => '196', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9312 => '172', - 9313 => '173', - 9314 => '174', - 9315 => '175', - 9316 => '176', - 9317 => '177', - 9318 => '178', - 9319 => '179', - 9320 => '180', - 9321 => '181', - 9674 => '224', - 9687 => '119', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_uhc.php b/main/inc/lib/mpdf/includes/subs_uhc.php deleted file mode 100755 index e9974217c7..0000000000 --- a/main/inc/lib/mpdf/includes/subs_uhc.php +++ /dev/null @@ -1,281 +0,0 @@ - '160', - 162 => '162', - 163 => '163', - 165 => '165', - 166 => '166', - 169 => '227', - 171 => '171', - 172 => '216', - 174 => '226', - 175 => '175', - 181 => '109', - 187 => '187', - 192 => '192', - 193 => '193', - 194 => '194', - 195 => '195', - 196 => '196', - 197 => '197', - 199 => '199', - 200 => '200', - 201 => '201', - 202 => '202', - 203 => '203', - 204 => '204', - 205 => '205', - 206 => '206', - 207 => '207', - 209 => '209', - 210 => '210', - 211 => '211', - 212 => '212', - 213 => '213', - 214 => '214', - 217 => '217', - 218 => '218', - 219 => '219', - 220 => '220', - 221 => '221', - 224 => '224', - 225 => '225', - 226 => '226', - 227 => '227', - 228 => '228', - 229 => '229', - 231 => '231', - 232 => '232', - 233 => '233', - 234 => '234', - 235 => '235', - 236 => '236', - 237 => '237', - 238 => '238', - 239 => '239', - 241 => '241', - 242 => '242', - 243 => '243', - 244 => '244', - 245 => '245', - 246 => '246', - 249 => '249', - 250 => '250', - 251 => '251', - 252 => '252', - 253 => '253', - 255 => '255', - 352 => '138', - 353 => '154', - 376 => '159', - 381 => '142', - 382 => '158', - 402 => '166', - 710 => '136', - 732 => '152', - 962 => '86', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8211 => '150', - 8212 => '151', - 8218 => '130', - 8222 => '132', - 8226 => '183', - 8249 => '139', - 8250 => '155', - 8260 => '164', - 8364 => '128', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8501 => '192', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8659 => '223', - 8709 => '198', - 8710 => '68', - 8713 => '207', - 8722 => '45', - 8725 => '164', - 8727 => '42', - 8773 => '64', - 8776 => '187', - 8836 => '203', - 8853 => '197', - 8855 => '196', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9674 => '224', - 9687 => '119', - 9755 => '42', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_win-1251.php b/main/inc/lib/mpdf/includes/subs_win-1251.php deleted file mode 100755 index 597df1382f..0000000000 --- a/main/inc/lib/mpdf/includes/subs_win-1251.php +++ /dev/null @@ -1,400 +0,0 @@ - '161', - 162 => '162', - 163 => '163', - 165 => '165', - 168 => '168', - 170 => '170', - 175 => '175', - 178 => '178', - 179 => '179', - 180 => '180', - 184 => '184', - 185 => '185', - 186 => '186', - 188 => '188', - 189 => '189', - 190 => '190', - 191 => '191', - 192 => '192', - 193 => '193', - 194 => '194', - 195 => '195', - 196 => '196', - 197 => '197', - 198 => '198', - 199 => '199', - 200 => '200', - 201 => '201', - 202 => '202', - 203 => '203', - 204 => '204', - 205 => '205', - 206 => '206', - 207 => '207', - 208 => '208', - 209 => '209', - 210 => '210', - 211 => '211', - 212 => '212', - 213 => '213', - 214 => '214', - 215 => '180', - 216 => '216', - 217 => '217', - 218 => '218', - 219 => '219', - 220 => '220', - 221 => '221', - 222 => '222', - 223 => '223', - 224 => '224', - 225 => '225', - 226 => '226', - 227 => '227', - 228 => '228', - 229 => '229', - 230 => '230', - 231 => '231', - 232 => '232', - 233 => '233', - 234 => '234', - 235 => '235', - 236 => '236', - 237 => '237', - 238 => '238', - 239 => '239', - 240 => '240', - 241 => '241', - 242 => '242', - 243 => '243', - 244 => '244', - 245 => '245', - 246 => '246', - 247 => '184', - 248 => '248', - 249 => '249', - 250 => '250', - 251 => '251', - 252 => '252', - 253 => '253', - 254 => '254', - 255 => '255', - 338 => '140', - 339 => '156', - 352 => '138', - 353 => '154', - 376 => '159', - 381 => '142', - 382 => '158', - 402 => '166', - 710 => '136', - 732 => '152', - 913 => '65', - 914 => '66', - 915 => '71', - 916 => '68', - 917 => '69', - 918 => '90', - 919 => '72', - 920 => '81', - 921 => '73', - 922 => '75', - 923 => '76', - 924 => '77', - 925 => '78', - 926 => '88', - 927 => '79', - 928 => '80', - 929 => '82', - 931 => '83', - 932 => '84', - 933 => '85', - 934 => '70', - 935 => '67', - 936 => '89', - 937 => '87', - 945 => '97', - 946 => '98', - 947 => '103', - 948 => '100', - 949 => '101', - 950 => '122', - 951 => '104', - 952 => '113', - 953 => '105', - 954 => '107', - 955 => '108', - 956 => '109', - 957 => '110', - 958 => '120', - 959 => '111', - 960 => '112', - 961 => '114', - 962 => '86', - 963 => '115', - 964 => '116', - 965 => '117', - 966 => '102', - 967 => '99', - 968 => '121', - 969 => '119', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8218 => '130', - 8242 => '162', - 8243 => '178', - 8260 => '164', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8486 => '87', - 8501 => '192', - 8592 => '172', - 8593 => '173', - 8594 => '174', - 8595 => '175', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8658 => '222', - 8659 => '223', - 8660 => '219', - 8704 => '34', - 8706 => '182', - 8707 => '36', - 8709 => '198', - 8710 => '68', - 8711 => '209', - 8712 => '206', - 8713 => '207', - 8715 => '39', - 8719 => '213', - 8721 => '229', - 8722 => '45', - 8725 => '164', - 8727 => '42', - 8730 => '214', - 8733 => '181', - 8734 => '165', - 8736 => '208', - 8743 => '217', - 8744 => '218', - 8745 => '199', - 8746 => '200', - 8747 => '242', - 8756 => '92', - 8764 => '126', - 8773 => '64', - 8776 => '187', - 8800 => '185', - 8801 => '186', - 8804 => '163', - 8805 => '179', - 8834 => '204', - 8835 => '201', - 8836 => '203', - 8838 => '205', - 8839 => '202', - 8853 => '197', - 8855 => '196', - 8869 => '94', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9312 => '172', - 9313 => '173', - 9314 => '174', - 9315 => '175', - 9316 => '176', - 9317 => '177', - 9318 => '178', - 9319 => '179', - 9320 => '180', - 9321 => '181', - 9632 => '110', - 9650 => '115', - 9660 => '116', - 9670 => '117', - 9674 => '224', - 9679 => '108', - 9687 => '119', - 9733 => '72', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/includes/subs_win-1252.php b/main/inc/lib/mpdf/includes/subs_win-1252.php deleted file mode 100755 index 66e701d00c..0000000000 --- a/main/inc/lib/mpdf/includes/subs_win-1252.php +++ /dev/null @@ -1,305 +0,0 @@ - '65', - 914 => '66', - 915 => '71', - 916 => '68', - 917 => '69', - 918 => '90', - 919 => '72', - 920 => '81', - 921 => '73', - 922 => '75', - 923 => '76', - 924 => '77', - 926 => '88', - 927 => '79', - 928 => '80', - 929 => '82', - 931 => '83', - 932 => '84', - 933 => '85', - 935 => '67', - 936 => '89', - 937 => '87', - 945 => '97', - 946 => '98', - 947 => '103', - 948 => '100', - 949 => '101', - 950 => '122', - 951 => '104', - 952 => '113', - 953 => '105', - 954 => '107', - 955 => '108', - 956 => '109', - 957 => '110', - 958 => '120', - 959 => '111', - 960 => '112', - 961 => '114', - 962 => '86', - 963 => '115', - 964 => '116', - 965 => '117', - 966 => '102', - 967 => '99', - 968 => '121', - 969 => '119', - 977 => '74', - 978 => '161', - 981 => '106', - 982 => '118', - 8242 => '162', - 8243 => '178', - 8260 => '164', - 8465 => '193', - 8472 => '195', - 8476 => '194', - 8486 => '87', - 8501 => '192', - 8592 => '172', - 8593 => '173', - 8594 => '174', - 8595 => '175', - 8596 => '171', - 8597 => '215', - 8629 => '191', - 8656 => '220', - 8657 => '221', - 8658 => '222', - 8659 => '223', - 8660 => '219', - 8704 => '34', - 8706 => '182', - 8707 => '36', - 8709 => '198', - 8710 => '68', - 8711 => '209', - 8712 => '206', - 8713 => '207', - 8715 => '39', - 8719 => '213', - 8721 => '229', - 8722 => '45', - 8725 => '164', - 8727 => '42', - 8730 => '214', - 8733 => '181', - 8734 => '165', - 8736 => '208', - 8743 => '217', - 8744 => '218', - 8745 => '199', - 8746 => '200', - 8747 => '242', - 8756 => '92', - 8764 => '126', - 8776 => '187', - 8800 => '185', - 8801 => '186', - 8804 => '163', - 8805 => '179', - 8834 => '204', - 8835 => '201', - 8836 => '203', - 8838 => '205', - 8839 => '202', - 8853 => '197', - 8855 => '196', - 8869 => '94', - 8901 => '215', - 8992 => '243', - 8993 => '245', - 9001 => '225', - 9002 => '241', - 9312 => '172', - 9313 => '173', - 9314 => '174', - 9315 => '175', - 9316 => '176', - 9317 => '177', - 9318 => '178', - 9319 => '179', - 9320 => '180', - 9321 => '181', - 9632 => '110', - 9650 => '115', - 9660 => '116', - 9670 => '117', - 9674 => '224', - 9679 => '108', - 9687 => '119', - 9733 => '72', - 9742 => '37', - 9755 => '42', - 9758 => '43', - 9824 => '170', - 9827 => '167', - 9829 => '169', - 9830 => '168', - 9985 => '33', - 9986 => '34', - 9987 => '35', - 9988 => '36', - 9990 => '38', - 9991 => '39', - 9992 => '40', - 9993 => '41', - 9996 => '44', - 9997 => '45', - 9998 => '46', - 9999 => '47', - 10000 => '48', - 10001 => '49', - 10002 => '50', - 10003 => '51', - 10004 => '52', - 10005 => '53', - 10006 => '54', - 10007 => '55', - 10008 => '56', - 10009 => '57', - 10010 => '58', - 10011 => '59', - 10012 => '60', - 10013 => '61', - 10014 => '62', - 10015 => '63', - 10016 => '64', - 10017 => '65', - 10018 => '66', - 10019 => '67', - 10020 => '68', - 10021 => '69', - 10022 => '70', - 10023 => '71', - 10025 => '73', - 10026 => '74', - 10027 => '75', - 10028 => '76', - 10029 => '77', - 10030 => '78', - 10031 => '79', - 10032 => '80', - 10033 => '81', - 10034 => '82', - 10035 => '83', - 10036 => '84', - 10037 => '85', - 10038 => '86', - 10039 => '87', - 10040 => '88', - 10041 => '89', - 10042 => '90', - 10043 => '91', - 10044 => '92', - 10045 => '93', - 10046 => '94', - 10047 => '95', - 10048 => '96', - 10049 => '97', - 10050 => '98', - 10051 => '99', - 10052 => '100', - 10053 => '101', - 10054 => '102', - 10055 => '103', - 10056 => '104', - 10057 => '105', - 10058 => '106', - 10059 => '107', - 10061 => '109', - 10063 => '111', - 10064 => '112', - 10065 => '113', - 10066 => '114', - 10070 => '118', - 10072 => '120', - 10073 => '121', - 10074 => '122', - 10075 => '123', - 10076 => '124', - 10077 => '125', - 10078 => '126', - 10081 => '161', - 10082 => '162', - 10083 => '163', - 10084 => '164', - 10085 => '165', - 10086 => '166', - 10087 => '167', - 10102 => '182', - 10103 => '183', - 10104 => '184', - 10105 => '185', - 10106 => '186', - 10107 => '187', - 10108 => '188', - 10109 => '189', - 10110 => '190', - 10111 => '191', - 10112 => '192', - 10113 => '193', - 10114 => '194', - 10115 => '195', - 10116 => '196', - 10117 => '197', - 10118 => '198', - 10119 => '199', - 10120 => '200', - 10121 => '201', - 10122 => '202', - 10123 => '203', - 10124 => '204', - 10125 => '205', - 10126 => '206', - 10127 => '207', - 10128 => '208', - 10129 => '209', - 10130 => '210', - 10131 => '211', - 10132 => '212', - 10136 => '216', - 10137 => '217', - 10138 => '218', - 10139 => '219', - 10140 => '220', - 10141 => '221', - 10142 => '222', - 10143 => '223', - 10144 => '224', - 10145 => '225', - 10146 => '226', - 10147 => '227', - 10148 => '228', - 10149 => '229', - 10150 => '230', - 10151 => '231', - 10152 => '232', - 10153 => '233', - 10154 => '234', - 10155 => '235', - 10156 => '236', - 10157 => '237', - 10158 => '238', - 10159 => '239', - 10161 => '241', - 10162 => '242', - 10163 => '243', - 10164 => '244', - 10165 => '245', - 10166 => '246', - 10167 => '247', - 10168 => '248', - 10169 => '249', - 10170 => '250', - 10171 => '251', - 10172 => '252', - 10173 => '253', - 10174 => '254', -); - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/index.html b/main/inc/lib/mpdf/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/makefonts/index.html b/main/inc/lib/mpdf/makefonts/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/makefonts/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/makefonts/makefonts.php b/main/inc/lib/mpdf/makefonts/makefonts.php deleted file mode 100755 index c8fd66de53..0000000000 --- a/main/inc/lib/mpdf/makefonts/makefonts.php +++ /dev/null @@ -1,1394 +0,0 @@ -'; -if (isset($_REQUEST['movefonts']) && $_REQUEST['movefonts']==1) { movefonts(); } -if (isset($_REQUEST['moveunifonts']) && $_REQUEST['moveunifonts']==1) { moveunifonts(); } - - -// INITIAL INSTRUCTIONS -if (!$step) { - echo '

mPDF Utility to generate font files

'; - echo '

If you have added fonts to a previous version of mDPF and want to create the extra files needed for embedded subsets - and you still have the [fontname].ufm and [fontname].t1a files: copy the .ufm and .t1a files to this directory and go directly to execute Step 7

'; - - echo '

Otherwise:

'; - - echo '

Prepare the source files

'; - echo '

Copy the [fontname].ttf files to this current directory

'; - echo '

Rename the .ttf files if necessary:

'; - echo '

Only characters a-z (lowercase only), 0-9 and _ (underscore)

'; - echo '

Style variants should be fontname.ttf fontnameb.ttf fontnamei.ttf fontnamebi.ttf

'; - echo '

If you only want Unicode TrueType font files, go directly to execute Step 5

'; - echo '

Otherwise go to Step 1 - Unibyte (codepage) font files - A

'; - -} - -// STEP 1 - -else if ($step==1) { - echo '

Step 1 - Unibyte (codepage) font files - A

'; - echo '

The next step will create and execute a file "makefonts.bat" in the current directory

'; - echo '

Execute and go to Step 2

'; -} - -// STEP 2 - -else if ($step==2) { - makebatlist('C'); - exec('makefonts.bat'); - echo '

Step 2 - Unibyte (codepage) font files - B

'; - echo '

Check that you have the following files in the current directory (for each of your original .ttf files):

'; - echo ''; - echo '
'; - - echo '

If these files are not present:

'; - echo '

Ensure that the file "ttf2pt1.exe" is in the current directory

'; - echo '

Execute/Run the batch file "makefonts.bat" - (double click on the file in Windows)

'; - - echo '

When the files are there go to step 3.

'; - echo '

The next step will generate the files for mPDF in the current directory

'; - echo '

Execute Step 3

'; -} - -// STEP 3 - -else if ($step==3) { - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ttf') { - $file = substr($f,0,(strlen($f)-4)); - foreach($cpages AS $cpage) { - $success = false; - if ($cpage =='win-1252') { - $success = MakeFont($file .'.pfb', $file .'.afm', 'win-1252'); - if ($success) { @unlink($file .'.pfb'); @unlink($file .'.afm'); } - } - else { - $success = MakeFont($file .'-'.$cpage.'.pfb', $file .'-'.$cpage.'.afm', $cpage); - if ($success) { @unlink($file .'-'.$cpage.'.pfb'); @unlink($file .'-'.$cpage.'.afm'); } - } - } - } - } - - echo '

Step 3 - Unibyte (codepage) font files - C

'; - echo '

When you have done that, check you have the following files (for each of your original .ttf files):

'; - echo ''; - echo '
  • NB The .pfb and .afm files have been deleted.

    '; - - echo '

    Go to Step 4

    '; - -} - -// STEP 4 - -else if ($step==4) { - echo '

    Step 4 - Unibyte (codepage) font files - D

    '; - echo '

    Copy all of the .php and .z files to the folder [path to mpdf]/mpdf/fonts/

    '; - echo '

    (This link may do the job for you. Note: This will not overwrite files, so you may need to delete files first from the [path to mpdf]/mpdf/fonts/ folder)

    '; - echo '

    Add the font names to config_fonts.php (and if appropriate to config_cp.php)

    '; - - echo '

    You have now completed font file generation for the codepage Type 1 font files.

    '; - echo '

    If you do not want to create the Unicode TrueType font files you can stop here, or '; - echo 'optionally you can tidy up which will delete all the font files except your .ttf files from the current directory.

    '; - - - echo '

    Now we will create the Unicode TrueType font files.

    '; - echo '

    NB This will also delete any remaining .php and .z files from the current directory.

    '; - - echo '

    To continue with Unicode TrueType font files, execute Step 5

    '; - -} - -// STEP 5 - -else if ($step==5) { - - // First get rid of any .php and .z files left - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ttf') { - $file = substr($f,0,(strlen($f)-4)); - foreach($cpages AS $cpage) { - if ($cpage =='win-1252') { - @unlink($file .'.z'); @unlink($file .'.php'); - } - else { - @unlink($file .'-'.$cpage.'.z'); @unlink($file .'-'.$cpage.'.php'); - } - } - } - } - makebatlist('U'); - exec('makefonts.bat'); - echo '

    Step 5 - Unicode TrueType font files - A

    '; - echo '

    Check that the following files have been created in the current directory (for each of your original .ttf files):

    '; - echo '
    • fontname.t1a
    • '; - echo '
    • fontname.ufm
    • '; - echo '
    • fontname.afm
    '; - - echo '
    '; - echo '

    If these files are not present:

    '; - echo '

    Ensure that the file "ttf2ufm.exe" is in the current directory

    '; - echo '

    Execute/Run the batch file "makefonts.bat" - (double click on the file in Windows)

    '; - - echo '

    When the files are there, go on to step 6.

    '; - echo '

    The next step will generate the core files for mPDF in the current directory

    '; - echo '

    Execute Step 6

    '; - -} - - - - - - - -// STEP 6 - -else if ($step==6) { - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ttf') { - $file = substr($f,0,(strlen($f)-4)); - MakeFontTTF($file .'.ttf', $file.'.ufm'); - @unlink($file .'.afm'); - } - } - - echo '

    Step 6 - Unicode TrueType font files - B

    '; - echo '

    When you have done that, check you have the following files (for each of your original .ttf files):

    '; - echo '
    • fontname.z
    • '; - echo '
    • fontname.ctg.z
    • '; - echo '
    • fontname.php
    '; - echo '

    NB The .afm files have been deleted (but .t1a and .ufm should remain).

    '; - - echo '

    The next step will generate the additional files for embedded subsets

    '; - echo '

    Execute Step 7 (NB This may take several minutes for large font files; you may need to increase the time-limit or memory-limits - see the top of the /makefont/makefonts.php file)

    '; - -} - - - -// STEP 7 - Create .uni2gn.php files, and .dat / .dat.php -else if ($step==7) { - $cs_commands = array( - 'abs' => array(12, 9 ), - 'add' => array(12, 10 ), - 'and' => array(12, 3 ), - 'blend' => array(16, -1 ), - 'callgsubr' => array(29, -1 ), - 'callothersubr' => array(12, 16 ), - 'callsubr' => array(10, -1 ), - 'closepath' => array(9, -1 ), - 'cntrmask' => array(20, -1 ), - 'div' => array(12, 12 ), - 'dotsection' => array(12, 0 ), - 'drop' => array(12, 18 ), - 'dup' => array(12, 27 ), - 'endchar' => array(14, -1 ), - 'eq' => array(12, 15 ), - 'error' => array(0, -1 ), - 'escape' => array(12, -1 ), - 'exch' => array(12, 28 ), - 'flex' => array(12, 35 ), - 'flex1' => array(12, 37 ), - 'get' => array(12, 21 ), - 'hflex' => array(12, 34 ), - 'hflex1' => array(12, 36 ), - 'hhcurveto' => array(27, -1 ), - 'hintmask' => array(19, -1 ), - 'hlineto' => array(6, -1 ), - 'hmoveto' => array(22, -1 ), - 'hsbw' => array(13, -1 ), - 'hstem' => array(1, -1 ), - 'hstem3' => array(12, 2 ), - 'hstemhm' => array(18, -1 ), - 'hvcurveto' => array(31, -1 ), - 'ifelse' => array(12, 22 ), - 'index' => array(12, 29 ), - 'load' => array(12, 13 ), - 'mul' => array(12, 24 ), - 'neg' => array(12, 14 ), - 'not' => array(12, 5 ), - 'or' => array(12, 4 ), - 'pop' => array(12, 17 ), - 'put' => array(12, 20 ), - 'random' => array(12, 23 ), - 'rcurveline' => array(24, -1 ), - 'return' => array(11, -1 ), - 'rlinecurve' => array(25, -1 ), - 'rlineto' => array(5, -1 ), - 'rmoveto' => array(21, -1 ), - 'roll' => array(12, 30 ), - 'rrcurveto' => array(8, -1 ), - 'sbw' => array(12, 7 ), - 'seac' => array(12, 6 ), - 'setcurrentpoint' => array(12, 33 ), - 'sqrt' => array(12, 26 ), - 'store' => array(12, 8 ), - 'sub' => array(12, 11 ), - 'vhcurveto' => array(30, -1 ), - 'vlineto' => array(7, -1 ), - 'vmoveto' => array(4, -1 ), - 'vstem' => array(3, -1 ), - 'vstem3' => array(12, 1 ), - 'vstemhm' => array(23, -1 ), - 'vvcurveto' => array(26, -1 ) - ); - - - - $lenIV = 4; - $cs_start = 'RD'; - // Read uni2gn [code-point to glyph-name] from .ufm file if exists - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ufm') { - $file = substr($f,0,(strpos($f,'.'))); - if (!file_exists($file.'.t1a')) { die("You must have both .ufm and .t1a files in the current directory ('.$f.')"); } - $uni2gn = array(); - $a=file($file.'.ufm'); - if(empty($a)) { die('ufm file found but with error'); } - foreach($a as $l) { - $e=explode(' ',chop($l)); - if(count($e)<2) { continue; } - if($e[0]=='U') { - $cc=(int)$e[1]; - if ($cc != -1) { $uni2gn[$cc] = $e[7]; } - } - } - $s = 'uni2gn = '.var_export($uni2gn, true).'; -?>'; - file_put_contents($file.'.uni2gn.php', $s); - // echo "File created: ".$file.'.uni2gn.php'."
    \n"; - // **************** DAT - - $file_ip = ''; - $file_op = ''; - $op_buffer = ''; - $if_header = ''; - $if_FullName = ''; - $if_FontName = ''; - $if_FamilyName = ''; - $if_encs = array(); - $if_eexec_start = ''; - $if_Subrs = array(); - $if_CharStrings = array(); - $pdf_diffstr = ''; // String of /Diffs for PDF file - $of_encodingstr = ''; - $useChars = array(); - - //echo "Processing font: ".$file."...
    \n"; - - $subrs=''; - $CharStrings=''; - $Encoding=''; - - $file_ip = $file.'.t1a'; - - $ifh = fopen($file_ip, "rb"); - $target = false; - $rem = ''; - // Header - $if_header = ''; - while(!$target && !feof($ifh)) { - $x = fread($ifh, 2048); - $x = preg_replace("/\r/","",$x); - $if_header .= $x; - if (preg_match('/(.*?)\/Encoding (.*)/s', $if_header , $m)) { - $if_header = $m[1]; - $rem = '/Encoding '.$m[2]; - $target = true; - } - } - if (feof($ifh)) { die("Error parsing ".$file_ip ); } - - // Discard - $target = false; - if (preg_match('/(.*?)currentfile eexec(.*)/s', $rem, $m)) { - $rem = $m[2]; - $target = true; - } - - $discard = ''; - while(!$target && !feof($ifh)) { - $x = fread($ifh, 2048); - $x = preg_replace("/\r/","",$x); - $discard .= $x; - if (preg_match('/(.*?)currentfile eexec(.*)/s', $discard , $m)) { - //$discard = $m[1]; - $rem = $m[2]; - $target = true; - } - } - if (feof($ifh)) { die("Error parsing ".$file_ip ); } - - - // eexec_start - $target = false; - if (preg_match('/(.*?)\/Subrs (.*)/s', $rem, $m)) { - $if_eexec_start = $m[1]; - $rem = $m[2]; - $target = true; - } - else { $if_eexec_start = $rem; } - - while(!$target && !feof($ifh)) { - $x = fread($ifh, 2048); - $x = preg_replace("/\r/","",$x); - $if_eexec_start .= $x; - if (preg_match('/(.*?)\/Subrs (.*)/s', $if_eexec_start , $m)) { - $if_eexec_start = $m[1]; - $rem = $m[2]; - $target = true; - } - } - if (feof($ifh)) { die("Error parsing ".$file_ip ); } - - - // WRITE if_header to .dat - $offset = 0; - $fh = fopen($file.'.dat', "wb"); - - _fwriteint($fh, strlen($if_header)); - fwrite($fh, $if_header); - $offset += strlen($if_header) + 4; - - // WRITE if_eexec_start to .dat - _fwriteint($fh, strlen($if_eexec_start)); - fwrite($fh, $if_eexec_start); - $offset += strlen($if_eexec_start) + 4; - - unset($if_header ); - unset($if_eexec_start ); - - - // SUBROUTINES - $if_Subrs = array(); - $target = false; - if (preg_match('/(.*?)\/CharStrings (.*)/s', $rem, $m)) { - $subrs = $m[1]; - $rem = $m[2]; - $target = true; - } - else { $subrs = $rem; } - - preg_match_all('/dup\s+(\d+)\s+\{(.*?)\}\s+NP/s',$subrs, $mm); - for($i=0;$i 4) { $if_Subrs[$mm[1][$i]] = preg_replace('/\s+return/', '', $mm[2][$i]); } // mPDF 4.4.016 - } - preg_match('/(.*}\s+NP)(.*)/s', $subrs, $mm); - if(isset($mm[2])) { $subrs = $mm[2]; } // mPDF 4.4.016 - - while(!$target && !feof($ifh)) { - $x = fread($ifh, 8192); - $x = preg_replace("/\r/","",$x); - $subrs .= $x; - if (preg_match('/(.*?)\/CharStrings (.*)/s', $subrs , $m)) { - $subrs = $m[1]; - $rem = $m[2]; - $target = true; - } - $subrs = preg_replace("/\r\n/","\n",$subrs); - preg_match_all('/dup\s+(\d+)\s+\{(.*?)\}\s+NP/s',$subrs, $mm); - for($i=0;$i 4) { $if_Subrs[$mm[1][$i]] = preg_replace('/\s+return/', '', $mm[2][$i]); } // mPDF 4.4.016 - } - preg_match('/(.*}\s+NP)(.*)/s', $subrs, $mm); - if(isset($mm[2])) { $subrs = $mm[2]; } // mPDF 4.5.003 - } - if (feof($ifh)) { die("Error parsing ".$file_ip ); } - - // CHARSTRINGS - $offs = array(); - $target = false; - if (preg_match('/(.*?)mark currentfile closefile/s', $rem, $m)) { - $CharStrings = $m[1]; - $target = true; - } - else { $CharStrings = $rem; } - - preg_match_all('/\/([a-zA-Z0-9._]+)\s+\{(.*?endchar\s+)\}\s+ND/s',$CharStrings, $m); - for($i=0;$i'; - fwrite($fh, $s); - fclose($fh); - // echo "Files created: ".$file." [.dat|.dat.php]
    \n"; - // **************** DAT - } - } - - - - - echo '

    Step 7 - Unicode TrueType font files - C

    '; - echo '

    When you have done that, check you have the following files (for each of your original .ttf files):

    '; - echo '
    • fontname.uni2gn.php
    • '; - echo '
    • fontname.dat
    • '; - echo '
    • fontname.dat.php
    '; - echo '

    If you have only run Step 7 to update previously added fonts, now just copy these files to your /unifont/ folder

    '; - - echo '

    Go to Step 8

    '; - -} - - - -// STEP 8 - -else if ($step==8) { - echo '

    Copy all of the following files to the folder [path to mpdf]/mpdf/unifont/

    '; - echo '

    (6 for each font/style)

    '; - echo '

    (This link should do the job for you. Note: This will not overwrite files, so you may need to delete files first from the [path to mpdf]/mpdf/unifont/ folder).

    '; - - echo '
    • fontname.z
    • '; - echo '
    • fontname.ctg.z
    • '; - echo '
    • fontname.php
    • '; - echo '
    • fontname.dat
    • '; - echo '
    • fontname.dat.php
    • '; - echo '
    • fontname.uni2gn.php
    '; - - echo '

    Add the font names to config_fonts.php (and if appropriate to config_cp.php)

    '; - - echo '

    Otherwise you\'re all done!

    '; - echo '

    Optionally you can tidy up which will delete all the font files except your .ttf files from the current directory.

    '; - -} - - -// STEP 9 - -else if ($step==9) { - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ttf') { - $file = substr($f,0,(strlen($f)-4)); - @unlink($file .'.afm'); - @unlink($file .'.ufm'); - @unlink($file .'.t1a'); - @unlink($file .'.php'); - @unlink($file .'.z'); - @unlink($file .'.ctg.z'); - @unlink($file .'.dat'); - @unlink($file .'.dat.php'); - @unlink($file .'.uni2gn.php'); - @unlink('makefonts.bat'); - foreach($cpages AS $cpage) { - if ($cpage =='win-1252') { - @unlink($file .'.z'); @unlink($file .'.php'); - } - else { - @unlink($file .'-'.$cpage.'.z'); @unlink($file .'-'.$cpage.'.php'); - } - } - } - } - - echo '

    All done!

    '; - -} - - - - - - - -echo ''; -exit; -/******************************************************************************* -* Functions to generate Unicode font .dat files * -*******************************************************************************/ -function _fwriteint($fh, $i) -{ - //Write a 4-byte integer to file - $s=chr(($i>>24) % 256); - $s.=chr(($i>>16) % 256); - $s.=chr(($i>>8) % 256); - $s.=chr($i % 256); - fwrite($fh, $s); -} - - -/* This function parses an entire charstring into integers and commands, - outputting bytes through the charstring buffer. */ -function parse_charstring($cs) { - global $lenIV, $cs_start, $cs_commands, $cipher_cr ; - /* initializes charstring encryption. */ - $buffer = ''; - $cipher_cr = 4330; - for ($i = 0; $i < $lenIV; $i++) { - $buffer .= charstring_byte(chr(0)); - } - $cc = preg_split('/\s+/',$cs,-1,PREG_SPLIT_NO_EMPTY); - foreach($cc AS $c) { - // Encode the integers according to charstring number encoding - if (preg_match('/^[\-]{0,1}\d+$/',$c)) { - $buffer .= charstring_int($c); - } - - // Encode the commands according to charstring command encoding - else if (isset($cs_commands[$c])) { - $one = $cs_commands[$c][0]; - $two = $cs_commands[$c][1]; - if ($one < 0 || $one > 255) - echo sprintf("bad charstring command number $d in %s in %s", $one, $c, $cs); - else if ($two > 255) - echo sprintf("bad charstring command number $d in %s in %s", $two, $c, $cs); - else if ($two < 0) { - $buffer .= charstring_byte($one); - } - else { - $buffer .= charstring_byte($one); - $buffer .= charstring_byte($two); - } - } - else { - echo sprintf("unknown charstring entry %s in %s", $c, $cs); - } - } - $s = sprintf("%d ", strlen($buffer)); - $s .= sprintf("%s ", $cs_start); - $s .= $buffer; - $buffer = ''; - return $s; -} - -/* This function encrypts and buffers a single byte of charstring data. */ -function charstring_byte($v) { - $b = ($v & 0xff); - $c = cencrypt($b); - return chr($c); -} - -/* This function encodes an integer according to charstring number encoding. */ -function charstring_int($num) { - $c = ''; - if ($num >= -107 && $num <= 107) { - $c .= charstring_byte($num + 139); - } else if ($num >= 108 && $num <= 1131) { - $x = $num - 108; - $c .= charstring_byte($x / 256 + 247); - $c .= charstring_byte($x % 256); - } else if ($num >= -1131 && $num <= -108) { - $x = abs($num) - 108; - $c .= charstring_byte($x / 256 + 251); - $c .= charstring_byte($x % 256); - } else if ($num >= (-2147483647-1) && $num <= 2147483647) { - $c .= charstring_byte(255); - $c .= charstring_byte($num >> 24); - $c .= charstring_byte($num >> 16); - $c .= charstring_byte($num >> 8); - $c .= charstring_byte($num); - } else { - echo sprintf("can't format huge number `%d'", $num); - /* output 0 instead */ - $c .= charstring_byte(139); - } - return $c; -} - -function cencrypt($plain) { - global $lenIV, $cipher_cr; - $c1 = 52845; - $c2 = 22719; - if ($lenIV < 0) return $plain; - $cipher = ($plain ^ ($cipher_cr >> 8)); - $cipher_cr = (($cipher + $cipher_cr) * $c1 + $c2) & 0xffff; - return $cipher; -} - -/******************************************************************************* -* Other Functions to generate font definition files - Type 1 + Unicode * -*******************************************************************************/ -function movefonts() { - global $cpages; - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ttf') { - $file = substr($f,0,(strlen($f)-4)); - foreach($cpages AS $cpage) { - if ($cpage =='win-1252') { - rename($file .'.php', '../font/'.$file .'.php'); - rename($file .'.z', '../font/'.$file .'.z'); - } - else { - rename($file .'-'.$cpage.'.php', '../font/'.$file .'-'.$cpage.'.php'); - rename($file .'-'.$cpage.'.z', '../font/'.$file .'-'.$cpage.'.z'); - } - } - } - } -} - - -function moveunifonts() { - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ttf') { - $file = substr($f,0,(strlen($f)-4)); - rename($file .'.dat', '../unifont/'.$file .'.dat'); - rename($file .'.dat.php', '../unifont/'.$file .'.dat.php'); - rename($file .'.php', '../unifont/'.$file .'.php'); - rename($file .'.z', '../unifont/'.$file .'.z'); - rename($file .'.ctg.z', '../unifont/'.$file .'.ctg.z'); - rename($file .'.uni2gn.php', '../unifont/'.$file .'.uni2gn.php'); - } - } -} - - -function makebatlist($type='U') { - global $cpages; - $bat = ''; - $ff = scandir('./'); - foreach($ff AS $f) { - if (substr($f,-4,4)=='.ttf') { - $file = substr($f,0,(strlen($f)-4)); - - // FOR UNIFONTS - if ($type=='U') { - $bat .= 'ttf2ufm -a '.$f." ".$file."\r\n"; - } - // FOR FONTS (codepaged) - else { - foreach($cpages AS $cpage) { - if ($cpage =='win-1252') { - $bat .= 'ttf2pt1 -b -L maps/'.$cpage.'.map '.$f." ".$file."\r\n"; - } - else { - $bat .= 'ttf2pt1 -b -L maps/'.$cpage.'.map '.$f." ".$file.'-'.$cpage."\r\n"; - } - } - } - } - } - file_put_contents('makefonts.bat', $bat); -} - - - -/******************************************************************************* -* Common Functions to generate font definition files - Type 1 + Unicode * -*******************************************************************************/ - - -function SaveToFile($file,$s,$mode='t') -{ - $f=fopen($file,'w'.$mode); - if(!$f) - die('Can\'t write to file '.$file); - fwrite($f,$s,strlen($s)); - fclose($f); -} - -function ReadShort($f) -{ - $a=unpack('n1n',fread($f,2)); - return $a['n']; -} - -function ReadLong($f) -{ - $a=unpack('N1N',fread($f,4)); - return $a['N']; -} - -function CheckTTF($file) -{ - //Check if font license allows embedding - $f=fopen($file,'rb'); - if(!$f) - die('Error: Can\'t open '.$file); - //Extract number of tables - fseek($f,4,SEEK_CUR); - $nb=ReadShort($f); - fseek($f,6,SEEK_CUR); - //Seek OS/2 table - $found=false; - for($i=0;$i<$nb;$i++) - { - if(fread($f,4)=='OS/2') - { - $found=true; - break; - } - fseek($f,12,SEEK_CUR); - } - if(!$found) - { - fclose($f); - return; - } - fseek($f,4,SEEK_CUR); - $offset=ReadLong($f); - fseek($f,$offset,SEEK_SET); - //Extract fsType flags - fseek($f,8,SEEK_CUR); - $fsType=ReadShort($f); - $rl=($fsType & 0x02)!=0; - $pp=($fsType & 0x04)!=0; - $e=($fsType & 0x08)!=0; - fclose($f); - if($rl and !$pp and !$e) - echo 'Warning: font license does not allow embedding'; -} - - -/******************************************************************************* -* Functions to generate font definition files Type 1 * -*******************************************************************************/ - -function ReadMap($enc) -{ - global $map_path; - //Read a map file -// $file=dirname(__FILE__).'/'.strtolower($enc).'.map'; - $file=$map_path.strtolower($enc).'.map'; - $a=file($file); - if(empty($a)) - die('Error: encoding map not found: '.$enc); - $cc2gn=array(); - foreach($a as $l) - { - if($l{0}=='!') - { - $e=preg_split('/[ \\t]+/',chop($l)); - $cc=hexdec(substr($e[0],1)); - $gn=$e[2]; - $cc2gn[$cc]=$gn; - } - } - for($i=0;$i<=255;$i++) - if(!isset($cc2gn[$i])) - $cc2gn[$i]='.notdef'; - return $cc2gn; -} - -function ReadAFM($file,&$map) -{ - //Read a font metric file - $a=file($file); - if(empty($a)) - die('File not found (ReadAFM) - '.$file); - $widths=array(); - $fm=array(); - $fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent', - 'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut', - 'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent', - 'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent', - 'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent', - 'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat', - 'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb', - 'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong'); - foreach($a as $l) - { - $e=explode(' ',chop($l)); - if(count($e)<2) - continue; - $code=$e[0]; - $param=$e[1]; - if($code=='C') - { - //Character metrics - $cc=(int)$e[1]; - $w=$e[4]; - $gn=$e[7]; - if(substr($gn,-4)=='20AC') - $gn='Euro'; - if(isset($fix[$gn])) - { - //Fix incorrect glyph name - foreach($map as $c=>$n) - if($n==$fix[$gn]) - $map[$c]=$gn; - } - if(empty($map)) - { - //Symbolic font: use built-in encoding - $widths[$cc]=$w; - } - else - { - $widths[$gn]=$w; - if($gn=='X') - $fm['CapXHeight']=$e[13]; - } - if($gn=='.notdef') - $fm['MissingWidth']=$w; - } - elseif($code=='FontName') - $fm['FontName']=$param; - elseif($code=='Weight') - $fm['Weight']=$param; - elseif($code=='ItalicAngle') - $fm['ItalicAngle']=(double)$param; - elseif($code=='Ascender') - $fm['Ascender']=(int)$param; - elseif($code=='Descender') - $fm['Descender']=(int)$param; - elseif($code=='UnderlineThickness') - $fm['UnderlineThickness']=(int)$param; - elseif($code=='UnderlinePosition') - $fm['UnderlinePosition']=(int)$param; - elseif($code=='IsFixedPitch') - $fm['IsFixedPitch']=($param=='true'); - elseif($code=='FontBBox') - $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]); - elseif($code=='CapHeight') - $fm['CapHeight']=(int)$param; - elseif($code=='StdVW') - $fm['StdVW']=(int)$param; - } - if(!isset($fm['FontName'])) - die('FontName not found'); - if(!empty($map)) - { - if(!isset($widths['.notdef'])) - $widths['.notdef']=600; - if(!isset($widths['Delta']) and isset($widths['increment'])) - $widths['Delta']=$widths['increment']; - //Order widths according to map - for($i=0;$i<=255;$i++) - { - if(!isset($widths[$map[$i]])) - { - echo 'Warning: character '.$map[$i].' is missing from '.$file.'
    '; - $widths[$i]=$widths['.notdef']; - } - else - $widths[$i]=$widths[$map[$i]]; - } - } - $fm['Widths']=$widths; - return $fm; -} - -function MakeFontDescriptor($fm,$symbolic) -{ - //Ascent - $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000); - $fd="array('Ascent'=>".$asc; - //Descent - $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200); - $fd.=",'Descent'=>".$desc; - //CapHeight - if(isset($fm['CapHeight'])) - $ch=$fm['CapHeight']; - elseif(isset($fm['CapXHeight'])) - $ch=$fm['CapXHeight']; - else - $ch=$asc; - $fd.=",'CapHeight'=>".$ch; - //Flags - $flags=0; - if(isset($fm['IsFixedPitch']) and $fm['IsFixedPitch']) - $flags+=1<<0; - if($symbolic) - $flags+=1<<2; - if(!$symbolic) - $flags+=1<<5; - if(isset($fm['ItalicAngle']) and $fm['ItalicAngle']!=0) - $flags+=1<<6; - $fd.=",'Flags'=>".$flags; - //FontBBox - if(isset($fm['FontBBox'])) - $fbb=$fm['FontBBox']; - else - $fbb=array(0,$des-100,1000,$asc+100); - $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; - //ItalicAngle - $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0); - $fd.=",'ItalicAngle'=>".$ia; - //StemV - if(isset($fm['StdVW'])) - $stemv=$fm['StdVW']; - elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight'])) - $stemv=120; - else - $stemv=70; - $fd.=",'StemV'=>".$stemv; - //MissingWidth - if(isset($fm['MissingWidth'])) - $fd.=",'MissingWidth'=>".$fm['MissingWidth']; - $fd.=')'; - return $fd; -} - -function MakeWidthArray($fm) -{ - //Make character width array - $s="array(\n\t"; - $cw=$fm['Widths']; - for($i=0;$i<=255;$i++) - { - if(chr($i)=="'") - $s.="'\\''"; - elseif(chr($i)=="\\") - $s.="'\\\\'"; - elseif($i>=32 and $i<=126) - $s.="'".chr($i)."'"; - else - $s.="chr($i)"; - $s.='=>'.$fm['Widths'][$i]; - if($i<255) - $s.=','; - if(($i+1)%22==0) - $s.="\n\t"; - } - $s.=')'; - return $s; -} - -function MakeFontEncoding($map) -{ - //Build differences from reference encoding - $ref=ReadMap('win-1252'); - $s=''; - $last=0; - for($i=32;$i<=255;$i++) - { - if($map[$i]!=$ref[$i]) - { - if($i!=$last+1) - $s.=$i.' '; - $last=$i; - $s.='/'.$map[$i].' '; - } - } - return chop($s); -} - - -/******************************************************************************* -* $fontfile: path to TTF file (or empty string if not to be embedded) * -* $afmfile: path to AFM file * -* $enc: font encoding (or empty string for symbolic fonts) * -* $patch: optional patch for encoding * -* $type : font type if $fontfile is empty * -*******************************************************************************/ -function MakeFont($fontfile,$afmfile,$enc='win-1252',$patch=array(),$type='TrueType') -{ - //Generate a font definition file - set_magic_quotes_runtime(0); - if($enc) - { - $map=ReadMap($enc); - foreach($patch as $cc=>$gn) - $map[$cc]=$gn; - } - else - $map=array(); - if(!file_exists($afmfile)) - die('Error: AFM file not found: '.$afmfile); - $fm=ReadAFM($afmfile,$map); - if($enc) - $diff=MakeFontEncoding($map); - else - $diff=''; - $fd=MakeFontDescriptor($fm,empty($map)); - //Find font type - if($fontfile) - { - $ext=strtolower(substr($fontfile,-3)); - if($ext=='ttf') - $type='TrueType'; - elseif($ext=='pfb') - $type='Type1'; - else - die('Error: unrecognized font file extension: '.$ext); - } - else - { - if($type!='TrueType' and $type!='Type1') - die('Error: incorrect font type: '.$type); - } - //Start generation - $s='Error: font file not found: '.$fontfile); - if($type=='TrueType') - CheckTTF($fontfile); - $f=fopen($fontfile,'rb'); - if(!$f) - die('Error: Can\'t open '.$fontfile); - $file=fread($f,filesize($fontfile)); - fclose($f); - if($type=='Type1') - { - //Find first two sections and discard third one - $pos=strpos($file,'eexec'); - if(!$pos) - die('Error: font file does not seem to be valid Type1'); - $size1=$pos+6; - $pos=strpos($file,'00000000'); - if(!$pos) - die('Error: font file does not seem to be valid Type1'); - $size2=$pos-$size1; - $file=substr($file,0,$size1+$size2); - } - if(function_exists('gzcompress')) - { - $cmp=$basename.'.z'; - SaveToFile($cmp,gzcompress($file),'b'); - $s.='$file=\''.$cmp."';\n"; - // echo 'Font file compressed ('.$cmp.')
    '; - } - else - { - $s.='$file=\''.basename($fontfile)."';\n"; - echo 'Notice: font file could not be compressed (gzcompress not available)
    '; - } - if($type=='Type1') - { - $s.='$size1='.$size1.";\n"; - $s.='$size2='.$size2.";\n"; - } - else - $s.='$originalsize='.filesize($fontfile).";\n"; - } - else - { - //Not embedded font - $s.='$file='."'';\n"; - } - $s.="?>\n"; - - SaveToFile($basename.'.php',$s); - //echo 'Font definition file generated ('.$basename.'.php'.')
    '; - return true; -} - - -/******************************************************************************* -* Functions to generate font definition files for Unicode Truetype fonts * -*******************************************************************************/ - -function ReadUFM($file, &$cidtogidmap) -{ - //Prepare empty CIDToGIDMap - $cidtogidmap = str_pad('', 256*256*2, "\x00"); - - //Read a font metric file - $a=file($file); - if(empty($a)) - die('File not found (ReadUFM) - '.$file); - $widths=array(); - $fm=array(); - foreach($a as $l) - { - $e=explode(' ',chop($l)); - if(count($e)<2) - continue; - $code=$e[0]; - $param=$e[1]; - if($code=='U') - { - // U 827 ; WX 0 ; N squaresubnosp ; G 675 ; - //Character metrics - $cc=(int)$e[1]; - if ($cc != -1) { - $gn = $e[7]; - $w = $e[4]; - $glyph = $e[10]; - $widths[$cc] = $w; - // if($cc == ord('X')) // mPDF 4.4.01 - // $fm['CapXHeight'] = $e[13]; // Height is not set in ttf2ufm - - // Set GID - if ($cc >= 0 && $cc < 0xFFFF && $glyph) { - $cidtogidmap{$cc*2} = chr($glyph >> 8); - $cidtogidmap{$cc*2 + 1} = chr($glyph & 0xFF); - } - // mPDF 4.5.003 - if($gn=='.notdef' && !isset($fm['MissingWidth'])) - $fm['MissingWidth']=$w; - } - } - elseif($code=='FontName') - $fm['FontName']=$param; - elseif($code=='Weight') - $fm['Weight']=$param; - elseif($code=='ItalicAngle') - $fm['ItalicAngle']=(double)$param; - elseif($code=='Ascender') - $fm['Ascender']=(int)$param; - elseif($code=='Descender') - $fm['Descender']=(int)$param; - elseif($code=='UnderlineThickness') - $fm['UnderlineThickness']=(int)$param; - elseif($code=='UnderlinePosition') - $fm['UnderlinePosition']=(int)$param; - elseif($code=='IsFixedPitch') - $fm['IsFixedPitch']=($param=='true'); - elseif($code=='FontBBox') - $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]); - elseif($code=='CapHeight') - $fm['CapHeight']=(int)$param; - elseif($code=='StdVW') - $fm['StdVW']=(int)$param; - } - if(!isset($fm['MissingWidth'])) - $fm['MissingWidth']=600; - - if(!isset($fm['FontName'])) - die('FontName not found'); - - $fm['Widths']=$widths; - - return $fm; -} - -function MakeFontDescriptorTTF($fm) -{ - //Ascent - $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000); - $fd="array('Ascent'=>".$asc; - //Descent - $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200); - $fd.=",'Descent'=>".$desc; - //CapHeight - if(isset($fm['CapHeight'])) - $ch=$fm['CapHeight']; - elseif(isset($fm['CapXHeight'])) - $ch=$fm['CapXHeight']; - else - $ch=$asc; - $fd.=",'CapHeight'=>".$ch; - //Flags - $flags=0; - if(isset($fm['IsFixedPitch']) and $fm['IsFixedPitch']) - $flags+=1<<0; - $flags+=1<<5; - if(isset($fm['ItalicAngle']) and $fm['ItalicAngle']!=0) - $flags+=1<<6; - $fd.=",'Flags'=>".$flags; - //FontBBox - if(isset($fm['FontBBox'])) - $fbb=$fm['FontBBox']; - else - $fbb=array(0,$des-100,1000,$asc+100); - $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; - //ItalicAngle - $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0); - $fd.=",'ItalicAngle'=>".$ia; - //StemV - if(isset($fm['StdVW'])) - $stemv=$fm['StdVW']; - elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight'])) - $stemv=120; - else - $stemv=70; - $fd.=",'StemV'=>".$stemv; - //MissingWidth - if(isset($fm['MissingWidth'])) - $fd.=",'MissingWidth'=>".$fm['MissingWidth']; - $fd.=')'; - return $fd; -} - -function MakeWidthArrayTTF($fm) -{ - //Make character width array - $s="array("; - $cw=$fm['Widths']; - $els=array(); - $c=0; - foreach ($cw as $i => $w) - { - $els[] = ((($c++)%16==0)?"\n\t":'').$i.'=>'.$w; - } - $s .= implode(', ', $els); - $s.=')'; - return $s; -} - - -/******************************************************************************* -* $fontfile: path to TTF file (or empty string if not to be embedded) * -* $ufmfile: path to UFM file * -*******************************************************************************/ -function MakeFontTTF($fontfile,$ufmfile) -{ - //Generate a font definition file - if (ini_get("magic_quotes_runtime")) set_magic_quotes_runtime(0); - if(!file_exists($ufmfile)) - die('Error: UFM file not found: '.$ufmfile); - $cidtogidmap = ''; - $fm=ReadUFM($ufmfile, $cidtogidmap); - $fd=MakeFontDescriptorTTF($fm); - //Find font type - if($fontfile) - { - $ext=strtolower(substr($fontfile,-3)); - if($ext=='ttf') - $type='TrueTypeUnicode'; - else - die('Error: not a truetype font: '.$ext); - } - else - { - if($type!='TrueTypeUnicode') - die('Error: incorrect font type: '.$type); - } - //Start generation - $s='Error: font file not found: '.$fontfile); - CheckTTF($fontfile); - $f=fopen($fontfile,'rb'); - if(!$f) - die('Error: Can\'t open '.$fontfile); - $file=fread($f,filesize($fontfile)); - fclose($f); - if(function_exists('gzcompress')) - { - $cmp=$basename.'.z'; - SaveToFile($cmp,gzcompress($file),'b'); - $s.='$file=\''.$cmp."';\n"; - // echo 'Font file compressed ('.$cmp.')
    '; - - $cmp=$basename.'.ctg.z'; - SaveToFile($cmp,gzcompress($cidtogidmap),'b'); - //echo 'CIDToGIDMap created and compressed ('.$cmp.')
    '; - $s.='$ctg=\''.$cmp."';\n"; - } - else - { - $s.='$file=\''.basename($fontfile)."';\n"; - echo 'Notice: font file could not be compressed (gzcompress not available)
    '; - - $cmp=$basename.'.ctg'; - $f = fopen($cmp, 'wb'); - fwrite($f, $cidtogidmap); - fclose($f); - echo 'CIDToGIDMap created ('.$cmp.')
    '; - $s.='$ctg=\''.$cmp."';\n"; - } - if($type=='Type1') - { - $s.='$size1='.$size1.";\n"; - $s.='$size2='.$size2.";\n"; - } - else - $s.='$originalsize='.filesize($fontfile).";\n"; - } - else - { - //Not embedded font - $s.='$file='."'';\n"; - } - $s.="?>\n"; - SaveToFile($basename.'.php',$s); - // echo 'Font definition file generated ('.$basename.'.php'.')
    '; - return true; -} - - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/makefonts/maps/index.html b/main/inc/lib/mpdf/makefonts/maps/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/makefonts/maps/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/makefonts/maps/iso-8859-2.map b/main/inc/lib/mpdf/makefonts/maps/iso-8859-2.map deleted file mode 100755 index 65ae09f958..0000000000 --- a/main/inc/lib/mpdf/makefonts/maps/iso-8859-2.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+02D8 breve -!A3 U+0141 Lslash -!A4 U+00A4 currency -!A5 U+013D Lcaron -!A6 U+015A Sacute -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+015E Scedilla -!AB U+0164 Tcaron -!AC U+0179 Zacute -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0142 lslash -!B4 U+00B4 acute -!B5 U+013E lcaron -!B6 U+015B sacute -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+015F scedilla -!BB U+0165 tcaron -!BC U+017A zacute -!BD U+02DD hungarumlaut -!BE U+017E zcaron -!BF U+017C zdotaccent -!C0 U+0154 Racute -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0139 Lacute -!C6 U+0106 Cacute -!C7 U+00C7 Ccedilla -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+011A Ecaron -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+010E Dcaron -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+0147 Ncaron -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0158 Rcaron -!D9 U+016E Uring -!DA U+00DA Uacute -!DB U+0170 Uhungarumlaut -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+0162 Tcommaaccent -!DF U+00DF germandbls -!E0 U+0155 racute -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+013A lacute -!E6 U+0107 cacute -!E7 U+00E7 ccedilla -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+011B ecaron -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+010F dcaron -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+0148 ncaron -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0159 rcaron -!F9 U+016F uring -!FA U+00FA uacute -!FB U+0171 uhungarumlaut -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+0163 tcommaaccent -!FF U+02D9 dotaccent diff --git a/main/inc/lib/mpdf/makefonts/maps/iso-8859-4.map b/main/inc/lib/mpdf/makefonts/maps/iso-8859-4.map deleted file mode 100755 index a7d87bf3ef..0000000000 --- a/main/inc/lib/mpdf/makefonts/maps/iso-8859-4.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+0138 kgreenlandic -!A3 U+0156 Rcommaaccent -!A4 U+00A4 currency -!A5 U+0128 Itilde -!A6 U+013B Lcommaaccent -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+0112 Emacron -!AB U+0122 Gcommaaccent -!AC U+0166 Tbar -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0157 rcommaaccent -!B4 U+00B4 acute -!B5 U+0129 itilde -!B6 U+013C lcommaaccent -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+0113 emacron -!BB U+0123 gcommaaccent -!BC U+0167 tbar -!BD U+014A Eng -!BE U+017E zcaron -!BF U+014B eng -!C0 U+0100 Amacron -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+012E Iogonek -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+0116 Edotaccent -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+012A Imacron -!D0 U+0110 Dcroat -!D1 U+0145 Ncommaaccent -!D2 U+014C Omacron -!D3 U+0136 Kcommaaccent -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+0172 Uogonek -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0168 Utilde -!DE U+016A Umacron -!DF U+00DF germandbls -!E0 U+0101 amacron -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+012F iogonek -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+0117 edotaccent -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+012B imacron -!F0 U+0111 dcroat -!F1 U+0146 ncommaaccent -!F2 U+014D omacron -!F3 U+0137 kcommaaccent -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+0173 uogonek -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0169 utilde -!FE U+016B umacron -!FF U+02D9 dotaccent diff --git a/main/inc/lib/mpdf/makefonts/maps/iso-8859-7.map b/main/inc/lib/mpdf/makefonts/maps/iso-8859-7.map deleted file mode 100755 index e163796b1c..0000000000 --- a/main/inc/lib/mpdf/makefonts/maps/iso-8859-7.map +++ /dev/null @@ -1,250 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+2018 quoteleft -!A2 U+2019 quoteright -!A3 U+00A3 sterling -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AF U+2015 afii00208 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+0384 tonos -!B5 U+0385 dieresistonos -!B6 U+0386 Alphatonos -!B7 U+00B7 periodcentered -!B8 U+0388 Epsilontonos -!B9 U+0389 Etatonos -!BA U+038A Iotatonos -!BB U+00BB guillemotright -!BC U+038C Omicrontonos -!BD U+00BD onehalf -!BE U+038E Upsilontonos -!BF U+038F Omegatonos -!C0 U+0390 iotadieresistonos -!C1 U+0391 Alpha -!C2 U+0392 Beta -!C3 U+0393 Gamma -!C4 U+0394 Delta -!C5 U+0395 Epsilon -!C6 U+0396 Zeta -!C7 U+0397 Eta -!C8 U+0398 Theta -!C9 U+0399 Iota -!CA U+039A Kappa -!CB U+039B Lambda -!CC U+039C Mu -!CD U+039D Nu -!CE U+039E Xi -!CF U+039F Omicron -!D0 U+03A0 Pi -!D1 U+03A1 Rho -!D3 U+03A3 Sigma -!D4 U+03A4 Tau -!D5 U+03A5 Upsilon -!D6 U+03A6 Phi -!D7 U+03A7 Chi -!D8 U+03A8 Psi -!D9 U+03A9 Omega -!DA U+03AA Iotadieresis -!DB U+03AB Upsilondieresis -!DC U+03AC alphatonos -!DD U+03AD epsilontonos -!DE U+03AE etatonos -!DF U+03AF iotatonos -!E0 U+03B0 upsilondieresistonos -!E1 U+03B1 alpha -!E2 U+03B2 beta -!E3 U+03B3 gamma -!E4 U+03B4 delta -!E5 U+03B5 epsilon -!E6 U+03B6 zeta -!E7 U+03B7 eta -!E8 U+03B8 theta -!E9 U+03B9 iota -!EA U+03BA kappa -!EB U+03BB lambda -!EC U+03BC mu -!ED U+03BD nu -!EE U+03BE xi -!EF U+03BF omicron -!F0 U+03C0 pi -!F1 U+03C1 rho -!F2 U+03C2 sigma1 -!F3 U+03C3 sigma -!F4 U+03C4 tau -!F5 U+03C5 upsilon -!F6 U+03C6 phi -!F7 U+03C7 chi -!F8 U+03C8 psi -!F9 U+03C9 omega -!FA U+03CA iotadieresis -!FB U+03CB upsilondieresis -!FC U+03CC omicrontonos -!FD U+03CD upsilontonos -!FE U+03CE omegatonos diff --git a/main/inc/lib/mpdf/makefonts/maps/iso-8859-9.map b/main/inc/lib/mpdf/makefonts/maps/iso-8859-9.map deleted file mode 100755 index 48c123ae6f..0000000000 --- a/main/inc/lib/mpdf/makefonts/maps/iso-8859-9.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+011E Gbreve -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0130 Idotaccent -!DE U+015E Scedilla -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+011F gbreve -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0131 dotlessi -!FE U+015F scedilla -!FF U+00FF ydieresis diff --git a/main/inc/lib/mpdf/makefonts/maps/win-1251.map b/main/inc/lib/mpdf/makefonts/maps/win-1251.map deleted file mode 100755 index de6a198d99..0000000000 --- a/main/inc/lib/mpdf/makefonts/maps/win-1251.map +++ /dev/null @@ -1,255 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0402 afii10051 -!81 U+0403 afii10052 -!82 U+201A quotesinglbase -!83 U+0453 afii10100 -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+20AC Euro -!89 U+2030 perthousand -!8A U+0409 afii10058 -!8B U+2039 guilsinglleft -!8C U+040A afii10059 -!8D U+040C afii10061 -!8E U+040B afii10060 -!8F U+040F afii10145 -!90 U+0452 afii10099 -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9A U+0459 afii10106 -!9B U+203A guilsinglright -!9C U+045A afii10107 -!9D U+045C afii10109 -!9E U+045B afii10108 -!9F U+045F afii10193 -!A0 U+00A0 space -!A1 U+040E afii10062 -!A2 U+045E afii10110 -!A3 U+0408 afii10057 -!A4 U+00A4 currency -!A5 U+0490 afii10050 -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+0401 afii10023 -!A9 U+00A9 copyright -!AA U+0404 afii10053 -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+0407 afii10056 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+0406 afii10055 -!B3 U+0456 afii10103 -!B4 U+0491 afii10098 -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+0451 afii10071 -!B9 U+2116 afii61352 -!BA U+0454 afii10101 -!BB U+00BB guillemotright -!BC U+0458 afii10105 -!BD U+0405 afii10054 -!BE U+0455 afii10102 -!BF U+0457 afii10104 -!C0 U+0410 afii10017 -!C1 U+0411 afii10018 -!C2 U+0412 afii10019 -!C3 U+0413 afii10020 -!C4 U+0414 afii10021 -!C5 U+0415 afii10022 -!C6 U+0416 afii10024 -!C7 U+0417 afii10025 -!C8 U+0418 afii10026 -!C9 U+0419 afii10027 -!CA U+041A afii10028 -!CB U+041B afii10029 -!CC U+041C afii10030 -!CD U+041D afii10031 -!CE U+041E afii10032 -!CF U+041F afii10033 -!D0 U+0420 afii10034 -!D1 U+0421 afii10035 -!D2 U+0422 afii10036 -!D3 U+0423 afii10037 -!D4 U+0424 afii10038 -!D5 U+0425 afii10039 -!D6 U+0426 afii10040 -!D7 U+0427 afii10041 -!D8 U+0428 afii10042 -!D9 U+0429 afii10043 -!DA U+042A afii10044 -!DB U+042B afii10045 -!DC U+042C afii10046 -!DD U+042D afii10047 -!DE U+042E afii10048 -!DF U+042F afii10049 -!E0 U+0430 afii10065 -!E1 U+0431 afii10066 -!E2 U+0432 afii10067 -!E3 U+0433 afii10068 -!E4 U+0434 afii10069 -!E5 U+0435 afii10070 -!E6 U+0436 afii10072 -!E7 U+0437 afii10073 -!E8 U+0438 afii10074 -!E9 U+0439 afii10075 -!EA U+043A afii10076 -!EB U+043B afii10077 -!EC U+043C afii10078 -!ED U+043D afii10079 -!EE U+043E afii10080 -!EF U+043F afii10081 -!F0 U+0440 afii10082 -!F1 U+0441 afii10083 -!F2 U+0442 afii10084 -!F3 U+0443 afii10085 -!F4 U+0444 afii10086 -!F5 U+0445 afii10087 -!F6 U+0446 afii10088 -!F7 U+0447 afii10089 -!F8 U+0448 afii10090 -!F9 U+0449 afii10091 -!FA U+044A afii10092 -!FB U+044B afii10093 -!FC U+044C afii10094 -!FD U+044D afii10095 -!FE U+044E afii10096 -!FF U+044F afii10097 diff --git a/main/inc/lib/mpdf/makefonts/maps/win-1252.map b/main/inc/lib/mpdf/makefonts/maps/win-1252.map deleted file mode 100755 index dd490e5961..0000000000 --- a/main/inc/lib/mpdf/makefonts/maps/win-1252.map +++ /dev/null @@ -1,251 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+0152 OE -!8E U+017D Zcaron -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+0153 oe -!9E U+017E zcaron -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis diff --git a/main/inc/lib/mpdf/maps/index.html b/main/inc/lib/mpdf/maps/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/maps/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/maps/iso-8859-2.map b/main/inc/lib/mpdf/maps/iso-8859-2.map deleted file mode 100755 index 65ae09f958..0000000000 --- a/main/inc/lib/mpdf/maps/iso-8859-2.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+02D8 breve -!A3 U+0141 Lslash -!A4 U+00A4 currency -!A5 U+013D Lcaron -!A6 U+015A Sacute -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+015E Scedilla -!AB U+0164 Tcaron -!AC U+0179 Zacute -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0142 lslash -!B4 U+00B4 acute -!B5 U+013E lcaron -!B6 U+015B sacute -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+015F scedilla -!BB U+0165 tcaron -!BC U+017A zacute -!BD U+02DD hungarumlaut -!BE U+017E zcaron -!BF U+017C zdotaccent -!C0 U+0154 Racute -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0139 Lacute -!C6 U+0106 Cacute -!C7 U+00C7 Ccedilla -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+011A Ecaron -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+010E Dcaron -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+0147 Ncaron -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0158 Rcaron -!D9 U+016E Uring -!DA U+00DA Uacute -!DB U+0170 Uhungarumlaut -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+0162 Tcommaaccent -!DF U+00DF germandbls -!E0 U+0155 racute -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+013A lacute -!E6 U+0107 cacute -!E7 U+00E7 ccedilla -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+011B ecaron -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+010F dcaron -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+0148 ncaron -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0159 rcaron -!F9 U+016F uring -!FA U+00FA uacute -!FB U+0171 uhungarumlaut -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+0163 tcommaaccent -!FF U+02D9 dotaccent diff --git a/main/inc/lib/mpdf/maps/iso-8859-4.map b/main/inc/lib/mpdf/maps/iso-8859-4.map deleted file mode 100755 index a7d87bf3ef..0000000000 --- a/main/inc/lib/mpdf/maps/iso-8859-4.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+0138 kgreenlandic -!A3 U+0156 Rcommaaccent -!A4 U+00A4 currency -!A5 U+0128 Itilde -!A6 U+013B Lcommaaccent -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+0112 Emacron -!AB U+0122 Gcommaaccent -!AC U+0166 Tbar -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0157 rcommaaccent -!B4 U+00B4 acute -!B5 U+0129 itilde -!B6 U+013C lcommaaccent -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+0113 emacron -!BB U+0123 gcommaaccent -!BC U+0167 tbar -!BD U+014A Eng -!BE U+017E zcaron -!BF U+014B eng -!C0 U+0100 Amacron -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+012E Iogonek -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+0116 Edotaccent -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+012A Imacron -!D0 U+0110 Dcroat -!D1 U+0145 Ncommaaccent -!D2 U+014C Omacron -!D3 U+0136 Kcommaaccent -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+0172 Uogonek -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0168 Utilde -!DE U+016A Umacron -!DF U+00DF germandbls -!E0 U+0101 amacron -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+012F iogonek -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+0117 edotaccent -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+012B imacron -!F0 U+0111 dcroat -!F1 U+0146 ncommaaccent -!F2 U+014D omacron -!F3 U+0137 kcommaaccent -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+0173 uogonek -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0169 utilde -!FE U+016B umacron -!FF U+02D9 dotaccent diff --git a/main/inc/lib/mpdf/maps/iso-8859-7.map b/main/inc/lib/mpdf/maps/iso-8859-7.map deleted file mode 100755 index e163796b1c..0000000000 --- a/main/inc/lib/mpdf/maps/iso-8859-7.map +++ /dev/null @@ -1,250 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+2018 quoteleft -!A2 U+2019 quoteright -!A3 U+00A3 sterling -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AF U+2015 afii00208 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+0384 tonos -!B5 U+0385 dieresistonos -!B6 U+0386 Alphatonos -!B7 U+00B7 periodcentered -!B8 U+0388 Epsilontonos -!B9 U+0389 Etatonos -!BA U+038A Iotatonos -!BB U+00BB guillemotright -!BC U+038C Omicrontonos -!BD U+00BD onehalf -!BE U+038E Upsilontonos -!BF U+038F Omegatonos -!C0 U+0390 iotadieresistonos -!C1 U+0391 Alpha -!C2 U+0392 Beta -!C3 U+0393 Gamma -!C4 U+0394 Delta -!C5 U+0395 Epsilon -!C6 U+0396 Zeta -!C7 U+0397 Eta -!C8 U+0398 Theta -!C9 U+0399 Iota -!CA U+039A Kappa -!CB U+039B Lambda -!CC U+039C Mu -!CD U+039D Nu -!CE U+039E Xi -!CF U+039F Omicron -!D0 U+03A0 Pi -!D1 U+03A1 Rho -!D3 U+03A3 Sigma -!D4 U+03A4 Tau -!D5 U+03A5 Upsilon -!D6 U+03A6 Phi -!D7 U+03A7 Chi -!D8 U+03A8 Psi -!D9 U+03A9 Omega -!DA U+03AA Iotadieresis -!DB U+03AB Upsilondieresis -!DC U+03AC alphatonos -!DD U+03AD epsilontonos -!DE U+03AE etatonos -!DF U+03AF iotatonos -!E0 U+03B0 upsilondieresistonos -!E1 U+03B1 alpha -!E2 U+03B2 beta -!E3 U+03B3 gamma -!E4 U+03B4 delta -!E5 U+03B5 epsilon -!E6 U+03B6 zeta -!E7 U+03B7 eta -!E8 U+03B8 theta -!E9 U+03B9 iota -!EA U+03BA kappa -!EB U+03BB lambda -!EC U+03BC mu -!ED U+03BD nu -!EE U+03BE xi -!EF U+03BF omicron -!F0 U+03C0 pi -!F1 U+03C1 rho -!F2 U+03C2 sigma1 -!F3 U+03C3 sigma -!F4 U+03C4 tau -!F5 U+03C5 upsilon -!F6 U+03C6 phi -!F7 U+03C7 chi -!F8 U+03C8 psi -!F9 U+03C9 omega -!FA U+03CA iotadieresis -!FB U+03CB upsilondieresis -!FC U+03CC omicrontonos -!FD U+03CD upsilontonos -!FE U+03CE omegatonos diff --git a/main/inc/lib/mpdf/maps/iso-8859-9.map b/main/inc/lib/mpdf/maps/iso-8859-9.map deleted file mode 100755 index 48c123ae6f..0000000000 --- a/main/inc/lib/mpdf/maps/iso-8859-9.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+011E Gbreve -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0130 Idotaccent -!DE U+015E Scedilla -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+011F gbreve -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0131 dotlessi -!FE U+015F scedilla -!FF U+00FF ydieresis diff --git a/main/inc/lib/mpdf/maps/win-1251.map b/main/inc/lib/mpdf/maps/win-1251.map deleted file mode 100755 index de6a198d99..0000000000 --- a/main/inc/lib/mpdf/maps/win-1251.map +++ /dev/null @@ -1,255 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0402 afii10051 -!81 U+0403 afii10052 -!82 U+201A quotesinglbase -!83 U+0453 afii10100 -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+20AC Euro -!89 U+2030 perthousand -!8A U+0409 afii10058 -!8B U+2039 guilsinglleft -!8C U+040A afii10059 -!8D U+040C afii10061 -!8E U+040B afii10060 -!8F U+040F afii10145 -!90 U+0452 afii10099 -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9A U+0459 afii10106 -!9B U+203A guilsinglright -!9C U+045A afii10107 -!9D U+045C afii10109 -!9E U+045B afii10108 -!9F U+045F afii10193 -!A0 U+00A0 space -!A1 U+040E afii10062 -!A2 U+045E afii10110 -!A3 U+0408 afii10057 -!A4 U+00A4 currency -!A5 U+0490 afii10050 -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+0401 afii10023 -!A9 U+00A9 copyright -!AA U+0404 afii10053 -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+0407 afii10056 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+0406 afii10055 -!B3 U+0456 afii10103 -!B4 U+0491 afii10098 -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+0451 afii10071 -!B9 U+2116 afii61352 -!BA U+0454 afii10101 -!BB U+00BB guillemotright -!BC U+0458 afii10105 -!BD U+0405 afii10054 -!BE U+0455 afii10102 -!BF U+0457 afii10104 -!C0 U+0410 afii10017 -!C1 U+0411 afii10018 -!C2 U+0412 afii10019 -!C3 U+0413 afii10020 -!C4 U+0414 afii10021 -!C5 U+0415 afii10022 -!C6 U+0416 afii10024 -!C7 U+0417 afii10025 -!C8 U+0418 afii10026 -!C9 U+0419 afii10027 -!CA U+041A afii10028 -!CB U+041B afii10029 -!CC U+041C afii10030 -!CD U+041D afii10031 -!CE U+041E afii10032 -!CF U+041F afii10033 -!D0 U+0420 afii10034 -!D1 U+0421 afii10035 -!D2 U+0422 afii10036 -!D3 U+0423 afii10037 -!D4 U+0424 afii10038 -!D5 U+0425 afii10039 -!D6 U+0426 afii10040 -!D7 U+0427 afii10041 -!D8 U+0428 afii10042 -!D9 U+0429 afii10043 -!DA U+042A afii10044 -!DB U+042B afii10045 -!DC U+042C afii10046 -!DD U+042D afii10047 -!DE U+042E afii10048 -!DF U+042F afii10049 -!E0 U+0430 afii10065 -!E1 U+0431 afii10066 -!E2 U+0432 afii10067 -!E3 U+0433 afii10068 -!E4 U+0434 afii10069 -!E5 U+0435 afii10070 -!E6 U+0436 afii10072 -!E7 U+0437 afii10073 -!E8 U+0438 afii10074 -!E9 U+0439 afii10075 -!EA U+043A afii10076 -!EB U+043B afii10077 -!EC U+043C afii10078 -!ED U+043D afii10079 -!EE U+043E afii10080 -!EF U+043F afii10081 -!F0 U+0440 afii10082 -!F1 U+0441 afii10083 -!F2 U+0442 afii10084 -!F3 U+0443 afii10085 -!F4 U+0444 afii10086 -!F5 U+0445 afii10087 -!F6 U+0446 afii10088 -!F7 U+0447 afii10089 -!F8 U+0448 afii10090 -!F9 U+0449 afii10091 -!FA U+044A afii10092 -!FB U+044B afii10093 -!FC U+044C afii10094 -!FD U+044D afii10095 -!FE U+044E afii10096 -!FF U+044F afii10097 diff --git a/main/inc/lib/mpdf/maps/win-1252.map b/main/inc/lib/mpdf/maps/win-1252.map deleted file mode 100755 index dd490e5961..0000000000 --- a/main/inc/lib/mpdf/maps/win-1252.map +++ /dev/null @@ -1,251 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+0152 OE -!8E U+017D Zcaron -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+0153 oe -!9E U+017E zcaron -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis diff --git a/main/inc/lib/mpdf/mpdf.css b/main/inc/lib/mpdf/mpdf.css deleted file mode 100755 index 4b071b8deb..0000000000 --- a/main/inc/lib/mpdf/mpdf.css +++ /dev/null @@ -1,20 +0,0 @@ -/* - This is a secondary default stylesheet for mPDF - It will only parse element-level CSS here - Remove the comment marks below and edit as required -*/ - - - -/* - These values used to be the default prior to mPDF 4.2 - Altered to make appearance closer to that of browsers - Uncomment these lines to return to behaviour prior to v4.2 -*/ - - -/* -img { margin: 0.83em 0; vertical-align: bottom; } -table { margin: 0.5em; } -textarea { vertical-align: top; } -*/ diff --git a/main/inc/lib/mpdf/mpdf.php b/main/inc/lib/mpdf/mpdf.php deleted file mode 100755 index 5e8fca6086..0000000000 --- a/main/inc/lib/mpdf/mpdf.php +++ /dev/null @@ -1,29584 +0,0 @@ - * -// License: GPL * -// * -// Changes: See changelog.txt * -// ****************************************************************************** - - -define('mPDF_VERSION','4.6'); - -define('AUTOFONT_CJK',1); -define('AUTOFONT_THAIVIET',2); -define('AUTOFONT_RTL',4); -define('AUTOFONT_INDIC',8); -define('AUTOFONT_ALL',15); - -define('_BORDER_ALL',15); -define('_BORDER_TOP',8); -define('_BORDER_RIGHT',4); -define('_BORDER_BOTTOM',2); -define('_BORDER_LEFT',1); - -if (!defined('_MPDF_PATH')) define('_MPDF_PATH', dirname(preg_replace('/\\\\/','/',__FILE__)) . '/'); // mPDF 4.2 \ to / - -require_once(_MPDF_PATH.'includes/functions.php'); -require_once(_MPDF_PATH.'config_cp.php'); - -if (!defined('_JPGRAPH_PATH')) define("_JPGRAPH_PATH", _MPDF_PATH.'jpgraph/'); - -// Removed by Ivan Tcholakov, 28-JUN-2010. -//if (!defined('_MPDF_TEMP_PATH')) define("_MPDF_TEMP_PATH", _MPDF_PATH.'tmp/'); // mPDF 4.3.007E -// - -// Added by Ivan Tcholakov, 28-JUN-2010. -// The directories ".../chamilo/main/inc/lib/mpdf/graph_cache/" and ".../chamilo/main/inc/lib/mpdf/tmp/" -// are moved at new locations ".../chamilo/arcive/mpdf/graph_cache/" and ".../chamilo/arcive/mpdf/tmp/" -// where access for writting is guaranteed. -define('_MPDF_GRAPH_CHACHE_PATH', api_get_path(SYS_ARCHIVE_PATH).'mpdf/graph_cache/'); -if (!file_exists(_MPDF_GRAPH_CHACHE_PATH)) { - @mkdir(_MPDF_GRAPH_CHACHE_PATH, api_get_permissions_for_new_directories(), true); -} -define('_MPDF_TEMP_PATH', api_get_path(SYS_ARCHIVE_PATH).'mpdf/tmp/'); -if (!file_exists(_MPDF_TEMP_PATH)) { - @mkdir(_MPDF_TEMP_PATH, api_get_permissions_for_new_directories(), true); -} -// - -$errorlevel=error_reporting(); -$errorlevel=error_reporting($errorlevel & ~E_NOTICE); - -//error_reporting(E_ALL); - -if(function_exists("date_default_timezone_set") and function_exists("date_default_timezone_get")) -@date_default_timezone_set(@date_default_timezone_get()); -// Disabled by Ivan Tcholakov, 28-JAN-2010. -//if (!function_exists("mb_strlen")) { die("Error - mPDF requires mb_string functions. Ensure that PHP is compiled with php_mbstring.dll enabled."); } -// - -class mPDF -{ - -/////////////////////////////// -// EXTERNAL (PUBLIC) VARIABLES -// Define these in config.php -/////////////////////////////// -var $tableMinSizePriority; // mPDF 4.5.006 - - -var $dpi; // mPDF 4.4.003 -var $watermarkImgAlphaBlend; // mPDF 4.4.002 -var $watermarkImgBehind; // mPDF 4.3.018 -var $justifyB4br; // mPDF 4.3.003 -var $packTableData; // mPDF 4.3.009 -var $pgsIns; // mPDF 4.2.020 -var $PDFA; // mPDF 4.2.018 -var $PDFAauto; // mPDF 4.2.018 -var $ICCProfile; // mPDF 4.2.018 -var $simpleTables; // mPDF 4.2.017 -var $enableImports; // mPDF 4.2.006 Adding mPDFI - -var $debug; -var $showStats; -var $setAutoTopMargin; -var $setAutoBottomMargin; -var $autoMarginPadding; -// mPDF 4.2 -var $collapseBlockMargins; -var $useSubstitutionsMB; -var $falseBoldWeight; -var $normalLineheight; -var $progressBar; -var $incrementFPR1; -var $incrementFPR2; -var $incrementFPR3; -var $incrementFPR4; - -var $hyphenate; -var $hyphenateTables; -var $SHYlang; -var $SHYleftmin; -var $SHYrightmin; -var $SHYcharmin; -var $SHYcharmax; -var $SHYlanguages; -// PageNumber Conditional Text -var $pagenumPrefix; -var $pagenumSuffix; -var $nbpgPrefix; -var $nbpgSuffix; -var $showImageErrors; -var $allow_output_buffering; -var $autoPadding; -var $useGraphs; -var $autoFontGroupSize; -var $disableMultilingualJustify; -var $tabSpaces; -var $useLang; -var $restoreBlockPagebreaks; -var $watermarkTextAlpha; -var $watermarkImageAlpha; -var $watermark_size; -var $watermark_pos; -var $annotSize; -var $annotMargin; -var $annotOpacity; -var $title2annots; -var $keepColumns; -var $keep_table_proportions; -var $ignore_table_widths; -var $ignore_table_percents; -var $list_align_style; -var $list_number_suffix; -var $useSubstitutions; -var $CSSselectMedia; // mPDF 4.3.001 -// $disablePrintCSS depracated - -var $forcePortraitHeaders; -var $forcePortraitMargins; -var $displayDefaultOrientation; -var $ignore_invalid_utf8; -var $allowedCSStags; -var $useOnlyCoreFonts; -var $use_CJK_only; -var $allow_charset_conversion; - -var $jSpacing; -var $jSWord; -var $jSmaxChar; -var $jSmaxCharLast; -var $jSmaxWordLast; - -var $orphansAllowed; -var $max_colH_correction; - - -var $table_error_report; -var $table_error_report_param; -var $biDirectional; -var $text_input_as_HTML; -var $anchor2Bookmark; -var $list_indent_first_level; -var $shrink_tables_to_fit; - -var $rtlCSS; - -var $allow_html_optional_endtags; - -var $img_dpi; - -var $defaultheaderfontsize; -var $defaultheaderfontstyle; -var $defaultheaderline; -var $defaultfooterfontsize; -var $defaultfooterfontstyle; -var $defaultfooterline; -var $header_line_spacing; -var $footer_line_spacing; - -var $textarea_lineheight; - -var $pregRTLchars; -var $pregUHCchars; -var $pregSJISchars; -var $pregCJKchars; -var $pregASCIIchars1; -var $pregASCIIchars2; -var $pregASCIIchars3; -var $pregVIETchars; -var $pregVIETPluschars; -var $pregHEBchars; -var $pregARABICchars; -var $pregNonARABICchars; - -// INDIC -var $pregHIchars; -var $pregBNchars; -var $pregPAchars; -var $pregGUchars; -var $pregORchars; -var $pregTAchars; -var $pregTEchars; -var $pregKNchars; -var $pregMLchars; -var $pregSHchars; -var $pregINDextra; - -var $mirrorMargins; -var $default_lineheight_correction; -var $watermarkText; -var $watermarkImage; -var $showWatermarkText; -var $showWatermarkImage; - -var $fontsizes; - -// Aliases for backward compatability -var $UnvalidatedText; // alias = $watermarkText -var $TopicIsUnvalidated; // alias = $showWatermarkText -var $use_embeddedfonts_1252; // alias = $useOnlyCoreFonts -var $useOddEven; // alias = $mirrorMargins - -////////////////////// -// INTERNAL VARIABLES -////////////////////// -var $watermarkImgAlpha; // mPDF 4.3.018 -var $PDFAwarnings; // mPDF 4.2.018 -var $MetadataRoot; // mPDF 4.2.018 -var $OutputIntentRoot; // mPDF 4.2.018 -var $InfoRoot; // mPDF 4.2.018 -// mPDF 4.2.006 From mPDFI -var $current_filename; -var $parsers; -var $current_parser; -var $_obj_stack; -var $_don_obj_stack; -var $_current_obj_id; -var $tpls; -var $tpl; -var $tplprefix; -var $_res; - - -var $pdf_version; -// mPDF 4.2 -var $noImageFile; -var $lastblockbottommargin; -var $baselineC; -var $subPos; -var $subArrMB; -var $ReqFontStyle; // mPDF 4.2 -var $tableClipPath ; // mPDF 4.2 -var $forceExactLineheight; // mPDF 4.2 -var $listOcc; // mPDF 4.2 - -// mPDF 4.1 -var $fullImageHeight; -// mPDF 4.0 -var $inFixedPosBlock; // Internal flag for position:fixed block -var $fixedPosBlock; // Buffer string for position:fixed block -var $fixedPosBlockDepth; -var $fixedPosBlockBBox; -var $fixedPosBlockSave; -var $maxPosL; -var $maxPosR; - -var $loaded; - -var $useSubsets; -var $extraFontSubsets; -var $docTemplateStart; // Internal flag for page (page no. -1) that docTemplate starts on -var $time0; - -// Classes -var $t1asm; -var $indic; -var $barcode; - -var $SHYpatterns; -var $loadedSHYpatterns; -var $loadedSHYdictionary; -var $SHYdictionary; -var $SHYdictionaryWords; - -var $spanbgcolorarray; -var $default_font; -var $list_lineheight; -var $headerbuffer; -var $lastblocklevelchange; -var $nestedtablejustfinished; -var $linebreakjustfinished; -var $cell_border_dominance_L; -var $cell_border_dominance_R; -var $cell_border_dominance_T; -var $cell_border_dominance_B; -var $tbCSSlvl; -var $listCSSlvl; -var $table_keep_together; -var $plainCell_properties; -var $inherit_lineheight; -var $listitemtype; -var $shrin_k1; -var $outerfilled; - -var $blockContext; -var $floatDivs; - -var $tablecascadeCSS; -var $listcascadeCSS; - -var $patterns; -var $pageBackgrounds; - -var $bodyBackgroundGradient; -var $bodyBackgroundImage; -var $bodyBackgroundColor; - -var $writingHTMLheader; // internal flag - used both for writing HTMLHeaders/Footers and FixedPos block -var $writingHTMLfooter; -var $autoFontGroups; -var $angle; - -var $gradients; - -var $kwt_Reference; -var $kwt_BMoutlines; -var $kwt_toc; - -var $tbrot_Reference; -var $tbrot_BMoutlines; -var $tbrot_toc; - -var $col_Reference; -var $col_BMoutlines; -var $col_toc; - -var $currentGraphId; -var $graphs; - -var $floatbuffer; -var $floatmargins; - -var $bullet; -var $bulletarray; - -var $rtlAsArabicFarsi; // DEPRACATED - -var $currentLang; -var $default_lang; -var $default_jSpacing; -var $default_available_fonts; -var $default_dir; - -var $pageTemplate; -var $docTemplate; -var $docTemplateContinue; - -var $arabGlyphs; -var $arabHex; -var $persianGlyphs; -var $persianHex; -var $arabVowels; -var $arabPrevLink; -var $arabNextLink; - - -var $formobjects; // array of Form Objects for WMF -var $gdiObjectArray; // array of GDI objects for WMF -var $InlineProperties; // Should have done this a long time ago -var $InlineAnnots; -var $ktAnnots; -var $tbrot_Annots; -var $kwt_Annots; -var $columnAnnots; - -var $PageAnnots; - -var $pageDim; // Keep track of page wxh for orientation changes - set in _beginpage, used in _putannots - -var $breakpoints; - - -var $tableLevel; -var $tbctr; -var $innermostTableLevel; -var $saveTableCounter; -var $cellBorderBuffer; - -var $saveHTMLFooter_height; -var $saveHTMLFooterE_height; - -var $firstPageBoxHeader; -var $firstPageBoxHeaderEven; -var $firstPageBoxFooter; -var $firstPageBoxFooterEven; - -var $page_box; -var $show_marks; // crop or cross marks - -var $basepathIsLocal; - -var $use_kwt; -var $kwt; -var $kwt_height; -var $kwt_y0; -var $kwt_x0; -var $kwt_buffer; -var $kwt_Links; -var $kwt_moved; -var $kwt_saved; - -// NOT USED??? -var $formBgColor; -var $formBgColorSmall; // Color used for background of form fields if reduced in size (so border disappears) - -var $PageNumSubstitutions; - - -var $table_borders_separate; -var $base_table_properties; -var $borderstyles; -// doesn't include none or hidden - -var $listjustfinished; -var $blockjustfinished; - -var $orig_bMargin; -var $orig_tMargin; -var $orig_lMargin; -var $orig_rMargin; -var $orig_hMargin; -var $orig_fMargin; - -var $pageheaders; -var $pagefooters; - -var $pageHTMLheaders; -var $pageHTMLfooters; - -var $saveHTMLHeader; -var $saveHTMLFooter; - -var $HTMLheaderPageLinks; - -// See config_fonts.php for these next 5 values -var $available_fonts; -var $available_unifonts; -var $sans_fonts; -var $serif_fonts; -var $mono_fonts; - -// List of ALL available CJK fonts (incl. styles) (Adobe add-ons) hw removed -var $available_CJK_fonts; - -var $cascadeCSS; - -var $HTMLHeader; -var $HTMLFooter; -var $HTMLHeaderE; // for Even pages -var $HTMLFooterE; // for Even pages -var $bufferoutput; - - - -var $showdefaultpagenos; // DEPRACATED -left for backward compatability - - -var $chrs; -var $ords; - -// CJK fonts -var $Big5_widths; -var $GB_widths; -var $SJIS_widths; -var $UHC_widths; - -// SetProtection -var $encrypted; //whether document is protected -var $Uvalue; //U entry in pdf document -var $Ovalue; //O entry in pdf document -var $Pvalue; //P entry in pdf document -var $enc_obj_id; //encryption object id -var $last_rc4_key; //last RC4 key encrypted (cached for optimisation) -var $last_rc4_key_c; //last RC4 computed key -var $encryption_key; -var $padding; //used for encryption - -// Bookmark -var $BMoutlines; -var $OutlineRoot; -// TOC -var $_toc; -var $TOCmark; -var $TOCfont; -var $TOCfontsize; -var $TOCindent; -var $TOCheader; -var $TOCfooter; -var $TOCpreHTML; -var $TOCpostHTML; -var $TOCbookmarkText; -var $TOCusePaging; -var $TOCuseLinking; -var $TOCorientation; -var $TOC_margin_left; -var $TOC_margin_right; -var $TOC_margin_top; -var $TOC_margin_bottom; -var $TOC_margin_header; -var $TOC_margin_footer; -var $TOC_odd_header_name; -var $TOC_even_header_name; -var $TOC_odd_footer_name; -var $TOC_even_footer_name; -var $TOC_odd_header_value; -var $TOC_even_header_value; -var $TOC_odd_footer_value; -var $TOC_even_footer_value; -var $TOC_start; -var $TOC_end; -var $TOC_npages; -var $m_TOC; -// INDEX -var $ColActive; -var $ChangePage; //Flag indicating that a page break has occurred -var $Reference; -var $CurrCol; -var $NbCol; -var $y0; //Top ordinate of columns -var $ColL; -var $ColWidth; -var $ColGap; -// COLUMNS -var $ColR; -var $ChangeColumn; -var $columnbuffer; -var $ColDetails; -var $columnLinks; -var $colvAlign; -// Substitutions -var $substitute; // Array of substitution strings e.g. 112 -var $entsearch; // Array of HTML entities (>ASCII 127) to substitute -var $entsubstitute; // Array of substitution decimal unicode for the Hi entities - - -// Default values if no style sheet offered (cf. http://www.w3.org/TR/CSS21/sample.html) -var $defaultCSS; - -var $form_element_spacing; -var $linemaxfontsize; -var $lineheight_correction; -var $lastoptionaltag; // Save current block item which HTML specifies optionsl endtag -var $pageoutput; -var $charset_in; -var $blk; -var $blklvl; -var $ColumnAdjust; -var $ws; // Word spacing -var $HREF; -var $pgwidth; -var $fontlist; -var $issetfont; -var $issetcolor; -var $oldx; -var $oldy; -var $B; -var $U; -var $I; - -var $tdbegin; -var $table; -var $cell; -var $col; -var $row; - -var $divbegin; -var $divalign; -var $divwidth; -var $divheight; -var $divrevert; -var $spanbgcolor; - -var $spanlvl; -var $listlvl; -var $listnum; -var $listtype; -var $listoccur; -var $listlist; -var $listitem; - -var $pjustfinished; -var $ignorefollowingspaces; -var $SUP; -var $SUB; -var $SMALL; -var $BIG; -var $toupper; -var $tolower; -var $dash_on; -var $dotted_on; -var $strike; - -var $CSS; -var $textbuffer; -var $currentfontstyle; -var $currentfontfamily; -var $currentfontsize; -var $colorarray; -var $bgcolorarray; -var $internallink; -var $enabledtags; - -var $lineheight; -var $basepath; -var $outlineparam; -var $outline_on; - -var $specialcontent; -var $selectoption; - -var $usecss; -var $usepre; -var $usetableheader; - -var $tableheadernrows; -var $tablefooternrows; // mPDF 4.0 - -var $objectbuffer; - -// Table Rotation -var $table_rotate; -var $tbrot_maxw; -var $tbrot_maxh; -var $tablebuffer; - -var $tbrot_align; -var $tbrot_Links; - -var $divbuffer; // Buffer used when keeping DIV on one page -var $keep_block_together; // Keep a Block from page-break-inside: avoid -var $ktLinks; // Keep-together Block links array -var $ktBlock; // Keep-together Block array -var $ktReference; -var $ktBMoutlines; -var $_kttoc; - -var $tbrot_y0; -var $tbrot_x0; -var $tbrot_w; -var $tbrot_h; - -var $is_MB; // renamed from isunicode -var $codepage; -var $isCJK; -var $mb_enc; -var $directionality; - -var $extgstates; // Used for alpha channel - Transparency (Watermark) -var $tt_savefont; -var $mgl; -var $mgt; -var $mgr; -var $mgb; - -var $tts; -var $ttz; -var $tta; - -var $headerDetails; -var $footerDetails; - -// Best to alter the below variables using default stylesheet above -var $div_margin_bottom; -var $div_bottom_border; -var $p_margin_bottom; -var $p_bottom_border; -var $page_break_after_avoid; -var $margin_bottom_collapse; -var $img_margin_top; // default is set at top of fn.openTag 'IMG' -var $img_margin_bottom; -var $list_indent; -var $list_align; -var $list_margin_bottom; -var $default_font_size; // in pts -var $original_default_font_size; // used to save default sizes when using table default -var $original_default_font; -var $watermark_font; -var $defaultAlign; - -// TABLE -var $defaultTableAlign; -var $tablethead; -var $thead_font_weight; -var $thead_font_style; -var $thead_valign_default; -var $thead_textalign_default; - -var $tabletfoot; -var $tfoot_font_weight; -var $tfoot_font_style; -var $tfoot_valign_default; -var $tfoot_textalign_default; - -var $trow_text_rotate; - -var $cellPaddingL; -var $cellPaddingR; -var $cellPaddingT; -var $cellPaddingB; -var $table_lineheight; -var $table_border_attr_set; -var $table_border_css_set; - -var $shrin_k; // factor with which to shrink tables - used internally - do not change -var $shrink_this_table_to_fit; // 0 or false to disable; value (if set) gives maximum factor to reduce fontsize -var $MarginCorrection; // corrects for OddEven Margins -var $margin_footer; -var $margin_header; - -var $tabletheadjustfinished; -var $usingCoreFont; -var $charspacing; - -//Private properties FROM FPDF -var $DisplayPreferences; -var $outlines; -var $flowingBlockAttr; -var $page; //current page number -var $n; //current object number -var $offsets; //array of object offsets -var $buffer; //buffer holding in-memory PDF -var $pages; //array containing pages -var $state; //current document state -var $compress; //compression flag -var $DefOrientation; //default orientation -var $CurOrientation; //current orientation -var $OrientationChanges; //array indicating orientation changes -var $k; //scale factor (number of points in user unit) -var $fwPt; -var $fhPt; //dimensions of page format in points -var $fw; -var $fh; //dimensions of page format in user unit -var $wPt; -var $hPt; //current dimensions of page in points -var $w; -var $h; //current dimensions of page in user unit -var $lMargin; //left margin -var $tMargin; //top margin -var $rMargin; //right margin -var $bMargin; //page break margin -var $cMarginL; //cell margin Left -var $cMarginR; //cell margin Right -var $cMarginT; //cell margin Left -var $cMarginB; //cell margin Right -var $DeflMargin; //Default left margin -var $DefrMargin; //Default right margin -var $x; -var $y; //current position in user unit for cell positioning -var $lasth; //height of last cell printed -var $LineWidth; //line width in user unit -var $CoreFonts; //array of standard font names -var $fonts; //array of used fonts -var $FontFiles; //array of font files -var $diffs; //array of encoding differences -var $images; //array of used images -var $PageLinks; //array of links in pages -var $links; //array of internal links -var $FontFamily; //current font family -var $FontStyle; //current font style -var $underline; //underlining flag -var $CurrentFont; //current font info -var $FontSizePt; //current font size in points -var $FontSize; //current font size in user unit -var $DrawColor; //commands for drawing color -var $FillColor; //commands for filling color -var $TextColor; //commands for text color -var $ColorFlag; //indicates whether fill and text colors are different -var $autoPageBreak; //automatic page breaking -var $PageBreakTrigger; //threshold used to trigger page breaks -var $InFooter; //flag set when processing footer -var $InHTMLFooter; - -var $processingFooter; //flag set when processing footer - added for columns -var $processingHeader; //flag set when processing header - added for columns -var $ZoomMode; //zoom display mode -var $LayoutMode; //layout display mode -var $title; //title -var $subject; //subject -var $author; //author -var $keywords; //keywords -var $creator; //creator - -var $aliasNbPg; //alias for total number of pages -var $aliasNbPgGp; //alias for total number of pages in page group - -var $ispre; - -var $outerblocktags; -var $innerblocktags; -// NOT Currently used -var $inlinetags; -var $listtags; -var $tabletags; -var $formtags; - - -// ********************************** -// ********************************** -// ********************************** -// ********************************** -// ********************************** -// ********************************** -// ********************************** -// ********************************** -// ********************************** - -function mPDF($codepage='win-1252',$format='A4',$default_font_size=0,$default_font='',$mgl=15,$mgr=15,$mgt=16,$mgb=16,$mgh=9,$mgf=9, $orientation='P') { - - // mPDF 4.0 - $this->time0 = microtime(true); - $unit='mm'; - if (strlen($codepage)==0) { $codepage='win-1252'; } - //Some checks - $this->_dochecks(); - - // Set up Aliases for backwards compatability - $this->UnvalidatedText =& $this->watermarkText; - $this->TopicIsUnvalidated =& $this->showWatermarkText; - $this->AliasNbPg =& $this->aliasNbPg; - $this->AliasNbPgGp =& $this->aliasNbPgGp; - $this->BiDirectional =& $this->biDirectional; - $this->Anchor2Bookmark =& $this->anchor2Bookmark; - $this->KeepColumns =& $this->keepColumns; - $this->use_embeddedfonts_1252 =& $this->useOnlyCoreFonts; - $this->useOddEven =& $this->mirrorMargins; - - - //Initialization of properties - $this->page=0; - $this->n=2; - $this->buffer=''; - $this->objectbuffer = array(); - $this->pages=array(); - $this->OrientationChanges=array(); - $this->state=0; - $this->fonts=array(); - $this->FontFiles=array(); - $this->diffs=array(); - $this->images=array(); - $this->links=array(); - $this->InFooter=false; - $this->processingFooter=false; - $this->processingHeader=false; - $this->lasth=0; - $this->FontFamily=''; - $this->FontStyle=''; - $this->FontSizePt=9; - $this->underline=false; - $this->DrawColor='0 G'; - $this->FillColor='0 g'; - $this->TextColor='0 g'; - $this->ColorFlag=false; - $this->extgstates = array(); - - $this->is_MB=false; // renamed from isunicode - $this->isCJK = false; - $this->mb_enc='windows-1252'; - $this->directionality='ltr'; - $this->defaultAlign = 'L'; - $this->defaultTableAlign = 'L'; - - // mPDF 4.0 - $this->fixedPosBlockSave = array(); - $this->useSubsets = false; - $this->extraFontSubsets = 0; - $this->loaded = array(); - - $this->SHYpatterns = array(); - $this->loadedSHYdictionary = false; - $this->SHYdictionary = array(); - $this->SHYdictionaryWords = array(); - $this->blockContext = 1; - $this->floatDivs = array(); - $this->DisplayPreferences=''; - - $this->tablecascadeCSS = array(); - $this->listcascadeCSS = array(); - - $this->patterns = array(); // Tiling patterns used for backgrounds - $this->pageBackgrounds = array(); - $this->writingHTMLheader = false; // internal flag - used both for writing HTMLHeaders/Footers and FixedPos block - $this->writingHTMLfooter = false; // internal flag - used both for writing HTMLHeaders/Footers and FixedPos block - $this->gradients = array(); - - $this->kwt_Reference = array(); - $this->kwt_BMoutlines = array(); - $this->kwt_toc = array(); - - $this->tbrot_Reference = array(); - $this->tbrot_BMoutlines = array(); - $this->tbrot_toc = array(); - - $this->col_Reference = array(); - $this->col_BMoutlines = array(); - $this->col_toc = array(); - $this->graphs = array(); - - $this->pgsIns = array(); // mPDF 4.2.020 - $this->PDFAwarnings = array(); // mPDF 4.2.018 - - // mPDF 4.2 - $this->baselineC = 0.35; // Baseline for text - $this->noImageFile = str_replace("\\","/",dirname(__FILE__)) . '/includes/no_image.jpg'; - $this->subPos = 0; - $this->forceExactLineheight = false; - $this->listOcc = 0; - $this->normalLineheight = 1.3; - // These are intended as configuration variables, and should be set in config.php - which will override these values; - // set here as failsafe as will cause an error if not defined - $this->incrementFPR1 = 10; - $this->incrementFPR2 = 10; - $this->incrementFPR3 = 10; - $this->incrementFPR4 = 10; - - // mPDF 4.1 - $this->fullImageHeight = false; - $this->floatbuffer = array(); - $this->floatmargins = array(); - $this->autoFontGroups = 0; - $this->formobjects=array(); // array of Form Objects for WMF - $this->InlineProperties=array(); - $this->InlineAnnots=array(); - $this->ktAnnots=array(); - $this->tbrot_Annots=array(); - $this->kwt_Annots=array(); - $this->columnAnnots=array(); - $this->pageDim=array(); - $this->breakpoints = array(); // used in columnbuffer - $this->tableLevel=0; - $this->tbctr=array(); // counter for nested tables at each level - $this->page_box = array(); - $this->show_marks = ''; // crop or cross marks - $this->kwt = false; - $this->kwt_height = 0; - $this->kwt_y0 = 0; - $this->kwt_x0 = 0; - $this->kwt_buffer = array(); - $this->kwt_Links = array(); - $this->kwt_moved = false; - $this->kwt_saved = false; - $this->PageNumSubstitutions = array(); - $this->base_table_properties=array(); - $this->borderstyles = array('inset','groove','outset','ridge','dotted','dashed','solid','double'); - $this->tbrot_align = 'C'; - $this->pageheaders=array(); - $this->pagefooters=array(); - - $this->pageHTMLheaders=array(); - $this->pageHTMLfooters=array(); - $this->HTMLheaderPageLinks = array(); -/*-- CJK --*/ - $this->available_CJK_fonts = array( - 'gb','big5','sjis','uhc', - 'gbB','big5B','sjisB','uhcB', - 'gbI','big5I','sjisI','uhcI', - 'gbBI','big5BI','sjisBI','uhcBI', - ); -/*-- END CJK --*/ - $this->cascadeCSS = array(); - $this->bufferoutput = false; - $this->encrypted=false; //whether document is protected - $this->BMoutlines=array(); - $this->_toc=array(); - $this->TOCheader=false; - $this->TOCfooter=false; - $this->ColActive=0; //Flag indicating that columns are on (the index is being processed) - $this->ChangePage=0; //Flag indicating that a page break has occurred - $this->Reference=array(); //Array containing the references - $this->CurrCol=0; //Current column number - $this->ColL = array(0); // Array of Left pos of columns - absolute - needs Margin correction for Odd-Even - $this->ColR = array(0); // Array of Right pos of columns - absolute pos - needs Margin correction for Odd-Even - $this->ChangeColumn = 0; - $this->columnbuffer = array(); - $this->ColDetails = array(); // Keeps track of some column details - $this->columnLinks = array(); // Cross references PageLinks - $this->substitute = array(); // Array of substitution strings e.g. 112 - $this->entsearch = array(); // Array of HTML entities (>ASCII 127) to substitute - $this->entsubstitute = array(); // Array of substitution decimal unicode for the Hi entities - $this->lastoptionaltag = ''; - $this->charset_in = ''; - $this->blk = array(); - $this->blklvl = 0; - $this->TOCmark = 0; - $this->tts = false; - $this->ttz = false; - $this->tta = false; - $this->ispre=false; - - $this->headerDetails=array(); - $this->footerDetails=array(); - $this->div_bottom_border = ''; - $this->p_bottom_border = ''; - $this->page_break_after_avoid = false; - $this->margin_bottom_collapse = false; - $this->tablethead = 0; - $this->tabletfoot = 0; - $this->table_border_attr_set = 0; - $this->table_border_css_set = 0; - - $this->shrin_k = 1.0; - $this->shrink_this_table_to_fit = 0; - $this->MarginCorrection = 0; - - $this->tabletheadjustfinished = false; - $this->usingCoreFont = false; - $this->charspacing=0; - - $this->outlines=array(); - $this->autoPageBreak = true; - -/*-- FORMS --*/ - // FORM ELEMENT SPACING - $this->form_element_spacing['select']['outer']['h'] = 0.5; // Horizontal spacing around SELECT - $this->form_element_spacing['select']['outer']['v'] = 0.5; // Vertical spacing around SELECT - $this->form_element_spacing['select']['inner']['h'] = 0.7; // Horizontal padding around SELECT - $this->form_element_spacing['select']['inner']['v'] = 0.7; // Vertical padding around SELECT - $this->form_element_spacing['input']['outer']['h'] = 0.5; - $this->form_element_spacing['input']['outer']['v'] = 0.5; - $this->form_element_spacing['input']['inner']['h'] = 0.7; - $this->form_element_spacing['input']['inner']['v'] = 0.7; - $this->form_element_spacing['textarea']['outer']['h'] = 0.5; - $this->form_element_spacing['textarea']['outer']['v'] = 0.5; - $this->form_element_spacing['textarea']['inner']['h'] = 1; - $this->form_element_spacing['textarea']['inner']['v'] = 0.5; - $this->form_element_spacing['button']['outer']['h'] = 0.5; - $this->form_element_spacing['button']['outer']['v'] = 0.5; - $this->form_element_spacing['button']['inner']['h'] = 2; - $this->form_element_spacing['button']['inner']['v'] = 1; -/*-- END FORMS --*/ - - require(_MPDF_PATH.'config.php'); // config data - - //Scale factor - $this->k=72/25.4; // Will only use mm - - $this->_setPageSize($format, $orientation); // mPDF 4.2.024 - $this->DefOrientation=$orientation; - - $this->margin_header=$mgh; - $this->margin_footer=$mgf; - - $bmargin=$mgb; - - $this->DeflMargin = $mgl; - $this->DefrMargin = $mgr; - - // v1.4 Save orginal settings in case of changed orientation - $this->orig_tMargin = $mgt; - $this->orig_bMargin = $bmargin; - $this->orig_lMargin = $this->DeflMargin; - $this->orig_rMargin = $this->DefrMargin; - $this->orig_hMargin = $this->margin_header; - $this->orig_fMargin = $this->margin_footer; - - // mPDF 4.0 - if ($this->setAutoTopMargin=='pad') { $mgt += $this->margin_header; } - if ($this->setAutoBottomMargin=='pad') { $mgb += $this->margin_footer; } - $this->SetMargins($this->DeflMargin,$this->DefrMargin,$mgt); // sets l r t margin - //Automatic page break - $this->SetAutoPageBreak($this->autoPageBreak,$bmargin); // sets $this->bMargin & PageBreakTrigger - - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - - //Interior cell margin (1 mm) ? not used - $this->cMarginL = 1; - $this->cMarginR = 1; - //Line width (0.2 mm) - $this->LineWidth=.567/$this->k; - - //To make the function Footer() work - replaces {nb} with page number - $this->AliasNbPages(); - $this->AliasNbPageGroups(); - - - //Enable all tags as default - $this->DisableTags(); - //Full width display mode - $this->SetDisplayMode(100); // fullwidth? 'fullpage' - //Compression - $this->SetCompression(true); - //Set default display preferences - $this->SetDisplayPreferences(''); // mPDF 3.0 - - // mPDF 4.0 - if (substr($codepage,-2)=='-s') { - $codepage = substr($codepage,0,(strlen($codepage)-2)); - $useSubsets = true; - } - require(_MPDF_PATH.'config_fonts.php'); // font data - - //Standard fonts - $this->CoreFonts=array('courier'=>'Courier','courierB'=>'Courier-Bold','courierI'=>'Courier-Oblique','courierBI'=>'Courier-BoldOblique', - 'helvetica'=>'Helvetica','helveticaB'=>'Helvetica-Bold','helveticaI'=>'Helvetica-Oblique','helveticaBI'=>'Helvetica-BoldOblique', - 'times'=>'Times-Roman','timesB'=>'Times-Bold','timesI'=>'Times-Italic','timesBI'=>'Times-BoldItalic', - 'symbol'=>'Symbol','zapfdingbats'=>'ZapfDingbats'); - $this->fontlist=array("times","courier","helvetica","symbol","zapfdingbats"); - - switch(strtolower($codepage)){ - case 'utf-8': $codepage='UTF-8';break; - case 'big5': case 'big-5': $codepage='BIG5';break; - case 'gbk': case 'cp936': $codepage='GBK';break; - case 'uhc': case 'cp949': $codepage='UHC';break; - case 'shift_jis': case 'shift-jis': case 'sjis': $codepage='SHIFT_JIS';break; - case 'win-1251': case 'windows-1251': case 'cp1251': $codepage='win-1251';break; - case 'win-1252': case 'windows-1252': case 'cp1252': $codepage='win-1252';break; - case 'iso-8859-2': $codepage='iso-8859-2';break; - case 'iso-8859-4': $codepage='iso-8859-4';break; - case 'iso-8859-7': $codepage='iso-8859-7';break; - case 'iso-8859-9': $codepage='iso-8859-9';break; - } - - $this->default_available_fonts = $this->available_unifonts; - - // Autodetect IF codepage is a language_country string (en-GB or en_GB or en) - if ((strlen($codepage) == 5 && $codepage != 'UTF-8') || strlen($codepage) == 2) { - // in HTMLToolkit - list ($codepage,$mpdf_pdf_unifonts,$mpdf_directionality,$mpdf_jSpacing) = GetCodepage($codepage); - $this->jSpacing = $mpdf_jSpacing; - if (($codepage != 'BIG5') && ($codepage != 'GBK') && ($codepage != 'UHC') && ($codepage != 'SHIFT_JIS')) { - if ($mpdf_pdf_unifonts) { - $this->RestrictUnicodeFonts($mpdf_pdf_unifonts); - $this->default_available_fonts = $mpdf_pdf_unifonts; - } - } - $this->SetDirectionality($mpdf_directionality); - $this->currentLang = $codepage; - $this->default_lang = $codepage; - $this->default_jSpacing = $mpdf_jSpacing; - $this->default_dir = $mpdf_directionality; - } - - // mPDF 4.0 TEMPORARY FIX to disable win-1251 dejavu fonts - if ($codepage=='win-1251') { - foreach($this->available_fonts AS $k=>$v) { - if (substr($v,0,6)=='dejavu') { unset($this->available_fonts[$k]); } - } - } - - $this->codepage = $codepage; - - // mPDF 4.0 - if ($useSubsets && $codepage=='UTF-8') { - $this->useSubsets = true; - } - - if ($codepage == 'UTF-8') { $this->is_MB = true; } -/*-- CJK --*/ - if ($codepage == 'BIG5' || $codepage == 'GBK' || $codepage == 'UHC' || $codepage == 'SHIFT_JIS') { - $this->isCJK = true; - require(_MPDF_PATH . 'includes/CJKdata.php'); - // FONTS - if ($codepage == 'BIG5') { $this->AddCJKFont('big5'); $default_font = 'big5';} - else if ($codepage == 'GBK') { $this->AddCJKFont('gb'); $default_font = 'gb'; } - else if ($codepage == 'SHIFT_JIS') { $this->AddCJKFont('sjis'); $default_font = 'sjis'; } - else if ($codepage == 'UHC') { $this->AddCJKFont('uhc'); $default_font = 'uhc';} - - $this->is_MB = true; - $this->use_CJK_only = true; - - } -/*-- END CJK --*/ - - // mPDF 4.2.018 - if (($codepage=='win-1252' || $codepage=='win-1251' || $codepage=='iso-8859-2' || $codepage=='iso-8859-4' || $codepage=='iso-8859-7' || $codepage=='iso-8859-9' || $codepage == 'BIG5' || $codepage == 'GBK' || $codepage == 'UHC' || $codepage == 'SHIFT_JIS') && !$this->PDFA) { - $this->useSubstitutions = true; - $this->SetSubstitutions(); - } - else { $this->useSubstitutions = false; } - - if (!defined('MPDF_FONTPATH')) { - if ($this->is_MB) { define('MPDF_FONTPATH',_MPDF_PATH.'unifont/'); } - else { define('MPDF_FONTPATH',_MPDF_PATH.'font/'); } - } - - if (file_exists(_MPDF_PATH.'mpdf.css')) { - $css = file_get_contents(_MPDF_PATH.'mpdf.css'); - $css2 = $this->ReadDefaultCSS($css); - $this->defaultCSS = $this->array_merge_recursive_unique($this->defaultCSS,$css2); - } - - if ($default_font=='') { - if ($codepage == 'win-1252') { - if (in_array(strtolower($this->defaultCSS['BODY']['FONT-FAMILY']),$this->mono_fonts)) { $default_font = 'courier'; } - else if (in_array(strtolower($this->defaultCSS['BODY']['FONT-FAMILY']),$this->sans_fonts)) { $default_font = 'helvetica'; } - else { $default_font = 'times'; } - } - else { $default_font = $this->defaultCSS['BODY']['FONT-FAMILY']; } - } - if (!$default_font_size) { - $mmsize = $this->ConvertSize($this->defaultCSS['BODY']['FONT-SIZE']); - $default_font_size = $mmsize*($this->k); - } - - if ($default_font) { $this->SetDefaultFont($default_font); } - if ($default_font_size) { $this->SetDefaultFontSize($default_font_size); } - - $this->setMBencoding($this->codepage); // sets $this->mb_enc - // Modified by Ivan Tcholakov, 28-JAN-2010. - //@mb_regex_encoding('UTF-8'); - _api_mb_regex_encoding('UTF-8'); - // - - $this->setHiEntitySubstitutions(); - - $this->SetLineHeight(); // lineheight is in mm - - $this->SetFillColor(255); - $this->HREF=''; - $this->oldy=-1; - $this->B=0; - $this->U=0; - $this->I=0; - - $this->listlvl=0; - $this->listnum=0; - $this->listtype=''; - $this->listoccur=array(); - $this->listlist=array(); - $this->listitem=array(); - - $this->tdbegin=false; - $this->table=array(); - $this->cell=array(); - $this->col=-1; - $this->row=-1; - $this->cellBorderBuffer = array(); - - $this->divbegin=false; - $this->divalign=$this->defaultAlign; - $this->divwidth=0; - $this->divheight=0; - $this->spanbgcolor=false; - $this->divrevert=false; - - $this->issetfont=false; - $this->issetcolor=false; - - $this->blockjustfinished=false; - $this->listjustfinished=false; - $this->ignorefollowingspaces = true; //in order to eliminate exceeding left-side spaces - $this->toupper=false; - $this->tolower=false; - $this->dash_on=false; - $this->dotted_on=false; - $this->SUP=false; - $this->SUB=false; - $this->strike=false; - - $this->currentfontfamily=''; - $this->currentfontsize=''; - $this->currentfontstyle=''; - $this->colorarray=array(); - $this->spanbgcolorarray=array(); - $this->textbuffer=array(); - $this->CSS=array(); - $this->internallink=array(); - $this->basepath = ""; - - $this->SetBasePath(''); - - $this->outlineparam = array(); - $this->outline_on = false; - - $this->specialcontent = ''; - $this->selectoption = array(); - - $this->usetableheader=false; - $this->usecss=true; - $this->usepre=true; - - for($i=0;$i<256;$i++) { - $this->chrs[$i] = chr($i); - $this->ords[chr($i)] = $i; - - } - -/*-- IMPORTS --*/ - // mPDF 4.2.006 - $this->tpls = array(); - $this->tpl = 0; - $this->tplprefix = "/TPL"; - $this->res = array(); - if ($this->enableImports) { - $this->SetImportUse(); - } -/*-- END IMPORTS --*/ - - if ($this->progressBar) { $this->StartProgressBarOutput($this->progressBar) ; } // *PROGRESS-BAR* -} - -// mPDF 4.2.024 -function _setPageSize($format, &$orientation) { - //Page format - if(is_string($format)) - { - if ($format=='') { $format = 'A4'; } - $pfo = 'P'; // mPDF 4.2.025 - if(preg_match('/([0-9a-zA-Z]*)-L/i',$format,$m)) { // e.g. A4-L = A$ landscape - $format=$m[1]; - $pfo='L'; // mPDF 4.2.025 - } - $format = $this->_getPageFormat($format); - if (!$format) { $this->Error('Unknown page format: '.$format); } - else { $orientation = $pfo; } // mPDF 4.2.025 - - $this->fwPt=$format[0]; - $this->fhPt=$format[1]; - } - else - { - if (!$format[0] || !$format[1]) { $this->Error('Invalid page format: '.$format[0].' '.$format[1]); } - $this->fwPt=$format[0]*$this->k; - $this->fhPt=$format[1]*$this->k; - } - $this->fw=$this->fwPt/$this->k; - $this->fh=$this->fhPt/$this->k; - //Page orientation - $orientation=strtolower($orientation); - if($orientation=='p' or $orientation=='portrait') - { - $orientation='P'; - $this->wPt=$this->fwPt; - $this->hPt=$this->fhPt; - } - elseif($orientation=='l' or $orientation=='landscape') - { - $orientation='L'; - $this->wPt=$this->fhPt; - $this->hPt=$this->fwPt; - } - else $this->Error('Incorrect orientation: '.$orientation); - $this->CurOrientation=$orientation; - - $this->w=$this->wPt/$this->k; - $this->h=$this->hPt/$this->k; -} - -// mPDF 4.2.024 -function _getPageFormat($format) { - switch (strtoupper($format)) { - case '4A0': {$format = array(4767.87,6740.79); break;} - case '2A0': {$format = array(3370.39,4767.87); break;} - case 'A0': {$format = array(2383.94,3370.39); break;} - case 'A1': {$format = array(1683.78,2383.94); break;} - case 'A2': {$format = array(1190.55,1683.78); break;} - case 'A3': {$format = array(841.89,1190.55); break;} - case 'A4': default: {$format = array(595.28,841.89); break;} - case 'A5': {$format = array(419.53,595.28); break;} - case 'A6': {$format = array(297.64,419.53); break;} - case 'A7': {$format = array(209.76,297.64); break;} - case 'A8': {$format = array(147.40,209.76); break;} - case 'A9': {$format = array(104.88,147.40); break;} - case 'A10': {$format = array(73.70,104.88); break;} - case 'B0': {$format = array(2834.65,4008.19); break;} - case 'B1': {$format = array(2004.09,2834.65); break;} - case 'B2': {$format = array(1417.32,2004.09); break;} - case 'B3': {$format = array(1000.63,1417.32); break;} - case 'B4': {$format = array(708.66,1000.63); break;} - case 'B5': {$format = array(498.90,708.66); break;} - case 'B6': {$format = array(354.33,498.90); break;} - case 'B7': {$format = array(249.45,354.33); break;} - case 'B8': {$format = array(175.75,249.45); break;} - case 'B9': {$format = array(124.72,175.75); break;} - case 'B10': {$format = array(87.87,124.72); break;} - case 'C0': {$format = array(2599.37,3676.54); break;} - case 'C1': {$format = array(1836.85,2599.37); break;} - case 'C2': {$format = array(1298.27,1836.85); break;} - case 'C3': {$format = array(918.43,1298.27); break;} - case 'C4': {$format = array(649.13,918.43); break;} - case 'C5': {$format = array(459.21,649.13); break;} - case 'C6': {$format = array(323.15,459.21); break;} - case 'C7': {$format = array(229.61,323.15); break;} - case 'C8': {$format = array(161.57,229.61); break;} - case 'C9': {$format = array(113.39,161.57); break;} - case 'C10': {$format = array(79.37,113.39); break;} - case 'RA0': {$format = array(2437.80,3458.27); break;} - case 'RA1': {$format = array(1729.13,2437.80); break;} - case 'RA2': {$format = array(1218.90,1729.13); break;} - case 'RA3': {$format = array(864.57,1218.90); break;} - case 'RA4': {$format = array(609.45,864.57); break;} - case 'SRA0': {$format = array(2551.18,3628.35); break;} - case 'SRA1': {$format = array(1814.17,2551.18); break;} - case 'SRA2': {$format = array(1275.59,1814.17); break;} - case 'SRA3': {$format = array(907.09,1275.59); break;} - case 'SRA4': {$format = array(637.80,907.09); break;} - case 'LETTER': {$format = array(612.00,792.00); break;} - case 'LEGAL': {$format = array(612.00,1008.00); break;} - case 'EXECUTIVE': {$format = array(521.86,756.00); break;} - case 'FOLIO': {$format = array(612.00,936.00); break;} - case 'B': {$format=array(362.83,561.26 ); break;} // 'B' format paperback size 128x198mm - case 'A': {$format=array(314.65,504.57 ); break;} // 'A' format paperback size 111x178mm - case 'DEMY': {$format=array(382.68,612.28 ); break;} // 'Demy' format paperback size 135x216mm - case 'ROYAL': {$format=array(433.70,663.30 ); break;} // 'Royal' format paperback size 153x234mm - default: $format = false; - } - return $format; -} - -/*-- PROGRESS-BAR --*/ -function StartProgressBarOutput($mode=1) { - // must be relative path, or URI (not a file system path) - if (!defined('_MPDF_URI')) { - $this->progressBar = false; - if ($this->debug) { $this->Error("You need to define _MPDF_URI to use the progress bar!"); } - else return false; - } - $this->progressBar = $mode; - echo ' - - mPDF File Progress - - - - -
    -

    mPDF file progress

    - -
    - '; - if ($this->progressBar==2) { echo ' - - -
    - Writing HTML code
    - 0%
    - - -
    - Autosizing elements
    - 0%
    - -

    - Writing Tables
    - 0%
    - -


    - '; } - echo ' Writing PDF file
    - 0%
    - - '; - if ($this->progressBar==2) { echo ' -
    - Memory usage
    - 0% '.ini_get("memory_limit").'
    - -

    - Memory usage (peak)
    - 0% '.ini_get("memory_limit").'
    - -
    - '; } - // mPDF 4.2.007 - echo '

    - - -
    - - '; - ob_flush(); - flush(); -} - -function UpdateProgressBar($el,$val,$txt='') { - // $val should be a string - 5 = actual value, +15 = increment - - if ($this->progressBar<2) { - if ($el>3) { return; } - else if ($el ==1) { $el = 2; } - } - echo ''."\n"; - ob_flush(); - flush(); -} -/*-- END PROGRESS-BAR --*/ - - -function RestrictUnicodeFonts($res) { - // $res = array of (Unicode) fonts to restrict to: e.g. norasi|norasiB - language specific - if (count($res)) { // Leave full list of available fonts if passed blank array - $this->available_unifonts = $res; - } - else { $this->available_unifonts = $this->default_available_fonts; } - if (count($this->available_unifonts) == 0) { $this->available_unifonts[] = $this->default_available_fonts[0]; } - $this->available_unifonts = array_values($this->available_unifonts); -} - - -function setMBencoding($enc) { - // only call mb_internal_encoding if need to change - $curr = $this->mb_enc; - // Sets encoding string for use in mb_string functions - if ($enc == 'win-1252') { $this->mb_enc = 'windows-1252'; } - else if ($enc == 'win-1251') { $this->mb_enc = 'windows-1251'; } - else if ($enc == 'UTF-8') { $this->mb_enc = 'UTF-8'; } - else if ($enc == 'BIG5') { $this->mb_enc = 'UTF-8'; } - else if ($enc == 'GBK') { $this->mb_enc = 'UTF-8'; } // cp936 - else if ($enc == 'SHIFT_JIS') { $this->mb_enc = 'UTF-8'; } - else if ($enc == 'UHC') { $this->mb_enc = 'UTF-8'; } // cp949 - else { $this->mb_enc = $enc; } // works for iso-8859-n - if ($this->mb_enc && $curr != $this->mb_enc) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //mb_internal_encoding($this->mb_enc); - _api_mb_internal_encoding($this->mb_enc); - // - } -} - -function getMBencoding() { - return $this->mb_enc; -} - - - -function SetMargins($left,$right,$top) { - //Set left, top and right margins - $this->lMargin=$left; - $this->rMargin=$right; - $this->tMargin=$top; -} - -function ResetMargins() { - //ReSet left, top margins - if (($this->forcePortraitHeaders || $this->forcePortraitMargins) && $this->DefOrientation=='P' && $this->CurOrientation=='L') { - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $this->tMargin=$this->orig_rMargin; - $this->bMargin=$this->orig_lMargin; - } - else { // ODD // OR NOT MIRRORING MARGINS/FOOTERS - $this->tMargin=$this->orig_lMargin; - $this->bMargin=$this->orig_rMargin; - } - $this->lMargin=$this->DeflMargin; - $this->rMargin=$this->DefrMargin; - $this->MarginCorrection = 0; - $this->PageBreakTrigger=$this->h-$this->bMargin; - } - else if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $this->lMargin=$this->DefrMargin; - $this->rMargin=$this->DeflMargin; - $this->MarginCorrection = $this->DefrMargin-$this->DeflMargin; - - } - else { // ODD // OR NOT MIRRORING MARGINS/FOOTERS - $this->lMargin=$this->DeflMargin; - $this->rMargin=$this->DefrMargin; - if ($this->mirrorMargins) { $this->MarginCorrection = $this->DeflMargin-$this->DefrMargin; } - } - $this->x=$this->lMargin; - -} - -function SetLeftMargin($margin) { - //Set left margin - $this->lMargin=$margin; - if($this->page>0 and $this->x<$margin) $this->x=$margin; -} - -function SetTopMargin($margin) { - //Set top margin - $this->tMargin=$margin; -} - -function SetRightMargin($margin) { - //Set right margin - $this->rMargin=$margin; -} - -function SetAutoPageBreak($auto,$margin=0) { - //Set auto page break mode and triggering margin - $this->autoPageBreak=$auto; - $this->bMargin=$margin; - $this->PageBreakTrigger=$this->h-$margin; -} - -function SetDisplayMode($zoom,$layout='continuous') { - //Set display mode in viewer - if($zoom=='fullpage' or $zoom=='fullwidth' or $zoom=='real' or $zoom=='default' or !is_string($zoom)) - $this->ZoomMode=$zoom; - else - $this->Error('Incorrect zoom display mode: '.$zoom); - if($layout=='single' or $layout=='continuous' or $layout=='two' or $layout=='default') - $this->LayoutMode=$layout; - else - $this->Error('Incorrect layout display mode: '.$layout); -} - -function SetCompression($compress) { - //Set page compression - if(function_exists('gzcompress')) $this->compress=$compress; - else $this->compress=false; -} - -function SetTitle($title) { - //Title of document // Arrives as UTF-8 - $this->title = $title; -} - -function SetSubject($subject) { - //Subject of document - $this->subject= $subject; -} - -function SetAuthor($author) { - //Author of document - $this->author= $author; -} - -function SetKeywords($keywords) { - //Keywords of document - $this->keywords= $keywords; -} - -function SetCreator($creator) { - //Creator of document - $this->creator= $creator; -} - - -function SetAnchor2Bookmark($x) { - $this->anchor2Bookmark = $x; -} - -function AliasNbPages($alias='{nb}') { - //Define an alias for total number of pages - $this->aliasNbPg=$alias; -} - -function AliasNbPageGroups($alias='{nbpg}') { - //Define an alias for total number of pages in a group - $this->aliasNbPgGp=$alias; -} - -function SetAlpha($alpha, $bm='Normal', $return=false) { // mPDF 4.3.017 -// alpha: real value from 0 (transparent) to 1 (opaque) -// bm: blend mode, one of the following: -// Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn, -// HardLight, SoftLight, Difference, Exclusion, Hue, Saturation, Color, Luminosity -// set alpha for stroking (CA) and non-stroking (ca) operations - // mPDF 4.2.018 - if ($this->PDFA && $alpha!=1) { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "Image opacity must be 100% (Opacity changed to 100%)"; } - $alpha = 1; - } - $gs = $this->AddExtGState(array('ca'=>$alpha, 'CA'=>$alpha, 'BM'=>'/'.$bm)); - if ($return) { return sprintf('/GS%d gs', $gs); } // mPDF 4.3.017 - else { $this->_out(sprintf('/GS%d gs', $gs)); } -} - -function AddExtGState($parms) { - $n = count($this->extgstates); - // check if graphics state already exists - for ($i=1; $i<=$n; $i++) { - if ($this->extgstates[$i]['parms']['ca']==$parms['ca'] && $this->extgstates[$i]['parms']['CA']==$parms['CA'] && $this->extgstates[$i]['parms']['BM']==$parms['BM']) { - return $i; - } - } - $n++; - $this->extgstates[$n]['parms'] = $parms; - return $n; -} - - - -function Error($msg) { - //Fatal error - header('Content-Type: text/html; charset=utf-8'); - die('mPDF error: '.$msg); -} - -function Open() { - //Begin document - if($this->state==0) $this->_begindoc(); -} - -function Close() { - if ($this->progressBar) { $this->UpdateProgressBar(2,'2','Closing last page'); } // *PROGRESS-BAR* - //Terminate document - if($this->state==3) return; - if($this->page==0) $this->AddPage($this->CurOrientation); - if (count($this->cellBorderBuffer)) { $this->printcellbuffer(); } // *TABLES* - if (count($this->tablebuffer)) { $this->printtablebuffer(); } // *TABLES* -/*-- COLUMNS --*/ - // mPDF 4.0 - if ($this->ColActive) { - $this->SetColumns(0); - $this->ColActive = 0; - if (count($this->columnbuffer)) { $this->printcolumnbuffer(); } - } -/*-- END COLUMNS --*/ - if (count($this->divbuffer)) { $this->printdivbuffer(); } - - // BODY Backgrounds - $s = ''; - $bby = $this->h; - $bbw = $this->w; - $bbh = $this->h; - if ($this->bodyBackgroundColor) { - $s .= sprintf('%.3f %.3f %.3f rg',$this->bodyBackgroundColor['R']/255,$this->bodyBackgroundColor['G']/255,$this->bodyBackgroundColor['B']/255)."\n"; - $s .= sprintf('%.3f %.3f %.3f %.3f re f',0,$bby*$this->k,$bbw*$this->k,-$bbh*$this->k)."\n"; - } -/*-- GRADIENTS --*/ - if ($this->bodyBackgroundGradient) { - $g = $this->parseBackgroundGradient($this->bodyBackgroundGradient); - if ($g) { - // mPDF 4.2 direct output, else overwrites background-image - //$this->pageBackgrounds[0][] = array('gradient'=>true, 'x'=>0, 'y'=>0, 'w'=>$this->w, 'h'=>$this->h, 'gradtype'=>$g['type'], 'col'=>$g['col'], 'col2'=>$g['col2'], 'coords'=>$g['coords'], 'extend'=>$g['extend']); - $s .= $this->Gradient(0, 0, $this->w, $this->h, $g['gradtype'], $g['col'], $g['col2'], $g['coords'], $g['extend'], true); - } - } -/*-- END GRADIENTS --*/ -/*-- BACKGROUND-IMAGES --*/ - if ($this->bodyBackgroundImage) { - if ($this->bodyBackgroundImage['image_id']) { // Background pattern - $n = count($this->patterns)+1; - // mPDF 4.3.015 - list($orig_w, $orig_h, $x_repeat, $y_repeat) = $this->_resizeBackgroundImage($this->bodyBackgroundImage['orig_w'], $this->bodyBackgroundImage['orig_h'], $bbw, $bbh, $this->bodyBackgroundImage['resize'], $this->bodyBackgroundImage['x_repeat'], $this->bodyBackgroundImage['y_repeat']); - // mPDF 3.1 $bbx = 0, 'y'=>0 - $this->patterns[$n] = array('x'=>0, 'y'=>0, 'w'=>$bbw, 'h'=>$bbh, 'pgh'=>$this->h, 'image_id'=>$this->bodyBackgroundImage['image_id'], 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$this->bodyBackgroundImage['x_pos'], 'y_pos'=>$this->bodyBackgroundImage['y_pos'], 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat); // mPDF 4.3.015 - // mPDF 4.3.017 - if ($this->bodyBackgroundImage['opacity']>0 && $this->bodyBackgroundImage['opacity']<1) { $opac = $this->SetAlpha($this->bodyBackgroundImage['opacity'],'Normal',true); } - else { $opac = ''; } - $s .= sprintf('q /Pattern cs /P%d scn %s %.3f %.3f %.3f %.3f re f Q', $n, $opac, 0,$bby*$this->k,$bbw*$this->k,-$bbh*$this->k) ."\n"; - } - } -/*-- END BACKGROUND-IMAGES --*/ - - - - $s .= $this->PrintPageBackgrounds(); - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', "\n".$s."\n".'\\1', $this->pages[$this->page]); - $this->pageBackgrounds = array(); - - if (!$this->TOCmark) { //Page footer - $this->InFooter=true; - $this->Footer(); - $this->InFooter=false; - } - if ($this->TOCmark || count($this->m_TOC)) { $this->insertTOC(); } // *TOC* - - //Close page - $this->_endpage(); - - //Close document - $this->_enddoc(); -} - -// mPDF 4.3.015 -function _resizeBackgroundImage($imw, $imh, $cw, $ch, $resize=0, $repx, $repy) { - $cw = $cw*$this->k; - $ch = $ch*$this->k; - if (!$resize) { return array($imw, $imh, $repx, $repy); } - if ($resize==1 && $imw > $cw) { - $h = $imh * $cw/$imw; - $repx = false; - return array($cw, $h, $repx, $repy); - } - else if ($resize==2 && $imh > $ch) { - $w = $imw * $ch/$imh; - $repy = false; - return array($w, $ch, $repx, $repy); - } - else if ($resize==3) { - $w = $imw; - $h = $imh; - $saverepx = $repx; - if ($w > $cw) { - $h = $h * $cw/$w; - $w = $cw; - $repx = false; - } - if ($h > $ch) { - $w = $w * $ch/$h; - $h = $ch; - $repy = false; - $repx = $saverepx; - } - return array($w, $h, $repx, $repy); - } - else if ($resize==4) { - $h = $imh * $cw/$imw; - $repx = false; - return array($cw, $h, $repx, $repy); - } - else if ($resize==5) { - $w = $imw * $ch/$imh; - $repy = false; - return array($w, $ch, $repx, $repy); - } - else if ($resize==6) { - $repx = false; - $repy = false; - return array($cw, $ch, $repx, $repy); - } - return array($imw, $imh, $repx, $repy); -} - - -function PrintPageBackgrounds($adjustmenty=0) { // mPDF 4.2.014 Adjustment added for HTMLFooters - $s = ''; - ksort($this->pageBackgrounds); - foreach($this->pageBackgrounds AS $bl=>$pbs) { - foreach ($pbs AS $pb) { - if (!isset($pb['image_id']) && !isset($pb['gradient'])) { // Background colour - if (isset($pb['clippath']) && $pb['clippath']) { $s .= $pb['clippath']."\n"; } - $s .= sprintf('%.3f %.3f %.3f rg',$pb['col']['R']/255,$pb['col']['G']/255,$pb['col']['B']/255)."\n"; - $s .= sprintf('%.3f %.3f %.3f %.3f re f',$pb['x']*$this->k,($this->h-$pb['y'])*$this->k,$pb['w']*$this->k,-$pb['h']*$this->k)."\n"; - if (isset($pb['clippath']) && $pb['clippath']) { $s .= 'Q'."\n"; } - } - } -/*-- GRADIENTS --*/ - foreach ($pbs AS $pb) { - if (isset($pb['gradient']) && $pb['gradient']) { - if (isset($pb['clippath']) && $pb['clippath']) { $s .= $pb['clippath']."\n"; } - $s .= $this->Gradient($pb['x'], $pb['y'], $pb['w'], $pb['h'], $pb['gradtype'], $pb['col'], $pb['col2'], $pb['coords'], $pb['extend'], true); - if (isset($pb['clippath']) && $pb['clippath']) { $s .= 'Q'."\n"; } - } - } -/*-- END GRADIENTS --*/ -/*-- BACKGROUND-IMAGES --*/ - foreach ($pbs AS $pb) { - if (isset($pb['image_id']) && $pb['image_id']) { // Background pattern - $pb['y'] -= $adjustmenty; // mPDF 4.2.014 - $pb['h'] += $adjustmenty; // mPDF 4.2.014 - $n = count($this->patterns)+1; - // mPDF 4.3.015 - list($orig_w, $orig_h, $x_repeat, $y_repeat) = $this->_resizeBackgroundImage($pb['orig_w'], $pb['orig_h'], $pb['w'], $pb['h'], $pb['resize'], $pb['x_repeat'], $pb['y_repeat']); - $this->patterns[$n] = array('x'=>$pb['x'], 'y'=>$pb['y'], 'w'=>$pb['w'], 'h'=>$pb['h'], 'pgh'=>$this->h, 'image_id'=>$pb['image_id'], 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$pb['x_pos'], 'y_pos'=>$pb['y_pos'], 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat); // mPDF 4.3.015 - $x = $pb['x']*$this->k; - $y = ($this->h - $pb['y'])*$this->k; - $w = $pb['w']*$this->k; - $h = -$pb['h']*$this->k; - if (isset($pb['clippath']) && $pb['clippath']) { $s .= $pb['clippath']."\n"; } - // mPDF 4.0 - if ($this->writingHTMLfooter || $this->writingHTMLheader) { - $iw = $pb['orig_w']/$this->k; - $ih = $pb['orig_h']/$this->k; - $w = $pb['w']; - $h = $pb['h']; - $x0 = $pb['x']; - $y0 = $pb['y']; - - // Number to repeat - if ($pb['x_repeat']) { $nx = ceil($w/$iw); } - else { $nx = 1; } - if ($pb['y_repeat']) { $ny = ceil($h/$ih); } - else { $ny = 1; } - - $x_pos = $pb['x_pos']; - if (stristr($x_pos ,'%') ) { - $x_pos += 0; - $x_pos /= 100; - $x_pos = ($w * $x_pos) - ($iw * $x_pos); - } - $y_pos = $pb['y_pos']; - if (stristr($y_pos ,'%') ) { - $y_pos += 0; - $y_pos /= 100; - $y_pos = ($h * $y_pos) - ($ih * $y_pos); - } - if ($nx>1) { - while($x_pos>0) { $x_pos -= $iw; } - } - if ($ny>1) { - while($y_pos>0) { $y_pos -= $ih; } - } - for($xi=0;$xi<$nx;$xi++) { - for($yi=0;$yi<$ny;$yi++) { - $x = $x0 + $x_pos + ($iw*$xi); - $y = $y0 + $y_pos + ($ih*$yi); - // mPDF 4.3.017 - if ($pb['opacity']>0 && $pb['opacity']<1) { $opac = $this->SetAlpha($pb['opacity'],'Normal',true); } - else { $opac = ''; } - $s .= sprintf("q %s %.3f 0 0 %.3f %.3f %.3f cm /I%d Do Q", $opac,$iw*$this->k,$ih*$this->k,$x*$this->k,($this->h-($y+$ih))*$this->k,$pb['image_id']) ."\n"; - } - } - } - else { - // mPDF 4.3.017 - if ($pb['opacity']>0 && $pb['opacity']<1) { $opac = $this->SetAlpha($pb['opacity'],'Normal',true); } - else { $opac = ''; } - $s .= sprintf('q /Pattern cs /P%d scn %s %.3f %.3f %.3f %.3f re f Q', $n, $opac, $x, $y, $w, $h) ."\n"; - } - if (isset($pb['clippath']) && $pb['clippath']) { $s .= 'Q'."\n"; } - } - } -/*-- END BACKGROUND-IMAGES --*/ - } - return $s; -} - -// Depracated - can use AddPage for all -function AddPages($orientation='',$condition='', $resetpagenum='', $pagenumstyle='', $suppress='',$mgl='',$mgr='',$mgt='',$mgb='',$mgh='',$mgf='',$ohname='',$ehname='',$ofname='',$efname='',$ohvalue=0,$ehvalue=0,$ofvalue=0,$efvalue=0,$pagesel='',$newformat='') -{ - $this->AddPage($orientation,$condition,$resetpagenum, $pagenumstyle, $suppress,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf, $ohname, $ehname, $ofname, $efname, $ohvalue, $ehvalue, $ofvalue, $efvalue,$pagesel,$newformat=''); -} - -// mPDF 4.2 Added $pagesel, $newformat [4.2.024] -function AddPage($orientation='',$condition='', $resetpagenum='', $pagenumstyle='', $suppress='',$mgl='',$mgr='',$mgt='',$mgb='',$mgh='',$mgf='',$ohname='',$ehname='',$ofname='',$efname='',$ohvalue=0,$ehvalue=0,$ofvalue=0,$efvalue=0,$pagesel='',$newformat='') -{ - -/*-- CSS-FLOAT --*/ - // Float DIV - // Cannot do with columns on, or if any change in page orientation/margins etc. - // If next page already exists - i.e background /headers and footers already written - if ($this->state > 0 && $this->page < count($this->pages)) { - $bak_cml = $this->cMarginL; - $bak_cmr = $this->cMarginR; - $bak_dw = $this->divwidth; - // Paint Div Border if necessary - if ($this->blklvl > 0) { - $save_tr = $this->table_rotate; // *TABLES* - $this->table_rotate = 0; // *TABLES* - if ($this->y == $this->blk[$this->blklvl]['y0']) { $this->blk[$this->blklvl]['startpage']++; } - if (($this->y > $this->blk[$this->blklvl]['y0']) || $this->flowingBlockAttr['is_table'] ) { $toplvl = $this->blklvl; } - else { $toplvl = $this->blklvl-1; } - $sy = $this->y; - for ($bl=1;$bl<=$toplvl;$bl++) { - $this->PaintDivBB('pagebottom',0,$bl); - } - $this->y = $sy; - $this->table_rotate = $save_tr; // *TABLES* - } - $s = $this->PrintPageBackgrounds(); - - // Writes after the marker so not overwritten later by page background etc. - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', '\\1'."\n".$s."\n", $this->pages[$this->page]); - $this->pageBackgrounds = array(); - - $family=$this->FontFamily; - $style=$this->FontStyle.($this->underline ? 'U' : ''); - $size=$this->FontSizePt; - $lw=$this->LineWidth; - $dc=$this->DrawColor; - $fc=$this->FillColor; - $tc=$this->TextColor; - $cf=$this->ColorFlag; - - $this->printfloatbuffer(); - - //Move to next page - $this->page++; - - $this->ResetMargins(); - $this->SetAutoPageBreak($this->autoPageBreak,$this->bMargin); - $this->x=$this->lMargin; - $this->y=$this->tMargin; - $this->FontFamily=''; - $this->_out('2 J'); - $this->LineWidth=$lw; - $this->_out(sprintf('%.3f w',$lw*$this->k)); - if($family) $this->SetFont($family,$style,$size,true,true); - $this->DrawColor=$dc; - if($dc!='0 G') $this->_out($dc); - $this->FillColor=$fc; - if($fc!='0 g') $this->_out($fc); - $this->TextColor=$tc; - $this->ColorFlag=$cf; - for($bl=1;$bl<=$this->blklvl;$bl++) { - $this->blk[$bl]['y0'] = $this->y; - // Don't correct more than once for background DIV containing a Float - if (!isset($this->blk[$bl]['marginCorrected'][$this->page])) { $this->blk[$bl]['x0'] += $this->MarginCorrection; } - $this->blk[$bl]['marginCorrected'][$this->page] = true; - } - $this->cMarginL = $bak_cml; - $this->cMarginR = $bak_cmr; - $this->divwidth = $bak_dw; - return ''; - } -/*-- END CSS-FLOAT --*/ - - //Start a new page - if($this->state==0) $this->Open(); - - // mPDF 3.0 - Moved here from WriteFlowingBlock, FinishFlowingBlock and printbuffer - $bak_cml = $this->cMarginL; - $bak_cmr = $this->cMarginR; - $bak_dw = $this->divwidth; - - // mPDF 4.2 - $bak_lh = $this->lineheight; - - $orientation = substr(strtoupper($orientation),0,1); - $condition = strtoupper($condition); - - // mPDF 4.2 - if ($condition == 'NEXT-EVEN') { // always adds at least one new page to create an Even page - if (!$this->mirrorMargins) { $condition = ''; } - else { - if ($pagesel) { $pbch = $pagesel; $pagesel = ''; } // *CSS-PAGE* - else { $pbch = false; } // *CSS-PAGE* - $this->AddPage($this->CurOrientation,'O'); - if ($pbch ) { $pagesel = $pbch; } // *CSS-PAGE* - $condition = ''; - } - } - if ($condition == 'NEXT-ODD') { // always adds at least one new page to create an Odd page - if (!$this->mirrorMargins) { $condition = ''; } - else { - if ($pagesel) { $pbch = $pagesel; $pagesel = ''; } // *CSS-PAGE* - else { $pbch = false; } // *CSS-PAGE* - $this->AddPage($this->CurOrientation,'E'); - if ($pbch ) { $pagesel = $pbch; } // *CSS-PAGE* - $condition = ''; - } - } - - - if ($condition == 'E') { // only adds new page if needed to create an Even page - if (!$this->mirrorMargins || ($this->page)%2==0) { return false; } - } - if ($condition == 'O') { // only adds new page if needed to create an Odd page - if (!$this->mirrorMargins || ($this->page)%2==1) { return false; } - } - - if ($resetpagenum || $pagenumstyle || $suppress) { - $this->PageNumSubstitutions[] = array('from'=>($this->page+1), 'reset'=> $resetpagenum, 'type'=>$pagenumstyle, 'suppress'=>$suppress); - } - - // mPDF 4.0 - $save_tr = $this->table_rotate; // *TABLES* - $this->table_rotate = 0; // *TABLES* - $save_kwt = $this->kwt; - $this->kwt = 0; - - - // Paint Div Border if necessary - //PAINTS BACKGROUND COLOUR OR BORDERS for DIV - DISABLED FOR COLUMNS (cf. AcceptPageBreak) AT PRESENT in ->PaintDivBB - if (!$this->ColActive && $this->blklvl > 0) { - if (isset($this->blk[$this->blklvl]['y0']) && $this->y == $this->blk[$this->blklvl]['y0']) { - if (isset($this->blk[$this->blklvl]['startpage'])) { $this->blk[$this->blklvl]['startpage']++; } - else { $this->blk[$this->blklvl]['startpage'] = 1; } - } - if ((isset($this->blk[$this->blklvl]['y0']) && $this->y > $this->blk[$this->blklvl]['y0']) || $this->flowingBlockAttr['is_table'] ) { $toplvl = $this->blklvl; } - else { $toplvl = $this->blklvl-1; } - $sy = $this->y; - for ($bl=1;$bl<=$toplvl;$bl++) { - $this->PaintDivBB('pagebottom',0,$bl); - } - $this->y = $sy; - // RESET block y0 and x0 - see below - } - - // BODY Backgrounds - if ($this->page > 0) { - $s = ''; - $bby = $this->h; - $bbw = $this->w; - $bbh = $this->h; - if ($this->bodyBackgroundColor) { - $s .= sprintf('%.3f %.3f %.3f rg',$this->bodyBackgroundColor['R']/255,$this->bodyBackgroundColor['G']/255,$this->bodyBackgroundColor['B']/255)."\n"; - $s .= sprintf('%.3f %.3f %.3f %.3f re f',0,$bby*$this->k,$bbw*$this->k,-$bbh*$this->k)."\n"; - } -/*-- GRADIENTS --*/ - if ($this->bodyBackgroundGradient) { - $g = $this->parseBackgroundGradient($this->bodyBackgroundGradient); - if ($g) { - // mPDF 4.2 direct output, else overwrites background-image - // $this->pageBackgrounds[0][] = array('gradient'=>true, 'x'=>0, 'y'=>0, 'w'=>$this->w, 'h'=>$this->h, 'gradtype'=>$g['type'], 'col'=>$g['col'], 'col2'=>$g['col2'], 'coords'=>$g['coords'], 'extend'=>$g['extend']); - $s .= $this->Gradient(0, 0, $this->w, $this->h, $g['gradtype'], $g['col'], $g['col2'], $g['coords'], $g['extend'], true); - } - } -/*-- END GRADIENTS --*/ -/*-- BACKGROUND-IMAGES --*/ - if ($this->bodyBackgroundImage) { - if ($this->bodyBackgroundImage['image_id']) { // Background pattern - $n = count($this->patterns)+1; - - - // mPDF 4.3.015 - list($orig_w, $orig_h, $x_repeat, $y_repeat) = $this->_resizeBackgroundImage($this->bodyBackgroundImage['orig_w'], $this->bodyBackgroundImage['orig_h'], $bbw, $bbh, $this->bodyBackgroundImage['resize'],$this->bodyBackgroundImage['x_repeat'],$this->bodyBackgroundImage['y_repeat']); - // mPDF 3.1 'y'=>0 - $this->patterns[$n] = array('x'=>0, 'y'=>0, 'w'=>$bbw, 'h'=>$bbh, 'pgh'=>$this->h, 'image_id'=>$this->bodyBackgroundImage['image_id'], 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$this->bodyBackgroundImage['x_pos'], 'y_pos'=>$this->bodyBackgroundImage['y_pos'], 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat); // mPDF 4.3.015 - // mPDF 4.3.017 - if ($this->bodyBackgroundImage['opacity']>0 && $this->bodyBackgroundImage['opacity']<1) { $opac = $this->SetAlpha($this->bodyBackgroundImage['opacity'],'Normal',true); } - else { $opac = ''; } - $s .= sprintf('q /Pattern cs /P%d scn %s %.3f %.3f %.3f %.3f re f Q', $n, $opac, 0,$bby*$this->k,$bbw*$this->k,-$bbh*$this->k) ."\n"; - } - } -/*-- END BACKGROUND-IMAGES --*/ - - $s .= $this->PrintPageBackgrounds(); - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', "\n".$s."\n".'\\1', $this->pages[$this->page]); - $this->pageBackgrounds = array(); - } - - $save_cols = false; -/*-- COLUMNS --*/ - if ($this->ColActive) { - $save_cols = true; - $save_nbcol = $this->NbCol; // other values of gap and vAlign will not change by setting Columns off - $this->SetColumns(0); - } -/*-- END COLUMNS --*/ - - $family=$this->FontFamily; - $style=$this->FontStyle.($this->underline ? 'U' : ''); - $size=$this->FontSizePt; - $this->ColumnAdjust = true; // enables column height adjustment for the page - $lw=$this->LineWidth; - $dc=$this->DrawColor; - $fc=$this->FillColor; - $tc=$this->TextColor; - $cf=$this->ColorFlag; - if($this->page>0) - { - //Page footer - $this->InFooter=true; - - // mPDF 3.0 - $this->Reset(); - $this->pageoutput[$this->page] = array(); - - $this->Footer(); - //Close page - $this->_endpage(); - } - - - - - - //Start new page - // mPDF 4.2 pagesel,$newformat 4.2.024 - $this->_beginpage($orientation,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$ohname,$ehname,$ofname,$efname,$ohvalue,$ehvalue,$ofvalue,$efvalue,$pagesel,$newformat); - // mPDF 4.2 Moved here from Header() - so it goes before ___BACKGROUND___PATTERNS marker - if ($this->docTemplate) { - $pagecount = $this->SetSourceFile($this->docTemplate); - if (($this->page - $this->docTemplateStart) > $pagecount) { - if ($this->docTemplateContinue) { - $tplIdx = $this->ImportPage($pagecount); - $this->UseTemplate($tplIdx); - } - } - else { - $tplIdx = $this->ImportPage(($this->page - $this->docTemplateStart)); - $this->UseTemplate($tplIdx); - } - } - if ($this->pageTemplate) { - $this->UseTemplate($this->pageTemplate); - } - - // Tiling Patterns // Moved here mPDF 4.0 - $this->_out('___BACKGROUND___PATTERNS'.date('jY')); - $this->pageBackgrounds = array(); - - //Set line cap style to square - $this->_out('2 J'); - //Set line width - $this->LineWidth=$lw; - $this->_out(sprintf('%.3f w',$lw*$this->k)); - //Set font - if($family) $this->SetFont($family,$style,$size,true,true); // forces write - //Set colors - $this->DrawColor=$dc; - if($dc!='0 G') $this->_out($dc); - $this->FillColor=$fc; - if($fc!='0 g') $this->_out($fc); - $this->TextColor=$tc; - $this->ColorFlag=$cf; - - //Page header - $this->Header(); - - //Restore line width - if($this->LineWidth!=$lw) - { - $this->LineWidth=$lw; - $this->_out(sprintf('%.3f w',$lw*$this->k)); - } - //Restore font - if($family) $this->SetFont($family,$style,$size,true,true); // forces write - //Restore colors - if($this->DrawColor!=$dc) - { - $this->DrawColor=$dc; - $this->_out($dc); - } - if($this->FillColor!=$fc) - { - $this->FillColor=$fc; - $this->_out($fc); - } - $this->TextColor=$tc; - $this->ColorFlag=$cf; - $this->InFooter=false; - -/*-- COLUMNS --*/ - if ($save_cols) { - // Restore columns - $this->SetColumns($save_nbcol,$this->colvAlign,$this->ColGap); - } - if ($this->ColActive) { $this->SetCol(0); } -/*-- END COLUMNS --*/ - - - //RESET BLOCK BORDER TOP - if (!$this->ColActive) { - for($bl=1;$bl<=$this->blklvl;$bl++) { - $this->blk[$bl]['y0'] = $this->y; - if (isset($this->blk[$bl]['x0'])) { $this->blk[$bl]['x0'] += $this->MarginCorrection; } - else { $this->blk[$bl]['x0'] = $this->MarginCorrection; } - // Added mPDF 3.0 Float DIV - $this->blk[$bl]['marginCorrected'][$this->page] = true; - } - } - - // mPDF 4.0 - $this->table_rotate = $save_tr; // *TABLES* - $this->kwt = $save_kwt; - - $this->cMarginL = $bak_cml; - $this->cMarginR = $bak_cmr; - $this->divwidth = $bak_dw; - // mPDF 4.2 - $this->lineheight = $bak_lh; -} - - -function PageNo() { - //Get current page number - return $this->page; -} - -function SetDrawColor($r,$g=-1,$b=-1,$col4=-1) { - //Set color for all stroking operations - if(($r==0 and $g==0 and $b==0 && $col4 == -1) or $g==-1) $this->DrawColor=sprintf('%.3f G',$r/255); - else if ($col4 == -1) $this->DrawColor=sprintf('%.3f %.3f %.3f RG',$r/255,$g/255,$b/255); - else { - // CMYK - // mPDF 4.2.018 - if ($this->PDFA) { $this->Error("PDFA1-b does not permit CMYK colours (fn. SetDrawColor)."); } - $this->DrawColor = sprintf('%.3f %.3f %.3f %.3f K', $r/100, $g/100, $b/100, $col4/100); - } - if($this->page>0 && ((isset($this->pageoutput[$this->page]['DrawColor']) && $this->pageoutput[$this->page]['DrawColor'] != $this->DrawColor) || !isset($this->pageoutput[$this->page]['DrawColor']) || $this->keep_block_together)) { $this->_out($this->DrawColor); } - $this->pageoutput[$this->page]['DrawColor'] = $this->DrawColor; -} - -function SetFillColor($r,$g=-1,$b=-1,$col4=-1) { - //Set color for all filling operations - if(($r==0 and $g==0 and $b==0 && $col4 == -1) or $g==-1) $this->FillColor=sprintf('%.3f g',$r/255); - else if ($col4 == -1) $this->FillColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255); - else { - // CMYK - // mPDF 4.2.018 - if ($this->PDFA) { $this->Error("PDFA1-b does not permit CMYK colours (fn. SetFillColor)."); } - $this->FillColor = sprintf('%.3f %.3f %.3f %.3f k', $r/100, $g/100, $b/100, $col4/100); - } - $this->ColorFlag = ($this->FillColor != $this->TextColor); - if($this->page>0 && ((isset($this->pageoutput[$this->page]['FillColor']) && $this->pageoutput[$this->page]['FillColor'] != $this->FillColor) || !isset($this->pageoutput[$this->page]['FillColor']) || $this->keep_block_together)) { $this->_out($this->FillColor); } - $this->pageoutput[$this->page]['FillColor'] = $this->FillColor; -} - -function SetTextColor($r,$g=-1,$b=-1,$col4=-1) { - //Set color for text - if(($r==0 and $g==0 and $b==0 && $col4 == -1) or $g==-1) $this->TextColor=sprintf('%.3f g',$r/255); - else if ($col4 == -1) $this->TextColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255); - else { - // CMYK - // mPDF 4.2.018 - if ($this->PDFA) { $this->Error("PDFA1-b does not permit CMYK colours (fn. SetTextColor)."); } - $this->TextColor = sprintf('%.3f %.3f %.3f %.3f k', $r/100, $g/100, $b/100, $col4/100); - } - $this->ColorFlag = ($this->FillColor != $this->TextColor); -} - - - -function GetStringWidth($s) { - //Get width of a string in the current font - $s = (string)$s; - $cw = &$this->CurrentFont['cw']; - $w = 0; -/*-- UNICODE-FONTS --*/ - if ($this->is_MB && !$this->usingCoreFont) { - $unicode = $this->UTF8StringToArray($s); - foreach($unicode as $char) { - if ($char == 173) { continue; } // Soft Hyphens - elseif (isset($cw[$char])) { $w+=$cw[$char]; } - elseif(isset($this->chrs[$char]) && isset($cw[$this->chrs[$char]])) { $w+=$cw[$this->chrs[$char]]; } - elseif(isset($this->CurrentFont['desc']['MissingWidth'])) { $w += $this->CurrentFont['desc']['MissingWidth']; } - elseif(isset($this->CurrentFont['MissingWidth'])) { $w += $this->CurrentFont['MissingWidth']; } - else { $w += 500; } - } - } - else { -/*-- END UNICODE-FONTS --*/ - $l = strlen($s); - for($i=0; $i<$l; $i++) { - // Soft Hyphens chr(173) - // mPDF 4.4.012 - if ($s[$i] == chr(173) && $this->FontFamily!='symbol' && $this->FontFamily!='zapfdingbats') { - continue; - } - else if (isset($cw[$s[$i]])) { $w += $cw[$s[$i]]; } - else if (isset($cw[ord($s[$i])])) { $w += $cw[ord($s[$i])]; } - } -/*-- UNICODE-FONTS --*/ - } -/*-- END UNICODE-FONTS --*/ - unset($cw); - return ($w * $this->FontSize/ 1000); -} - -function SetLineWidth($width) { - //Set line width - $this->LineWidth=$width; - $lwout = (sprintf('%.3f w',$width*$this->k)); - if($this->page>0 && ((isset($this->pageoutput[$this->page]['LineWidth']) && $this->pageoutput[$this->page]['LineWidth'] != $lwout) || !isset($this->pageoutput[$this->page]['LineWidth']) || $this->keep_block_together)) { - $this->_out($lwout); - } - $this->pageoutput[$this->page]['LineWidth'] = $lwout; -} - -function Line($x1,$y1,$x2,$y2) { - //Draw a line - $this->_out(sprintf('%.3f %.3f m %.3f %.3f l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); -} - -function Arrow($x1,$y1,$x2,$y2,$headsize=3,$fill='B',$angle=25) { - //F == fill //S == stroke //B == stroke and fill - // angle = splay of arrowhead - 1 - 89 degrees - if($fill=='F') $fill='f'; - elseif($fill=='FD' or $fill=='DF' or $fill=='B') $fill='B'; - else $fill='S'; - $a = atan2(($y2-$y1),($x2-$x1)); - $b = $a + deg2rad($angle); - $c = $a - deg2rad($angle); - $x3 = $x2 - ($headsize* cos($b)); - $y3 = $this->h-($y2 - ($headsize* sin($b))); - $x4 = $x2 - ($headsize* cos($c)); - $y4 = $this->h-($y2 - ($headsize* sin($c))); - - $x5 = $x3-($x3-$x4)/2; // mid point of base of arrowhead - to join arrow line to - $y5 = $y3-($y3-$y4)/2; - - $s = ''; - $s.=sprintf('%.3f %.3f m %.3f %.3f l S',$x1*$this->k,($this->h-$y1)*$this->k,$x5*$this->k,$y5*$this->k); - $this->_out($s); - - $s = ''; - $s.=sprintf('%.3f %.3f m %.3f %.3f l %.3f %.3f l %.3f %.3f l %.3f %.3f l ',$x5*$this->k,$y5*$this->k,$x3*$this->k,$y3*$this->k,$x2*$this->k,($this->h-$y2)*$this->k,$x4*$this->k,$y4*$this->k,$x5*$this->k,$y5*$this->k); - $s.=$fill; - $this->_out($s); -} - - -function Rect($x,$y,$w,$h,$style='') { - //Draw a rectangle - if($style=='F') $op='f'; - elseif($style=='FD' or $style=='DF') $op='B'; - else $op='S'; - $this->_out(sprintf('%.3f %.3f %.3f %.3f re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); -} - -function AddFont($family,$style='',$file='') { - - if ($this->isCJK && $this->use_CJK_only) { return; } - if(empty($family)) { return; } - $family = strtolower($family); - $style=strtoupper($style); - $style=str_replace('U','',$style); - if($style=='IB') $style='BI'; - $fontkey = $family.$style; - // check if the font has been already added - if(isset($this->fonts[$fontkey])) { - return; - } - -/*-- UNICODE-FONTS --*/ - if (($this->is_MB) && (!$this->usingCoreFont)) { - if($file=='') { - $file = str_replace(' ', '', $family).strtolower($style).'.php'; - } - if(!file_exists(MPDF_FONTPATH.$file)) { - // try to load the basic file without styles - $file = str_replace(' ', '', $family).'.php'; - } - include(MPDF_FONTPATH.$file); - // mPDF 4.1 - if ($this->useSubsets && file_exists(MPDF_FONTPATH.substr($file,0,(strpos($file,'.'))).'.dat')) { $type = "Type1subset"; } - if(!isset($name)) { - $this->Error('Could not include font definition file'); - } - $i = count($this->fonts)+$this->extraFontSubsets+1; - // mPDF 4.0 - $sbarr = range(0,32); - // Always include space, and 0-9 in first subset for use in page number aliases {nb} {nbpg} - for($ctr=0; $ctr<10; $ctr++) { $sbarr[($ctr+33)] = ($ctr+48); } - $this->fonts[$fontkey] = array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file, 'ctg'=>$ctg, 'subsets'=>array(0=>$sbarr), 'subsetfontids'=>array($i), 'used'=>false); - - /* mPDF 4.2 Not required in MB document/fonts - if(isset($diff) AND (!empty($diff))) { - //Search existing encodings - $d=0; - $nb=count($this->diffs); - for($i=1;$i<=$nb;$i++) { - if($this->diffs[$i]==$diff) { - $d=$i; - break; - } - } - if($d==0) { - $d=$nb+1; - $this->diffs[$d]=$diff; - } - $this->fonts[$fontkey]['diff']=$d; - } - */ - if(!empty($file)) { - // mPDF 4.0 - if ($this->useSubsets && $type == "Type1subset") { - $this->FontFiles[$file]=array('type'=>"Type1subset"); - } - else if((strcasecmp($type,"TrueType") == 0) OR (strcasecmp($type,"TrueTypeUnicode") == 0)) { - $this->FontFiles[$file]=array('length1'=>$originalsize); - } - else { - $this->FontFiles[$file]=array('length1'=>$size1,'length2'=>$size2); - } - } - } - else { // if not unicode (or embedded) -/*-- END UNICODE-FONTS --*/ - - if($file=='') { - $file=str_replace(' ','',$family).strtolower($style); - - if ($this->is_MB) { - $file=$file.'.php'; - } - else if ($this->codepage != 'win-1252') { - $file=$file.'-'.$this->codepage.'.php'; - } - else { // is there any other? - $file=$file.'.php'; - } - - - } - if(defined('MPDF_FONTPATH')) { $file=MPDF_FONTPATH.$file; } - include($file); - if(!isset($name)) $this->Error('Could not include font definition file - '.$family.' '.$style); - $i=count($this->fonts)+$this->extraFontSubsets+1; - $this->fonts[$family.$style]=array('i'=>$i,'type'=>$type,'name'=>$name,'desc'=>$desc,'up'=>$up,'ut'=>$ut,'cw'=>$cw,'enc'=>$enc,'file'=>$file, 'used'=>false); - if($diff) - { - //Search existing encodings - $d=0; - $nb=count($this->diffs); - for($i=1;$i<=$nb;$i++) - if($this->diffs[$i]==$diff) { - $d=$i; - break; - } - if($d==0) { - $d=$nb+1; - $this->diffs[$d]=$diff; - } - $this->fonts[$family.$style]['diff']=$d; - } - if($file) { - if($type=='TrueType') $this->FontFiles[$file]=array('length1'=>$originalsize); - else $this->FontFiles[$file]=array('length1'=>$size1,'length2'=>$size2); - } - // ADDED fontlist is defined in html2fpdf - if (isset($this->fontlist)) { $this->fontlist[] = strtolower($family); } - else { $this->fontlist = array(strtolower($family)); } - } // *UNICODE-FONTS* -} - - - -function SetFont($family,$style='',$size=0, $write=true, $forcewrite=false) { - $family=strtolower($family); - // save previous values - ? not required mPDF 4.0 - // $this->prevFontFamily = $this->FontFamily; - // $this->prevFontStyle = $this->FontStyle; - // Select a font; size given in points - - if($family=='') { - if ($this->FontFamily) { $family=$this->FontFamily; } - else if ($this->default_font) { $family=$this->default_font; } - else { $this->Error("No font or default font set!"); } - } - - // mPDF 4.2 - $this->ReqFontStyle = $style; // required or requested style - used later for artificial bold/italic - - if (($family == 'symbol') || ($family == 'zapfdingbats') || ($family == 'times') || ($family == 'courier') || ($family == 'helvetica')) { - // mPDF 4.2.018 - if ($this->PDFA) { - if ($family == 'symbol' || $family == 'zapfdingbats') { - $this->Error("Symbol and Zapfdingbats cannot be embedded in mPDF (required for PDFA1-b)."); - } - if ($family == 'times' || $family == 'courier') { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "Core Adobe font ".ucfirst($family)." cannot be embedded in mPDF, which is required for PDFA1-b. (Embedded font will be substituted.)"; } - if ($family == 'times') { $family = 'serif'; } - if ($family == 'courier') { $family = 'mono'; } - } - $this->usingCoreFont = false; - } - else { $this->usingCoreFont = true; } - } - else { $this->usingCoreFont = false; } - - if($family=='symbol' or $family=='zapfdingbats') { $style=''; } - $style=strtoupper($style); - if(is_int(strpos($style,'U'))) { - $this->underline=true; - $style=str_replace('U','',$style); - } - else { $this->underline=false; } - if ($style=='IB') $style='BI'; - if ($size==0) $size=$this->FontSizePt; - - $fontkey=$family.$style; - -/*-- UNICODE-FONTS --*/ - if ($this->is_MB && !$this->usingCoreFont) { - // CJK fonts -/*-- CJK --*/ - if (in_array($fontkey,$this->available_CJK_fonts)) { - if(!isset($this->fonts[$fontkey])) { // already added - if (empty($this->Big5_widths)) { require(_MPDF_PATH . 'includes/CJKdata.php'); } - $this->AddCJKFont($family); // don't need to add style - } - $this->isCJK = true; - $this->setMBencoding('UTF-8'); - } - else if ($this->use_CJK_only) { - $family = $this->default_font; - $this->isCJK = true; - $this->setMBencoding('UTF-8'); - } - // Test to see if requested font/style is available - or substitute - else -/*-- END CJK --*/ - if (!in_array($fontkey,$this->available_unifonts)) { - // If font[nostyle] exists - set it - if (in_array($family,$this->available_unifonts)) { - $style = ''; - } - - // Else if only one font available - set it (assumes if only one font available it will not have a style) - else if (count($this->available_unifonts) == 1) { - $family = $this->available_unifonts[0]; - $style = ''; - } - - else { - $found = 0; - // else substitute font of similar type - if (in_array($family,$this->sans_fonts)) { - $i = array_intersect($this->sans_fonts,$this->available_unifonts); - if (count($i)) { - $i = array_values($i); - // with requested style if possible - if (!in_array(($i[0].$style),$this->available_unifonts)) { - $style = ''; - } - $family = $i[0]; - $found = 1; - } - } - else if (in_array($family,$this->serif_fonts)) { - $i = array_intersect($this->serif_fonts,$this->available_unifonts); - if (count($i)) { - $i = array_values($i); - // with requested style if possible - if (!in_array(($i[0].$style),$this->available_unifonts)) { - $style = ''; - } - $family = $i[0]; - $found = 1; - } - } - else if (in_array($family,$this->mono_fonts)) { - $i = array_intersect($this->mono_fonts,$this->available_unifonts); - if (count($i)) { - $i = array_values($i); - // with requested style if possible - if (!in_array(($i[0].$style),$this->available_unifonts)) { - $style = ''; - } - $family = $i[0]; - $found = 1; - } - } - - if (!$found) { - // set first available font - $fs = $this->available_unifonts[0]; - // mPDF 4.0 Added 0-9 - preg_match('/^([a-z_0-9]+)([BI]{0,2})$/',$fs,$fas); - // with requested style if possible - $ws = $fas[1].$style; - if (in_array($ws,$this->available_unifonts)) { - $family = $fas[1]; // leave $style as is - } - else if (in_array($fas[1],$this->available_unifonts)) { - // or without style - $family = $fas[1]; - $style = ''; - } - else { - // or with the style specified - $family = $fas[1]; - $style = $fas[2]; - } - } - } - - $this->isCJK = false; - $this->setMBencoding('UTF-8'); - - $fontkey = $family.$style; - } - else { - $this->isCJK = false; - $this->setMBencoding('UTF-8'); - } - - // try to add font (if not already added) - $this->AddFont($family, $style); - - //Test if font is already selected - if(($this->FontFamily == $family) AND ($this->FontStyle == $style) AND ($this->FontSizePt == $size) && !$forcewrite) { - return $family; - } - - $fontkey = $family.$style; - //Select it - $this->FontFamily = $family; - $this->FontStyle = $style; - $this->FontSizePt = $size; - $this->FontSize = $size / $this->k; - $this->CurrentFont = &$this->fonts[$fontkey]; - if ($write) { - $fontout = (sprintf('BT /F%d %.3f Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); - // Edited mPDF 3.0 - if($this->page>0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']) || $this->keep_block_together)) { $this->_out($fontout); } - $this->pageoutput[$this->page]['Font'] = $fontout; - } - - - - // Added - currentfont (lowercase) used in HTML2PDF - $this->currentfontfamily=$family; - $this->currentfontsize=$size; - $this->currentfontstyle=$style.($this->underline ? 'U' : ''); - } - - else { // if not unicode/CJK - or core embedded font -/*-- END UNICODE-FONTS --*/ - - // mPDF 4.2.018 - if ($this->PDFA && $this->useOnlyCoreFonts) { - $this->Error('Core Adobe fonts cannot be embedded in mPDF (required for PDFA1-b) - cannot use $mpdf->useOnlyCoreFonts.'); - } - $this->isCJK = false; - $this->setMBencoding($this->codepage); - - //Test if font is already selected - if(($this->FontFamily == $family) AND ($this->FontStyle == $style) AND ($this->FontSizePt == $size) && !$forcewrite) { - return $family; - } - - // ALWAYS SUBSTITUTE ARIAL TIMES COURIER IN 1252 - if (!isset($this->CoreFonts[$fontkey]) && ($this->useOnlyCoreFonts) && ($this->codepage == 'win-1252')) { - if (in_array($family,$this->serif_fonts)) { $family = 'times'; } - else if (in_array($family,$this->mono_fonts)) { $family = 'courier'; } - else { $family = 'helvetica'; } - $this->usingCoreFont = true; - $fontkey = $family.$style; - } - - // Test to see if requested font/style is available - or substitute - if (!in_array($fontkey,$this->available_fonts) && (!$this->usingCoreFont) ) { - - // If font[nostyle] exists - set it - if (in_array($family,$this->available_fonts)) { - $style = ''; - } - // Else if only one font available - set it (assumes if only one font available it will not have a style) - else if (count($this->available_fonts) == 1) { - $family = $this->available_fonts[0]; - $style = ''; - } - else { - $found = 0; - // else substitute font of similar type - if (in_array($family,$this->sans_fonts)) { - $i = array_intersect($this->sans_fonts,$this->available_fonts); - if (count($i)) { - $i = array_values($i); - // with requested style if possible - if (!in_array(($i[0].$style),$this->available_fonts)) { - $style = ''; - } - $family = $i[0]; - $found = 1; - } - } - else if (in_array($family,$this->serif_fonts)) { - $i = array_intersect($this->serif_fonts,$this->available_fonts); - if (count($i)) { - $i = array_values($i); - // with requested style if possible - if (!in_array(($i[0].$style),$this->available_fonts)) { - $style = ''; - } - $family = $i[0]; - $found = 1; - } - } - else if (in_array($family,$this->mono_fonts)) { - $i = array_intersect($this->mono_fonts,$this->available_fonts); - if (count($i)) { - $i = array_values($i); - // with requested style if possible - if (!in_array(($i[0].$style),$this->available_fonts)) { - $style = ''; - } - $family = $i[0]; - $found = 1; - } - } - if (!$found) { - // set first available font - $fs = $this->available_unifonts[0]; - // mPDF 4.0 Added 0-9 - preg_match('/^([a-z_0-9]+)([BI]{0,2})$/',$fs,$fas); - // with requested style if possible - $ws = $fas[1].$style; - if (in_array($ws,$this->available_fonts)) { - $family = $fas[1]; // leave $style as is - } - else if (in_array($fas[1],$this->available_fonts)) { - // or without style - $family = $fas[1]; - $style = ''; - } - else { - // or with the style specified - $family = $fas[1]; - $style = $fas[2]; - } - } - } - $fontkey = $family.$style; - } - - // mPDF 4.0 - if(!isset($this->fonts[$fontkey])) { - // STANDARD CORE FONTS - if (isset($this->CoreFonts[$fontkey])) { - //Load metric file - $file=$family; - if($family=='times' || $family=='helvetica' || $family=='courier') { $file.=strtolower($style); } - $file.='.php'; - include(_MPDF_PATH.'font/'.$file); - if(!isset($cw)) { $this->Error('Could not include font metric file'); } - $i=count($this->fonts)+$this->extraFontSubsets+1; - $this->fonts[$fontkey]=array('i'=>$i,'type'=>'core','name'=>$this->CoreFonts[$fontkey],'desc'=>$desc,'up'=>$up,'ut'=>$ut,'cw'=>$cw); - } - else { - // try to add font - $this->AddFont($family, $style); - } - } - //Test if font is already selected - if(($this->FontFamily == $family) AND ($this->FontStyle == $style) AND ($this->FontSizePt == $size) && !$forcewrite) { - return $family; - } - //Select it - $this->FontFamily=$family; - $this->FontStyle=$style; - $this->FontSizePt=$size; - $this->FontSize=$size/$this->k; - $this->CurrentFont=&$this->fonts[$fontkey]; - if ($write) { - $fontout = (sprintf('BT /F%d %.3f Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); - if($this->page>0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']) || $this->keep_block_together)) { $this->_out($fontout); } - $this->pageoutput[$this->page]['Font'] = $fontout; - } - // Added - currentfont (lowercase) used in HTML2PDF - $this->currentfontfamily=$family; - $this->currentfontsize=$size; - $this->currentfontstyle=$style.($this->underline ? 'U' : ''); - - } // *UNICODE-FONTS* - return $family; -} - -function SetFontSize($size,$write=true) { - //Set font size in points - if($this->FontSizePt==$size) return; - $this->FontSizePt=$size; - $this->FontSize=$size/$this->k; - $this->currentfontsize=$size; - if ($write) { - $fontout = (sprintf('BT /F%d %.3f Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); - // Edited mPDF 3.0 - if($this->page>0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']) || $this->keep_block_together)) { $this->_out($fontout); } - $this->pageoutput[$this->page]['Font'] = $fontout; - } -} - -function AddLink() { - //Create a new internal link - $n=count($this->links)+1; - $this->links[$n]=array(0,0); - return $n; -} - -function SetLink($link,$y=0,$page=-1) { - //Set destination of internal link - if($y==-1) $y=$this->y; - if($page==-1) $page=$this->page; - $this->links[$link]=array($page,$y); -} - -function Link($x,$y,$w,$h,$link) { - if ($this->keep_block_together) { // Save to array - don't write yet - $this->ktLinks[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link); - return; - } - else if ($this->table_rotate) { // *TABLES* - $this->tbrot_Links[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link); // *TABLES* - return; // *TABLES* - } // *TABLES* - else if ($this->kwt) { - $this->kwt_Links[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link); - return; - } - // mPDF 4.0 - if ($this->writingHTMLheader || $this->writingHTMLfooter) { - $this->HTMLheaderPageLinks[]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link); - return; - } - //Put a link on the page - $this->PageLinks[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link); - // Save cross-reference to Column buffer - $ref = count($this->PageLinks[$this->page])-1; // *COLUMNS* - $this->columnLinks[$this->CurrCol][INTVAL($this->x)][INTVAL($this->y)] = $ref; // *COLUMNS* - -} - -function Text($x,$y,$txt) { - // Output a string - // Called (only) by Watermark - // Expects input to be mb_encoded if necessary and RTL reversed - // NON_BREAKING SPACE - // mPDF 4.0 - $this->CurrentFont['used']= true; - // mPDF 4.0 Subset fonts are unibyte at output stage -/*-- UNICODE-FONTS --*/ - if ($this->is_MB && !$this->usingCoreFont && (!$this->useSubsets || $this->CurrentFont['type']!='Type1subset')) { - $txt2 = str_replace($this->chrs[194].$this->chrs[160],$this->chrs[32],$txt); - if (!$this->usingCoreFont) { - //Convert string to UTF-16BE without BOM - $txt2= $this->UTF8ToUTF16BE($txt2, false); - } - $s=sprintf('BT %.3f %.3f Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt2)); - } - // mPDF 4.0 Subset fonts - else -/*-- END UNICODE-FONTS --*/ - if ($this->useSubsets && $this->CurrentFont['type']=='Type1subset' && !$this->isCJK && !$this->usingCoreFont) { - $txt2 = str_replace($this->chrs[160],$this->chrs[32],$txt); - $txt2 = $this->UTF8toSubset($txt2); - $s=sprintf('BT %.3f %.3f Td %s Tj ET',$x*$this->k,($this->h-$y)*$this->k,$txt2); - } - else { - $txt2 = str_replace($this->chrs[160],$this->chrs[32],$txt); - $s=sprintf('BT %.3f %.3f Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt2)); - } - if($this->underline and $txt!='') { - $s.=' '.$this->_dounderline($x,$y + (0.1* $this->FontSize),$txt); - } - if($this->ColorFlag) $s='q '.$this->TextColor.' '.$s.' Q'; - $this->_out($s); -} - -/*-- DIRECTW --*/ -function WriteText($x,$y,$txt) { - // Output a string using Text() but does encoding and text reversing of RTL - $txt = $this->purify_utf8_text($txt); - if ($this->text_input_as_HTML) { - $txt = $this->all_entities_to_utf8($txt); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $txt = mb_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $txt = api_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - // - // DIRECTIONALITY - $this->magic_reverse_dir($txt); // *RTL* - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($txt); // *INDIC* - $this->Text($x,$y,$txt); -} - -function WriteCell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='', $currentx=0) { - //Output a cell using Cell() but does encoding and text reversing of RTL - $txt = $this->purify_utf8_text($txt); - if ($this->text_input_as_HTML) { - $txt = $this->all_entities_to_utf8($txt); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $txt = mb_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $txt = api_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - // - // DIRECTIONALITY - $this->magic_reverse_dir($txt); // *RTL* - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($txt); // *INDIC* - $this->Cell($w,$h,$txt,$border,$ln,$align,$fill,$link, $currentx); -} -/*-- END DIRECTW --*/ - -// mPDF 4.0 -function ResetSpacing() { - if ($this->ws != 0) { $this->_out('BT 0 Tw ET'); } - $this->ws=0; - if ($this->charspacing != 0) { $this->_out('BT 0 Tc ET'); } - $this->charspacing=0; -} - -// mPDF 4.0 -function SetSpacing($cs,$ws) { - if ($cs) { $this->_out(sprintf('BT %.3f Tc ET',$cs)); } - else if ($this->charspacing != 0) { $this->_out('BT 0 Tc ET'); } - $this->charspacing=$cs; - if ($ws) { $this->_out(sprintf('BT %.3f Tw ET',$ws)); } - else if ($this->ws != 0) { $this->_out('BT 0 Tw ET'); } - $this->ws=$ws; -} - -// WORD SPACING -function GetJspacing($nc,$ns,$w) { - $ws = 0; - $charspacing = 0; - $ww = $this->jSWord; - $ncx = $nc-1; - if ($nc == 0 && $ns == 0) { return array(0,0); } - if ($nc==1) { $charspacing = $w; } - else if ($this->jSpacing == 'C') { - if ($nc) { $charspacing = $w / ($ncx ); } - } - else if ($this->jSpacing == 'W') { - if ($ns) { $ws = $w / $ns; } - } - else if (!$ns) { - if ($nc) { $charspacing = $w / ($ncx ); } - if (($this->jSmaxChar > 0) && ($charspacing > $this->jSmaxChar)) { - $charspacing = $this->jSmaxChar; - } - } - else if ($ns == ($ncx )) { - $charspacing = $w / $ns; - } - else { - if ($nc) { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB && !$this->usingCoreFont) { - $cs = ($w * (1 - $this->jSWord)) / ($ncx -$ns); - if (($this->jSmaxChar > 0) && ($cs > $this->jSmaxChar)) { - $cs = $this->jSmaxChar; - $ww = 1 - (($cs * ($ncx -$ns))/$w); - } - $charspacing = $cs; - $ws = (($w * ($ww) ) / $ns) - $charspacing; - } - else { -/*-- END UNICODE-FONTS --*/ - $cs = ($w * (1 - $this->jSWord)) / ($ncx ); - if (($this->jSmaxChar > 0) && ($cs > $this->jSmaxChar)) { - $cs = $this->jSmaxChar; - $ww = 1 - (($cs * ($ncx ))/$w); - } - $charspacing = $cs; - $ws = ($w * ($ww) ) / $ns; - } // *UNICODE-FONTS* - } - } - return array($charspacing,$ws); -} - -// mPDF 4.2 Last parameters added above and below font -function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='', $currentx=0, $lcpaddingL=0, $lcpaddingR=0, $valign='M', $spanfill=0, $abovefont=0, $belowfont=0) { - //Output a cell - // Expects input to be mb_encoded if necessary and RTL reversed - // NON_BREAKING SPACE - if ($this->is_MB) { // *UNICODE-FONTS* - $txt = str_replace($this->chrs[194].$this->chrs[160],$this->chrs[32],$txt); // *UNICODE-FONTS* - } // *UNICODE-FONTS* - else { // *UNICODE-FONTS* - $txt = str_replace($this->chrs[160],$this->chrs[32],$txt); - } // *UNICODE-FONTS* - - $k=$this->k; - $oldcolumn = $this->CurrCol; - // Automatic page break - // Allows PAGE-BREAK-AFTER = avoid to work - // mPDF 4.2.008 - if (!$this->tableLevel && (($this->y+$this->divheight>$this->PageBreakTrigger) || ($this->y+$h>$this->PageBreakTrigger) || - ($this->y+($h*2)>$this->PageBreakTrigger && $this->blk[$this->blklvl]['page_break_after_avoid'])) and !$this->InFooter and $this->AcceptPageBreak()) { - $x=$this->x;//Current X position - - - // WORD SPACING - $ws=$this->ws;//Word Spacing - $charspacing=$this->charspacing;//Character Spacing - // mPDF 4.0 - $this->ResetSpacing(); - - $this->AddPage($this->CurOrientation); - // Added to correct for OddEven Margins - $x += $this->MarginCorrection; - if ($currentx) { - $currentx += $this->MarginCorrection; - } - $this->x=$x; - // WORD SPACING - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - } - - // Test: to put border round each cell: $border=1; - // Test: to put line through centre of cell: $this->Line($this->x,$this->y+($h/2),$this->x+50,$this->y+($h/2)); - -/*-- COLUMNS --*/ - // COLS - // COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - if ($currentx) { - $currentx += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - } - $this->x += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - } - - // COLUMNS Update/overwrite the lowest bottom of printing y value for a column - if ($this->ColActive) { - if ($h) { $this->ColDetails[$this->CurrCol]['bottom_margin'] = $this->y+$h; } - else { $this->ColDetails[$this->CurrCol]['bottom_margin'] = $this->y+$this->divheight; } - } -/*-- END COLUMNS --*/ - - // KEEP BLOCK TOGETHER Update/overwrite the lowest bottom of printing y value on first page - if ($this->keep_block_together) { - if ($h) { $this->ktBlock[$this->page]['bottom_margin'] = $this->y+$h; } -// else { $this->ktBlock[$this->page]['bottom_margin'] = $this->y+$this->divheight; } - } - - if($w==0) $w = $this->w-$this->rMargin-$this->x; - $s=''; - if($fill==1 && $this->FillColor) { - if((isset($this->pageoutput[$this->page]['FillColor']) && $this->pageoutput[$this->page]['FillColor'] != $this->FillColor) || !isset($this->pageoutput[$this->page]['FillColor']) || $this->keep_block_together) { $s .= $this->FillColor.' '; } - $this->pageoutput[$this->page]['FillColor'] = $this->FillColor; - } - - // mPDF 4.0 - $boxtop = $this->y; - $boxheight = $h; - $boxbottom = $this->y+$h; - - if($txt!='') { - // FONT SIZE - this determines the baseline caculation - if ($this->linemaxfontsize && !$this->processingHeader) { $bfs = $this->linemaxfontsize; } - else { $bfs = $this->FontSize; } - //Calculate baseline Superscript and Subscript Y coordinate adjustment - $bfx = $this->baselineC; // mPDF 4.2 - $baseline = $bfx*$bfs; - if($this->SUP) { $baseline += ($bfx-1.05)*$this->FontSize; } - else if($this->SUB) { $baseline += ($bfx + 0.04)*$this->FontSize; } - else if($this->bullet) { $baseline += ($bfx-0.7)*$this->FontSize; } - - // Vertical align (for Images) - // mPDF 4.2 - if ($abovefont || $belowfont) { // from flowing block - valign always M - $va = $abovefont + (0.5*$bfs); - } - else if ($this->lineheight_correction) { - if ($valign == 'T') { $va = (0.5 * $bfs * $this->lineheight_correction); } - else if ($valign == 'B') { $va = $h-(0.5 * $bfs * $this->lineheight_correction); } - else { $va = 0.5*$h; } // Middle - } - else { - if ($valign == 'T') { $va = (0.5 * $bfs * $this->default_lineheight_correction); } - else if ($valign == 'B') { $va = $h-(0.5 * $bfs * $this->default_lineheight_correction); } - else { $va = 0.5*$h; } // Middle - } - - // ONLY SET THESE IF WANT TO CONFINE BORDER +- FILL TO FIT FONTSIZE - NOT FULL CELL - if ($spanfill) { - $boxtop = $this->y+$baseline+$va-($this->FontSize*(0.5+$bfx)); - $boxheight = $this->FontSize; - $boxbottom = $boxtop + $boxheight; - } - } - - - if($fill==1 or $border==1) { - if ($fill==1) $op=($border==1) ? 'B' : 'f'; - else $op='S'; - $s.=sprintf('%.3f %.3f %.3f %.3f re %s ',$this->x*$k,($this->h-$boxtop)*$k,$w*$k,-$boxheight*$k,$op); - } - - if(is_string($border)) { - $x=$this->x; - $y=$this->y; - if(is_int(strpos($border,'L'))) - $s.=sprintf('%.3f %.3f m %.3f %.3f l S ',$x*$k,($this->h-$boxtop)*$k,$x*$k,($this->h-($boxbottom))*$k); - if(is_int(strpos($border,'T'))) - $s.=sprintf('%.3f %.3f m %.3f %.3f l S ',$x*$k,($this->h-$boxtop)*$k,($x+$w)*$k,($this->h-$boxtop)*$k); - if(is_int(strpos($border,'R'))) - $s.=sprintf('%.3f %.3f m %.3f %.3f l S ',($x+$w)*$k,($this->h-$boxtop)*$k,($x+$w)*$k,($this->h-($boxbottom))*$k); - if(is_int(strpos($border,'B'))) - $s.=sprintf('%.3f %.3f m %.3f %.3f l S ',$x*$k,($this->h-($boxbottom))*$k,($x+$w)*$k,($this->h-($boxbottom))*$k); - } - - if($txt!='') { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$stringWidth = $this->GetStringWidth($txt) + ( $this->charspacing * mb_strlen( $txt, $this->mb_enc ) / $k ) - // + ( $this->ws * mb_substr_count( $txt, ' ', $this->mb_enc ) / $k ); - $stringWidth = $this->GetStringWidth($txt) + ( $this->charspacing * api_strlen( $txt, $this->mb_enc ) / $k ) - + ( $this->ws * api_substr_count( $txt, ' ', $this->mb_enc ) / $k ); - // - - // Set x OFFSET FOR PRINTING - if($align=='R') { - $dx=$w-$this->cMarginR - $stringWidth - $lcpaddingR; - } - elseif($align=='C') { - $dx=(($w - $stringWidth )/2); - } - elseif($align=='L' or $align=='J') $dx=$this->cMarginL + $lcpaddingL; - else $dx = 0; - - - if($this->ColorFlag) $s.='q '.$this->TextColor.' '; - - // OUTLINE - if($this->outline_on) { - $s.=' '.sprintf('%.3f w',$this->LineWidth*$k).' '; - $s.=" $this->DrawColor "; - $s.=" 2 Tr "; - } - // mPDF 4.2 Artificial BOLD - else if ($this->falseBoldWeight && strpos($this->ReqFontStyle,"B") !== false && strpos($this->FontStyle,"B") === false) { // can't use together with OUTLINE - $s .= ' 2 Tr 1 J 1 j '; - $s .= ' '.sprintf('%.3f w',($this->FontSize/130)*$k*$this->falseBoldWeight).' '; - $tc = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG - if($this->FillColor!=$tc) { $s .= ' '.$tc.' '; } // stroke (outline) = same colour as text(fill) - } - // mPDF 4.2 Artificial ITALIC - if (strpos($this->ReqFontStyle,"I") !== false && strpos($this->FontStyle,"I") === false) { // Artificial italic - $aix = '1 0 0.261799 1 %.3f %.3f Tm '; - } - else { $aix = '%.3f %.3f Td '; } - - // THE TEXT - // mPDF 4.0 - $this->CurrentFont['used']= true; - // WORD SPACING - // IF multibyte - Tw has no effect - need to do word spacing by setting character spacing for spaces between words - // mPDF 4.0 Subset fonts are unibyte at output stage -/*-- UNICODE-FONTS --*/ - - if ($this->ws && $this->is_MB && (!$this->useSubsets || $this->CurrentFont['type']!='Type1subset')) { - $space = ' '; - if ($this->is_MB && !$this->usingCoreFont) { - //Convert string to UTF-16BE without BOM - $space= $this->UTF8ToUTF16BE($space , false); - } - $space=$this->_escape($space ); - $s.=sprintf('BT '.$aix,($this->x+$dx)*$k,($this->h-($this->y+$baseline+$va))*$k); - $t = explode(' ',$txt); // mPDF 4.4.012 - for($i=0;$iis_MB && !$this->usingCoreFont) { - //Convert string to UTF-16BE without BOM - $tx = $this->UTF8ToUTF16BE($tx , false); - } - - $tx = $this->_escape($tx); - - $s.=sprintf(' %.3f Tc (%s) Tj',$this->charspacing,$tx); - if (($i+1)ws+$this->charspacing,$space); - } - } - $s.=' ET'; - } - else { -/*-- END UNICODE-FONTS --*/ - $txt2= $txt; - // mPDF 4.0 Subset fonts - if ($this->useSubsets && $this->CurrentFont['type']=='Type1subset' && !$this->isCJK && !$this->usingCoreFont) { - $txt2 = $this->UTF8toSubset($txt2); - $s.=sprintf('BT '.$aix.' %s Tj ET',($this->x+$dx)*$k,($this->h-($this->y+$baseline+$va))*$k,$txt2); - } - else { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB && !$this->usingCoreFont) { - //Convert string to UTF-16BE without BOM - $txt2= $this->UTF8ToUTF16BE($txt2, false); - } -/*-- END UNICODE-FONTS --*/ - $txt2=$this->_escape($txt2); - $s.=sprintf('BT '.$aix.' (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+$baseline+$va))*$k,$txt2); - } - } // *UNICODE-FONTS* - - // UNDERLINE - // mPDF 4.0 - if($this->underline) { - $c = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG - if($this->FillColor!=$c) { $s.= ' '.$c.' '; } - if (isset($this->CurrentFont['up'])) { $up=$this->CurrentFont['up']; } - else { $up = -100; } - $adjusty = (-$up/1000* $this->FontSize); - if (isset($this->CurrentFont['ut'])) { $ut=$this->CurrentFont['ut']/1000* $this->FontSize; } - else { $ut = 60/1000* $this->FontSize; } - $olw = $this->LineWidth; - $s.=' '.(sprintf(' %.3f w',$ut*$this->k)); - $s.=' '.$this->_dounderline($this->x+$dx,$this->y+$baseline+$va+$adjusty,$txt); - $s.=' '.(sprintf(' %.3f w',$olw*$this->k)); - if($this->FillColor!=$c) { $s.= ' '.$this->FillColor.' '; } - } - - // STRIKETHROUGH - // mPDF 4.0 - if($this->strike) { - $c = strtoupper($this->TextColor); // change 0 0 0 rg to 0 0 0 RG - if($this->FillColor!=$c) { $s.= ' '.$c.' '; } - //Superscript and Subscript Y coordinate adjustment (now for striked-through texts) - if (isset($this->CurrentFont['desc']['CapHeight'])) { $ch=$this->CurrentFont['desc']['CapHeight']; } - else { $ch = 700; } - $adjusty = (-$ch/1000* $this->FontSize) * 0.35; - if (isset($this->CurrentFont['ut'])) { $ut=$this->CurrentFont['ut']/1000* $this->FontSize; } - else { $ut = 60/1000* $this->FontSize; } - $olw = $this->LineWidth; - $s.=' '.(sprintf(' %.3f w',$ut*$this->k)); - $s.=' '.$this->_dounderline($this->x+$dx,$this->y+$baseline+$va+$adjusty,$txt); - $s.=' '.(sprintf(' %.3f w',$olw)); - if($this->FillColor!=$c) { $s.= ' '.$this->FillColor.' '; } - } - - // COLOR - if($this->ColorFlag) $s.=' Q'; - - // LINK - if($link!='') { - $this->Link($this->x+$dx,$this->y+$va-.5*$this->FontSize,$stringWidth,$this->FontSize,$link); - } - } - if($s) $this->_out($s); - - // WORD SPACING - if ($this->ws && $this->is_MB) { // *UNICODE-FONTS* - $this->_out(sprintf('BT %.3f Tc ET',$this->charspacing)); // *UNICODE-FONTS* - } // *UNICODE-FONTS* - - $this->lasth=$h; - if( strpos($txt,"\n") !== false) $ln=1; // cell recognizes \n from
    tag - if($ln>0) - { - //Go to next line - $this->y += $h; - if($ln==1) { - //Move to next line - if ($currentx != 0) { $this->x=$currentx; } - else { $this->x=$this->lMargin; } - } - } - else $this->x+=$w; - - -} - - -function MultiCell($w,$h,$txt,$border=0,$align='',$fill=0,$link='',$directionality='ltr',$encoded=false) -{ - // Parameter (pre-)encoded - When called internally from ToC or textarea: mb_encoding already done - but not reverse RTL/Indic - if (!$encoded) { - $txt = $this->purify_utf8_text($txt); - if ($this->text_input_as_HTML) { - $txt = $this->all_entities_to_utf8($txt); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $txt = mb_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $txt = api_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - // - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - else if ($this->is_MB) { // *INDIC* - $this->ConvertIndic($tmp); // *INDIC* - } // *INDIC* - } - if (!$align) { $align = $this->defaultAlign; } - //Output text with automatic or explicit line breaks - $cw=&$this->CurrentFont['cw']; - if($w==0) $w=$this->w-$this->rMargin-$this->x; - -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - $wmax = ($w - ($this->cMarginL+$this->cMarginR)); - $s=str_replace("\r",'',$txt); // mPDF 4.4.012 - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$nb=mb_strlen($s, $this->mb_enc ); - //while($nb>0 and mb_substr($s,$nb-1,1,$this->mb_enc )=="\n") $nb--; - $nb=api_strlen($s, $this->mb_enc ); - while($nb>0 and api_substr($s,$nb-1,1,$this->mb_enc )=="\n") $nb--; - // - } - else { -/*-- END UNICODE-FONTS --*/ - $wmax=($w- ($this->cMarginL+$this->cMarginR))*1000/$this->FontSize; - $s=str_replace("\r",'',$txt); - $nb=strlen($s); - while($nb>0 and $s[$nb-1]=="\n") $nb--; - } // *UNICODE-FONTS* - $b=0; - if($border) { - if($border==1) { - $border='LTRB'; - $b='LRT'; - $b2='LR'; - } - else { - $b2=''; - if(is_int(strpos($border,'L'))) $b2.='L'; - if(is_int(strpos($border,'R'))) $b2.='R'; - $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; - } - } - $sep=-1; - $i=0; - $j=0; - $l=0; - $ns=0; - $nl=1; - - -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - while($i<$nb) { - //Get next character - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$c = mb_substr($s,$i,1,$this->mb_enc ); - $c = api_substr($s,$i,1,$this->mb_enc); - // - if($c == "\n") { // mPDF 4.4.012 - //Explicit line break - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$tmp = rtrim(mb_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - $tmp = rtrim(api_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - // - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - - $this->Cell($w,$h,$tmp,$b,2,$align,$fill,$link); - $i++; - $sep=-1; - $j=$i; - $l=0; - $ns=0; - $nl++; - if($border and $nl==2) $b=$b2; - continue; - } - if($c == " ") { // mPDF 4.4.012 - $sep=$i; - $ls=$l; - $ns++; - } - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$l = $this->GetStringWidth(mb_substr($s, $j, $i-$j,$this->mb_enc )); - $l = $this->GetStringWidth(api_substr($s, $j, $i-$j,$this->mb_enc )); - // - - if($l>$wmax) { - //Automatic line break - if($sep==-1) { // Only one word - if($i==$j) $i++; - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$tmp = rtrim(mb_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - $tmp = rtrim(api_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - // - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - - $this->Cell($w,$h,$tmp,$b,2,$align,$fill,$link); - } - else { - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$tmp = rtrim(mb_substr($s,$j,$sep-$j,$this->mb_enc)); // mPDF 4.4.012 - $tmp = rtrim(api_substr($s,$j,$sep-$j,$this->mb_enc)); // mPDF 4.4.012 - // - if($align=='J') { - //$this->ws=($ns>1) ? ((($wmax-$ls)/($ns-1))) : 0; - //$this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); - - ////////////////////////////////////////// - // JUSTIFY J using Unicode fonts (Word spacing doesn't work) - // WORD SPACING UNICODE - // Change NON_BREAKING SPACE to spaces so they are 'spaced' properly - $tmp = str_replace($this->chrs[194].$this->chrs[160],$this->chrs[32],$tmp ); - $len_ligne = $this->GetStringWidth($tmp ); - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$nb_carac = mb_strlen( $tmp , $this->mb_enc ) ; - //$nb_spaces = mb_substr_count( $tmp ,' ', $this->mb_enc ) ; - $nb_carac = api_strlen( $tmp , $this->mb_enc ) ; - $nb_spaces = api_substr_count( $tmp ,' ', $this->mb_enc ) ; - // - list($charspacing,$ws) = $this->GetJspacing($nb_carac,$nb_spaces,((($w-2) - $len_ligne) * $this->k)); - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - ////////////////////////////////////////// - } - - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - - $this->Cell($w,$h,$tmp,$b,2,$align,$fill,$link); - $i=$sep+1; - } - $sep=-1; - $j=$i; - $l=0; - $ns=0; - $nl++; - if($border and $nl==2) $b=$b2; - } - else $i++; - } - //Last chunk - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - - } - - - else { -/*-- END UNICODE-FONTS --*/ - while($i<$nb) { - //Get next character - $c=$s[$i]; // mPDF 4.4.012 - if($c == "\n") { // mPDF 4.4.012 - //Explicit line break - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link); - $i++; - $sep=-1; - $j=$i; - $l=0; - $ns=0; - $nl++; - if($border and $nl==2) $b=$b2; - continue; - } - if($c == " ") { // mPDF 4.4.012 - $sep=$i; - $ls=$l; - $ns++; - } - - $l+=$cw[$c]; - if($l>$wmax) { - //Automatic line break - if($sep==-1) { - if($i==$j) $i++; - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link); - } - else { - if($align=='J') { - $tmp = rtrim(substr($s,$j,$sep-$j)); - ////////////////////////////////////////// - // JUSTIFY J using Unicode fonts (Word spacing doesn't work) - // WORD SPACING NON_UNICDOE/CJK - // Change NON_BREAKING SPACE to spaces so they are 'spaced' properly - $tmp = str_replace($this->chrs[160],$this->chrs[32],$tmp); - $len_ligne = $this->GetStringWidth($tmp ); - $nb_carac = strlen( $tmp ) ; - $nb_spaces = substr_count( $tmp ,' ' ) ; - list($charspacing,$ws) = $this->GetJspacing($nb_carac,$nb_spaces,((($w-2) - $len_ligne) * $this->k)); - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - ////////////////////////////////////////// - } - $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill,$link); - $i=$sep+1; - } - $sep=-1; - $j=$i; - $l=0; - $ns=0; - $nl++; - if($border and $nl==2) $b=$b2; - } - else $i++; - } - //Last chunk - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - - } // *UNICODE-FONTS* - - //Last chunk - if($border and is_int(strpos($border,'B'))) $b.='B'; - if ($this->is_MB) { - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$tmp = rtrim(mb_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - $tmp = rtrim(api_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - // - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - $this->Cell($w,$h,$tmp,$b,2,$align,$fill,$link); - } - else { $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link); } - $this->x=$this->lMargin; -} - - -/*-- DIRECTW --*/ -function Write($h,$txt,$currentx=0,$link='',$directionality='ltr',$align='') { - if (!$align) { $align = $this->defaultAlign; } // NB Cannot use Align=J or C using Write?? - if ($h == 0) { $this->SetLineHeight(); $h = $this->lineheight; } - //Output text in flowing mode - $cw = &$this->CurrentFont['cw']; - $w = $this->w - $this->rMargin - $this->x; - -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - $wmax = ($w - ($this->cMarginL+$this->cMarginR)); - $s=str_replace("\r",'',$txt); // mPDF 4.4.012 - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$nb=mb_strlen($s, $this->mb_enc ); - $nb=api_strlen($s, $this->mb_enc ); - // - // handle single space character - if(($nb==1) && $s == " ") { // mPDF 4.4.012 - $this->x += $this->GetStringWidth($s); - return; - } - } - else { -/*-- END UNICODE-FONTS --*/ - $wmax=($w- ($this->cMarginL+$this->cMarginR))*1000/$this->FontSize; - $s=str_replace("\r",'',$txt); - $nb=strlen($s); - } // *UNICODE-FONTS* - - - $sep=-1; - $i=0; - $j=0; - $l=0; - $nl=1; - - -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - while($i<$nb) { - //Get next character - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$c = mb_substr($s,$i,1,$this->mb_enc ); - $c = api_substr($s,$i,1,$this->mb_enc ); - // - if($c == "\n") { // mPDF 4.4.012 - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - //Explicit line break - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$tmp = rtrim(mb_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - $tmp = rtrim(api_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - // - if ($this->directionality == 'rtl') { // *RTL* - if ($align == 'J') { $align = 'R'; } // *RTL* - } // *RTL* - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - - $this->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link); - $i++; - $sep = -1; - $j = $i; - $l = 0; - if($nl == 1) { - if ($currentx != 0) $this->x=$currentx; - else $this->x=$this->lMargin; - $w = $this->w - $this->rMargin - $this->x; - $wmax = ($w - ($this->cMarginL+$this->cMarginR)); - } - $nl++; - continue; - } - if($c == " ") { // mPDF 4.4.012 - $sep= $i; - } - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$l = $this->GetStringWidth(mb_substr($s, $j, $i-$j,$this->mb_enc)); - $l = $this->GetStringWidth(api_substr($s, $j, $i-$j,$this->mb_enc)); - // - - if($l > $wmax) { - //Automatic line break (word wrapping) - if($sep == -1) { - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - if($this->x > $this->lMargin) { - //Move to next line - if ($currentx != 0) $this->x=$currentx; - else $this->x=$this->lMargin; - $this->y+=$h; - $w=$this->w-$this->rMargin-$this->x; - $wmax = ($w - ($this->cMarginL+$this->cMarginR)); - $i++; - $nl++; - continue; - } - if($i==$j) { - $i++; - } - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$tmp = rtrim(mb_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - $tmp = rtrim(api_substr($s,$j,$i-$j,$this->mb_enc)); // mPDF 4.4.012 - // - if ($this->directionality == 'rtl') { // *RTL* - if ($align == 'J') { $align = 'R'; } // *RTL* - } // *RTL* - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - - $this->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link); - } - else { - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$tmp = rtrim(mb_substr($s,$j,$sep-$j,$this->mb_enc)); // mPDF 4.4.012 - $tmp = rtrim(api_substr($s,$j,$sep-$j,$this->mb_enc)); // mPDF 4.4.012 - // - if ($this->directionality == 'rtl') { // *RTL* - if ($align == 'J') { $align = 'R'; } // *RTL* - } // *RTL* - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - - if($align=='J') { - ////////////////////////////////////////// - // JUSTIFY J using Unicode fonts (Word spacing doesn't work) - // WORD SPACING - // Change NON_BREAKING SPACE to spaces so they are 'spaced' properly - $tmp = str_replace($this->chrs[194].$this->chrs[160],$this->chrs[32],$tmp ); - $len_ligne = $this->GetStringWidth($tmp ); - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$nb_carac = mb_strlen( $tmp , $this->mb_enc ) ; - //$nb_spaces = mb_substr_count( $tmp ,' ', $this->mb_enc ) ; - $nb_carac = api_strlen( $tmp , $this->mb_enc ) ; - $nb_spaces = api_substr_count( $tmp ,' ', $this->mb_enc ) ; - // - list($charspacing,$ws) = $this->GetJspacing($nb_carac,$nb_spaces,((($w-2) - $len_ligne) * $this->k)); - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - ////////////////////////////////////////// - } - - $this->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link); - $i=$sep+1; - } - $sep = -1; - $j = $i; - $l = 0; - if($nl==1) { - if ($currentx != 0) $this->x=$currentx; - else $this->x=$this->lMargin; - $w=$this->w-$this->rMargin-$this->x; - $wmax = ($w - ($this->cMarginL+$this->cMarginR)); - } - $nl++; - } - else { - $i++; - } - } - - - //Last chunk - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - - } - - - else { -/*-- END UNICODE-FONTS --*/ - - while($i<$nb) { - //Get next character - $c=$s[$i]; // mPDF 4.4.012 - if($c == "\n") { // mPDF 4.4.012 - //Explicit line break - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - $this->Cell($w, $h, substr($s, $j, $i-$j), 0, 2, $align, $fill, $link); - $i++; - $sep = -1; - $j = $i; - $l = 0; - if($nl == 1) { - if ($currentx != 0) $this->x=$currentx; - else $this->x=$this->lMargin; - $w = $this->w - $this->rMargin - $this->x; - $wmax=($w-($this->cMarginL+$this->cMarginR))*1000/$this->FontSize; - } - $nl++; - continue; - } - if($c == " ") { // mPDF 4.4.012 - $sep= $i; - } - - $l += $cw[$c]; - - if($l > $wmax) { - //Automatic line break (word wrapping) - if($sep == -1) { - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - if($this->x > $this->lMargin) { - //Move to next line - if ($currentx != 0) $this->x=$currentx; - else $this->x=$this->lMargin; - $this->y+=$h; - $w=$this->w-$this->rMargin-$this->x; - $wmax=($w-($this->cMarginL+$this->cMarginR))*1000/$this->FontSize; - $i++; - $nl++; - continue; - } - if($i==$j) { - $i++; - } - $this->Cell($w, $h, substr($s, $j, $i-$j), 0, 2, $align, $fill, $link); - } - else { - $tmp = substr($s, $j, $sep-$j); - if($align=='J') { - ////////////////////////////////////////// - // JUSTIFY J using Unicode fonts (Word spacing doesn't work) - // WORD SPACING - // Change NON_BREAKING SPACE to spaces so they are 'spaced' properly - $tmp = str_replace($this->chrs[160],$this->chrs[32],$tmp ); - $len_ligne = $this->GetStringWidth($tmp ); - $nb_carac = strlen( $tmp ) ; - $nb_spaces = substr_count( $tmp ,' ' ) ; - list($charspacing,$ws) = $this->GetJspacing($nb_carac,$nb_spaces,((($w-2) - $len_ligne) * $this->k)); - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - ////////////////////////////////////////// - } - - $this->Cell($w, $h, $tmp, 0, 2, $align, $fill, $link); - $i=$sep+1; - } - $sep = -1; - $j = $i; - $l = 0; - if($nl==1) { - if ($currentx != 0) $this->x=$currentx; - else $this->x=$this->lMargin; - $w=$this->w-$this->rMargin-$this->x; - $wmax=($w-($this->cMarginL+$this->cMarginR))*1000/$this->FontSize; - } - $nl++; - } - else { - $i++; - } - } - - //Last chunk - // WORD SPACING - // mPDF 4.0 - $this->ResetSpacing(); - } // *UNICODE-FONTS* - - //Last chunk - if($i!=$j) { - // mPDF 4.0 - if ($currentx != 0) $this->mpdf->x=$currentx; - else $this->mpdf->x=$this->mpdf->lMargin + $this->mpdf->cMarginL; - -/*-- UNICODE-FONTS --*/ - if (($this->is_MB) && (!$this->usingCoreFont)) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$tmp = mb_substr($s,$j,$i-$j,$this->mb_enc); - $tmp = api_substr($s,$j,$i-$j,$this->mb_enc); - // - if ($this->directionality == 'rtl') { // *RTL* - if ($align == 'J') { $align = 'R'; } // *RTL* - } // *RTL* - // DIRECTIONALITY - $this->magic_reverse_dir($tmp); // *RTL* - - } - else { -/*-- END UNICODE-FONTS --*/ - $tmp = substr($s,$j,$i-$j); // Including CJK which has processed each byte (not multibyte) - } // *UNICODE-FONTS* - $this->Cell($this->GetStringWidth($tmp),$h,$tmp,0,0,'C',$fill,$link); - } -} -/*-- END DIRECTW --*/ - - -function saveInlineProperties() { - $saved = array(); - $saved[ 'family' ] = $this->FontFamily; - $saved[ 'style' ] = $this->FontStyle; - $saved[ 'sizePt' ] = $this->FontSizePt; - $saved[ 'size' ] = $this->FontSize; - $saved[ 'HREF' ] = $this->HREF; - $saved[ 'underline' ] = $this->underline; - $saved[ 'strike' ] = $this->strike; - $saved[ 'SUP' ] = $this->SUP; - $saved[ 'SUB' ] = $this->SUB; - $saved[ 'linewidth' ] = $this->LineWidth; - $saved[ 'drawcolor' ] = $this->DrawColor; - $saved[ 'is_outline' ] = $this->outline_on; - $saved[ 'outlineparam' ] = $this->outlineparam; - $saved[ 'toupper' ] = $this->toupper; - $saved[ 'tolower' ] = $this->tolower; - - $saved[ 'I' ] = $this->I; - $saved[ 'B' ] = $this->B; - $saved[ 'colorarray' ] = $this->colorarray; - $saved[ 'bgcolorarray' ] = $this->spanbgcolorarray; - $saved[ 'color' ] = $this->TextColor; - $saved[ 'bgcolor' ] = $this->FillColor; - $saved['lang'] = $this->currentLang; - - return $saved; -} - -function restoreInlineProperties( $saved) { - - // mPDF 4.0 $this->FontFamily Resets below - don't change here - change via SetFont() - // or it will not change $this->CurrentFont - //$this->FontFamily = $saved[ 'family' ]; - $FontFamily = $saved[ 'family' ]; - - $this->FontStyle = $saved[ 'style' ]; - $this->FontSizePt = $saved[ 'sizePt' ]; - $this->FontSize = $saved[ 'size' ]; - - $this->currentLang = $saved['lang']; -/*-- UNICODE-FONTS --*/ - if ($this->useLang && $this->is_MB && $this->currentLang != $this->default_lang && ((strlen($this->currentLang) == 5 && $this->currentLang != 'UTF-8') || strlen($this->currentLang ) == 2)) { - list ($codepage,$mpdf_pdf_unifonts,$mpdf_directionality,$mpdf_jSpacing) = GetCodepage($this->currentLang); - if ($codepage == 'SHIFT_JIS') { $FontFamily = 'sjis'; } // mPDF 4.0 see above - else if ($codepage == 'UHC') { $FontFamily = 'uhc'; } // mPDF 4.0 see above - else if ($codepage == 'BIG5') { $FontFamily = 'big5'; } // mPDF 4.0 see above - else if ($codepage == 'GBK') { $FontFamily = 'gb'; } // mPDF 4.0 see above - else if ($mpdf_pdf_unifonts) { $this->RestrictUnicodeFonts($mpdf_pdf_unifonts); } - else { $this->RestrictUnicodeFonts($this->default_available_fonts ); } - } - else if ($this->useLang && $this->is_MB ) { - $this->RestrictUnicodeFonts($this->default_available_fonts ); - } -/*-- END UNICODE-FONTS --*/ - - $this->ColorFlag = ($this->FillColor != $this->TextColor); //Restore ColorFlag as well - - $this->HREF = $saved[ 'HREF' ]; - $this->underline = $saved[ 'underline' ]; - $this->strike = $saved[ 'strike' ]; - $this->SUP = $saved[ 'SUP' ]; - $this->SUB = $saved[ 'SUB' ]; - $this->LineWidth = $saved[ 'linewidth' ]; - $this->DrawColor = $saved[ 'drawcolor' ]; - $this->outline_on = $saved[ 'is_outline' ]; - $this->outlineparam = $saved[ 'outlineparam' ]; - - $this->toupper = $saved[ 'toupper' ]; - $this->tolower = $saved[ 'tolower' ]; - - // mPDF 4.0 - $this->SetFont($FontFamily, $saved[ 'style' ].($this->underline ? 'U' : ''),$saved[ 'sizePt' ],false); - //$this->currentfontfamily = $saved[ 'family' ]; - - $this->currentfontstyle = $saved[ 'style' ].($this->underline ? 'U' : ''); - $this->currentfontsize = $saved[ 'sizePt' ]; - $this->SetStyle('U',$this->underline); - $this->SetStyle('B',$saved[ 'B' ]); - $this->SetStyle('I',$saved[ 'I' ]); - - $this->TextColor = $saved[ 'color' ]; - $this->FillColor = $saved[ 'bgcolor' ]; - $this->colorarray = $saved[ 'colorarray' ]; - $cor = $saved[ 'colorarray' ]; - if ($cor) $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); - $this->spanbgcolorarray = $saved[ 'bgcolorarray' ]; - $cor = $saved[ 'bgcolorarray' ]; - if ($cor) $this->SetFillColor($cor['R'],$cor['G'],$cor['B']); -} - - - -// mPDF 3.0 -// Used when ColActive for tables - updated to return first block with background fill OR borders -function GetFirstBlockFill() { - // Returns the first blocklevel that uses a bgcolor fill - $startfill = 0; - for ($i=1;$i<=$this->blklvl;$i++) { - if ($this->blk[$i]['bgcolor'] || $this->blk[$i]['border_left']['w'] || $this->blk[$i]['border_right']['w'] || $this->blk[$i]['border_top']['w'] || $this->blk[$i]['border_bottom']['w'] ) { - $startfill = $i; - break; - } - } - return $startfill; -} - -function SetBlockFill($blvl) { - if ($this->blk[$blvl]['bgcolor']) { - $this->SetFillColor($this->blk[$blvl]['bgcolorarray']['R'],$this->blk[$blvl]['bgcolorarray']['G'],$this->blk[$blvl]['bgcolorarray']['B']); - return 1; - } - else { - $this->SetFillColor(255); - return 0; - } -} - - -//-------------------------FLOWING BLOCK------------------------------------// -//The following functions were originally written by Damon Kohler // -//--------------------------------------------------------------------------// - -function saveFont() { - $saved = array(); - $saved[ 'family' ] = $this->FontFamily; - $saved[ 'style' ] = $this->FontStyle; - $saved[ 'sizePt' ] = $this->FontSizePt; - $saved[ 'size' ] = $this->FontSize; - $saved[ 'curr' ] = &$this->CurrentFont; - $saved[ 'color' ] = $this->TextColor; - $saved[ 'spanbgcolor' ] = $this->spanbgcolor; - $saved[ 'spanbgcolorarray' ] = $this->spanbgcolorarray; - $saved[ 'HREF' ] = $this->HREF; - $saved[ 'underline' ] = $this->underline; - $saved[ 'strike' ] = $this->strike; - $saved[ 'SUP' ] = $this->SUP; - $saved[ 'SUB' ] = $this->SUB; - $saved[ 'linewidth' ] = $this->LineWidth; - $saved[ 'drawcolor' ] = $this->DrawColor; - $saved[ 'is_outline' ] = $this->outline_on; - $saved[ 'outlineparam' ] = $this->outlineparam; - // mPDF 4.2 - $saved[ 'ReqFontStyle' ] = $this->ReqFontStyle; - return $saved; -} - -function restoreFont( $saved, $write=true) { - if (!isset($saved) || empty($saved)) return; - - $this->FontFamily = $saved[ 'family' ]; - $this->FontStyle = $saved[ 'style' ]; - $this->FontSizePt = $saved[ 'sizePt' ]; - $this->FontSize = $saved[ 'size' ]; - $this->CurrentFont = &$saved[ 'curr' ]; - $this->TextColor = $saved[ 'color' ]; - $this->spanbgcolor = $saved[ 'spanbgcolor' ]; - $this->spanbgcolorarray = $saved[ 'spanbgcolorarray' ]; - $this->ColorFlag = ($this->FillColor != $this->TextColor); //Restore ColorFlag as well - $this->HREF = $saved[ 'HREF' ]; - $this->underline = $saved[ 'underline' ]; - $this->strike = $saved[ 'strike' ]; - $this->SUP = $saved[ 'SUP' ]; - $this->SUB = $saved[ 'SUB' ]; - $this->LineWidth = $saved[ 'linewidth' ]; - $this->DrawColor = $saved[ 'drawcolor' ]; - $this->outline_on = $saved[ 'is_outline' ]; - $this->outlineparam = $saved[ 'outlineparam' ]; - if ($write) { - $this->SetFont($saved[ 'family' ],$saved[ 'style' ].($this->underline ? 'U' : ''),$saved[ 'sizePt' ],true,true); // force output - $fontout = (sprintf('BT /F%d %.3f Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); - if($this->page>0 && ((isset($this->pageoutput[$this->page]['Font']) && $this->pageoutput[$this->page]['Font'] != $fontout) || !isset($this->pageoutput[$this->page]['Font']) || $this->keep_block_together)) { $this->_out($fontout); } - $this->pageoutput[$this->page]['Font'] = $fontout; - } - else - $this->SetFont($saved[ 'family' ],$saved[ 'style' ].($this->underline ? 'U' : ''),$saved[ 'sizePt' ]); - // mPDF 4.2 - $this->ReqFontStyle = $saved[ 'ReqFontStyle' ]; -} - -function newFlowingBlock( $w, $h, $a = '', $is_table = false, $is_list = false, $blockstate = 0, $newblock=true ) -{ - if (!$a) { $a = $this->defaultAlign; } - // cell width in points - - $this->flowingBlockAttr[ 'width' ] = ($w * $this->k); - // line height in user units - $this->flowingBlockAttr[ 'is_table' ] = $is_table; - $this->flowingBlockAttr[ 'is_list' ] = $is_list; - $this->flowingBlockAttr[ 'height' ] = $h; - $this->flowingBlockAttr[ 'lineCount' ] = 0; - $this->flowingBlockAttr[ 'align' ] = $a; - $this->flowingBlockAttr[ 'font' ] = array(); - $this->flowingBlockAttr[ 'content' ] = array(); - $this->flowingBlockAttr[ 'contentWidth' ] = 0; - $this->flowingBlockAttr[ 'blockstate' ] = $blockstate; - - $this->flowingBlockAttr[ 'newblock' ] = $newblock; - $this->flowingBlockAttr[ 'valign' ] = 'M'; -} - -function finishFlowingBlock($endofblock=false, $next='') { // mPDF 4.3.003 - $currentx = $this->x; - //prints out the last chunk - $is_table = $this->flowingBlockAttr[ 'is_table' ]; - $is_list = $this->flowingBlockAttr[ 'is_list' ]; - $maxWidth =& $this->flowingBlockAttr[ 'width' ]; - $lineHeight =& $this->flowingBlockAttr[ 'height' ]; - $align =& $this->flowingBlockAttr[ 'align' ]; - $content =& $this->flowingBlockAttr[ 'content' ]; - $font =& $this->flowingBlockAttr[ 'font' ]; - $contentWidth =& $this->flowingBlockAttr[ 'contentWidth' ]; - $lineCount =& $this->flowingBlockAttr[ 'lineCount' ]; - $valign =& $this->flowingBlockAttr[ 'valign' ]; - $blockstate = $this->flowingBlockAttr[ 'blockstate' ]; - - $newblock = $this->flowingBlockAttr[ 'newblock' ]; - - // *********** BLOCK BACKGROUND COLOR *****************// - if ($this->blk[$this->blklvl]['bgcolor'] && !$is_table) { - // mPDF 3.0 - Tiling Patterns - $fill = 0; -// $fill = 1; -// $bcor = $this->blk[$this->blklvl]['bgcolorarray']; -// $this->SetFillColor($bcor['R'],$bcor['G'],$bcor['B']); - } - else { - $this->SetFillColor(255); - $fill = 0; - } - - // mPDF 4.0 -// if ($this->ws != 0) { $this->_out('BT 0 Tw ET'); } -// $this->ws=0; -// if ($this->charspacing != 0) { $this->_out('BT 0 Tc ET'); } -// $this->charspacing=0; - - // mPDF 4.3.003 - // Right trim content and adjust width if need to justify (later) - if (!$endofblock && $align=='J' && ($next=='image' || $next=='select' || $next=='input' || $next=='textarea' || ($next=='br' && $this->justifyB4br))) { - if (preg_match('/[ ]+$/',$content[count($content)-1], $m)) { - $strip = strlen($m[0]); - $content[count($content)-1] = substr($content[count($content)-1],0,(strlen($content[count($content)-1])-$strip)); - $this->restoreFont( $font[ count($content)-1 ],false ); - $contentWidth -= $this->GetStringWidth($m[0]) * $this->k; - } - } - - // the amount of space taken up so far in user units - $usedWidth = 0; - - // COLS - $oldcolumn = $this->CurrCol; - - if ($this->ColActive && !$is_table) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - - // Print out each chunk - -/*-- TABLES --*/ - if ($is_table) { - $ipaddingL = 0; - $ipaddingR = 0; - $paddingL = 0; - $paddingR = 0; - } - else { -/*-- END TABLES --*/ - $ipaddingL = $this->blk[$this->blklvl]['padding_left']; - $ipaddingR = $this->blk[$this->blklvl]['padding_right']; - $paddingL = ($ipaddingL * $this->k); - $paddingR = ($ipaddingR * $this->k); - $this->cMarginL = $this->blk[$this->blklvl]['border_left']['w']; - $this->cMarginR = $this->blk[$this->blklvl]['border_right']['w']; - - // Added mPDF 3.0 Float DIV - $fpaddingR = 0; - $fpaddingL = 0; -/*-- CSS-FLOAT --*/ - if (count($this->floatDivs)) { - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl); - if ($r_exists) { $fpaddingR = $r_width; } - if ($l_exists) { $fpaddingL = $l_width; } - } -/*-- END CSS-FLOAT --*/ - - $usey = $this->y + 0.002; - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($lineCount == 0) ) { - $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w']; - } -/*-- CSS-IMAGE-FLOAT --*/ - // If float exists at this level - if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) { $fpaddingR += $this->floatmargins['R']['w']; } - if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) { $fpaddingL += $this->floatmargins['L']['w']; } -/*-- END CSS-IMAGE-FLOAT --*/ - } // *TABLES* - - // Set Current lineheight (correction factor) - $lhfixed = false; -/*-- LISTS --*/ - if ($is_list) { - if (preg_match('/([0-9.,]+)mm/',$this->list_lineheight[$this->listlvl][$this->listOcc],$am)) { - $lhfixed = true; - $def_fontsize = $this->InlineProperties['LISTITEM'][$this->listlvl][$this->listOcc][$this->listnum]['size']; - $this->lineheight_correction = $am[1] / $def_fontsize ; - } - else { - $this->lineheight_correction = $this->list_lineheight[$this->listlvl][$this->listOcc]; - } - } - else -/*-- END LISTS --*/ -/*-- TABLES --*/ - if ($is_table) { - if (preg_match('/([0-9.,]+)mm/',$this->table_lineheight,$am)) { - $lhfixed = true; - $def_fontsize = $this->FontSize; // needs to be default font-size for block **** - $this->lineheight_correction = $lineHeight / $def_fontsize ; - } - else { - $this->lineheight_correction = $this->table_lineheight; - } - } - else -/*-- END TABLES --*/ - if (isset($this->blk[$this->blklvl]['line_height']) && $this->blk[$this->blklvl]['line_height']) { - if (preg_match('/([0-9.,]+)mm/',$this->blk[$this->blklvl]['line_height'],$am)) { - $lhfixed = true; - $def_fontsize = $this->blk[$this->blklvl]['InlineProperties']['size']; // needs to be default font-size for block **** - $this->lineheight_correction = $am[1] / $def_fontsize ; - } - else { - $this->lineheight_correction = $this->blk[$this->blklvl]['line_height']; - } - } - else { - $this->lineheight_correction = $this->normalLineheight; - } - - // mPDF 4.2 - // correct lineheight to maximum fontsize - if ($lhfixed) { $maxlineHeight = $this->lineheight; } - else { $maxlineHeight = 0; } - $this->forceExactLineheight = true; - $maxfontsize = 0; - foreach ( $content as $k => $chunk ) - { - $this->restoreFont( $font[ $k ],false ); - if (!isset($this->objectbuffer[$k])) { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - $content[$k] = $chunk = str_replace("\xc2\xad",'',$chunk ); - } - // mPDF 3.0 Soft Hyphens chr(173) - else -/*-- END UNICODE-FONTS --*/ - if ($this->FontFamily!='symbol' && $this->FontFamily!='zapfdingbats') { - $content[$k] = $chunk = str_replace($this->chrs[173],'',$chunk ); - } - // Special case of sub/sup carried over on its own to last line - if (($this->SUB || $this->SUP) && count($content)==1) { $actfs = $this->FontSize*100/55; } // 55% is font change for sub/sup - else { $actfs = $this->FontSize; } - // mPDF 4.2 - if (!$lhfixed) { $maxlineHeight = max($maxlineHeight,$actfs * $this->lineheight_correction ); } - if ($lhfixed && ($actfs > $def_fontsize || ($actfs > ($lineHeight * $this->lineheight_correction) && $is_list))) { - $this->forceExactLineheight = false; - } - $maxfontsize = max($maxfontsize,$actfs); - } - } - - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - $lastfontreqstyle = $font[count($font)-1]['ReqFontStyle']; - $lastfontstyle = $font[count($font)-1]['style']; - if ($this->directionality == 'ltr' && strpos($lastfontreqstyle,"I") !== false && strpos($lastfontstyle,"I") === false) { // Artificial italic - $lastitalic = $this->FontSize*0.15*$this->k; - } - else { $lastitalic = 0; } - - -/*-- LISTS --*/ - // mPDF 4.2 Moved here from later - if ($is_list && is_array($this->bulletarray) && count($this->bulletarray)) { - $actfs = $this->bulletarray['fontsize']; - if (!$lhfixed) { $maxlineHeight = max($maxlineHeight,$actfs * $this->lineheight_correction ); } // mPDF 4.2 - if ($lhfixed && $actfs > $def_fontsize) { $this->forceExactLineheight = false; } - $maxfontsize = max($maxfontsize,$actfs); - } -/*-- END LISTS --*/ - - // when every text item checked i.e. $maxfontsize is set properly - - $af = 0; // Above font - $bf = 0; // Below font - $mta = 0; // Maximum top-aligned - $mba = 0; // Maximum bottom-aligned - - foreach ( $content as $k => $chunk ) - { - if (isset($this->objectbuffer[$k])) { - $oh = $this->objectbuffer[$k]['OUTER-HEIGHT']; - $va = $this->objectbuffer[$k]['vertical-align']; // = $objattr['vertical-align'] = set as M,T,B,S - if ($lhfixed && $oh > $def_fontsize) { $this->forceExactLineheight = false; } - - if ($va == 'BS') { // (BASELINE default) - $af = max($af, ($oh - ($maxfontsize * (0.5 + $this->baselineC)))); - } - else if ($va == 'M') { - $af = max($af, ($oh - $maxfontsize)/2); - $bf = max($bf, ($oh - $maxfontsize)/2); - } - else if ($va == 'TT') { - $bf = max($bf, ($oh - $maxfontsize)); - } - else if ($va == 'TB') { - $af = max($af, ($oh - $maxfontsize)); - } - else if ($va == 'T') { - $mta = max($mta, $oh); - } - else if ($va == 'B') { - $mba = max($mba, $oh); - } - } - } - if ((!$lhfixed || !$this->forceExactLineheight) && ($af > (($maxlineHeight - $maxfontsize)/2) || $bf > (($maxlineHeight - $maxfontsize)/2))) { - $maxlineHeight = $maxfontsize + $af + $bf; - } - else if (!$lhfixed) { $af = $bf = ($maxlineHeight - $maxfontsize)/2; } - if ($mta > $maxlineHeight) { - $bf += ($mta - $maxlineHeight); - $maxlineHeight = $mta; - } - if ($mba > $maxlineHeight) { - $af += ($mba - $maxlineHeight); - $maxlineHeight = $mba; - } - - $lineHeight = $maxlineHeight; - // mPDF 4.2 If NOT images, and maxfontsize NOT > lineHeight - this value determines text baseline positioning - if ($lhfixed && $af==0 && $bf==0 && $maxfontsize<=($def_fontsize * $this->lineheight_correction * 0.8 )) { - $this->linemaxfontsize = $def_fontsize; - } - else { $this->linemaxfontsize = $maxfontsize; } - - // Get PAGEBREAK TO TEST for height including the bottom border/padding - $check_h = max($this->divheight,$lineHeight); - - if ($this->blklvl > 0 && !$is_table) { - if ($endofblock && $blockstate > 1) { - if ($this->blk[$this->blklvl]['page_break_after_avoid']) { $check_h += $lineHeight; } - $check_h += ($this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w']); - } - if (($newblock && ($blockstate==1 || $blockstate==3) && $lineCount == 0) || ($endofblock && $blockstate > 1 && $lineCount == 0)) { - $check_h += ($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['border_top']['w']); - } - } - - // mPDF 4.2 Force PAGE break if column height cannot take check-height - if ($this->ColActive && $check_h > ($this->PageBreakTrigger - $this->y0)) { $this->CurrCol = $this->NbCol; } - - // PAGEBREAK - //'If' below used in order to fix "first-line of other page with justify on" bug - // mPDF 4.2.008 Disable in Tables - if(!$is_table && $this->y+$check_h > $this->PageBreakTrigger and !$this->InFooter and $this->AcceptPageBreak()) { - $bak_x=$this->x;//Current X position - // WORD SPACING - $ws=$this->ws;//Word Spacing - $charspacing=$this->charspacing;//Character Spacing - // mPDF 4.0 - $this->ResetSpacing(); - - $this->AddPage($this->CurOrientation); - - $this->x=$bak_x; - // Added to correct for OddEven Margins - $currentx += $this->MarginCorrection; - $this->x += $this->MarginCorrection; - - // WORD SPACING - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - } - -/*-- COLUMNS --*/ - // COLS - // COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - $currentx += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - $this->x += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - - $oldcolumn = $this->CurrCol; - } - - if ($this->ColActive && !$is_table) { $this->breakpoints[$this->CurrCol][] = $this->y; } -/*-- END COLUMNS --*/ - - // TOP MARGIN - if ($newblock && ($blockstate==1 || $blockstate==3) && ($this->blk[$this->blklvl]['margin_top']) && $lineCount == 0 && !$is_table && !$is_list) { - $this->DivLn($this->blk[$this->blklvl]['margin_top'],$this->blklvl-1,true,$this->blk[$this->blklvl]['margin_collapse']); - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - } - - if ($newblock && ($blockstate==1 || $blockstate==3) && $lineCount == 0 && !$is_table && !$is_list) { - $this->blk[$this->blklvl]['y0'] = $this->y; - $this->blk[$this->blklvl]['startpage'] = $this->page; - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - } - - // ADDED for Paragraph_indent - $WidthCorrection = 0; - if (($newblock) && ($blockstate==1 || $blockstate==3) && isset($this->blk[$this->blklvl]['text_indent']) && ($lineCount == 0) && (!$is_table) && (!$is_list) && ($align != 'C')) { - // mPDF 4.0 - $ti = $this->ConvertSize($this->blk[$this->blklvl]['text_indent'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - $WidthCorrection = ($ti*$this->k); - } - - - // PADDING and BORDER spacing/fill - if (($newblock) && ($blockstate==1 || $blockstate==3) && (($this->blk[$this->blklvl]['padding_top']) || ($this->blk[$this->blklvl]['border_top'])) && ($lineCount == 0) && (!$is_table) && (!$is_list)) { - // mPDF 3.0 Also does border when Columns active - // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom - $this->DivLn($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'],-3,true,false,1); - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - $this->x = $currentx; - } - - - // Added mPDF 3.0 Float DIV - $fpaddingR = 0; - $fpaddingL = 0; -/*-- CSS-FLOAT --*/ - if (count($this->floatDivs)) { - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl); - if ($r_exists) { $fpaddingR = $r_width; } - if ($l_exists) { $fpaddingL = $l_width; } - } -/*-- END CSS-FLOAT --*/ - - $usey = $this->y + 0.002; - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($lineCount == 0) ) { - $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w']; - } -/*-- CSS-IMAGE-FLOAT --*/ - // If float exists at this level - if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) { $fpaddingR += $this->floatmargins['R']['w']; } - if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) { $fpaddingL += $this->floatmargins['L']['w']; } -/*-- END CSS-IMAGE-FLOAT --*/ - - if ($content) { - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - $empty = $maxWidth - $lastitalic-$WidthCorrection - $contentWidth - (($this->cMarginL+$this->cMarginR)* $this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ); - $empty /= $this->k; - - // In FinishFlowing Block no lines are justified as it is always last line - // but if orphansAllowed have allowed content width to go over max width, use J charspacing to compress line - // JUSTIFICATION J - NOT! - $nb_carac = 0; - $nb_spaces = 0; - foreach ( $content as $k => $chunk ) { - if (!isset($this->objectbuffer[$k]) || (isset($this->objectbuffer[$k]) && !$this->objectbuffer[$k])) { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - $chunk = str_replace($this->chrs[194].$this->chrs[160],$this->chrs[32],$chunk ); - } - else { -/*-- END UNICODE-FONTS --*/ - $chunk = str_replace($this->chrs[160],$this->chrs[32],$chunk ); - } // *UNICODE-FONTS* - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$nb_carac += mb_strlen( $chunk, $this->mb_enc ); - //$nb_spaces += mb_substr_count( $chunk,' ', $this->mb_enc ); - $nb_carac += api_strlen( $chunk, $this->mb_enc ); - $nb_spaces += api_substr_count( $chunk,' ', $this->mb_enc ); - // - } - } - // if it's justified, we need to find the char/word spacing (or if orphans have allowed length of line to go over the maxwidth) - // If "orphans" in fact is just a final space - ignore this - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - // mPDF 4.3.003 Justify line if following is object - image etc. - if (((($contentWidth + $lastitalic) > $maxWidth) && ($content[count($content)-1] != ' ') ) || - (!$endofblock && $align=='J' && ($next=='image' || $next=='select' || $next=='input' || $next=='textarea' || ($next=='br' && $this->justifyB4br))) - ) { - // WORD SPACING - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - list($charspacing,$ws) = $this->GetJspacing($nb_carac,$nb_spaces,($maxWidth-$lastitalic-$contentWidth-$WidthCorrection-(($this->cMarginL+$this->cMarginR)*$this->k)-($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ))); - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - } - // mPDF 4.0 Check if will fit at word/char spacing of previous line - if so continue it - // but only allow a maximum of $this->jSmaxWordLast and $this->jSmaxCharLast - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - else if ($contentWidth < ($maxWidth - $lastitalic-$WidthCorrection - (($this->cMarginL+$this->cMarginR)* $this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k)))) { - if ($this->ws > $this->jSmaxWordLast) { - $ws=$this->jSmaxWord; - $this->_out(sprintf('BT %.3f Tw ET',$ws)); - $this->ws=$ws; - } - if ($this->charspacing > $this->jSmaxCharLast) { - $charspacing=$this->jSmaxCharLast; - $this->_out(sprintf('BT %.3f Tc ET',$charspacing)); - $this->charspacing=$charspacing; - } - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - $check = $maxWidth - $lastitalic-$WidthCorrection - $contentWidth - (($this->cMarginL+$this->cMarginR)* $this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ) - ( $this->charspacing * $nb_carac) - ( $this->ws * $nb_spaces); - if ($check <= 0) { - // mPDF 4.0 - $this->ResetSpacing(); - } - } - else { - // mPDF 4.0 - $this->ResetSpacing(); - } - - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - $empty = $maxWidth - $lastitalic-$WidthCorrection - $contentWidth - (($this->cMarginL+$this->cMarginR)* $this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ) - ( $this->charspacing * $nb_carac) - ( $this->ws * $nb_spaces); - $empty /= $this->k; - - // mPDF 4.0 - if (!$is_table) { - $this->maxPosR = max($this->maxPosR , ($this->w - $this->rMargin - $this->blk[$this->blklvl]['outer_right_margin'] - $empty)); - $this->maxPosL = min($this->maxPosL , ($this->lMargin + $this->blk[$this->blklvl]['outer_left_margin'] + $empty)); - } - - $arraysize = count($content); - - $margins = ($this->cMarginL+$this->cMarginR) + ($ipaddingL+$ipaddingR + $fpaddingR + $fpaddingR ); - - if (!$is_table) { $this->DivLn($lineHeight,$this->blklvl,false); } // false -> don't advance y - - // DIRECTIONALITY RTL - $all_rtl = false; - $contains_rtl = false; -/*-- RTL --*/ - if (($this->directionality == 'rtl') || (($this->directionality == 'ltr') && ($this->biDirectional))) { - $all_rtl = true; - foreach ( $content as $k => $chunk ) { - $reversed = $this->magic_reverse_dir($chunk, false); - if ($reversed > 0) { $contains_rtl = true; } - if ($reversed < 2) { $all_rtl = false; } - $content[$k] = $chunk; - } - if ($this->directionality == 'rtl') { - if ($contains_rtl) { - $content = array_reverse($content,false); - } - } - else if (($this->directionality == 'ltr') && ($this->biDirectional)) { - if ($all_rtl) { - $content = array_reverse($content,false); - } - } - } -/*-- END RTL --*/ - - - $this->x = $currentx + $this->cMarginL + $ipaddingL + $fpaddingL; - if ($align == 'R') { $this->x += $empty; } - else if ($align == 'J') { - if ($this->directionality == 'rtl' && $contains_rtl) { $this->x += $empty; } - else if ($this->directionality == 'ltr' && $all_rtl) { $this->x += $empty; } - } - else if ($align == 'C') { $this->x += ($empty / 2); } - - // Paragraph INDENT - $WidthCorrection = 0; - if (($newblock) && ($blockstate==1 || $blockstate==3) && isset($this->blk[$this->blklvl]['text_indent']) && ($lineCount == 0) && (!$is_table) && (!$is_list) && ($align !='C')) { - // mPDF 4.0 - $ti = $this->ConvertSize($this->blk[$this->blklvl]['text_indent'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - $this->x += $ti; - } - - - foreach ( $content as $k => $chunk ) - { - - // FOR IMAGES - if (($this->directionality=='rtl' && $contains_rtl) || $all_rtl) { $dirk = $arraysize-1 - $k; } else { $dirk = $k; } - - // mPDF 4.2 - $va = 'M'; // default for text - if (isset($this->objectbuffer[$dirk]) && $this->objectbuffer[$dirk]) { - $xadj = $this->x - $this->objectbuffer[$dirk]['OUTER-X']; - $this->objectbuffer[$dirk]['OUTER-X'] += $xadj; - $this->objectbuffer[$dirk]['BORDER-X'] += $xadj; - $this->objectbuffer[$dirk]['INNER-X'] += $xadj; - // mPDF 4.2 - $va = $this->objectbuffer[$dirk]['vertical-align']; - $yadj = $this->y - $this->objectbuffer[$dirk]['OUTER-Y']; - if ($va == 'BS') { - $yadj += $af + ($this->linemaxfontsize * (0.5 + $this->baselineC)) - $this->objectbuffer[$dirk]['OUTER-HEIGHT']; - } - else if ($va == 'M' || $va == '') { - $yadj += $af + ($this->linemaxfontsize /2) - ($this->objectbuffer[$dirk]['OUTER-HEIGHT']/2); - } - else if ($va == 'TB') { - $yadj += $af + $this->linemaxfontsize - $this->objectbuffer[$dirk]['OUTER-HEIGHT']; - } - else if ($va == 'TT') { - $yadj += $af; - } - else if ($va == 'B') { - $yadj += $af + $this->linemaxfontsize + $bf - $this->objectbuffer[$dirk]['OUTER-HEIGHT']; - } - else if ($va == 'T') { - $yadj += 0; - } - $this->objectbuffer[$dirk]['OUTER-Y'] += $yadj; - $this->objectbuffer[$dirk]['BORDER-Y'] += $yadj; - $this->objectbuffer[$dirk]['INNER-Y'] += $yadj; - } - - - - // DIRECTIONALITY RTL - if ((($this->directionality == 'rtl') && ($contains_rtl )) || ($all_rtl )) { $this->restoreFont( $font[ $arraysize-1 - $k ] ); } - else { $this->restoreFont( $font[ $k ] ); } - // *********** SPAN BACKGROUND COLOR ***************** // - if (isset($this->spanbgcolor) && $this->spanbgcolor) { - $cor = $this->spanbgcolorarray; - $this->SetFillColor($cor['R'],$cor['G'],$cor['B']); - $save_fill = $fill; $spanfill = 1; $fill = 1; - } - // WORD SPACING - // Modified by Ivan Tcholakov, 28-JAN-2010. - // $stringWidth = $this->GetStringWidth($chunk ) + ( $this->charspacing * mb_strlen($chunk,$this->mb_enc ) / $this->k ) - // + ( $this->ws * mb_substr_count($chunk,' ',$this->mb_enc ) / $this->k ); - $stringWidth = $this->GetStringWidth($chunk ) + ( $this->charspacing * api_strlen($chunk,$this->mb_enc ) / $this->k ) - + ( $this->ws * api_substr_count($chunk,' ',$this->mb_enc ) / $this->k ); - // - if (isset($this->objectbuffer[$dirk])) { - // mPDF 4.2.031 - if ($this->objectbuffer[$dirk]['type']=='dottab') { - $this->objectbuffer[$dirk]['OUTER-WIDTH'] +=$empty; - } - $stringWidth = $this->objectbuffer[$dirk]['OUTER-WIDTH']; - } - - // mPDF 4.2 af , bf above and below font - if ($k == $arraysize-1) $this->Cell( $stringWidth, $lineHeight, $chunk, '', 1, '', $fill, $this->HREF , $currentx,0,0,'M', $fill, $af, $bf ); //mono-style line or last part (skips line) - else $this->Cell( $stringWidth, $lineHeight, $chunk, '', 0, '', $fill, $this->HREF, 0, 0,0,'M', $fill, $af, $bf );//first or middle part - - - // *********** SPAN BACKGROUND COLOR OFF - RESET BLOCK BGCOLOR ***************** // - if (isset($spanfill) && $spanfill) { - $fill = $save_fill; $spanfill = 0; - if ($fill) { $this->SetFillColor($bcor['R'],$bcor['G'],$bcor['B']); } - } - } - - $this->printobjectbuffer($is_table); - - - $this->objectbuffer = array(); - - // mPDF 4.0 - $this->ResetSpacing(); - -/*-- LISTS --*/ - // LIST BULLETS/NUMBERS - if ($is_list && is_array($this->bulletarray) && ($lineCount == 0) ) { - // mPDF 4.0 - $savedFont = $this->saveFont(); - - $bull = $this->bulletarray; - if (isset($bull['level']) && isset($bull['occur']) && isset($this->InlineProperties['LIST'][$bull['level']][$bull['occur']])) { - $this->restoreInlineProperties($this->InlineProperties['LIST'][$bull['level']][$bull['occur']]); - } - if (isset($bull['level']) && isset($bull['occur']) && isset($bull['num']) && isset($this->InlineProperties['LISTITEM'][$bull['level']][$bull['occur']][$bull['num']]) && $this->InlineProperties['LISTITEM'][$bull['level']][$bull['occur']][$bull['num']]) { $this->restoreInlineProperties($this->InlineProperties['LISTITEM'][$bull['level']][$bull['occur']][$bull['num']]); } - if (isset($bull['font']) && $bull['font'] == 'zapfdingbats') { - $this->bullet = true; - $this->SetFont('zapfdingbats','',$this->FontSizePt/2.5); - } - else { $this->SetFont($this->FontFamily,$this->FontStyle,$this->FontSizePt,true,true); } // force output - //Output bullet - $this->x = $currentx; - if (isset($bull['x'])) { $this->x += $bull['x']; } - $this->y -= $lineHeight; - // mPDF 4.0 - if (isset($bull['txt'])) { $this->Cell($bull['w'], $lineHeight,$bull['txt'],'','',$bull['align'],0,'',0,-$this->cMarginL, -$this->cMarginR ); } - if (isset($bull['font']) && $bull['font'] == 'zapfdingbats') { - $this->bullet = false; - } - $this->x = $currentx; // Reset - $this->y += $lineHeight; - - if ($this->ColActive && !$is_table) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - - // mPDF 3.0 ? does nothing as $savedFont is not defined - // mPDF 4.0 - $this->restoreFont( $savedFont ); - // $font = array( $savedFont ); - - $this->bulletarray = array(); // prevents repeat of bullet/number if
  • ....
    .....
  • - } -/*-- END LISTS --*/ - - - } // END IF CONTENT - -/*-- CSS-IMAGE-FLOAT --*/ - // Update values if set to skipline - if ($this->floatmargins) { $this->_advanceFloatMargins(); } - - - if ($endofblock && $blockstate>1) { - // If float exists at this level - if (isset($this->floatmargins['R']['y1'])) { $fry1 = $this->floatmargins['R']['y1']; } - else { $fry1 = 0; } - if (isset($this->floatmargins['L']['y1'])) { $fly1 = $this->floatmargins['L']['y1']; } - else { $fly1 = 0; } - if ($this->y < $fry1 || $this->y < $fly1) { - $drop = max($fry1,$fly1) - $this->y; - $this->DivLn($drop); - $this->x = $currentx; - } - } -/*-- END CSS-IMAGE-FLOAT --*/ - - - // PADDING and BORDER spacing/fill - if ($endofblock && ($blockstate > 1) && ($this->blk[$this->blklvl]['padding_bottom'] || $this->blk[$this->blklvl]['border_bottom'] || $this->blk[$this->blklvl]['css_set_height']) && (!$is_table) && (!$is_list)) { - // mPDF 4.0 If CSS height set, extend bottom - if on same page as block started, and CSS HEIGHT > actual height, - // and does not force pagebreak - $extra = 0; - if ($this->blk[$this->blklvl]['css_set_height'] && $this->blk[$this->blklvl]['startpage']==$this->page) { - // predicted height - $h1 = ($this->y-$this->blk[$this->blklvl]['y0']) + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w']; - if ($h1 < $this->blk[$this->blklvl]['css_set_height']) { $extra = $this->blk[$this->blklvl]['css_set_height'] - $h1; } - if($this->y + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w'] + $extra > $this->PageBreakTrigger) { - $extra = $this->PageBreakTrigger - ($this->y + $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w']); - } - } - - // mPDF 3.0 Also does border when Columns active - // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom - $this->DivLn($this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w'] + $extra,-3,true,false,2); - $this->x = $currentx; - - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - - } - - // SET Bottom y1 of block (used for painting borders) - if (($endofblock) && ($blockstate > 1) && (!$is_table) && (!$is_list)) { - $this->blk[$this->blklvl]['y1'] = $this->y; - } - - // BOTTOM MARGIN - if (($endofblock) && ($blockstate > 1) && ($this->blk[$this->blklvl]['margin_bottom']) && (!$is_table) && (!$is_list)) { - if($this->y+$this->blk[$this->blklvl]['margin_bottom'] < $this->PageBreakTrigger and !$this->InFooter) { - $this->DivLn($this->blk[$this->blklvl]['margin_bottom'],$this->blklvl-1,true,$this->blk[$this->blklvl]['margin_collapse']); - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - } - } - - // Reset lineheight - $lineHeight = $this->divheight; -} - - - - - -function printobjectbuffer($is_table=false) { - if ($is_table && $this->shrin_k > 1) { $k = $this->shrin_k; } - else { $k = 1; } - $save_y = $this->y; - $save_x = $this->x; - $save_currentfontfamily = $this->FontFamily; - $save_currentfontsize = $this->FontSizePt; - $save_currentfontstyle = $this->FontStyle.($this->underline ? 'U' : ''); - if ($this->directionality == 'rtl') { $rtlalign = 'R'; } else { $rtlalign = 'L'; } - foreach ($this->objectbuffer AS $ib => $objattr) { - // mPDF 3.0 - if ($objattr['type'] == 'bookmark' || $objattr['type'] == 'indexentry' || $objattr['type'] == 'toc') { - $x = $objattr['OUTER-X']; - $y = $objattr['OUTER-Y']; - $this->y = $y - $this->FontSize/2; - $this->x = $x; - if ($objattr['type'] == 'bookmark' ) { $this->Bookmark($objattr['CONTENT'],$objattr['bklevel'] ,$y - $this->FontSize); } // *BOOKMARKS* - if ($objattr['type'] == 'indexentry') { $this->IndexEntry($objattr['CONTENT']); } // *INDEX* - if ($objattr['type'] == 'toc') { $this->TOC_Entry($objattr['CONTENT'], $objattr['toclevel'], $objattr['toc_id']); } // *TOC* - } -/*-- ANNOTATIONS --*/ - else if ($objattr['type'] == 'annot') { - if ($objattr['POS-X']) { $x = $objattr['POS-X']; } - else if ($this->annotMargin<>0) { $x = -$objattr['OUTER-X']; } - else { $x = $objattr['OUTER-X']; } - if ($objattr['POS-Y']) { $y = $objattr['POS-Y']; } - else { $y = $objattr['OUTER-Y'] - $this->FontSize/2; } - // Create a dummy entry in the _out/columnBuffer with position sensitive data, - // linking $y-1 in the Columnbuffer with entry in $this->columnAnnots - // and when columns are split in length will not break annotation from current line - $this->y = $y-1; - $this->x = $x-1; - $this->Line($x-1,$y-1,$x-1,$y-1); - $this->Annotation($objattr['CONTENT'], $x , $y , $objattr['ICON'], $objattr['AUTHOR'], $objattr['SUBJECT'], $objattr['OPACITY'], $objattr['COLOR'], $objattr['POPUP']); // mPDF 4.2.027 - } -/*-- END ANNOTATIONS --*/ - else { - $y = $objattr['OUTER-Y']; - $x = $objattr['OUTER-X']; - $w = $objattr['OUTER-WIDTH']; - $h = $objattr['OUTER-HEIGHT']; - if (isset($objattr['text'])) { $texto = $objattr['text']; } - $this->y = $y; - $this->x = $x; - if (isset($objattr['fontfamily'])) { $this->SetFont($objattr['fontfamily'],'',$objattr['fontsize'] ); } - } - - // HR - if ($objattr['type'] == 'hr') { - $this->SetDrawColor($objattr['color']['R'],$objattr['color']['G'],$objattr['color']['B']); - switch($objattr['align']) { - case 'C': - $empty = $objattr['OUTER-WIDTH'] - $objattr['INNER-WIDTH']; - $empty /= 2; - $x += $empty; - break; - case 'R': - $empty = $objattr['OUTER-WIDTH'] - $objattr['INNER-WIDTH']; - $x += $empty; - break; - } - $oldlinewidth = $this->LineWidth; - $this->SetLineWidth($objattr['linewidth']/$k ); - $this->y += ($objattr['linewidth']/2) + $objattr['margin_top']/$k; - $this->Line($x,$this->y,$x+$objattr['INNER-WIDTH'],$this->y); - $this->SetLineWidth($oldlinewidth); - $this->SetDrawColor(0); - } - // IMAGE - if ($objattr['type'] == 'image') { - if (isset($objattr['opacity'])) { $this->SetAlpha($objattr['opacity']); } - // mPDF 4.3.016 - $rotate = 0; - $obiw = $objattr['INNER-WIDTH']; - $obih = $objattr['INNER-HEIGHT']; - $sx = $objattr['INNER-WIDTH']*$this->k / $objattr['orig_w']; - $sy = abs($objattr['INNER-HEIGHT'])*$this->k / abs($objattr['orig_h']); - $sx = ($objattr['INNER-WIDTH']*$this->k / $objattr['orig_w']); - $sy = ($objattr['INNER-HEIGHT']*$this->k / $objattr['orig_h']); - - if (isset($objattr['ROTATE'])) { $rotate = $objattr['ROTATE']; } - if ($rotate==90) { - // Clockwise - $obiw = $objattr['INNER-HEIGHT']; - $obih = $objattr['INNER-WIDTH']; - $tr = $this->transformTranslate(0, -$objattr['INNER-WIDTH'], true) ; - $tr .= ' '. $this->transformRotate(90, $objattr['INNER-X'],($objattr['INNER-Y'] +$objattr['INNER-WIDTH'] ),true) ; - $sx = $obiw*$this->k / $objattr['orig_h']; - $sy = $obih*$this->k / $objattr['orig_w']; // mPDF 4.4.013 - } - else if ($rotate==-90) { - // AntiClockwise - $obiw = $objattr['INNER-HEIGHT']; - $obih = $objattr['INNER-WIDTH']; - $tr = $this->transformTranslate($objattr['INNER-WIDTH'], ($objattr['INNER-HEIGHT']-$objattr['INNER-WIDTH']), true) ; - $tr .= ' '. $this->transformRotate(-90, $objattr['INNER-X'],($objattr['INNER-Y'] +$objattr['INNER-WIDTH'] ),true) ; - $sx = $obiw*$this->k / $objattr['orig_h']; - $sy = $obih*$this->k / $objattr['orig_w']; // mPDF 4.4.013 - } - else if ($rotate==180) { - // Mirror - $tr = $this->transformTranslate($objattr['INNER-WIDTH'], -$objattr['INNER-HEIGHT'], true) ; - $tr .= ' '. $this->transformRotate(180, $objattr['INNER-X'],($objattr['INNER-Y'] +$objattr['INNER-HEIGHT'] ),true) ; - } - else { $tr = ''; } - $tr = trim($tr); // mPDF 4.5.007 - if ($tr) { $tr .= ' '; } // mPDF 4.5.007 -/*-- IMAGES-WMF --*/ - if (isset($objattr['itype']) && $objattr['itype']=='wmf') { - $outstring = sprintf('q '.$tr.'%.3f 0 0 %.3f %.3f %.3f cm /FO%d Do Q', $sx, -$sy, $objattr['INNER-X']*$this->k-$sx*$objattr['wmf_x'], (($this->h-$objattr['INNER-Y'])*$this->k)+$sy*$objattr['wmf_y'], $objattr['ID']); // mPDF 4.3.016 // mPDF 4.5.007 - - } - else -/*-- END IMAGES-WMF --*/ - // mPDF 4.3.013 SVG files - if (isset($objattr['itype']) && $objattr['itype']=='svg') { - $outstring = sprintf('q '.$tr.'%.3f 0 0 %.3f %.3f %.3f cm /FO%d Do Q', $sx, -$sy, $objattr['INNER-X']*$this->k-$sx*$objattr['wmf_x'], (($this->h-$objattr['INNER-Y'])*$this->k)+$sy*$objattr['wmf_y'], $objattr['ID']); // mPDF 4.3.016 // mPDF 4.5.007 - } - else { - $outstring = sprintf("q ".$tr."%.3f 0 0 %.3f %.3f %.3f cm /I%d Do Q",$obiw*$this->k, $obih*$this->k, $objattr['INNER-X'] *$this->k, ($this->h-($objattr['INNER-Y'] +$obih ))*$this->k,$objattr['ID'] ); // mPDF 4.3.016 // mPDF 4.5.007 - } - $this->_out($outstring); - // LINK - if (isset($objattr['link'])) $this->Link($objattr['INNER-X'],$objattr['INNER-Y'],$objattr['INNER-WIDTH'],$objattr['INNER-HEIGHT'],$objattr['link']); - if (isset($objattr['BORDER-WIDTH'])) { $this->PaintImgBorder($objattr,$is_table); } - if (isset($objattr['opacity'])) { $this->SetAlpha(1); } - } - -/*-- BARCODES --*/ - // mPDF 4.0 - // BARCODE - if ($objattr['type'] == 'barcode') { - $bgcol = array('R'=>255, 'G'=>255, 'B'=>255); - if (isset($objattr['bgcolor']) && is_array($objattr['bgcolor'])) { - $bgcol = $objattr['bgcolor']; - } - $col = array('R'=>0, 'G'=>0, 'B'=>0); - if (isset($objattr['color']) && is_array($objattr['color'])) { - $col = $objattr['color']; - } - $this->SetFillColor($bgcol['R'],$bgcol['G'],$bgcol['B']); - $this->Rect($objattr['BORDER-X'], $objattr['BORDER-Y'], $objattr['BORDER-WIDTH'], $objattr['BORDER-HEIGHT'], 'F'); - $this->SetFillColor(255); - if (isset($objattr['BORDER-WIDTH'])) { $this->PaintImgBorder($objattr,$is_table); } - if ($objattr['btype'] == 'EAN13' || $objattr['btype'] == 'ISBN' || $objattr['btype'] == 'ISSN' || $objattr['btype'] == 'UPCA' || $objattr['btype'] == 'UPCE' || $objattr['btype'] == 'EAN8') { - $this->WriteBarcode($objattr['code'], $objattr['showtext'], $objattr['INNER-X'], $objattr['INNER-Y'], $objattr['bsize'], 0, 0, 0, 0, 0, $objattr['bheight'], $bgcol, $col, $objattr['btype'], $objattr['bsupp'], $objattr['bsupp_code'], $k); - } - else { - $this->WriteBarcode2($objattr['code'], $objattr['INNER-X'], $objattr['INNER-Y'], $objattr['bsize'], $objattr['bheight'], $bgcol, $col, $objattr['btype'], $objattr['pr_ratio'], $k); - } - } -/*-- END BARCODES --*/ - - - // mPDF 3.0 Normal spacing - // mPDF 4.0 - $this->ResetSpacing(); - - // mPDF 4.2.031 - if ($objattr['type'] == 'dottab') { - $sp = $this->GetStringWidth(' '); - $nb=floor(($w-2*$sp)/$this->GetStringWidth('.')); - if ($nb>0) { $dots=' '.str_repeat('.',$nb).' '; } - else { $dots=' '; } - $this->Cell($w,$h,$dots,0,0,'C'); - } - -/*-- FORMS --*/ - // mPDF - 1.4 Active Forms edited all the form elements below - // TEXT/PASSWORD INPUT - if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'TEXT' || $objattr['subtype'] == 'PASSWORD')) { - $w -= $this->form_element_spacing['input']['outer']['h']*2 /$k; - $h -= $this->form_element_spacing['input']['outer']['v']*2 /$k; - $this->x += $this->form_element_spacing['input']['outer']['h'] /$k; - $this->y += $this->form_element_spacing['input']['outer']['v'] /$k; - // Chop texto to max length $w-inner-padding - while ($this->GetStringWidth($texto) > $w-($this->form_element_spacing['input']['inner']['h']*2)) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$texto = mb_substr($texto,0,mb_strlen($texto,$this->mb_enc)-1,$this->mb_enc); - $texto = api_substr($texto,0,api_strlen($texto,$this->mb_enc)-1,$this->mb_enc); - // - } - // DIRECTIONALITY - $this->SetLineWidth(0.2 /$k ); - $this->magic_reverse_dir($texto, false); // *RTL* - if (isset($objattr['disabled']) && $objattr['disabled']) { - $this->SetFillColor(225); - $this->SetTextColor(127); - } - else if (isset($objattr['readonly']) && $objattr['readonly']) { - $this->SetFillColor(225); - $this->SetTextColor(0); - } - else { - $this->SetFillColor(250); - $this->SetTextColor(0); - } - $this->Cell($w,$h,$texto,1,0,$rtlalign,1,'',0,$this->form_element_spacing['input']['inner']['h'] /$k ,$this->form_element_spacing['input']['inner']['h'] /$k , 'M'); - $this->SetFillColor(255); - $this->SetTextColor(0); - - } - // SELECT - if ($objattr['type'] == 'select') { - // DIRECTIONALITY - $this->magic_reverse_dir($texto, false); // *RTL* - $this->SetLineWidth(0.2 /$k ); - if (isset($objattr['disabled']) && $objattr['disabled']) { - $this->SetFillColor(225); - $this->SetTextColor(127); - } - else { - $this->SetFillColor(250); - $this->SetTextColor(0); - } - $w -= $this->form_element_spacing['select']['outer']['h']*2 /$k ; - $h -= $this->form_element_spacing['select']['outer']['v']*2 /$k ; - $this->x += $this->form_element_spacing['select']['outer']['h'] /$k ; - $this->y += $this->form_element_spacing['select']['outer']['v'] /$k ; - $this->Cell($w-($this->FontSize*1.4),$h,$texto,1,0,$rtlalign,1,'',0,$this->form_element_spacing['select']['inner']['h'] /$k,$this->form_element_spacing['select']['inner']['h'] /$k , 'M') ; - $this->SetFillColor(190); - $save_font = $this->FontFamily; - $save_currentfont = $this->currentfontfamily; - // mPDF 4.2.018 - if ($this->PDFA) { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "Core Adobe font Zapfdingbats cannot be embedded in mPDF - used in Form element: Select - which is required for PDFA1-b. (Different character/font will be substituted.)"; } - $this->SetFont('sans'); - $this->Cell(($this->FontSize*1.4),$h,'=',1,0,'C',1,'',0,0,0, 'M') ; - } - else { - $this->SetFont('zapfdingbats','',0); - $this->Cell(($this->FontSize*1.4),$h,$this->chrs[116],1,0,'C',1,'',0,0,0, 'M') ; - } - $this->SetFont($save_font,'',0); - $this->currentfontfamily = $save_currentfont; - $this->SetFillColor(255); - $this->SetTextColor(0); - } - - - // INPUT/BUTTON as IMAGE - if ($objattr['type'] == 'input' && $objattr['subtype'] == 'IMAGE') { - $this->y = $objattr['INNER-Y']; - $this->_out( sprintf("q %.3f 0 0 %.3f %.3f %.3f cm /I%d Do Q",$objattr['INNER-WIDTH'] *$this->k,$objattr['INNER-HEIGHT'] *$this->k,$objattr['INNER-X'] *$this->k,($this->h-($objattr['INNER-Y'] +$objattr['INNER-HEIGHT'] ))*$this->k,$objattr['ID'] ) ); - if (isset($objattr['BORDER-WIDTH']) && $objattr['BORDER-WIDTH']) { $this->PaintImgBorder($objattr,$is_table); } - } - - - // BUTTON - if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'SUBMIT' || $objattr['subtype'] == 'RESET' || $objattr['subtype'] == 'BUTTON')) { - $this->SetLineWidth(0.2 /$k ); - $this->SetFillColor(190,190,190); - $w -= $this->form_element_spacing['button']['outer']['h']*2 /$k ; - $h -= $this->form_element_spacing['button']['outer']['v']*2 /$k ; - $this->x += $this->form_element_spacing['button']['outer']['h'] /$k ; - $this->y += $this->form_element_spacing['button']['outer']['v'] /$k ; - $this->RoundedRect($this->x, $this->y, $w, $h, 0.5 /$k , 'DF'); - $w -= $this->form_element_spacing['button']['inner']['h']*2 /$k ; - $h -= $this->form_element_spacing['button']['inner']['v']*2 /$k ; - $this->x += $this->form_element_spacing['button']['inner']['h'] /$k ; - $this->y += $this->form_element_spacing['button']['inner']['v'] /$k ; - $this->magic_reverse_dir($texto, false); // *RTL* - $this->Cell($w,$h,$texto,'',0,'C',0,'',0,0,0, 'M') ; - $this->SetFillColor(255); - } - - // TEXTAREA - if ($objattr['type'] == 'textarea') { - $w -= $this->form_element_spacing['textarea']['outer']['h']*2 /$k ; - $h -= $this->form_element_spacing['textarea']['outer']['v']*2 /$k ; - $this->x += $this->form_element_spacing['textarea']['outer']['h'] /$k ; - $this->y += $this->form_element_spacing['textarea']['outer']['v'] /$k ; - $this->SetLineWidth(0.2 /$k ); - if (isset($objattr['disabled']) && $objattr['disabled']) { - $this->SetFillColor(225); - $this->SetTextColor(127); - } - else if (isset($objattr['readonly']) && $objattr['readonly']) { - $this->SetFillColor(225); - $this->SetTextColor(0); - } - else { - $this->SetFillColor(250); - $this->SetTextColor(0); - } - $this->Rect($this->x,$this->y,$w,$h,'DF'); - $w -= $this->form_element_spacing['textarea']['inner']['h']*2 /$k ; - $this->x += $this->form_element_spacing['textarea']['inner']['h'] /$k ; - $this->y += $this->form_element_spacing['textarea']['inner']['v'] /$k ; - $linesneeded = $this->WordWrap($texto,$w); - if ($linesneeded > $objattr['rows']) { //Too many words inside textarea - $textoaux = explode("\n",$texto); // mPDF 4.4.012 - $texto = ''; - for($i=0;$i<$objattr['rows'];$i++) { - if ($i == ($objattr['rows']-1)) $texto .= $textoaux[$i]; - else $texto .= $textoaux[$i] . "\n"; - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$texto = mb_substr($texto,0,mb_strlen($texto,$this->mb_enc)-4,$this->mb_enc) . "..."; - $texto = api_substr($texto,0,api_strlen($texto,$this->mb_enc)-4,$this->mb_enc) . "..."; - // - } - if ($texto != '') $this->MultiCell($w,$this->FontSize*$this->textarea_lineheight,$texto,0,'',0,'',$this->directionality,true); - $this->SetFillColor(255); - $this->SetTextColor(0); - } - - // CHECKBOX - if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'CHECKBOX')) { - $iw = $w * 0.7; - $ih = $h * 0.7; - $lx = $x + (($w-$iw)/2); - $ty = $y + (($h-$ih)/2); - $rx = $lx + $iw; - $by = $ty + $ih; - $this->SetLineWidth(0.2 /$k ); - if (isset($objattr['disabled']) && $objattr['disabled']) { - $this->SetFillColor(225); - $this->SetDrawColor(127); - } - else { - $this->SetFillColor(250); - $this->SetDrawColor(0); - } - $this->Rect($lx,$ty,$iw,$ih,'DF'); - if (isset($objattr['checked']) && $objattr['checked']) { - //Round join and cap - $this->_out('1 J'); - $this->Line($lx,$ty,$rx,$by); - $this->Line($lx,$by,$rx,$ty); - //Set line cap style back to square - $this->_out('2 J'); - } - $this->SetFillColor(255); - $this->SetDrawColor(0); - } - // RADIO - if ($objattr['type'] == 'input' && ($objattr['subtype'] == 'RADIO')) { - $this->SetLineWidth(0.2 /$k ); - $radius = $this->FontSize *0.35; - $cx = $x + ($w/2); - $cy = $y + ($h/2); - if (isset($objattr['disabled']) && $objattr['disabled']) { - $this->SetFillColor(127); - $this->SetDrawColor(127); - } - else { - $this->SetFillColor(0); - $this->SetDrawColor(0); - } - $this->Circle($cx,$cy,$radius,'D'); - if (isset($objattr['checked']) && $objattr['checked']) { - $this->Circle($cx,$cy,$radius*0.4,'DF'); - } - $this->SetFillColor(255); - $this->SetDrawColor(0); - } -/*-- END FORMS --*/ - } - $this->SetFont($save_currentfontfamily,$save_currentfontstyle,$save_currentfontsize); - $this->y = $save_y; - $this->x = $save_x; - unset($content); -} - - -function WriteFlowingBlock( $s) -{ - $currentx = $this->x; - $is_table = $this->flowingBlockAttr[ 'is_table' ]; - $is_list = $this->flowingBlockAttr[ 'is_list' ]; - // width of all the content so far in points - $contentWidth =& $this->flowingBlockAttr[ 'contentWidth' ]; - // cell width in points - $maxWidth =& $this->flowingBlockAttr[ 'width' ]; - $lineCount =& $this->flowingBlockAttr[ 'lineCount' ]; - // line height in user units - $lineHeight =& $this->flowingBlockAttr[ 'height' ]; - $align =& $this->flowingBlockAttr[ 'align' ]; - $content =& $this->flowingBlockAttr[ 'content' ]; - $font =& $this->flowingBlockAttr[ 'font' ]; - $valign =& $this->flowingBlockAttr[ 'valign' ]; - $blockstate = $this->flowingBlockAttr[ 'blockstate' ]; - - $newblock = $this->flowingBlockAttr[ 'newblock' ]; - // *********** BLOCK BACKGROUND COLOR ***************** // - if ($this->blk[$this->blklvl]['bgcolor'] && !$is_table) { - // mPDF 3.0 - Tiling Patterns - $fill = 0; -// $fill = 1; -// $bcor = $this->blk[$this->blklvl]['bgcolorarray']; -// $this->SetFillColor($bcor['R'],$bcor['G'],$bcor['B']); - } - else { - $this->SetFillColor(255); - $fill = 0; - } - $font[] = $this->saveFont(); - $content[] = ''; - $currContent =& $content[ count( $content ) - 1 ]; - // where the line should be cutoff if it is to be justified - $cutoffWidth = $contentWidth; - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$curlyquote = mb_convert_encoding("\xe2\x80\x9e",$this->mb_enc,'UTF-8'); - //$curlylowquote = mb_convert_encoding("\xe2\x80\x9d",$this->mb_enc,'UTF-8'); - $curlyquote = api_convert_encoding("\xe2\x80\x9e",$this->mb_enc,'UTF-8'); - $curlylowquote = api_convert_encoding("\xe2\x80\x9d",$this->mb_enc,'UTF-8'); - // - - // COLS - $oldcolumn = $this->CurrCol; - - if ($this->ColActive && !$is_table) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - -/*-- TABLES --*/ - if ($is_table) { - $ipaddingL = 0; - $ipaddingR = 0; - $paddingL = 0; - $paddingR = 0; - $cpaddingadjustL = 0; - $cpaddingadjustR = 0; - // Added mPDF 3.0 - $fpaddingR = 0; - $fpaddingL = 0; - } - else { -/*-- END TABLES --*/ - $ipaddingL = $this->blk[$this->blklvl]['padding_left']; - $ipaddingR = $this->blk[$this->blklvl]['padding_right']; - $paddingL = ($ipaddingL * $this->k); - $paddingR = ($ipaddingR * $this->k); - $this->cMarginL = $this->blk[$this->blklvl]['border_left']['w']; - $cpaddingadjustL = -$this->cMarginL; - $this->cMarginR = $this->blk[$this->blklvl]['border_right']['w']; - $cpaddingadjustR = -$this->cMarginR; - // Added mPDF 3.0 Float DIV - $fpaddingR = 0; - $fpaddingL = 0; -/*-- CSS-FLOAT --*/ - if (count($this->floatDivs)) { - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl); - if ($r_exists) { $fpaddingR = $r_width; } - if ($l_exists) { $fpaddingL = $l_width; } - } -/*-- END CSS-FLOAT --*/ - - $usey = $this->y + 0.002; - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($lineCount == 0) ) { - $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w']; - } -/*-- CSS-IMAGE-FLOAT --*/ - // If float exists at this level - if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) { $fpaddingR += $this->floatmargins['R']['w']; } - if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) { $fpaddingL += $this->floatmargins['L']['w']; } -/*-- END CSS-IMAGE-FLOAT --*/ - } // *TABLES* - - //OBJECTS - IMAGES & FORM Elements (NB has already skipped line/page if required - in printbuffer) - if (substr($s,0,3) == "\xbb\xa4\xac") { //identifier has been identified! - // mPDF 4.0 - $objattr = $this->_getObjAttr($s); - $h_corr = 0; - if ($is_table) { // *TABLES* - $maximumW = ($maxWidth/$this->k) - ($this->cellPaddingL + $this->cMarginL + $this->cellPaddingR + $this->cMarginR); // *TABLES* - } // *TABLES* - else { // *TABLES* - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($lineCount == 0) && (!$is_table)) { $h_corr = $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w']; } - $maximumW = ($maxWidth/$this->k) - ($this->blk[$this->blklvl]['padding_left'] + $this->blk[$this->blklvl]['border_left']['w'] + $this->blk[$this->blklvl]['padding_right'] + $this->blk[$this->blklvl]['border_right']['w'] + $fpaddingL + $fpaddingR ); - } // *TABLES* - $objattr = $this->inlineObject($objattr['type'],$this->lMargin + $fpaddingL + ($contentWidth/$this->k),($this->y + $h_corr), $objattr, $this->lMargin,($contentWidth/$this->k),$maximumW,$lineHeight,true,$is_table); - - // SET LINEHEIGHT for this line ================ RESET AT END - $lineHeight = MAX($lineHeight,$objattr['OUTER-HEIGHT']); - $this->objectbuffer[count($content)-1] = $objattr; - // mPDF 4.2 - // if (isset($objattr['vertical-align'])) { $valign = $objattr['vertical-align']; } - // else { $valign = ''; } - $contentWidth += ($objattr['OUTER-WIDTH'] * $this->k); - return; - } - - -/*-- UNICODE-FONTS --*/ - if ($this->is_MB && !$this->usingCoreFont) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$tmp = mb_strlen( $s, $this->mb_enc ); - $tmp = api_strlen( $s, $this->mb_enc ); - // - } - else { -/*-- END UNICODE-FONTS --*/ - $tmp = strlen( $s ); - } // *UNICODE-FONTS* - - $orphs = 0; - $check = 0; - - // for every character in the string - for ( $i = 0; $i < $tmp; $i++ ) { - - // extract the current character - // get the width of the character in points -/*-- UNICODE-FONTS --*/ - if ($this->is_MB && !$this->usingCoreFont) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - // $c = mb_substr($s,$i,1,$this->mb_enc ); - $c = api_substr($s,$i,1,$this->mb_enc ); - // - $cw = ($this->GetStringWidth($c) * $this->k); - } - else { -/*-- END UNICODE-FONTS --*/ - $c = $s[$i]; // mPDF 4.4.012 - // mPDF 3.0 Soft Hyphens chr(173) - if ($c == chr(173) && ($this->FontFamily!='symbol' && $this->FontFamily!='zapfdingbats')) { $cw = 0; } - else { $cw = $this->CurrentFont[ 'cw' ][ $c ] * ( $this->FontSizePt / 1000 ); } - } // *UNICODE-FONTS* - if ($c==' ') { $check = 1; } - - // CHECK for ORPHANS - else if ($c=='.' || $c==',' || $c==')' || $c==';' || $c==':' || $c=='!' || $c=='?'|| $c=='"' || $c==$curlyquote || $c==$curlylowquote || $c=="\xef\xbc\x8c" || $c=="\xe3\x80\x82") {$check++; } - else { $check = 0; } - - // There's an orphan '. ' or ', ' or 32 about to be cut off at the end of line - if($check==1) { - $currContent .= $c; - $cutoffWidth = $contentWidth; - $contentWidth += $cw; - continue; - } - if(($this->SUP || $this->SUB) && ($orphs < $this->orphansAllowed)) { // ? disable orphans in table if borders used - $currContent .= $c; - $cutoffWidth = $contentWidth; - $contentWidth += $cw; - $orphs++; - continue; - } - else { $orphs = 0; } - - // ADDED for Paragraph_indent - $WidthCorrection = 0; - if (($newblock) && ($blockstate==1 || $blockstate==3) && isset($this->blk[$this->blklvl]['text_indent']) && ($lineCount == 0) && (!$is_table) && (!$is_list) && ($align != 'C')) { - // mPDF 4.0 - $ti = $this->ConvertSize($this->blk[$this->blklvl]['text_indent'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - $WidthCorrection = ($ti*$this->k); - } - - // Added mPDF 3.0 Float DIV - $fpaddingR = 0; - $fpaddingL = 0; -/*-- CSS-FLOAT --*/ - if (count($this->floatDivs)) { - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl); - if ($r_exists) { $fpaddingR = $r_width; } - if ($l_exists) { $fpaddingL = $l_width; } - } -/*-- END CSS-FLOAT --*/ - - $usey = $this->y + 0.002; - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($lineCount == 0) ) { - $usey += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w']; - } - -/*-- CSS-IMAGE-FLOAT --*/ - // If float exists at this level - if (isset($this->floatmargins['R']) && $usey <= $this->floatmargins['R']['y1'] && $usey >= $this->floatmargins['R']['y0'] && !$this->floatmargins['R']['skipline']) { $fpaddingR += $this->floatmargins['R']['w']; } - if (isset($this->floatmargins['L']) && $usey <= $this->floatmargins['L']['y1'] && $usey >= $this->floatmargins['L']['y0'] && !$this->floatmargins['L']['skipline']) { $fpaddingL += $this->floatmargins['L']['w']; } -/*-- END CSS-IMAGE-FLOAT --*/ - - - - // try adding another char - if (( $contentWidth + $cw > $maxWidth - $WidthCorrection - (($this->cMarginL+$this->cMarginR)*$this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ) + 0.001)) {// 0.001 is to correct for deviations converting mm=>pts - // it won't fit, output what we already have - $lineCount++; - - // contains any content that didn't make it into this print - $savedContent = ''; - $savedFont = array(); - // mPDF 4.2.031 Dot Tabs - $savedObj = array(); - -/*-- CJK --*/ - - // Change   = CJK space - if ($this->isCJK) { - if ($this->currentfontfamily == 'sjis' && preg_match("/( |\xe3\x80\x80)/",$currContent) ) { $words = preg_split( "/( |\xe3\x80\x80)/", $currContent ); } - // If CJK break at space if in ASCII string else break after current character - else if (isset($this->ords[$c]) && $this->ords[$c]>127) { $words = array(); $words[] = $currContent; } - else { $words = explode( ' ', $currContent ); } - } - // cut off and save any partial words at the end of the string - else { -/*-- END CJK --*/ - $words = explode( ' ', $currContent ); - /////////////////// - // HYPHENATION - $currWord = $words[count($words)-1] ; - $success = false; -/*-- HYPHENATION --*/ - // mPDF 3.0 Soft Hyphens chr(173) -/*-- UNICODE-FONTS --*/ - if (($this->is_MB && preg_match("/\xc2\xad/",$currWord)) || (!$this->is_MB && preg_match("/".chr(173)."/",$currWord) && ($this->FontFamily!='symbol' && $this->FontFamily!='zapfdingbats')) ) { - $rem = $maxWidth - $WidthCorrection - (($this->cMarginL+$this->cMarginR)*$this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ); - list($success,$pre,$post,$prelength) = $this->softHyphenate($currWord, (($rem-$cutoffWidth)/$this->k -$this->GetStringWidth(" ")) ); - } -/*-- END UNICODE-FONTS --*/ - if (!$success && ($this->hyphenate || ($this->hyphenateTables && $is_table))) { - // Look ahead to get current word - // Modified by Ivan Tcholakov, 28-JAN-2010. - //for($ac = $i; $ac<(mb_strlen($s)-1); $ac++) { - // $addc = mb_substr($s,$ac,1,$this->mb_enc ); - for($ac = $i; $ac<(api_strlen($s, $this->mb_enc)-1); $ac++) { - $addc = api_substr($s,$ac,1,$this->mb_enc ); - // - if ($addc == ' ') { break; } - $currWord .= $addc; - } - $rem = $maxWidth - $WidthCorrection - (($this->cMarginL+$this->cMarginR)*$this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ); - list($success,$pre,$post,$prelength) = $this->hyphenateWord($currWord, (($rem-$cutoffWidth)/$this->k -$this->GetStringWidth(" ")) ); - } - if ($success) { - $already = array_pop( $words ); - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$forward = mb_substr($already,$prelength,mb_strlen($already, $this->mb_enc), $this->mb_enc); - $forward = api_substr($already,$prelength,api_strlen($already, $this->mb_enc), $this->mb_enc); - // - $words[] = $pre.'-'; - $words[] = $forward; - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$currContent = mb_substr($currContent,0,mb_strlen($currContent, $this->mb_enc)+1-mb_strlen($post, $this->mb_enc), $this->mb_enc) . '-'; // mPDF 4.2.009 +1 as $post returned longer - $currContent = api_substr($currContent,0,api_strlen($currContent, $this->mb_enc)+1-api_strlen($post, $this->mb_enc), $this->mb_enc) . '-'; // mPDF 4.2.009 +1 as $post returned longer - // - } -/*-- END HYPHENATION --*/ - } // *CJK* - - - // if it looks like we didn't finish any words for this chunk - if ( count( $words ) == 1 ) { - // TO correct for error when word too wide for page - but only when one long word from left to right margin - if (count($content) == 1 && $currContent != ' ') { - $lastContent = $words[0]; - $savedFont = $this->saveFont(); - // replace the current content with the cropped version - $currContent = rtrim( $lastContent ); // mPDF 4.4.012 - } - else { - // save and crop off the content currently on the stack - $savedContent = array_pop( $content ); - $savedFont = array_pop( $font ); - // trim any trailing spaces off the last bit of content - $currContent =& $content[ count( $content ) - 1 ]; - $currContent = rtrim( $currContent ); // mPDF 4.4.012 - } - } - else { // otherwise, we need to find which bit to cut off - $lastContent = ''; - // mPDF 3.0 - for ( $w = 0; $w < count( $words ) - 1; $w++) { $lastContent .= $words[ $w ]." "; } - $savedContent = $words[ count( $words ) - 1 ]; - $savedFont = $this->saveFont(); - // replace the current content with the cropped version - $currContent = rtrim( $lastContent ); // mPDF 4.4.012 - } - - // mPDF 4.2.031 Dot Tabs - if (isset($this->objectbuffer[(count($content)-1)]) && $this->objectbuffer[(count($content)-1)]['type']=='dottab') { - $savedObj = array_pop( $this->objectbuffer ); - $contentWidth -= ($this->objectbuffer[(count($content)-1)]['OUTER-WIDTH'] * $this->k); - } - - // Set Current lineheight (correction factor) - $lhfixed = false; -/*-- LISTS --*/ - if ($is_list) { - if (preg_match('/([0-9.,]+)mm/',$this->list_lineheight[$this->listlvl][$this->listOcc],$am)) { - $lhfixed = true; - $def_fontsize = $this->InlineProperties['LISTITEM'][$this->listlvl][$this->listOcc][$this->listnum]['size']; - $this->lineheight_correction = $am[1] / $def_fontsize ; - } - else { - $this->lineheight_correction = $this->list_lineheight[$this->listlvl][$this->listOcc]; - } - } - else -/*-- END LISTS --*/ -/*-- TABLES --*/ - if ($is_table) { - if (preg_match('/([0-9.,]+)mm/',$this->table_lineheight,$am)) { - $lhfixed = true; - $def_fontsize = $this->FontSize; // needs to be default font-size for block **** - $this->lineheight_correction = $lineHeight / $def_fontsize ; - } - else { - $this->lineheight_correction = $this->table_lineheight; - } - } - else -/*-- END TABLES --*/ - if (isset($this->blk[$this->blklvl]['line_height']) && $this->blk[$this->blklvl]['line_height']) { - if (preg_match('/([0-9.,]+)mm/',$this->blk[$this->blklvl]['line_height'],$am)) { - $lhfixed = true; - $def_fontsize = $this->blk[$this->blklvl]['InlineProperties']['size']; // needs to be default font-size for block **** - $this->lineheight_correction = $am[1] / $def_fontsize ; - } - else { - $this->lineheight_correction = $this->blk[$this->blklvl]['line_height']; - } - } - else { - $this->lineheight_correction = $this->normalLineheight; - } - - // update $contentWidth and $cutoffWidth since they changed with cropping - // Also correct lineheight to maximum fontsize (not for tables) - $contentWidth = 0; - // mPDF 4.2 - // correct lineheight to maximum fontsize - if ($lhfixed) { $maxlineHeight = $this->lineheight; } - else { $maxlineHeight = 0; } - $this->forceExactLineheight = true; - $maxfontsize = 0; - foreach ( $content as $k => $chunk ) - { - $this->restoreFont( $font[ $k ]); - if (!isset($this->objectbuffer[$k])) { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - $content[$k] = $chunk = str_replace("\xc2\xad",'',$chunk ); - } - // mPDF 3.0 Soft Hyphens chr(173) - else -/*-- END UNICODE-FONTS --*/ - if ($this->FontFamily!='symbol' && $this->FontFamily!='zapfdingbats') { - $content[$k] = $chunk = str_replace($this->chrs[173],'',$chunk ); - } - $contentWidth += $this->GetStringWidth( $chunk ) * $this->k; - // mPDF 4.2 - if (!$lhfixed) { $maxlineHeight = max($maxlineHeight,$this->FontSize * $this->lineheight_correction ); } - if ($lhfixed && ($this->FontSize > $def_fontsize || ($this->FontSize > ($lineHeight * $this->lineheight_correction) && $is_list))) { - $this->forceExactLineheight = false; - } - $maxfontsize = max($maxfontsize,$this->FontSize); - } - } - - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - $lastfontreqstyle = $font[count($font)-1]['ReqFontStyle']; - $lastfontstyle = $font[count($font)-1]['style']; - if ($this->directionality == 'ltr' && strpos($lastfontreqstyle,"I") !== false && strpos($lastfontstyle,"I") === false) { // Artificial italic - $lastitalic = $this->FontSize*0.15*$this->k; - } - else { $lastitalic = 0; } - - -/*-- LISTS --*/ - // mPDF 4.2 Moved here from later - if ($is_list && is_array($this->bulletarray) && $this->bulletarray) { - $actfs = $this->bulletarray['fontsize']; - if (!$lhfixed) { $maxlineHeight = max($maxlineHeight,$actfs * $this->lineheight_correction ); } // mPDF 4.2 - if ($lhfixed && $actfs > $def_fontsize) { $this->forceExactLineheight = false; } - $maxfontsize = max($maxfontsize,$actfs); - } -/*-- END LISTS --*/ - - // when every text item checked i.e. $maxfontsize is set properly - - $af = 0; // Above font - $bf = 0; // Below font - $mta = 0; // Maximum top-aligned - $mba = 0; // Maximum bottom-aligned - - foreach ( $content as $k => $chunk ) { - if (isset($this->objectbuffer[$k]) && $this->objectbuffer[$k]) { - $contentWidth += $this->objectbuffer[$k]['OUTER-WIDTH'] * $this->k; - $oh = $this->objectbuffer[$k]['OUTER-HEIGHT']; - $va = $this->objectbuffer[$k]['vertical-align']; // = $objattr['vertical-align'] = set as M,T,B,S - if ($lhfixed && $oh > $def_fontsize) { $this->forceExactLineheight = false; } - - if ($va == 'BS') { // (BASELINE default) - $af = max($af, ($oh - ($maxfontsize * (0.5 + $this->baselineC)))); - } - else if ($va == 'M') { - $af = max($af, ($oh - $maxfontsize)/2); - $bf = max($bf, ($oh - $maxfontsize)/2); - } - else if ($va == 'TT') { - $bf = max($bf, ($oh - $maxfontsize)); - } - else if ($va == 'TB') { - $af = max($af, ($oh - $maxfontsize)); - } - else if ($va == 'T') { - $mta = max($mta, $oh); - } - else if ($va == 'B') { - $mba = max($mba, $oh); - } - } - } - if ((!$lhfixed || !$this->forceExactLineheight) && ($af > (($maxlineHeight - $maxfontsize)/2) || $bf > (($maxlineHeight - $maxfontsize)/2))) { - $maxlineHeight = $maxfontsize + $af + $bf; - } - else if (!$lhfixed) { $af = $bf = ($maxlineHeight - $maxfontsize)/2; } - - if ($mta > $maxlineHeight) { - $bf += ($mta - $maxlineHeight); - $maxlineHeight = $mta; - } - if ($mba > $maxlineHeight) { - $af += ($mba - $maxlineHeight); - $maxlineHeight = $mba; - } - - - $lineHeight = $maxlineHeight; - $cutoffWidth = $contentWidth; - // mPDF 4.2 If NOT images, and maxfontsize NOT > lineHeight - this value determines text baseline positioning - if ($lhfixed && $af==0 && $bf==0 && $maxfontsize<=($def_fontsize * $this->lineheight_correction * 0.8 )) { - $this->linemaxfontsize = $def_fontsize; - } - else { $this->linemaxfontsize = $maxfontsize; } - - - // JUSTIFICATION J - $nb_carac = 0; - $nb_spaces = 0; - // if it's justified, we need to find the char/word spacing (or if orphans have allowed length of line to go over the maxwidth) - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - if(( $align == 'J' ) || ($cutoffWidth + $lastitalic > $maxWidth - $WidthCorrection - (($this->cMarginL+$this->cMarginR)*$this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ) + 0.001)) { // 0.001 is to correct for deviations converting mm=>pts - // JUSTIFY J (Use character spacing) - // WORD SPACING - foreach ( $content as $k => $chunk ) { - if (!isset($this->objectbuffer[$k]) || (isset($this->objectbuffer[$k]) && !$this->objectbuffer[$k])) { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - $chunk = str_replace($this->chrs[194].$this->chrs[160],$this->chrs[32],$chunk ); - } - else { -/*-- END UNICODE-FONTS --*/ - $chunk = str_replace($this->chrs[160],$this->chrs[32],$chunk ); - } // *UNICODE-FONTS* - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$nb_carac += mb_strlen( $chunk, $this->mb_enc ) ; - //$nb_spaces += mb_substr_count( $chunk,' ', $this->mb_enc ) ; - $nb_carac += api_strlen( $chunk, $this->mb_enc ) ; - $nb_spaces += api_substr_count( $chunk,' ', $this->mb_enc ) ; - // - } - } - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - list($charspacing,$ws) = $this->GetJspacing($nb_carac,$nb_spaces,($maxWidth-$lastitalic-$cutoffWidth-$WidthCorrection-(($this->cMarginL+$this->cMarginR)*$this->k)-($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ))); - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - } - - // otherwise, we want normal spacing - else { - // mPDF 4.0 - $this->ResetSpacing(); - } - - // WORD SPACING - // mPDF 4.2 $lastitalic to shorten if line ends with artificial ITALIC - $empty = $maxWidth - $lastitalic-$WidthCorrection - $contentWidth - (($this->cMarginL+$this->cMarginR)* $this->k) - ($paddingL+$paddingR +(($fpaddingL + $fpaddingR) * $this->k) ) - ( $this->charspacing * $nb_carac) - ( $this->ws * $nb_spaces); - $empty /= $this->k; - $b = ''; //do not use borders - // Get PAGEBREAK TO TEST for height including the top border/padding - $check_h = max($this->divheight,$lineHeight); - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($this->blklvl > 0) && ($lineCount == 1) && (!$is_table) && (!$is_list)) { - $check_h += ($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['border_top']['w']); - } - - // mPDF 4.2 Force PAGE break if column height cannot take check-height - if ($this->ColActive && $check_h > ($this->PageBreakTrigger - $this->y0)) { $this->CurrCol = $this->NbCol; } - - // PAGEBREAK - // 'If' below used in order to fix "first-line of other page with justify on" bug - // mPDF 4.2.008 Disable in Tables - if(!$is_table && ($this->y+$check_h) > $this->PageBreakTrigger and !$this->InFooter and $this->AcceptPageBreak()) { - $bak_x=$this->x;//Current X position - - // WORD SPACING - $ws=$this->ws;//Word Spacing - $charspacing=$this->charspacing;//Character Spacing - // mPDF 4.0 - $this->ResetSpacing(); - - $this->AddPage($this->CurOrientation); - - $this->x = $bak_x; - // Added to correct for OddEven Margins - $currentx += $this->MarginCorrection; - $this->x += $this->MarginCorrection; - - // WORD SPACING - // mPDF 4.0 - $this->SetSpacing($charspacing,$ws); - } - -/*-- COLUMNS --*/ - // COLS - // COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - $currentx += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - $this->x += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - $oldcolumn = $this->CurrCol; - } - - if ($this->ColActive && !$is_table) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* -/*-- END COLUMNS --*/ - - // TOP MARGIN - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($this->blk[$this->blklvl]['margin_top']) && ($lineCount == 1) && (!$is_table) && (!$is_list)) { - $this->DivLn($this->blk[$this->blklvl]['margin_top'],$this->blklvl-1,true,$this->blk[$this->blklvl]['margin_collapse']); - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - } - - - // Update y0 for top of block (used to paint border) - if (($newblock) && ($blockstate==1 || $blockstate==3) && ($lineCount == 1) && (!$is_table) && (!$is_list)) { - $this->blk[$this->blklvl]['y0'] = $this->y; - $this->blk[$this->blklvl]['startpage'] = $this->page; - } - - // TOP PADDING and BORDER spacing/fill - if (($newblock) && ($blockstate==1 || $blockstate==3) && (($this->blk[$this->blklvl]['padding_top']) || ($this->blk[$this->blklvl]['border_top'])) && ($lineCount == 1) && (!$is_table) && (!$is_list)) { - // mPDF 3.0 Also does border when Columns active - // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom - $this->DivLn($this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w'],-3,true,false,1); - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - } - - $arraysize = count($content); - - $margins = ($this->cMarginL+$this->cMarginR) + ($ipaddingL+$ipaddingR + $fpaddingR + $fpaddingR ); - - // PAINT BACKGROUND FOR THIS LINE - if (!$is_table) { $this->DivLn($lineHeight,$this->blklvl,false); } // false -> don't advance y - - - $this->x = $currentx + $this->cMarginL + $ipaddingL + $fpaddingL ; - if ($align == 'R') { $this->x += $empty; } - else if ($align == 'C') { $this->x += ($empty / 2); } - - // Paragraph INDENT - if (isset($this->blk[$this->blklvl]['text_indent']) && ($newblock) && ($blockstate==1 || $blockstate==3) && ($lineCount == 1) && (!$is_table) && ($this->directionality!='rtl') && ($align !='C')) { - // mPDF 4.0 - $ti = $this->ConvertSize($this->blk[$this->blklvl]['text_indent'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - $this->x += $ti; - } - - - // DIRECTIONALITY RTL - $all_rtl = false; - $contains_rtl = false; -/*-- RTL --*/ - if (($this->directionality == 'rtl') || (($this->directionality == 'ltr') && ($this->biDirectional))) { - $all_rtl = true; - foreach ( $content as $k => $chunk ) { - $reversed = $this->magic_reverse_dir($chunk, false); - if ($reversed > 0) { $contains_rtl = true; } - if ($reversed < 2) { $all_rtl = false; } - $content[$k] = $chunk; - } - if ($this->directionality == 'rtl') { - if ($contains_rtl) { - $content = array_reverse($content,false); - } - } - else if (($this->directionality == 'ltr') && ($this->biDirectional)) { - if ($all_rtl) { - $content = array_reverse($content,false); - } - } - } -/*-- END RTL --*/ - - foreach ( $content as $k => $chunk ) { - - // FOR IMAGES - UPDATE POSITION - if (($this->directionality=='rtl' && $contains_rtl) || $all_rtl) { $dirk = $arraysize-1 - $k ; } else { $dirk = $k; } - - // mPDF 4.2 - $va = 'M'; // default for text - if (isset($this->objectbuffer[$dirk]) && $this->objectbuffer[$dirk]) { - $xadj = $this->x - $this->objectbuffer[$dirk]['OUTER-X'] ; - $this->objectbuffer[$dirk]['OUTER-X'] += $xadj; - $this->objectbuffer[$dirk]['BORDER-X'] += $xadj; - $this->objectbuffer[$dirk]['INNER-X'] += $xadj; - // mPDF 4.2 - $va = $this->objectbuffer[$dirk]['vertical-align']; - $yadj = $this->y - $this->objectbuffer[$dirk]['OUTER-Y']; - if ($va == 'BS') { - $yadj += $af + ($this->linemaxfontsize * (0.5 + $this->baselineC)) - $this->objectbuffer[$dirk]['OUTER-HEIGHT']; - } - else if ($va == 'M' || $va == '') { - $yadj += $af + ($this->linemaxfontsize /2) - ($this->objectbuffer[$dirk]['OUTER-HEIGHT']/2); - } - else if ($va == 'TB') { - $yadj += $af + $this->linemaxfontsize - $this->objectbuffer[$dirk]['OUTER-HEIGHT']; - } - else if ($va == 'TT') { - $yadj += $af; - } - else if ($va == 'B') { - $yadj += $af + $this->linemaxfontsize + $bf - $this->objectbuffer[$dirk]['OUTER-HEIGHT']; - } - else if ($va == 'T') { - $yadj += 0; - } - $this->objectbuffer[$dirk]['OUTER-Y'] += $yadj; - $this->objectbuffer[$dirk]['BORDER-Y'] += $yadj; - $this->objectbuffer[$dirk]['INNER-Y'] += $yadj; - } - - // DIRECTIONALITY RTL - if ((($this->directionality == 'rtl') && ($contains_rtl )) || ($all_rtl )) { $this->restoreFont($font[$arraysize-1 - $k]); } - else { $this->restoreFont( $font[ $k ] ); } - - // *********** SPAN BACKGROUND COLOR ***************** // - if ($this->spanbgcolor) { - $cor = $this->spanbgcolorarray; - $this->SetFillColor($cor['R'],$cor['G'],$cor['B']); - $save_fill = $fill; $spanfill = 1; $fill = 1; - } - - // WORD SPACING - // Modified by Ivan Tcholakov, 28-JAN-2010. - // $stringWidth = $this->GetStringWidth($chunk ) + ( $this->charspacing * mb_strlen($chunk,$this->mb_enc ) / $this->k ) - // + ( $this->ws * mb_substr_count($chunk,' ',$this->mb_enc ) / $this->k ); - $stringWidth = $this->GetStringWidth($chunk ) + ( $this->charspacing * api_strlen($chunk,$this->mb_enc ) / $this->k ) - + ( $this->ws * api_substr_count($chunk,' ',$this->mb_enc ) / $this->k ); - // - if (isset($this->objectbuffer[$dirk])) { $stringWidth = $this->objectbuffer[$dirk]['OUTER-WIDTH']; } - - if ($stringWidth > 0) { - if ($k == $arraysize-1) { - $stringWidth -= ( $this->charspacing / $this->k ); - // mPDF 4.2 af , bf above and below font - $this->Cell( $stringWidth, $lineHeight, $chunk, '', 1, '', $fill, $this->HREF , $currentx,0,0,'M', $fill, $af, $bf ); //mono-style line or last part (skips line) - } - else $this->Cell( $stringWidth, $lineHeight, $chunk, '', 0, '', $fill, $this->HREF, 0, 0,0,'M', $fill, $af, $bf );//first or middle part - } - else { // If a space started a new chunk at the end of a line - $this->x = $currentx; $this->y += $lineHeight; - } - // *********** SPAN BACKGROUND COLOR OFF - RESET BLOCK BGCOLOR ***************** // - if (isset($spanfill) && $spanfill) { - $fill = $save_fill; $spanfill = 0; - if ($fill) { $this->SetFillColor($bcor['R'],$bcor['G'],$bcor['B']); } - } - } - // mPDF 4.0 - if (!$is_table) { - $this->maxPosR = max($this->maxPosR , ($this->w - $this->rMargin - $this->blk[$this->blklvl]['outer_right_margin'])); - $this->maxPosL = min($this->maxPosL , ($this->lMargin + $this->blk[$this->blklvl]['outer_left_margin'])); - } - - // move on to the next line, reset variables, tack on saved content and current char - - $this->printobjectbuffer($is_table); - $this->objectbuffer = array(); - -/*-- LISTS --*/ - // LIST BULLETS/NUMBERS - if ($is_list && is_array($this->bulletarray) && ($lineCount == 1) ) { - // mPDF 4.0 - $this->ResetSpacing(); - - $bull = $this->bulletarray; - if (isset($bull['level']) && isset($bull['occur']) && isset($this->InlineProperties['LIST'][$bull['level']][$bull['occur']])) { - $this->restoreInlineProperties($this->InlineProperties['LIST'][$bull['level']][$bull['occur']]); - } - if (isset($bull['level']) && isset($bull['occur']) && isset($bull['num']) && isset($this->InlineProperties['LISTITEM'][$bull['level']][$bull['occur']][$bull['num']]) && $this->InlineProperties['LISTITEM'][$bull['level']][$bull['occur']][$bull['num']]) { $this->restoreInlineProperties($this->InlineProperties['LISTITEM'][$bull['level']][$bull['occur']][$bull['num']]); } - if (isset($bull['font']) && $bull['font'] == 'zapfdingbats') { - $this->bullet = true; - $this->SetFont('zapfdingbats','',$this->FontSizePt/2.5); - } - else { $this->SetFont($this->FontFamily,$this->FontStyle,$this->FontSizePt,true,true); } // force output - //Output bullet - $this->x = $currentx; - if (isset($bull['x'])) { $this->x += $bull['x']; } - $this->y -= $lineHeight; - // mPDF 4.0 - if (isset($bull['txt'])) { $this->Cell($bull['w'], $lineHeight,$bull['txt'],'','',$bull['align'],0,'',0,-$this->cMarginL, -$this->cMarginR ); } - if (isset($bull['font']) && $bull['font'] == 'zapfdingbats') { - $this->bullet = false; - } - $this->x = $currentx; // Reset - $this->y += $lineHeight; - - if ($this->ColActive && !$is_table) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - - $this->bulletarray = array(); // prevents repeat of bullet/number if
  • ....
    .....
  • - } -/*-- END LISTS --*/ - - -/*-- CSS-IMAGE-FLOAT --*/ - // Update values if set to skipline - if ($this->floatmargins) { $this->_advanceFloatMargins(); } -/*-- END CSS-IMAGE-FLOAT --*/ - - // Reset lineheight - $lineHeight = $this->divheight; - $valign = 'M'; - - $this->restoreFont( $savedFont ); - - // mPDF 4.2.031 Dot Tabs - $font = array(); - $content = array(); - - $contentWidth = 0; - if (!empty($savedObj)) { - $this->objectbuffer[] = $savedObj; - $font[] = $savedFont; - $content[] = ''; - $contentWidth += $savedObj['OUTER-WIDTH'] * $this->k; - } - $font[] = $savedFont; - $content[] = $savedContent . $c; - $currContent =& $content[ (count($content)-1) ]; - $contentWidth += $this->GetStringWidth( $currContent ) * $this->k; - $cutoffWidth = $contentWidth; - } - // another character will fit, so add it on - else { - $contentWidth += $cw; - $currContent .= $c; - } - } - unset($content); -} -//----------------------END OF FLOWING BLOCK------------------------------------// - - -/*-- CSS-IMAGE-FLOAT --*/ -// Update values if set to skipline -function _advanceFloatMargins() { - // Update floatmargins - L - if (isset($this->floatmargins['L']) && $this->floatmargins['L']['skipline'] && $this->floatmargins['L']['y0'] != $this->y) { - $yadj = $this->y - $this->floatmargins['L']['y0']; - $this->floatmargins['L']['y0'] = $this->y; - $this->floatmargins['L']['y1'] += $yadj; - - // Update objattr in floatbuffer - if ($this->floatbuffer[$this->floatmargins['L']['id']]['border_left']['w']) { - $this->floatbuffer[$this->floatmargins['L']['id']]['BORDER-Y'] += $yadj; - } - $this->floatbuffer[$this->floatmargins['L']['id']]['INNER-Y'] += $yadj; - $this->floatbuffer[$this->floatmargins['L']['id']]['OUTER-Y'] += $yadj; - - // Unset values - $this->floatbuffer[$this->floatmargins['L']['id']]['skipline'] = false; - $this->floatmargins['L']['skipline'] = false; - $this->floatmargins['L']['id'] = ''; - } - // Update floatmargins - R - if (isset($this->floatmargins['R']) && $this->floatmargins['R']['skipline'] && $this->floatmargins['R']['y0'] != $this->y) { - $yadj = $this->y - $this->floatmargins['R']['y0']; - $this->floatmargins['R']['y0'] = $this->y; - $this->floatmargins['R']['y1'] += $yadj; - - // Update objattr in floatbuffer - if ($this->floatbuffer[$this->floatmargins['R']['id']]['border_left']['w']) { - $this->floatbuffer[$this->floatmargins['R']['id']]['BORDER-Y'] += $yadj; - } - $this->floatbuffer[$this->floatmargins['R']['id']]['INNER-Y'] += $yadj; - $this->floatbuffer[$this->floatmargins['R']['id']]['OUTER-Y'] += $yadj; - - // Unset values - $this->floatbuffer[$this->floatmargins['R']['id']]['skipline'] = false; - $this->floatmargins['R']['skipline'] = false; - $this->floatmargins['R']['id'] = ''; - } -} -/*-- END CSS-IMAGE-FLOAT --*/ - - - -//////////////////////////////////////////////////////////////////////////////// -// ADDED forcewrap - to call from inline OBJECT functions to breakwords if necessary in cell -//////////////////////////////////////////////////////////////////////////////// -function WordWrap(&$text, $maxwidth, $forcewrap = 0) { - $biggestword=0; - $toonarrow=false; - - $text = trim($text); // mPDF 4.4.012 - - if ($text==='') return 0; - $space = $this->GetStringWidth(' '); - $lines = explode("\n", $text); // mPDF 4.4.012 - $text = ''; - $count = 0; - foreach ($lines as $line) { - $words = explode(' ', $line); // mPDF 4.4.012 - $width = 0; - foreach ($words as $word) { - $word = trim($word); // mPDF 4.4.012 - $wordwidth = $this->GetStringWidth($word); - - //Warn user that maxwidth is insufficient - if ($wordwidth > $maxwidth + 0.0001) { - if ($wordwidth > $biggestword) { $biggestword = $wordwidth; } - $toonarrow=true; - // ADDED - if ($forcewrap) { - while($wordwidth > $maxwidth) { - $chw = 0; // check width - // Modified by Ivan Tcholakov, 28-JAN-2010. - //for ( $i = 0; $i < mb_strlen($word, $this->mb_enc ); $i++ ) { - // $chw = $this->GetStringWidth(mb_substr($word,0,$i+1,$this->mb_enc )); - for ( $i = 0; $i < api_strlen($word, $this->mb_enc ); $i++ ) { - $chw = $this->GetStringWidth(api_substr($word,0,$i+1,$this->mb_enc )); - // - if ($chw > $maxwidth ) { - if ($text) { - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$text = rtrim($text)."\n".mb_substr($word,0,$i,$this->mb_enc ); // mPDF 4.4.012 - $text = rtrim($text)."\n".api_substr($word,0,$i,$this->mb_enc ); // mPDF 4.4.012 - // - $count++; - } - else { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$text = mb_substr($word,0,$i,$this->mb_enc ); - $text = api_substr($word,0,$i,$this->mb_enc ); - // - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$word = mb_substr($word,$i,mb_strlen($word, $this->mb_enc )-$i,$this->mb_enc ); - $word = api_substr($word,$i,api_strlen($word, $this->mb_enc )-$i,$this->mb_enc ); - // - $wordwidth = $this->GetStringWidth($word); - $width = $maxwidth; - break; - } - } - } - } - } - - if ($width + $wordwidth < $maxwidth - 0.0001) { - $width += $wordwidth + $space; - $text .= $word.' '; - } - else { - $width = $wordwidth + $space; - $text = rtrim($text)."\n".$word.' '; // mPDF 4.4.012 - $count++; - } - } - - $text = rtrim($text)."\n"; // mPDF 4.4.012 - $count++; - } - $text = rtrim($text); // mPDF 4.4.012 - - //Return -(wordsize) if word is bigger than maxwidth - - // ADDED - if ($forcewrap) { return $count; } - if (($toonarrow) && ($this->table_error_report)) { - $this->Error("Word is too long to fit in table - ".$this->table_error_report_param); - } - if ($toonarrow) return -$biggestword; - else return $count; -} - -function _SetTextRendering($mode) { - if (!(($mode == 0) || ($mode == 1) || ($mode == 2))) - $this->Error("Text rendering mode should be 0, 1 or 2 (value : $mode)"); - $tr = ($mode.' Tr'); - if($this->page>0 && ((isset($this->pageoutput[$this->page]['TextRendering']) && $this->pageoutput[$this->page]['TextRendering'] != $tr) || !isset($this->pageoutput[$this->page]['TextRendering']) || $this->keep_block_together)) { $this->_out($tr); } - $this->pageoutput[$this->page]['TextRendering'] = $tr; - -} - -function SetTextOutline($width, $r=0, $g=-1, $b=-1) { - if ($width == false) //Now resets all values - { - $this->outline_on = false; - $this->SetLineWidth(0.2); - $this->SetDrawColor(0); - $this->_SetTextRendering(0); - $tr = ('0 Tr'); - if($this->page>0 && ((isset($this->pageoutput[$this->page]['TextRendering']) && $this->pageoutput[$this->page]['TextRendering'] != $tr) || !isset($this->pageoutput[$this->page]['TextRendering']) || $this->keep_block_together)) { $this->_out($tr); } - $this->pageoutput[$this->page]['TextRendering'] = $tr; - } - else - { - $this->SetLineWidth($width); - $this->SetDrawColor($r, $g , $b); - $tr = ('2 Tr'); - if($this->page>0 && ((isset($this->pageoutput[$this->page]['TextRendering']) && $this->pageoutput[$this->page]['TextRendering'] != $tr) || !isset($this->pageoutput[$this->page]['TextRendering']) || $this->keep_block_together)) { $this->_out($tr); } - $this->pageoutput[$this->page]['TextRendering'] = $tr; - } -} -// mPDF 4.2 -function Image($file,$x,$y,$w=0,$h=0,$type='',$link='',$paint=true, $constrain=true, $watermark=false, $shownoimg=true, $allowvector=true) { - $orig_srcpath = $file; // mPDF 4.2.029 - $this->GetFullPath($file); // mPDF 4.2.029 - - $info=$this->_getImage($file, true, $allowvector, $orig_srcpath ); // mPDF 4.2.029 - if(!$info && $paint) { - $info = $this->_getImage($this->noImageFile); - if ($info) { - $file = $this->noImageFile; - $w = ($info['w'] * (25.4/$this->dpi)); // 14 x 16px - $h = ($info['h'] * (25.4/$this->dpi)); // 14 x 16px - } - } - if(!$info) return false; // mPDF 4.2 - - //Automatic width and height calculation if needed - if($w==0 and $h==0) { -/*-- IMAGES-WMF --*/ - if ($info['type']=='wmf') { - // WMF units are twips (1/20pt) - // divide by 20 to get points - // divide by k to get user units - $w = abs($info['w'])/(20*$this->k); - $h = abs($info['h']) / (20*$this->k); - } - else -/*-- END IMAGES-WMF --*/ - if ($info['type']=='svg') { - // returned SVG units are pts - // divide by k to get user units (mm) - $w = abs($info['w'])/$this->k; - $h = abs($info['h']) /$this->k; - } - else { - //Put image at default image dpi - $w=($info['w']/$this->k) * (72/$this->img_dpi); - $h=($info['h']/$this->k) * (72/$this->img_dpi); - } - } - if($w==0) $w=abs($h*$info['w']/$info['h']); - if($h==0) $h=abs($w*$info['h']/$info['w']); - -/*-- WATERMARK --*/ - if ($watermark) { - $maxw = $this->w; - $maxh = $this->h; - // Size = D PF or array - if (is_array($this->watermark_size)) { - $w = $this->watermark_size[0]; - $h = $this->watermark_size[1]; - } - else if (!is_string($this->watermark_size)) { - $maxw -= $this->watermark_size*2; - $maxh -= $this->watermark_size*2; - $w = $maxw; - $h=abs($w*$info['h']/$info['w']); - if ($h > $maxh ) { - $h = $maxh ; $w=abs($h*$info['w']/$info['h']); - } - } - else if ($this->watermark_size == 'F') { - if ($this->ColActive) { $maxw = $this->w - ($this->DeflMargin + $this->DefrMargin); } - else { $maxw = $this->pgwidth; } - $maxh = $this->h - ($this->tMargin + $this->bMargin); - $w = $maxw; - $h=abs($w*$info['h']/$info['w']); - if ($h > $maxh ) { - $h = $maxh ; $w=abs($h*$info['w']/$info['h']); - } - } - else if ($this->watermark_size == 'P') { // Default P - $w = $maxw; - $h=abs($w*$info['h']/$info['w']); - if ($h > $maxh ) { - $h = $maxh ; $w=abs($h*$info['w']/$info['h']); - } - } - // Automatically resize to maximum dimensions of page if too large - if ($w > $maxw) { - $w = $maxw; - $h=abs($w*$info['h']/$info['w']); - } - if ($h > $maxh ) { - $h = $maxh ; - $w=abs($h*$info['w']/$info['h']); - } - // Position - if (is_array($this->watermark_pos)) { - $x = $this->watermark_pos[0]; - $y = $this->watermark_pos[1]; - } - else if ($this->watermark_pos == 'F') { // centred on printable area - if ($this->ColActive) { // *COLUMNS* - if (($this->mirrorMargins) && (($this->page)%2==0)) { $xadj = $this->DeflMargin-$this->DefrMargin; } // *COLUMNS* - else { $xadj = 0; } // *COLUMNS* - $x = ($this->DeflMargin - $xadj + ($this->w - ($this->DeflMargin + $this->DefrMargin))/2) - ($w/2); // *COLUMNS* - } // *COLUMNS* - else { // *COLUMNS* - $x = ($this->lMargin + ($this->pgwidth)/2) - ($w/2); - } // *COLUMNS* - $y = ($this->tMargin + ($this->h - ($this->tMargin + $this->bMargin))/2) - ($h/2); - } - else { // default P - centred on whole page - $x = ($this->w/2) - ($w/2); - $y = ($this->h/2) - ($h/2); - } -/*-- IMAGES-WMF --*/ - if ($info['type']=='wmf') { - $sx = $w*$this->k / $info['w']; - $sy = -$h*$this->k / $info['h']; - $outstring = sprintf('q %.3f 0 0 %.3f %.3f %.3f cm /FO%d Do Q', $sx, $sy, $x*$this->k-$sx*$info['x'], (($this->h-$y)*$this->k)-$sy*$info['y'], $info['i']); // mPDF 4.5.007 - } - else -/*-- END IMAGES-WMF --*/ - // mPDF 4.3.013 - if ($info['type']=='svg') { - $sx = $w*$this->k / $info['w']; - $sy = -$h*$this->k / $info['h']; - $outstring = sprintf('q %.3f 0 0 %.3f %.3f %.3f cm /FO%d Do Q', $sx, $sy, $x*$this->k-$sx*$info['x'], (($this->h-$y)*$this->k)-$sy*$info['y'], $info['i']); - } - else { - $outstring = sprintf("q %.3f 0 0 %.3f %.3f %.3f cm /I%d Do Q",$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']); - } - - // mPDF 4.3.018 - if ($this->watermarkImgBehind) { - $outstring = $this->watermarkImgAlpha . "\n" . $outstring . "\n" . $this->SetAlpha(1, 'Normal', true) . "\n"; - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', "\n".$outstring."\n".'\\1', $this->pages[$this->page]); - } - else { $this->_out($outstring); } - - return 0; - } // end of IF watermark -/*-- END WATERMARK --*/ - - if ($constrain) { - // Automatically resize to maximum dimensions of page if too large - if (isset($this->blk[$this->blklvl]['inner_width']) && $this->blk[$this->blklvl]['inner_width']) { $maxw = $this->blk[$this->blklvl]['inner_width']; } - else { $maxw = $this->pgwidth; } - if ($w > $maxw) { - $w = $maxw; - $h=abs($w*$info['h']/$info['w']); - } - if ($h > $this->h - ($this->tMargin + $this->bMargin + 10)) { // see below - +10 to avoid drawing too close to border of page - $h = $this->h - ($this->tMargin + $this->bMargin + 10) ; // mPDF 4.1 - if ($this->fullImageHeight) { $h = $this->fullImageHeight; } // mPDF 4.1 - $w=abs($h*$info['w']/$info['h']); - } - - - //Avoid drawing out of the paper(exceeding width limits). - //if ( ($x + $w) > $this->fw ) { - if ( ($x + $w) > $this->w ) { - $x = $this->lMargin; - $y += 5; - } - - $changedpage = false; - $oldcolumn = $this->CurrCol; - //Avoid drawing out of the page. - if($y+$h>$this->PageBreakTrigger and !$this->InFooter and $this->AcceptPageBreak()) { - $this->AddPage($this->CurOrientation); - // Added to correct for OddEven Margins - $x=$x +$this->MarginCorrection; - $y = $tMargin + $this->margin_header; - $changedpage = true; - } -/*-- COLUMNS --*/ - // COLS - // COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - $y = $this->y0; - $x += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - $this->x += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - } -/*-- END COLUMNS --*/ - } // end of IF constrain - -/*-- IMAGES-WMF --*/ - if ($info['type']=='wmf') { - $sx = $w*$this->k / $info['w']; - $sy = -$h*$this->k / $info['h']; - $outstring = sprintf('q %.3f 0 0 %.3f %.3f %.3f cm /FO%d Do Q', $sx, $sy, $x*$this->k-$sx*$info['x'], (($this->h-$y)*$this->k)-$sy*$info['y'], $info['i']); // mPDF 4.5.007 - } - else -/*-- END IMAGES-WMF --*/ - // mPDF 4.3.013 - if ($info['type']=='svg') { - $sx = $w*$this->k / $info['w']; - $sy = -$h*$this->k / $info['h']; - $outstring = sprintf('q %.3f 0 0 %.3f %.3f %.3f cm /FO%d Do Q', $sx, $sy, $x*$this->k-$sx*$info['x'], (($this->h-$y)*$this->k)-$sy*$info['y'], $info['i']); // mPDF 4.5.007 - } - else { - $outstring = sprintf("q %.3f 0 0 %.3f %.3f %.3f cm /I%d Do Q",$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']); - } - - if($paint) { - $this->_out($outstring); - if($link) $this->Link($x,$y,$w,$h,$link); - - // Avoid writing text on top of the image. // THIS WAS OUTSIDE THE if ($paint) bit!!!!!!!!!!!!!!!! - $this->y = $y + $h; - } - - //Return width-height array - $sizesarray['WIDTH'] = $w; - $sizesarray['HEIGHT'] = $h; - $sizesarray['X'] = $x; //Position before painting image - $sizesarray['Y'] = $y; //Position before painting image - $sizesarray['OUTPUT'] = $outstring; - // mPDF 3.0 Tiling patterns - $sizesarray['IMAGE_ID'] = $info['i']; - return $sizesarray; -} - - - -//============================================================= -//============================================================= -//============================================================= -//============================================================= -//============================================================= -// mPDF 4.0 -function _getObjAttr($t) { - $c = explode("\xbb\xa4\xac",$t,2); - $c = explode(",",$c[1],2); - foreach($c as $v) { - $v = explode("=",$v,2); - $sp[$v[0]] = $v[1]; - } - return (unserialize($sp['objattr'])); -} - - -function inlineObject($type,$x,$y,$objattr,$Lmargin,$widthUsed,$maxWidth,$lineHeight,$paint=false,$is_table=false) -{ - if ($is_table) { $k = $this->shrin_k; } else { $k = 1; } - - // NB $x is only used when paint=true - // Lmargin not used - $w = 0; - if (isset($objattr['width'])) { $w = $objattr['width']/$k; } - $h = 0; - if (isset($objattr['height'])) { $h = abs($objattr['height']/$k); } - - $widthLeft = $maxWidth - $widthUsed; - $maxHeight = $this->h - ($this->tMargin + $this->bMargin + 10) ; // mPDF 4.1 - if ($this->fullImageHeight) { $maxHeight = $this->fullImageHeight; } // mPDF 4.1 - // For Images - if (isset($objattr['border_left'])) { - $extraWidth = ($objattr['border_left']['w'] + $objattr['border_right']['w'] + $objattr['margin_left']+ $objattr['margin_right'])/$k; - $extraHeight = ($objattr['border_top']['w'] + $objattr['border_bottom']['w'] + $objattr['margin_top']+ $objattr['margin_bottom'])/$k; - // mPDF 4.0 - if ($type == 'image' || $type == 'barcode') { - $extraWidth += ($objattr['padding_left'] + $objattr['padding_right'])/$k; - $extraHeight += ($objattr['padding_top'] + $objattr['padding_bottom'])/$k; - } - } - - // mPDF 4.2 Failsafe (e.g. for HR) - if (!isset($objattr['vertical-align'])) { $objattr['vertical-align'] = 'M'; } - - if ($type == 'image' || (isset($objattr['subtype']) && $objattr['subtype'] == 'IMAGE')) { - if (isset($objattr['itype']) && ($objattr['itype'] == 'wmf' || $objattr['itype'] == 'svg')) { // mPDF 4.3.013 - $file = $objattr['file']; - $info=$this->formobjects[$file]; - } - else if (isset($objattr['file'])) { - $file = $objattr['file']; - $info=$this->images[$file]; - } - } - // mPDF 3.0 - if ($type == 'annot' || $type == 'bookmark' || $type == 'indexentry' || $type == 'toc') { - $w = 0.00001; - $h = 0.00001; - } - - // TEST whether need to skipline - if (!$paint) { - if ($type == 'hr') { // always force new line - if (($y + $h + $lineHeight > $this->PageBreakTrigger) && !$this->InFooter && !$is_table) { return array(-2, $w ,$h ); } // New page + new line - else { return array(1, $w ,$h ); } // new line - } - else { - if ($widthUsed > 0 && $w > $widthLeft && (!$is_table || $type != 'image')) { // New line needed - if (($y + $h + $lineHeight > $this->PageBreakTrigger) && !$this->InFooter) { return array(-2,$w ,$h ); } // New page + new line - return array(1,$w ,$h ); // new line - } - // mPDF 4.2.011 - else if ($widthUsed > 0 && $w > $widthLeft && $is_table) { // New line needed in TABLE - return array(1,$w ,$h ); // new line - } - // Will fit on line but NEW PAGE REQUIRED - else if (($y + $h > $this->PageBreakTrigger) && !$this->InFooter && !$is_table) { return array(-1,$w ,$h ); } - else { return array(0,$w ,$h ); } - } - } - - // mPDF 3.0 - if ($type == 'annot' || $type == 'bookmark' || $type == 'indexentry' || $type == 'toc') { - $w = 0.00001; - $h = 0.00001; - $objattr['BORDER-WIDTH'] = 0; - $objattr['BORDER-HEIGHT'] = 0; - $objattr['BORDER-X'] = $x; - $objattr['BORDER-Y'] = $y; - $objattr['INNER-WIDTH'] = 0; - $objattr['INNER-HEIGHT'] = 0; - $objattr['INNER-X'] = $x; - $objattr['INNER-Y'] = $y; - } - - if ($type == 'image') { - // Automatically resize to width remaining - if ($w > $widthLeft && !$is_table) { - $w = $widthLeft ; - $h=abs($w*$info['h']/$info['w']); - } - $img_w = $w - $extraWidth ; - $img_h = $h - $extraHeight ; - // mPDF 4.0 - $objattr['BORDER-WIDTH'] = $img_w + $objattr['padding_left']/$k + $objattr['padding_right']/$k + (($objattr['border_left']['w']/$k + $objattr['border_right']['w']/$k)/2) ; - $objattr['BORDER-HEIGHT'] = $img_h + $objattr['padding_top']/$k + $objattr['padding_bottom']/$k + (($objattr['border_top']['w']/$k + $objattr['border_bottom']['w']/$k)/2) ; - $objattr['BORDER-X'] = $x + $objattr['margin_left']/$k + (($objattr['border_left']['w']/$k)/2) ; - $objattr['BORDER-Y'] = $y + $objattr['margin_top']/$k + (($objattr['border_top']['w']/$k)/2) ; - $objattr['INNER-WIDTH'] = $img_w; - $objattr['INNER-HEIGHT'] = $img_h; - $objattr['INNER-X'] = $x + $objattr['padding_left']/$k + $objattr['margin_left']/$k + ($objattr['border_left']['w']/$k); - $objattr['INNER-Y'] = $y + $objattr['padding_top']/$k + $objattr['margin_top']/$k + ($objattr['border_top']['w']/$k) ; - $objattr['ID'] = $info['i']; - } - - if ($type == 'input' && $objattr['subtype'] == 'IMAGE') { - $img_w = $w - $extraWidth ; - $img_h = $h - $extraHeight ; - $objattr['BORDER-WIDTH'] = $img_w + (($objattr['border_left']['w']/$k + $objattr['border_right']['w']/$k)/2) ; - $objattr['BORDER-HEIGHT'] = $img_h + (($objattr['border_top']['w']/$k + $objattr['border_bottom']['w']/$k)/2) ; - $objattr['BORDER-X'] = $x + $objattr['margin_left']/$k + (($objattr['border_left']['w']/$k)/2) ; - $objattr['BORDER-Y'] = $y + $objattr['margin_top']/$k + (($objattr['border_top']['w']/$k)/2) ; - $objattr['INNER-WIDTH'] = $img_w; - $objattr['INNER-HEIGHT'] = $img_h; - $objattr['INNER-X'] = $x + $objattr['margin_left']/$k + ($objattr['border_left']['w']/$k); - $objattr['INNER-Y'] = $y + $objattr['margin_top']/$k + ($objattr['border_top']['w']/$k) ; - $objattr['ID'] = $info['i']; - } - -/*-- BARCODES --*/ - // mPDF 4.0 - if ($type == 'barcode') { - $b_w = $w - $extraWidth ; - $b_h = $h - $extraHeight ; - $objattr['BORDER-WIDTH'] = $b_w + $objattr['padding_left']/$k + $objattr['padding_right']/$k + (($objattr['border_left']['w']/$k + $objattr['border_right']['w']/$k)/2) ; - $objattr['BORDER-HEIGHT'] = $b_h + $objattr['padding_top']/$k + $objattr['padding_bottom']/$k + (($objattr['border_top']['w']/$k + $objattr['border_bottom']['w']/$k)/2) ; - $objattr['BORDER-X'] = $x + $objattr['margin_left']/$k + (($objattr['border_left']['w']/$k)/2) ; - $objattr['BORDER-Y'] = $y + $objattr['margin_top']/$k + (($objattr['border_top']['w']/$k)/2) ; - $objattr['INNER-WIDTH'] = $img_w; - $objattr['INNER-HEIGHT'] = $img_h; - $objattr['INNER-X'] = $x + $objattr['padding_left']/$k + $objattr['margin_left']/$k + ($objattr['border_left']['w']/$k); - $objattr['INNER-Y'] = $y + $objattr['padding_top']/$k + $objattr['margin_top']/$k + ($objattr['border_top']['w']/$k) ; - } -/*-- END BARCODES --*/ - - - if ($type == 'textarea') { - // Automatically resize to width remaining - if ($w > $widthLeft && !$is_table) { - $w = $widthLeft ; - } - if (($y + $h > $this->PageBreakTrigger) && !$this->InFooter) { - $h=$this->h - $y - $this->bMargin; - } - } - - if ($type == 'hr') { - if ($is_table) { - $objattr['INNER-WIDTH'] = $maxWidth * $objattr['W-PERCENT']/100; - $objattr['width'] = $objattr['INNER-WIDTH']; - // mPDF 3.0 - $w = $maxWidth; - } - else { - if ($w>$maxWidth) { $w = $maxWidth; } - $objattr['INNER-WIDTH'] = $w; - // mPDF 3.0 - $w = $maxWidth; - } - } - - - - if (($type == 'select') || ($type == 'input' && ($objattr['subtype'] == 'TEXT' || $objattr['subtype'] == 'PASSWORD'))) { - // Automatically resize to width remaining - if ($w > $widthLeft && !$is_table) { - $w = $widthLeft; - } - } - - if ($type == 'textarea' || $type == 'select' || $type == 'input') { - if (isset($objattr['fontsize'])) $objattr['fontsize'] /= $k; - if (isset($objattr['linewidth'])) $objattr['linewidth'] /= $k; - } - - // mPDF 3.0 - if (!isset($objattr['BORDER-Y'])) { $objattr['BORDER-Y'] = 0; } - if (!isset($objattr['BORDER-X'])) { $objattr['BORDER-X'] = 0; } - if (!isset($objattr['INNER-Y'])) { $objattr['INNER-Y'] = 0; } - if (!isset($objattr['INNER-X'])) { $objattr['INNER-X'] = 0; } - - //Return width-height array - $objattr['OUTER-WIDTH'] = $w; - $objattr['OUTER-HEIGHT'] = $h; - $objattr['OUTER-X'] = $x; - $objattr['OUTER-Y'] = $y; - return $objattr; -} - - -//============================================================= -//============================================================= -//============================================================= -//============================================================= -//============================================================= - - - - -function SetDash($black=false,$white=false) -{ - if($black and $white) $s=sprintf('[%.3f %.3f] 0 d',$black*$this->k,$white*$this->k); - else $s='[] 0 d'; - if($this->page>0 && ((isset($this->pageoutput[$this->page]['Dash']) && $this->pageoutput[$this->page]['Dash'] != $s) || !isset($this->pageoutput[$this->page]['Dash']) || $this->keep_block_together)) { $this->_out($s); } - $this->pageoutput[$this->page]['Dash'] = $s; - -} - -function SetDisplayPreferences($preferences) { - // String containing any or none of /HideMenubar/HideToolbar/HideWindowUI/DisplayDocTitle/CenterWindow/FitWindow - $this->DisplayPreferences .= $preferences; -} - - -function Ln($h='',$collapsible=0) -{ -// Added collapsible to allow collapsible top-margin on new page - //Line feed; default value is last cell height - $this->x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin']; - if ($collapsible && ($this->y==$this->tMargin) && (!$this->ColActive)) { $h = 0; } - if(is_string($h)) $this->y+=$this->lasth; - else $this->y+=$h; -} - - -// mPDF 3.0 Also does border when Columns active -// $state = 0 normal; 1 top; 2 bottom; 3 top and bottom -function DivLn($h,$level=-3,$move_y=true,$collapsible=false,$state=0) { - // this->x is returned as it was - // adds lines (y) where DIV bgcolors are filled in - // mPDF 4.2 allows .00001 as nominal height used for bookmarks/annotations etc. - if ($collapsible && (sprintf("%0.4f", $this->y)==sprintf("%0.4f", $this->tMargin)) && (!$this->ColActive)) { return; } - if ($collapsible && (sprintf("%0.4f", $this->y)==sprintf("%0.4f", $this->y0)) && ($this->ColActive) && $this->CurrCol == 0) { return; } // *COLUMNS* - - // mPDF 3.0 - // Still use this method if columns or page-break-inside: avoid, as it allows repositioning later - // otherwise, now uses PaintDivBB() - if (!$this->ColActive && !$this->keep_block_together && !$this->kwt) { // mPDF 4.0 added kwt - if ($move_y && !$this->ColActive) { $this->y += $h; } - return; - } - - if ($level == -3) { $level = $this->blklvl; } - $firstblockfill = $this->GetFirstBlockFill(); - if ($firstblockfill && $this->blklvl > 0 && $this->blklvl >= $firstblockfill) { - $last_x = 0; - $last_w = 0; - $last_fc = $this->FillColor; - $bak_x = $this->x; - $bak_h = $this->divheight; - $this->divheight = 0; // Temporarily turn off divheight - as Cell() uses it to check for PageBreak - for ($blvl=$firstblockfill;$blvl<=$level;$blvl++) { - $this->SetBlockFill($blvl); - $this->x = $this->lMargin + $this->blk[$blvl]['outer_left_margin']; - if ($last_x != $this->lMargin + $this->blk[$blvl]['outer_left_margin'] || $last_w != $this->blk[$blvl]['width'] || $last_fc != $this->FillColor) { - $x = $this->x; // mPDF 3.0 - $this->Cell( ($this->blk[$blvl]['width']), $h, '', '', 0, '', 1); - // mPDF 3.0 Also does border when Columns active - if (!$this->keep_block_together && !$this->writingHTMLheader && !$this->writingHTMLfooter) { - $this->x = $x; - // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom - if ($blvl == $this->blklvl) { $this->PaintDivLnBorder($state,$blvl,$h); } - else { $this->PaintDivLnBorder(0,$blvl,$h); } - } - } - $last_x = $this->lMargin + $this->blk[$blvl]['outer_left_margin']; - $last_w = $this->blk[$blvl]['width']; - $last_fc = $this->FillColor; - } - // Reset current block fill - if (isset($this->blk[$this->blklvl]['bgcolorarray'])) { - $bcor = $this->blk[$this->blklvl]['bgcolorarray']; - $this->SetFillColor($bcor['R'],$bcor['G'],$bcor['B']); - } - $this->x = $bak_x; - $this->divheight = $bak_h; - } - if ($move_y) { $this->y += $h; } -} - -function GetX() -{ - //Get x position - return $this->x; -} - -function SetX($x) -{ - //Set x position - if($x >= 0) $this->x=$x; - else $this->x = $this->w + $x; -} - -function GetY() -{ - //Get y position - return $this->y; -} - -function SetY($y) -{ - //Set y position and reset x - $this->x=$this->lMargin; - if($y>=0) - $this->y=$y; - else - $this->y=$this->h+$y; -} - -function SetXY($x,$y) -{ - //Set x and y positions - $this->SetY($y); - $this->SetX($x); -} - - - -function Output($name='',$dest='') -{ - - //Output PDF to some destination - global $_SERVER; - // mPDF 4.0 - if ($this->showStats) { - echo '
    Generated in '.sprintf('%.2f',(microtime(true) - $this->time0)).' seconds
    '; - } - //Finish document if necessary - if ($this->progressBar) { $this->UpdateProgressBar(1,'100','Finished'); } // *PROGRESS-BAR* - if($this->state < 3) $this->Close(); - if ($this->progressBar) { $this->UpdateProgressBar(2,'100','Finished'); } // *PROGRESS-BAR* - // fn. error_get_last is only in PHP>=5.2 - if ($this->debug && function_exists('error_get_last') && error_get_last()) { - $e = error_get_last(); - if (($e['type'] < 2048 && $e['type'] != 8) || (intval($e['type']) & intval(ini_get("error_reporting")))) { - echo "

    Error message detected - PDF file generation aborted.

    "; - echo $e['message'].'
    '; - echo 'File: '.$e['file'].'
    '; - echo 'Line: '.$e['line'].'
    '; - exit; - } - } - - // mPDF 4.2.018 - if ($this->PDFA && $this->encrypted) { $this->Error("PDFA1-b does not permit encryption of documents."); } - if (count($this->PDFAwarnings) && $this->PDFA && !$this->PDFAauto) { - echo '
    WARNING - This file could not be generated as it stands as a PDFA1-b compliant file.
    '; - echo '
    These issues can be automatically fixed by mPDF using $mpdf->PDFAauto=true;
    '; - echo '
    Action that mPDF will take to automatically force PDFA1-b compliance are shown in brackets.
    '; - echo '
    Warning(s) generated:
    '; - exit; - } - - // mPDF 4.0 - if ($this->showStats) { - echo '
    Compiled in '.sprintf('%.2f',(microtime(true) - $this->time0)).' seconds (total)
    '; - echo '
    Peak Memory usage '.number_format((memory_get_peak_usage(true)/(1024*1024)),2).' MB
    '; - echo '
    PDF file size '.number_format((strlen($this->buffer)/1024)).' kB
    '; - echo '
    Number of fonts '.count($this->fonts).'
    '; - exit; - } - - if(is_bool($dest)) $dest=$dest ? 'D' : 'F'; - $dest=strtoupper($dest); - if($dest=='') { - if($name=='') { - $name='mpdf.pdf'; - $dest='I'; - } - else { $dest='F'; } - } - -/*-- PROGRESS-BAR --*/ - // mPDF 4.2 Progress bar - if ($this->progressBar && ($dest=='D' || $dest=='I')) { - if($name=='') { $name='mpdf.pdf'; } - $tempfile = '_tempPDF'.RAND(1,10000); - //Save to local file - $f=fopen(_MPDF_TEMP_PATH.$tempfile.'.pdf','wb'); // mPDF 4.3.007E - if(!$f) $this->Error('Unable to create temporary output file: '.$tempfile.'.pdf'); - fwrite($f,$this->buffer,strlen($this->buffer)); - fclose($f); - $this->UpdateProgressBar(3,'','Finished'); - echo ' - - - '; - exit; - } - else { - if ($this->progressBar) { $this->UpdateProgressBar(3,'','Finished'); } -/*-- END PROGRESS-BAR --*/ - switch($dest) { - case 'I': - // mPDF 3.0 // Edited mPDF 3.1 - if ($this->debug && !$this->allow_output_buffering && ob_get_contents()) { echo "

    Output has already been sent from the script - PDF file generation aborted.

    "; exit; } - //Send to standard output - if(isset($_SERVER['SERVER_NAME'])) - { - //We send to a browser - header('Content-Type: application/pdf'); - if(headers_sent()) - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - header('Content-Length: '.strlen($this->buffer)); - header('Content-disposition: inline; filename="'.$name.'"'); // mPDF 4.3.007B - // mPDF 4.2 - header('Pragma: no-cache'); - // mPDF 4.3.012B IE6 : this header avoid IE6 to open directly the pdf file - //header('Cache-Control: no-cache, must-revalidate'); - header('Cache-Control: maxage=0'); - - } - echo $this->buffer; - break; - case 'D': - //Download file - // mPDF 4.0 - if(isset($_SERVER['HTTP_USER_AGENT']) and strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) { - if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') { - header('HTTP/1.1 200 OK'); - header('Status: 200 OK'); - header('Pragma: anytextexeptno-cache', true); - header("Cache-Control: public, must-revalidate"); - } - else { - header('Pragma: no-cache'); - // mPDF 4.3.012B IE6 : this header avoid IE6 to open directly the pdf file - //header('Cache-Control: no-cache, must-revalidate'); - header('Cache-Control: maxage=0'); - } - header('Content-Type: application/force-download'); - } - else { - header('Content-Type: application/octet-stream'); - } - if(headers_sent()) - $this->Error('Some data has already been output to browser, can\'t send PDF file'); - header('Content-Length: '.strlen($this->buffer)); - header('Content-disposition: attachment; filename="'.$name.'"'); // mPDF 4.3.007B - echo $this->buffer; - break; - case 'F': - //Save to local file - $f=fopen($name,'wb'); - if(!$f) $this->Error('Unable to create output file: '.$name); - fwrite($f,$this->buffer,strlen($this->buffer)); - fclose($f); - break; - case 'S': - //Return as a string - return $this->buffer; - default: - $this->Error('Incorrect output destination: '.$dest); - } -/*-- PROGRESS-BAR --*/ - } -/*-- END PROGRESS-BAR --*/ - return ''; -} - - -// ***************************************************************************** -// * -// Protected methods * -// * -// ***************************************************************************** -function _dochecks() -{ - //Check for locale-related bug - if(1.1==1) - $this->Error('Don\'t alter the locale before including class file'); - //Check for decimal separator - if(sprintf('%.1f',1.0)!='1.0') - setlocale(LC_NUMERIC,'C'); -} - -function _begindoc() -{ - //Start document - $this->state=1; - $this->_out('%PDF-'.$this->pdf_version); - $this->_out('%'.chr(226).chr(227).chr(207).chr(211)); // mPDF 4.2.018 4 chars > 128 to show binary file -} - - -/*-- HTMLHEADERS-FOOTERS --*/ -// mPDF 4.0 Write out all HTML Headers and Footers -function _puthtmlheaders() { - $this->state=2; - $nb=$this->page; - for($n=1;$n<=$nb;$n++) { - if ($this->mirrorMargins && $n%2==0) { $OE = 'E'; } // EVEN - else { $OE = 'O'; } - $this->page = $n; - if (isset($this->saveHTMLHeader[$n][$OE])) { - $html = $this->saveHTMLHeader[$n][$OE]['html']; - $this->lMargin = $this->saveHTMLHeader[$n][$OE]['ml']; - $this->rMargin = $this->saveHTMLHeader[$n][$OE]['mr']; - $this->tMargin = $this->saveHTMLHeader[$n][$OE]['mh']; - $this->bMargin = $this->saveHTMLHeader[$n][$OE]['mf']; - $this->margin_header = $this->saveHTMLHeader[$n][$OE]['mh']; - $this->margin_footer = $this->saveHTMLHeader[$n][$OE]['mf']; - $this->w = $this->saveHTMLHeader[$n][$OE]['pw']; - $this->h = $this->saveHTMLHeader[$n][$OE]['ph']; - $rotate = $this->saveHTMLHeader[$n][$OE]['rotate']; - $this->Reset(); - $this->pageoutput[$n] = array(); - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->x = $this->lMargin; - $this->y = $this->margin_header; - - $html = str_replace('{PAGENO}',$this->pagenumPrefix.$this->docPageNum($n).$this->pagenumSuffix,$html); - $html = str_replace($this->aliasNbPgGp,$this->nbpgPrefix.$this->docPageNumTotal($n).$this->nbpgSuffix,$html ); // {nbpg} - $html = str_replace($this->aliasNbPg,$nb,$html ); // {nb} - $html = preg_replace('/\{DATE\s+(.*?)\}/e',"date('\\1')",$html ); - - $this->HTMLheaderPageLinks = array(); - $this->pageBackgrounds = array(); - - $this->writingHTMLheader = true; - $this->WriteHTML($html , 4); // parameter 4 saves output to $this->headerbuffer - $this->writingHTMLheader = false; - $this->Reset(); - $this->pageoutput[$n] = array(); - - $s = $this->PrintPageBackgrounds(); - $this->headerbuffer = $s . $this->headerbuffer; - - $os = ''; - if ($rotate) { - $os .= sprintf('q 0 -1 1 0 0 %.3f cm ',($this->w*$this->k)); - } - $os .= $this->headerbuffer ; - if ($rotate) { - $os .= ' Q' . "\n"; - } - - // Writes over the page background but behind any other output on page - $os = preg_replace('/\\\\/','\\\\\\\\',$os); // mPDF 4.3.012C - $this->pages[$n] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', "\n".$os."\n".'\\1', $this->pages[$n]); - - // mPDF 4.0 - $lks = $this->HTMLheaderPageLinks; - foreach($lks AS $lk) { - if ($rotate) { - $lw = $lk[2]; - $lh = $lk[3]; - $lk[2] = $lh; - $lk[3] = $lw; // swap width and height - $ax = $lk[0]/$this->k; - $ay = $lk[1]/$this->k; - $bx = $ay-($lh/$this->k); - $by = $this->w-$ax; - $lk[0] = $bx*$this->k; - $lk[1] = ($this->h-$by)*$this->k - $lw; - } - $this->PageLinks[$n][]=$lk; - } - - - } - if (isset($this->saveHTMLFooter[$n][$OE])) { - $html = $this->saveHTMLFooter[$this->page][$OE]['html']; - $this->lMargin = $this->saveHTMLFooter[$n][$OE]['ml']; - $this->rMargin = $this->saveHTMLFooter[$n][$OE]['mr']; - $this->tMargin = $this->saveHTMLFooter[$n][$OE]['mh']; - $this->bMargin = $this->saveHTMLFooter[$n][$OE]['mf']; - $this->margin_header = $this->saveHTMLFooter[$n][$OE]['mh']; - $this->margin_footer = $this->saveHTMLFooter[$n][$OE]['mf']; - $this->w = $this->saveHTMLFooter[$n][$OE]['pw']; - $this->h = $this->saveHTMLFooter[$n][$OE]['ph']; - $rotate = $this->saveHTMLFooter[$n][$OE]['rotate']; - $this->Reset(); - $this->pageoutput[$n] = array(); - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->x = $this->lMargin; - $top_y = $this->y = $this->h - $this->margin_footer; - - // if bottom-margin==0, corrects to avoid division by zero - if ($this->y == $this->h) { $top_y = $this->y = ($this->h - 0.1); } - - $html = str_replace('{PAGENO}',$this->pagenumPrefix.$this->docPageNum($n).$this->pagenumSuffix,$html); - $html = str_replace($this->aliasNbPgGp,$this->nbpgPrefix.$this->docPageNumTotal($n).$this->nbpgSuffix,$html ); // {nbpg} - $html = str_replace($this->aliasNbPg,$nb,$html ); // {nb} - $html = preg_replace('/\{DATE\s+(.*?)\}/e',"date('\\1')",$html ); - - - $this->HTMLheaderPageLinks = array(); - $this->pageBackgrounds = array(); - - $this->writingHTMLfooter = true; - $this->InFooter = true; - $this->WriteHTML($html , 4); // parameter 4 saves output to $this->headerbuffer - $this->writingHTMLfooter = false; - $this->InFooter = false; - $this->Reset(); - $this->pageoutput[$n] = array(); - - $fheight = $this->y - $top_y; - $adj = -$fheight; - - $s = $this->PrintPageBackgrounds(-$adj); // mPDF 4.2.014 - $this->headerbuffer = $s . $this->headerbuffer; - - $os = ''; - $os .= $this->StartTransform(true)."\n"; - if ($rotate) { - $os .= sprintf('q 0 -1 1 0 0 %.3f cm ',($this->w*$this->k)); - } - $os .= $this->transformTranslate(0, $adj, true)."\n"; - $os .= $this->headerbuffer ; - if ($rotate) { - $os .= ' Q' . "\n"; - } - $os .= $this->StopTransform(true)."\n"; - // Writes over the page background but behind any other output on page - $os = preg_replace('/\\\\/','\\\\\\\\',$os); // mPDF 4.3.012C - $this->pages[$n] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', "\n".$os."\n".'\\1', $this->pages[$n]); - - // mPDF 4.0 - $lks = $this->HTMLheaderPageLinks; - foreach($lks AS $lk) { - $lk[1] -= $adj*$this->k; - if ($rotate) { - $lw = $lk[2]; - $lh = $lk[3]; - $lk[2] = $lh; - $lk[3] = $lw; // swap width and height - - $ax = $lk[0]/$this->k; - $ay = $lk[1]/$this->k; - $bx = $ay-($lh/$this->k); - $by = $this->w-$ax; - $lk[0] = $bx*$this->k; - $lk[1] = ($this->h-$by)*$this->k - $lw; - } - $this->PageLinks[$n][]=$lk; - } - } - } - $this->page=$nb; - $this->state=1; -} -/*-- END HTMLHEADERS-FOOTERS --*/ - - -function _putpages() -{ - $nb=$this->page; - $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; - - // mPDF 4.2.024 Changed to 'def' - if($this->DefOrientation=='P') { - $defwPt=$this->fwPt; - $defhPt=$this->fhPt; - } - else { - $defwPt=$this->fhPt; - $defhPt=$this->fwPt; - } - $annotid=(3+2*$nb); - for($n=1;$n<=$nb;$n++) - { - // mPDF 4.2.024 - if(isset($this->OrientationChanges[$n])) { - $hPt=$this->pageDim[$n]['w']*$this->k; - $wPt=$this->pageDim[$n]['h']*$this->k; - } - else { - $wPt=$this->pageDim[$n]['w']*$this->k; - $hPt=$this->pageDim[$n]['h']*$this->k; - } - // mPDF 4.0 Moved - //Replace number of pages - if(!empty($this->aliasNbPg)) { - // mPDF 4.0 - if ($this->is_MB && !$this->useSubsets) { $s1 = $this->UTF8ToUTF16BE($this->aliasNbPg, false); } - else { $s1 = $this->aliasNbPg; } - if ($this->useSubsets) { - $r = ''; - $nstr = "$nb"; - for($i=0;$iis_MB) { $r = $this->UTF8ToUTF16BE($nb, false); } // *UNICODE-FONTS* - else { $r = $nb; } - if (preg_match_all('/{mpdfheadernbpg (C|R) ff=(\S*) fs=(\S*) fz=(.*?)}/',$this->pages[$n],$m)) { - for($hi=0;$hiSetFont($hff,$hfst,$hfsz, false); - $x1 = $this->GetStringWidth($this->aliasNbPg); - $x2 = $this->GetStringWidth($nb); - $xadj = $x1 - $x2; - if ($pos=='C') { $xadj /= 2; } - $rep = sprintf(' q 1 0 0 1 %.3f 0 cm ', $xadj*$this->k); - $this->pages[$n] = str_replace($m[0][$hi], $rep, $this->pages[$n]); - } - } - $this->pages[$n]=str_replace($s1,$r,$this->pages[$n]); - } - //Replace number of pages in group - if(!empty($this->aliasNbPgGp)) { - // mPDF 4.0 - if ($this->is_MB && !$this->useSubsets) { $s2 = $this->UTF8ToUTF16BE($this->aliasNbPgGp, false); } - else { $s2 = $this->aliasNbPgGp; } - $nbt = $this->docPageNumTotal($n); - if ($this->useSubsets) { - $r = ''; - $nstr = "$nbt"; - for($i=0;$iis_MB) { $r = $this->UTF8ToUTF16BE($nbt, false); } // *UNICODE-FONTS* - else { $r = $nbt; } - if (preg_match_all('/{mpdfheadernbpggp (C|R) ff=(\S*) fs=(\S*) fz=(.*?)}/',$this->pages[$n],$m)) { - for($hi=0;$hiSetFont($hff,$hfst,$hfsz, false); - $x1 = $this->GetStringWidth($this->aliasNbPgGp); - // mPDF 3.0 - $x2 = $this->GetStringWidth($nbt); - $xadj = $x1 - $x2; - if ($pos=='C') { $xadj /= 2; } - $rep = sprintf(' q 1 0 0 1 %.3f 0 cm ', $xadj*$this->k); - $this->pages[$n] = str_replace($m[0][$hi], $rep, $this->pages[$n]); - } - } - $this->pages[$n]=str_replace($s2,$r,$this->pages[$n]); - } - - // mPDF 3.0 Remove Pattern marker - $this->pages[$n] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', "\n", $this->pages[$n]); - - //Page - $this->_newobj(); - $this->_out('<_out('/Parent 1 0 R'); - if(isset($this->OrientationChanges[$n])) { - $this->_out(sprintf('/MediaBox [0 0 %.3f %.3f]',$hPt,$wPt)); - if (isset($this->OrientationChanges[$n]) && $this->displayDefaultOrientation) { - if ($this->DefOrientation=='P') { $this->_out('/Rotate 270'); } - else { $this->_out('/Rotate 90'); } - } - } - // mPDF 4.2.024 - else if($wPt != $defwPt || $hPt != $defhPt) { - $this->_out(sprintf('/MediaBox [0 0 %.3f %.3f]',$wPt,$hPt)); - } - $this->_out('/Resources 2 0 R'); - - $annotsnum = 0; - if (isset($this->PageLinks[$n])) { $annotsnum += count($this->PageLinks[$n]); } -/*-- ANNOTATIONS --*/ - // mPDF 4.2.027 - if (isset($this->PageAnnots[$n])) { - foreach ($this->PageAnnots[$n] as $pl) { - if (!empty($pl['opt']['popup'])) { $annotsnum += 2 ; } - else { $annotsnum++; } - } - } -/*-- END ANNOTATIONS --*/ - if ($annotsnum ) { - $s = '/Annots [ '; - for($i=0;$i<$annotsnum;$i++) { - $s .= ($annotid + $i) . ' 0 R '; - } - $annotid += $annotsnum; - $s .= '] '; - $this->_out($s); - } - - $this->_out('/Contents '.($this->n+1).' 0 R>>'); - $this->_out('endobj'); - - //Page content - $this->_newobj(); - $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; - $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); - $this->_putstream($p); - $this->_out('endobj'); - } - $this->_putannots($n); - - - //Pages root - $this->offsets[1]=strlen($this->buffer); - $this->_out('1 0 obj'); - $this->_out('<_out($kids.']'); - $this->_out('/Count '.$nb); - $this->_out(sprintf('/MediaBox [0 0 %.3f %.3f]',$defwPt,$defhPt)); // mPDF 4.2.024 - $this->_out('>>'); - $this->_out('endobj'); -} - - -function _putannots($n) { - $nb=$this->page; - for($n=1;$n<=$nb;$n++) - { - $annotobjs = array(); - if(isset($this->PageLinks[$n]) || isset($this->PageAnnots[$n])) { - $wPt=$this->pageDim[$n]['w']*$this->k; - $hPt=$this->pageDim[$n]['h']*$this->k; - - //Links - if(isset($this->PageLinks[$n])) { - foreach($this->PageLinks[$n] as $key => $pl) { - $this->_newobj(); - $annot=''; - $rect=sprintf('%.3f %.3f %.3f %.3f',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); - $annot .= '<_UTF16BEtextstring($pl[4]); - $annot .= ' /NM ('.sprintf('%04u-%04u', $n, $key).')'; - $annot .= ' /M '.$this->_textstring('D:'.date('YmdHis')); - $annot .= ' /Border [0 0 0]'; - // mPDF 4.2.018 - if ($this->PDFA) { $annot .= ' /F 28'; } - if (strpos($pl[4],'@')===0) { - $p=substr($pl[4],1); - // $h=isset($this->OrientationChanges[$p]) ? $wPt : $hPt; - $htarg=$this->pageDim[$p]['h']*$this->k; - $annot.=sprintf(' /Dest [%d 0 R /XYZ 0 %.3f null]>>',1+2*$p,$htarg); - } - else if(is_string($pl[4])) { - $annot .= ' /A <_textstring($pl[4]).'>> >>'; - } - else { - $l=$this->links[$pl[4]]; - // mPDF 3.0 - // may not be set if #link points to non-existent target - if (isset($this->pageDim[$l[0]]['h'])) { $htarg=$this->pageDim[$l[0]]['h']*$this->k; } - else { $htarg=$this->h*$this->k; } // doesn't really matter - $annot.=sprintf(' /Dest [%d 0 R /XYZ 0 %.3f null]>>',1+2*$l[0],$htarg-$l[1]*$this->k); - } - $this->_out($annot); - $this->_out('endobj'); - } - } - - -/*-- ANNOTATIONS --*/ - if(isset($this->PageAnnots[$n])) { - foreach ($this->PageAnnots[$n] as $key => $pl) { - $this->_newobj(); - $annot=''; - $pl['opt'] = array_change_key_case($pl['opt'], CASE_LOWER); - $x = $pl['x']; - if ($this->annotMargin <> 0 || $x==0 || $x<0) { // Odd page - $x = ($wPt/$this->k) - $this->annotMargin; - } - $w = $h = ($this->annotSize * $this->k); - $a = $x * $this->k; - // mPDF 3.0 - $b = $hPt - ($pl['y'] * $this->k); - $rect = sprintf('%.3f %.3f %.3f %.3f', $a, $b-$h, $a+$w, $b); - $annot .= '<_UTF16BEtextstring($pl['txt']); - $annot .= ' /NM ('.sprintf('%04u-%04u', $n, (2000 + $key)).')'; - $annot .= ' /M '.$this->_textstring('D:'.date('YmdHis')); - $annot .= ' /CreationDate '.$this->_textstring('D:'.date('YmdHis')); - $annot .= ' /Border [0 0 0]'; - // mPDF 4.2.018 - if ($this->PDFA) { - $annot .= ' /F 28'; - $annot .= ' /CA 1'; - } - else if ($pl['opt']['ca']>0) { $annot .= ' /CA '.$pl['opt']['ca']; } - - $annot .= ' /C ['; - if (isset($pl['opt']['c']) AND (is_array($pl['opt']['c']))) { - foreach ($pl['opt']['c'] as $col) { - $col = intval($col); - $color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255); - $annot .= sprintf(" %.4f", $color); - } - } - else { $annot .= '1 1 0'; } // mPDF 4.2.026 - $annot .= ']'; - // Usually Author - if (isset($pl['opt']['t']) AND is_string($pl['opt']['t'])) { - $annot .= ' /T '.$this->_UTF16BEtextstring($pl['opt']['t']); - } - if (isset($pl['opt']['subj'])) { - $annot .= ' /Subj '.$this->_UTF16BEtextstring($pl['opt']['subj']); - } - $iconsapp = array('Comment', 'Help', 'Insert', 'Key', 'NewParagraph', 'Note', 'Paragraph'); - if (isset($pl['opt']['icon']) AND in_array($pl['opt']['icon'], $iconsapp)) { - $annot .= ' /Name /'.$pl['opt']['icon']; - } - else { $annot .= ' /Name /Note'; } - // mPDF 4.2.027 - if (!empty($pl['opt']['popup'])) { - $annot .= ' /Open true'; - $annot .= ' /Popup '.($this->n+1).' 0 R'; // mPDF 4.2.027 - } - else { $annot .= ' /Open false'; } // mPDF 4.2.027 - $annot .= ' /P 3 0 R'; // mPDF 4.2.027 - $annot .= '>>'; - $this->_out($annot); - $this->_out('endobj'); - - // mPDF 4.2.027 - if (!empty($pl['opt']['popup'])) { - $this->_newobj(); - $annot=''; - if (is_array($pl['opt']['popup']) && isset($pl['opt']['popup'][0])) { $x = $pl['opt']['popup'][0] * $this->k; } - else { $x = $pl['x'] * $this->k; } - if (is_array($pl['opt']['popup']) && isset($pl['opt']['popup'][1])) { $y = $hPt - ($pl['opt']['popup'][1] * $this->k); } - else { $y = $hPt - ($pl['y'] * $this->k); } - if (is_array($pl['opt']['popup']) && isset($pl['opt']['popup'][2])) { $w = $pl['opt']['popup'][2] * $this->k; } - else { $w = 180; } - if (is_array($pl['opt']['popup']) && isset($pl['opt']['popup'][3])) { $h = $pl['opt']['popup'][3] * $this->k; } - else { $h = 120; } - $rect = sprintf('%.3f %.3f %.3f %.3f', $x, $y-$h, $x+$w, $y); - $annot .= '<_textstring('D:'.date('YmdHis')); - if ($this->PDFA) { $annot .= ' /F 28'; } - $annot .= ' /P 3 0 R'; - $annot .= ' /Parent '.($this->n-1).' 0 R'; - $annot .= '>>'; - $this->_out($annot); - $this->_out('endobj'); - } - } - } -/*-- END ANNOTATIONS --*/ - } - } -} - - - -/*-- ANNOTATIONS --*/ -function Annotation($text, $x=0, $y=0, $icon='Note', $author='', $subject='', $opacity=0, $colarray=array(255,255,0), $popup='') { // mPDF 4.2.027 - if ($x==0) { $x = $this->x; } - if ($y==0) { $y = $this->y; } - $page = $this->page; - if ($page < 1) { // Document has not been started - assume it's for first page - $page = 1; - if ($x==0) { $x = $this->lMargin; } - if ($y==0) { $y = $this->tMargin; } - } - // mPDF 4.2.018 - if ($this->PDFA) { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "Annotation markers cannot be semi-transparent in PDFA1-b, so they may make underlying text unreadable. (Annotation markers moved to right margin)"; } - $x = ($this->w) - $this->rMargin*0.66; - } - if (!$this->annotMargin) { $y -= $this->FontSize / 2; } - - if (!$opacity && $this->annotMargin) { $opacity = 1; } - else if (!$opacity) { $opacity = $this->annotOpacity; } - - if ($this->keep_block_together) { // Save to array - don't write yet - $this->ktAnnots[$this->page][]=array('txt' => $text, 'x' => $x, 'y' => $y, 'opt' => array('Icon'=>$icon, 'T'=>$author, 'Subj'=>$subject, 'C'=>$colarray, 'CA'=>$opacity, 'popup'=>$popup)); // mPDF 4.2.027 - return; - } - else if ($this->table_rotate) { - $this->tbrot_Annots[$this->page][]=array('txt' => $text, 'x' => $x, 'y' => $y, 'opt' => array('Icon'=>$icon, 'T'=>$author, 'Subj'=>$subject, 'C'=>$colarray, 'CA'=>$opacity, 'popup'=>$popup)); // mPDF 4.2.027 - return; - } - else if ($this->kwt) { - $this->kwt_Annots[$this->page][]=array('txt' => $text, 'x' => $x, 'y' => $y, 'opt' => array('Icon'=>$icon, 'T'=>$author, 'Subj'=>$subject, 'C'=>$colarray, 'CA'=>$opacity, 'popup'=>$popup)); // mPDF 4.2.027 - return; - } - //Put an Annotation on the page - $this->PageAnnots[$page][] = array('txt' => $text, 'x' => $x, 'y' => $y, 'opt' => array('Icon'=>$icon, 'T'=>$author, 'Subj'=>$subject, 'C'=>$colarray, 'CA'=>$opacity, 'popup'=>$popup)); // mPDF 4.2.027 -/*-- COLUMNS --*/ - // Save cross-reference to Column buffer - $ref = count($this->PageAnnots[$this->page])-1; - $this->columnAnnots[$this->CurrCol][INTVAL($this->x)][INTVAL($this->y)] = $ref; -/*-- END COLUMNS --*/ -} -/*-- END ANNOTATIONS --*/ - - - -function _putfonts() { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - $nf=$this->n; - /* mPDF 4.2 Not required in MB document/fonts - foreach($this->diffs as $diff) { - //Encodings - $this->_newobj(); - $this->_out('<>'); - $this->_out('endobj'); - } - */ - // mPDF 4.1 - $mqr=ini_get("magic_quotes_runtime"); - if ($mqr) { set_magic_quotes_runtime(0); } - foreach($this->FontFiles as $file=>$info) { - // mPDF 4.0 - if (!isset($info['type']) || $info['type']!='Type1subset') { - // mPDF 4.0 - $used = true; - foreach($this->fonts AS $f) { - if ($f['file'] == $file && $f['type']=='TrueTypeUnicode') { $used = $f['used']; } - } - if ($used) { - //Font file embedding - $this->_newobj(); - $this->FontFiles[$file]['n']=$this->n; - $font=''; - $f=fopen(MPDF_FONTPATH.$file,'rb',1); - if(!$f) { - $this->Error('Font file not found'); - } - while(!feof($f)) { - $font .= fread($f, 2048); - } - fclose($f); - $compressed=(substr($file,-2)=='.z'); - if(!$compressed && isset($info['length2'])) { - $header=($this->ords[substr($font,0,1)]==128); - if($header) { - //Strip first binary header - $font=substr($font,6); - } - if($header && $this->ords[substr($font,$info['length1'],1)]==128) { - //Strip second binary header - $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6); - } - } - $this->_out('<_out('/Filter /FlateDecode'); - } - $this->_out('/Length1 '.$info['length1']); - if(isset($info['length2'])) { - $this->_out('/Length2 '.$info['length2'].' /Length3 0'); - } - $this->_out('>>'); - $this->_putstream($font); - $this->_out('endobj'); - } - } - } - // mPDF 4.1 - if ($mqr) { set_magic_quotes_runtime($mqr); } - foreach($this->fonts as $k=>$font) { - //Font objects - $type=$font['type']; - $name=$font['name']; - if($type=='Type0') { - $this->fonts[$k]['n']=$this->n+1; - $this->_newobj(); - $this->_out('<_putType0($font); - } - else if($type=='core') { - //Standard font - // mPDF 4.2.018 - if ($this->PDFA) { $this->Error('Core fonts are not allowed in PDF/A1-b files (Times, Helvetica, Courier etc.)'); } - $this->fonts[$k]['n']=$this->n+1; - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$name); - $this->_out('/Subtype /Type1'); - if($name!='Symbol' && $name!='ZapfDingbats') { - $this->_out('/Encoding /WinAnsiEncoding'); - } - $this->_out('>>'); - $this->_out('endobj'); - } - // Only uses Type 1 when utf-8 encoded for embedded SUBSETS - else if ($type=='Type1subset') { - // mPDF 4.5.014 - if (!$font['used']) { continue; } - $ssfaid="A"; - if (!class_exists('t1asm')) { include(_MPDF_PATH .'classes/t1asm.php'); } - // Create Type1 file using t1asm - $asm = new t1asm(); - $asm->LoadFontFile(MPDF_FONTPATH.substr($font['file'],0,(strpos($font['file'],'.')))); - for($sfid=0;$sfidprogressBar) { $this->UpdateProgressBar(2,'+2','Font subsets'); } // *PROGRESS-BAR* - $this->fonts[$k]['n'][$sfid]=$this->n+1; // NB an array for subset - $subsetname = 'MPDFA'.$ssfaid.'+'.$name; - $ssfaid++; - $asm->DefineChars($font['subsets'][$sfid], $this->PDFA); // mPDF 4.2.018 - $fontstream = $asm->OutputPFB(''); - - ///$font'subsets'][0] = array(charpoint[0-255] => decimal char e.g. 193) - $widthstring = ''; - $toUnistring = ''; - foreach($font['subsets'][$sfid] AS $cp=>$u) { - if (isset($font['cw'][$u])) { - $widthstring .= $font['cw'][$u].' '; - } - else if ($cp <32) { - $widthstring .= '0'.' '; - } - else { - $widthstring .= $font['desc']['MissingWidth'].' '; - } - $toUnistring .= sprintf("<%02s> <%04s>\n", strtoupper(dechex($cp)), strtoupper(dechex($u))); - } - //Additional Type1 or TrueType font - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$subsetname); - $this->_out('/Subtype /Type1'); - $this->_out('/FirstChar 0 /LastChar '.(count($font['subsets'][$sfid])-1)); - $this->_out('/Widths '.($this->n+1).' 0 R'); - $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); - - // mPDF 4.0 - $this->_out('/Encoding '.($this->n + 3).' 0 R'); - $this->_out('/ToUnicode '.($this->n + 4).' 0 R'); - $this->_out('>>'); - $this->_out('endobj'); - - //Widths - $this->_newobj(); - $this->_out('['.$widthstring.']'); - $this->_out('endobj'); - //Descriptor - $this->_newobj(); - $s='<$v) { - $s.=' /'.$kd.' '.$v; - } - - // mPDF 4.2.018 CharSet for PDF/A - if ($this->PDFA) { - $s.=' /CharSet ('.$asm->pdfa_charset.')'; - } - - $s.=' /FontFile '.($this->n + 3).' 0 R'; - $this->_out($s.'>>'); - $this->_out('endobj'); - //Encodings - $this->_newobj(); - $this->_out('<pdf_diffstr .' ]>>'); - $this->_out('endobj'); - // mPDF 4.0 - // ToUnicode - // Uses the .map files to determine mapping of 7F-FF to Unicode characters - // Allows copying and pasting of PDF text to another editor - $toUni = "stream\n"; - $toUni .= "/CIDInit /ProcSet findresource begin\n"; - $toUni .= "12 dict begin\n"; - $toUni .= "begincmap\n"; - $toUni .= "/CIDSystemInfo\n"; - $toUni .= "<_newobj(); - $this->_out('<>'); - $this->_out($toUni); - - //Font file - $this->_newobj(); - $this->_out('<_out('/Filter /FlateDecode'); - $this->_out('/Length1 '.$asm->of_size1); - if(isset($asm->of_size2)) { - $this->_out('/Length2 '.$asm->of_size2.' /Length3 0'); - } - $this->_out('>>'); - $this->_putstream($fontstream); - $this->_out('endobj'); - } // foreach subset - unset($asm ); - } - else { - // mPDF 4.0 - if (!$font['used'] && $type=='TrueTypeUnicode') { continue; } - //Allow for additional types - $mtd='_put'.strtolower($type); - if(!method_exists($this, $mtd)) { - $this->Error('Unsupported font type: '.$type.' ('.$name.')'); - } - $this->fonts[$k]['n']=$this->n+1; - $this->$mtd($font); - } - } - } - else { -/*-- END UNICODE-FONTS --*/ - - $nf=$this->n; - foreach($this->diffs as $diff) - { - //Encodings - $this->_newobj(); - $this->_out('<>'); - $this->_out('endobj'); - } - // mPDF 4.1 - $mqr=ini_get("magic_quotes_runtime"); - if ($mqr) { set_magic_quotes_runtime(0); } - foreach($this->FontFiles as $file=>$info) - { - //Font file embedding - $this->_newobj(); - $this->FontFiles[$file]['n']=$this->n; - if(defined('MPDF_FONTPATH')) - $file=MPDF_FONTPATH.$file; - $size=filesize($file); - if(!$size) - $this->Error('Font file not found'); - $this->_out('<_out('/Filter /FlateDecode'); - $this->_out('/Length1 '.$info['length1']); - if(isset($info['length2'])) - $this->_out('/Length2 '.$info['length2'].' /Length3 0'); - $this->_out('>>'); - $f=fopen($file,'rb'); - $s = ''; - while (!feof($f)) { - $s .= fread($f, 2048); - } - - $this->_putstream($s); - fclose($f); - $this->_out('endobj'); - } - // mPDF 4.1 - if ($mqr) { set_magic_quotes_runtime($mqr); } - foreach($this->fonts as $k=>$font) - { - //Font objects - $this->fonts[$k]['n']=$this->n+1; - $type=$font['type']; - $name=$font['name']; - if($type=='core') - { - //Standard font - // mPDF 4.2.018 - if ($this->PDFA) { $this->Error('Core fonts are not allowed in PDF/A1-b files (Times, Helvetica, Courier etc.)'); } - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$name); - $this->_out('/Subtype /Type1'); - if($name!='Symbol' and $name!='ZapfDingbats') - $this->_out('/Encoding /WinAnsiEncoding'); - $this->_out('>>'); - $this->_out('endobj'); - } - elseif($type=='Type1' or $type=='TrueType') - { - //Additional Type1 or TrueType font - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$name); - $this->_out('/Subtype /'.$type); - $this->_out('/FirstChar 32 /LastChar 255'); - $this->_out('/Widths '.($this->n+1).' 0 R'); - $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); - - // mPDF 4.0 - $mapdata = false; - if($font['enc']) { - if(isset($font['diff'])) { - $this->_out('/Encoding '.($nf+$font['diff']).' 0 R'); - $mapdata = @file(_MPDF_PATH .'maps/'.$font['enc'].'.map'); - if ($mapdata) { - $this->_out('/ToUnicode '.($this->n + 3).' 0 R'); - } - } - else - $this->_out('/Encoding /WinAnsiEncoding'); - } - $this->_out('>>'); - $this->_out('endobj'); - //Widths - $this->_newobj(); - $cw=&$font['cw']; - $s='['; - for($i=32;$i<=255;$i++) - $s.=$cw[$this->chrs[$i]].' '; - $this->_out($s.']'); - $this->_out('endobj'); - //Descriptor - $this->_newobj(); - $s='<$v) - $s.=' /'.$k.' '.$v; - $file=$font['file']; - if($file) - $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R'; - $this->_out($s.'>>'); - $this->_out('endobj'); - - - // mPDF 4.0 - // ToUnicode - // Uses the .map files to determine mapping of 7F-FF to Unicode characters - // Allows copying and pasting of PDF text to another editor - if($mapdata) { - $toUni = "stream\n"; - $toUni .= "/CIDInit /ProcSet findresource begin\n"; - $toUni .= "12 dict begin\n"; - $toUni .= "begincmap\n"; - $toUni .= "/CIDSystemInfo\n"; - $toUni .= "< 127) { - $unip[$tp] = substr($ms, 6, 4); - } - } - $toUni .= count($unip)." beginbfchar\n"; - foreach($unip AS $cp=>$u) { - $toUni .= sprintf("<%02s> <%04s>\n", strtoupper(dechex($cp)), $u); - } - $toUni .= "endbfchar\n"; - $toUni .= "endcmap\n"; - $toUni .= "CMapName currentdict /CMap defineresource pop\n"; - $toUni .= "end\n"; - $toUni .= "end\n"; - $toUni .= "endstream\n"; - $toUni .= "endobj"; - $this->_newobj(); - $this->_out('<>'); - $this->_out($toUni); - } - } - else - { - //Allow for additional types including TrueTypeUnicode - $mtd='_put'.strtolower($type); - if(!method_exists($this,$mtd)) - $this->Error('Unsupported font type: '.$type.' ('.$name.')'); - $this->$mtd($font); - } - } - - - } // *UNICODE-FONTS* -} - - - -/*-- UNICODE-FONTS --*/ -// Unicode fonts -function _puttruetypeunicode($font) { - // Type0 Font - // A composite font - a font composed of other fonts, organized hierarchically - $this->_newobj(); - $this->_out('<_out('/Subtype /Type0'); - $this->_out('/BaseFont /'.$font['name'].''); - $this->_out('/Encoding /Identity-H'); //The horizontal identity mapping for 2-byte CIDs; may be used with CIDFonts using any Registry, Ordering, and Supplement values. - $this->_out('/DescendantFonts ['.($this->n + 1).' 0 R]'); - $this->_out('/ToUnicode '.($this->n + 2).' 0 R'); - $this->_out('>>'); - $this->_out('endobj'); - - // CIDFontType2 - // A CIDFont whose glyph descriptions are based on TrueType font technology - $this->_newobj(); - $this->_out('<_out('/Subtype /CIDFontType2'); - $this->_out('/BaseFont /'.$font['name'].''); - $this->_out('/CIDSystemInfo '.($this->n + 2).' 0 R'); - $this->_out('/FontDescriptor '.($this->n + 3).' 0 R'); - if (isset($font['desc']['MissingWidth'])){ - $this->_out('/DW '.$font['desc']['MissingWidth'].''); // The default width for glyphs in the CIDFont MissingWidth - } - $w = ""; - // mPDF 4.5.013 - $lastcid=-1; - $lastw=-1; - foreach ($font['cw'] as $cid => $width) { - if ($lastcid==-1) { - $w .= ''.$cid.' ['.$width; - } - else if ($cid==$lastcid+1) { - $w .= ' '.$width; - } - else { - $w .= '] '.$cid.' ['.$width; - } - $lastcid=$cid; - $lastw=$width; - } - $w .= '] '; - - $this->_out('/W ['.$w.']'); // A description of the widths for the glyphs in the CIDFont - - $this->_out('/CIDToGIDMap '.($this->n + 4).' 0 R'); - - $this->_out('>>'); - $this->_out('endobj'); - - // ToUnicode - // is a stream object that contains the definition of the CMap - // (PDF Reference 1.3 chap. 5.9) - $this->_newobj(); - $this->_out('<>'); - $this->_out('stream'); - $this->_out('/CIDInit /ProcSet findresource begin'); - $this->_out('12 dict begin'); - $this->_out('begincmap'); - $this->_out('/CIDSystemInfo'); - $this->_out('<_out('/Ordering (UCS)'); - $this->_out('/Supplement 0'); - $this->_out('>> def'); - $this->_out('/CMapName /Adobe-Identity-UCS def'); - $this->_out('/CMapType 2 def'); - $this->_out('1 begincodespacerange'); - $this->_out('<0000> '); - $this->_out('endcodespacerange'); - $this->_out('1 beginbfrange'); - $this->_out('<0000> <0000>'); - $this->_out('endbfrange'); - $this->_out('endcmap'); - $this->_out('CMapName currentdict /CMap defineresource pop'); - $this->_out('end'); - $this->_out('end'); - $this->_out('endstream'); - $this->_out('endobj'); - - // CIDSystemInfo dictionary - // A dictionary containing entries that define the character collection of the CIDFont. - $this->_newobj(); - $this->_out('<_out('/Ordering (UCS)'); // A string that uniquely names a character collection issued by a specific registry - $this->_out('/Supplement 0'); // The supplement number of the character collection. - $this->_out('>>'); - $this->_out('endobj'); - - // Font descriptor - // A font descriptor describing the CIDFont's default metrics other than its glyph widths - $this->_newobj(); - $this->_out('<_out('/FontName /'.$font['name']); - foreach ($font['desc'] as $key => $value) { - $this->_out('/'.$key.' '.$value); - } - if ($font['file']) { - // obj ID of a stream containing a TrueType font program - $this->_out('/FontFile2 '.$this->FontFiles[$font['file']]['n'].' 0 R'); - } - $this->_out('>>'); - $this->_out('endobj'); - - // Embed CIDToGIDMap - // A specification of the mapping from CIDs to glyph indices - $this->_newobj(); - $ctgfile = MPDF_FONTPATH.$font['ctg']; - if(!file_exists($ctgfile)) { - $this->Error('Font file not found: '.$ctgfile); - } - $size = filesize($ctgfile); - $this->_out('<_out('/Filter /FlateDecode'); - } - $this->_out('>>'); - $this->_putstream(file_get_contents($ctgfile)); - $this->_out('endobj'); - -} - - -function _putfontwidths($font, $cidoffset=0) { - ksort($font['cw']); - $rangeid = 0; - $range = array(); - $prevcid = -2; - $prevwidth = -1; - $interval = false; - // for each character - foreach ($font['cw'] as $cid => $width) { - $cid -= $cidoffset; - if (!isset($font['dw']) || (isset($font['dw']) && $width != $font['dw'])) { - if ($cid == ($prevcid + 1)) { - // consecutive CID - if ($width == $prevwidth) { - if ($width == $range[$rangeid][0]) { - $range[$rangeid][] = $width; - } else { - array_pop($range[$rangeid]); - // new range - $rangeid = $prevcid; - $range[$rangeid] = array(); - $range[$rangeid][] = $prevwidth; - $range[$rangeid][] = $width; - } - $interval = true; - $range[$rangeid]['interval'] = true; - } else { - if ($interval) { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - } else { - $range[$rangeid][] = $width; - } - $interval = false; - } - } else { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - $interval = false; - } - $prevcid = $cid; - $prevwidth = $width; - } - } - // optimize ranges - $prevk = -1; - $nextk = -1; - $prevint = false; - foreach ($range as $k => $ws) { - $cws = count($ws); - if (($k == $nextk) AND (!$prevint) AND ((!isset($ws['interval'])) OR ($cws < 4))) { - if (isset($range[$k]['interval'])) { - unset($range[$k]['interval']); - } - $range[$prevk] = array_merge($range[$prevk], $range[$k]); - unset($range[$k]); - } else { - $prevk = $k; - } - $nextk = $k + $cws; - if (isset($ws['interval'])) { - if ($cws > 3) { - $prevint = true; - } else { - $prevint = false; - } - unset($range[$k]['interval']); - --$nextk; - } else { - $prevint = false; - } - } - // output data - $w = ''; - foreach ($range as $k => $ws) { - if (count(array_count_values($ws)) == 1) { - // interval mode is more compact - $w .= ' '.$k.' '.($k + count($ws) - 1).' '.$ws[0]; - } else { - // range mode - $w .= ' '.$k.' [ '.implode(' ', $ws).' ]'; - } - } - $this->_out('/W ['.$w.' ]'); -} -/*-- END UNICODE-FONTS --*/ - - - -/*-- CJK --*/ -// from class PDF_Chinese CJK EXTENSIONS -function _putType0($font) -{ - //Type0 - $this->_out('/Subtype /Type0'); - $this->_out('/BaseFont /'.$font['name'].'-'.$font['CMap']); - $this->_out('/Encoding /'.$font['CMap']); - $this->_out('/DescendantFonts ['.($this->n+1).' 0 R]'); - $this->_out('>>'); - $this->_out('endobj'); - //CIDFont - $this->_newobj(); - $this->_out('<_out('/Subtype /CIDFontType0'); - $this->_out('/BaseFont /'.$font['name']); - - $cidinfo = '/Registry '.$this->_textstring('Adobe'); - $cidinfo .= ' /Ordering '.$this->_textstring($font['registry']['ordering']); - $cidinfo .= ' /Supplement '.$font['registry']['supplement']; - $this->_out('/CIDSystemInfo <<'.$cidinfo.'>>'); - - $this->_out('/FontDescriptor '.($this->n+1).' 0 R'); - if (isset($font['MissingWidth'])){ - $this->_out('/DW '.$font['MissingWidth'].''); - } - $this->_putfontwidths($font, 31); - $this->_out('>>'); - $this->_out('endobj'); - - //Font descriptor - $this->_newobj(); - $s = '< $v) { - if ($k != 'Style') { - $s .= ' /'.$k.' '.$v.''; - } - } - $this->_out($s.'>>'); - $this->_out('endobj'); -} -/*-- END CJK --*/ - - -function _putimages() -{ - $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; - reset($this->images); - while(list($file,$info)=each($this->images)) - { - $this->_newobj(); - $this->images[$file]['n']=$this->n; - $this->_out('<_out('/Subtype /Image'); - $this->_out('/Width '.$info['w']); - $this->_out('/Height '.$info['h']); - - // mPDF 4.0 - if (isset($info['masked'])) { - $this->_out('/SMask '.($this->n - 1).' 0 R'); - } - - if($info['cs']=='Indexed') - $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); - else - { - $this->_out('/ColorSpace /'.$info['cs']); - if($info['cs']=='DeviceCMYK') { - // mPDF 4.2.018 - if ($this->PDFA) { $this->Error("PDFA1-b does not permit Images using DeviceCMYK colour space (".$file.")."); } - $this->_out('/Decode [1 0 1 0 1 0 1 0]'); - } - } - $this->_out('/BitsPerComponent '.$info['bpc']); - // mPDF 4.0 - if (isset($info['f']) && $info['f']) { $this->_out('/Filter /'.$info['f']); } - if(isset($info['parms'])) { $this->_out($info['parms']); } - if(isset($info['trns']) and is_array($info['trns'])) - { - $trns=''; - for($i=0;$i_out('/Mask ['.$trns.']'); - } - $this->_out('/Length '.strlen($info['data']).'>>'); - $this->_putstream($info['data']); - unset($this->images[$file]['data']); - $this->_out('endobj'); - //Palette - if($info['cs']=='Indexed') - { - $this->_newobj(); - $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal']; - $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); - $this->_putstream($pal); - $this->_out('endobj'); - } - } -} - -function _putinfo() -{ - $this->_out('/Producer '.$this->_UTF16BEtextstring('mPDF '.mPDF_VERSION)); - if(!empty($this->title)) - $this->_out('/Title '.$this->_UTF16BEtextstring($this->title)); - if(!empty($this->subject)) - $this->_out('/Subject '.$this->_UTF16BEtextstring($this->subject)); - if(!empty($this->author)) - $this->_out('/Author '.$this->_UTF16BEtextstring($this->author)); - if(!empty($this->keywords)) - $this->_out('/Keywords '.$this->_UTF16BEtextstring($this->keywords)); - if(!empty($this->creator)) - $this->_out('/Creator '.$this->_UTF16BEtextstring($this->creator)); - // mPDF 4.2.018 - $z = date('O'); // +0200 - $offset = substr($z,0,3)."'".substr($z,3,2)."'"; - $this->_out('/CreationDate '.$this->_textstring(date('YmdHis').$offset)); - $this->_out('/ModDate '.$this->_textstring(date('YmdHis').$offset)); -} - -// mPDF 4.2.018 -function _putmetadata() { - $this->_newobj(); - $this->MetadataRoot = $this->n; - $Producer = 'mPDF '.mPDF_VERSION; - $z = date('O'); // +0200 - $offset = substr($z,0,3).':'.substr($z,3,2); - $CreationDate = date('Y-m-d\TH:i:s').$offset; // 2006-03-10T10:47:26-05:00 2006-06-19T09:05:17Z - $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', mt_rand(0, 0xffff), mt_rand(0, 0xffff), - mt_rand(0, 0xffff), mt_rand(0, 0x0fff) | 0x4000, mt_rand(0, 0x3fff) | 0x8000, - mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); - - - $m = ''."\n"; // begin = FEFF BOM - $m .= ' '."\n"; - $m .= ' '."\n"; - $m .= ' '."\n"; - $m .= ' '.$Producer.''."\n"; - if(!empty($this->keywords)) { - $m .= ' '.$this->keywords.''."\n"; - } - $m .= ' '."\n"; - $m .= ' '."\n"; - $m .= ' '.$CreationDate.''."\n"; - $m .= ' '.$CreationDate.''."\n"; - $m .= ' '.$CreationDate.''."\n"; - - if(!empty($this->creator)) { - $m .= ' '.$this->creator.''."\n"; - } - - - $m .= ' '."\n"; - $m .= ' '."\n"; - $m .= ' application/pdf'."\n"; - if(!empty($this->title)) { - $m .= ' - - '.$this->title.' - - '."\n"; - } - if(!empty($this->keywords)) { - $m .= ' - - '.$this->keywords.' - - '."\n"; - } - if(!empty($this->subject)) { - $m .= ' - - '.$this->subject.' - - '."\n"; - } - if(!empty($this->author)) { - $m .= ' - - '.$this->author.' - - '."\n"; - } - $m .= ' '."\n"; - -// This bit is specific to PDFA-1b - $m .= ' '."\n"; - $m .= ' 1'."\n"; - $m .= ' B'."\n"; - $m .= ' 2005'."\n"; - $m .= ' '."\n"; - - $m .= ' '."\n"; - $m .= ' uuid:'.$uuid.''."\n"; - $m .= ' '."\n"; - $m .= ' '."\n"; - $m .= ' '."\n"; - $m .= str_repeat(str_repeat(' ',100)."\n",20); // 2-4kB whitespace padding required - $m .= ''; // "r" read only - $this->_out('<>'); - $this->_putstream($m); - $this->_out('endobj'); -} - -// mPDF 4.2.018 -function _putoutputintent() { - $this->_newobj(); - $this->OutputIntentRoot = $this->n; - if ($this->compress) { $s = gzcompress($s); } - $this->_out('<ICCProfile) - $this->_out('/Info ('.$this->ICCProfile.')'); - else - $this->_out('/Info (sRGB)'); - $this->_out('/S /GTS_PDFA1'); - $this->_out('/OutputConditionIdentifier (Custom)'); - $this->_out('/OutputCondition ()'); - $this->_out('/DestOutputProfile '.($this->n+1).' 0 R >>'); - $this->_out('endobj'); - - $this->_newobj(); - if ($this->ICCProfile) - $s = file_get_contents(_MPDF_PATH.'iccprofiles/'.$this->ICCProfile.'.icc'); - else - $s = file_get_contents(_MPDF_PATH.'iccprofiles/sRGB_IEC61966-2-1.icc'); - if ($this->compress) { $s = gzcompress($s); } - $this->_out('<compress) - $this->_out('/Filter /FlateDecode '); - $this->_out('/Length '.strlen($s).'>>'); - $this->_putstream($s); - $this->_out('endobj'); -} - - -function _putcatalog() { - $this->_out('/Type /Catalog'); - $this->_out('/Pages 1 0 R'); - if($this->ZoomMode=='fullpage') $this->_out('/OpenAction [3 0 R /Fit]'); - elseif($this->ZoomMode=='fullwidth') $this->_out('/OpenAction [3 0 R /FitH null]'); - elseif($this->ZoomMode=='real') $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); - elseif(!is_string($this->ZoomMode)) $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']'); - else $this->_out('/OpenAction [3 0 R /XYZ null null null]'); // mPDF 4.3.007F - if($this->LayoutMode=='single') $this->_out('/PageLayout /SinglePage'); - elseif($this->LayoutMode=='continuous') $this->_out('/PageLayout /OneColumn'); - elseif($this->LayoutMode=='two') { - if ($this->mirrorMargins) { $this->_out('/PageLayout /TwoColumnRight'); } - else { $this->_out('/PageLayout /TwoColumnLeft'); } - } -/*-- BOOKMARKS --*/ - if(count($this->BMoutlines)>0) { - $this->_out('/Outlines '.$this->OutlineRoot.' 0 R'); - $this->_out('/PageMode /UseOutlines'); - } -/*-- END BOOKMARKS --*/ - if(is_int(strpos($this->DisplayPreferences,'FullScreen'))) $this->_out('/PageMode /FullScreen'); - - // mPDF 4.2.018 - Metadata - if ($this->PDFA) { - $this->_out('/Metadata '.$this->MetadataRoot.' 0 R'); - } - // mPDF 4.2.018 - OutputIntents - if ($this->PDFA || $this->ICCProfile) { - $this->_out('/OutputIntents ['.$this->OutputIntentRoot.' 0 R]'); - } - - if($this->DisplayPreferences || $this->directionality == 'rtl' || $this->mirrorMargins) { - $this->_out('/ViewerPreferences<<'); - if(is_int(strpos($this->DisplayPreferences,'HideMenubar'))) $this->_out('/HideMenubar true'); - if(is_int(strpos($this->DisplayPreferences,'HideToolbar'))) $this->_out('/HideToolbar true'); - if(is_int(strpos($this->DisplayPreferences,'HideWindowUI'))) $this->_out('/HideWindowUI true'); - if(is_int(strpos($this->DisplayPreferences,'DisplayDocTitle'))) $this->_out('/DisplayDocTitle true'); - if(is_int(strpos($this->DisplayPreferences,'CenterWindow'))) $this->_out('/CenterWindow true'); - if(is_int(strpos($this->DisplayPreferences,'FitWindow'))) $this->_out('/FitWindow true'); - if($this->directionality == 'rtl') $this->_out('/Direction /R2L'); - // mPDF 4.0 - if($this->mirrorMargins) { - // if ($this->DefOrientation=='P') $this->_out('/Duplex /DuplexFlipShortEdge'); - $this->_out('/Duplex /DuplexFlipLongEdge'); // PDF v1.7+ - } - $this->_out('>>'); - } -} - -// Inactive function left for backwards compatability -function SetUserRights($enable=true, $annots="", $form="", $signature="") { - // Does nothing -} - -function _enddoc() { - if ($this->progressBar) { $this->UpdateProgressBar(2,'+10','Writing Headers & Footers'); } // *PROGRESS-BAR* - $this->_puthtmlheaders(); // *HTMLHEADERS-FOOTERS* - if ($this->progressBar) { $this->UpdateProgressBar(2,'+10','Writing Pages'); } // *PROGRESS-BAR* - // mPDF 4.5.014 - // Remove references to unused fonts (usually default font) - foreach($this->fonts as $fk=>$font) { - if (!$font['used'] && ($font['type']=='TrueTypeUnicode' || $font['type']=='Type1subset')) { - if ($font['type']=='Type1subset') { - foreach($font['subsetfontids'] AS $k => $fid) { - foreach($this->pages AS $pn=>$page) { - $this->pages[$pn] = preg_replace('/\s\/F'.$fid.' \d[\d.]* Tf\s/is',' ',$this->pages[$pn]); - } - } - } - else { - foreach($this->pages AS $pn=>$page) { - $this->pages[$pn] = preg_replace('/\s\/F'.$font['i'].' \d[\d.]* Tf\s/is',' ',$this->pages[$pn]); - } - } - } - } - - $this->_putpages(); - if ($this->progressBar) { $this->UpdateProgressBar(2,'+10','Writing document resources'); } // *PROGRESS-BAR* - $this->_putresources(); - //Info - $this->_newobj(); - $this->InfoRoot = $this->n; - $this->_out('<<'); - if ($this->progressBar) { $this->UpdateProgressBar(2,'+10','Writing document info'); } // *PROGRESS-BAR* - $this->_putinfo(); - $this->_out('>>'); - $this->_out('endobj'); - // mPDF 4.2.018 - // METADATA - if ($this->PDFA) { $this->_putmetadata(); } - // OUTPUTINTENT - if ($this->PDFA || $this->ICCProfile) { $this->_putoutputintent(); } - - //Catalog - $this->_newobj(); - $this->_out('<<'); - if ($this->progressBar) { $this->UpdateProgressBar(2,'+10','Writing document catalog'); } // *PROGRESS-BAR* - $this->_putcatalog(); - $this->_out('>>'); - $this->_out('endobj'); - //Cross-ref - $o=strlen($this->buffer); - $this->_out('xref'); - $this->_out('0 '.($this->n+1)); - $this->_out('0000000000 65535 f '); - for($i=1; $i <= $this->n ; $i++) - $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); - //Trailer - $this->_out('trailer'); - $this->_out('<<'); - $this->_puttrailer(); - $this->_out('>>'); - $this->_out('startxref'); - $this->_out($o); - // mPDF 4.2.010 - $this->buffer .= '%%EOF'; - $this->state=3; -/*-- IMPORTS --*/ - // mPDF 4.2.006 - if ($this->enableImports && count($this->parsers) > 0) { - foreach ($this->parsers as $k => $_){ - $this->parsers[$k]->closeFile(); - $this->parsers[$k] = null; - unset($this->parsers[$k]); - } - } -/*-- END IMPORTS --*/ -} - -// mPDF 4.2 pagesel, $newformat [4.2.024] -function _beginpage($orientation,$mgl='',$mgr='',$mgt='',$mgb='',$mgh='',$mgf='',$ohname='',$ehname='',$ofname='',$efname='',$ohvalue=0,$ehvalue=0,$ofvalue=0,$efvalue=0,$pagesel='',$newformat='') { - $this->page++; - $this->pages[$this->page]=''; - $this->state=2; - $resetHTMLHeadersrequired = false; - - // mPDF 4.2.024 - if ($newformat) { $this->_setPageSize($newformat, $orientation); } -/*-- CSS-PAGE --*/ - // Paged media (page-box) - // mPDF 4.2 - if ($pagesel || (isset($this->page_box['using']) && $this->page_box['using'])) { - if ($pagesel || $this->page==1) { $first = true; } - else { $first = false; } - if ($this->mirrorMargins && ($this->page % 2==0)) { $oddEven = 'E'; } - else { $oddEven = 'O'; } - if ($pagesel) { $psel = $pagesel; } - else if ($this->page_box['current']) { $psel = $this->page_box['current']; } - else { $psel = ''; } - list($orientation,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$hname,$fname,$bg,$resetpagenum,$pagenumstyle,$suppress,$marks,$newformat) = $this->SetPagedMediaCSS($psel, $first, $oddEven); - - if ($this->mirrorMargins && ($this->page % 2==0)) { - if ($hname) { $ehvalue = 1; $ehname = $hname; } else { $ehvalue = -1; } - if ($fname) { $efvalue = 1; $efname = $fname; } else { $efvalue = -1; } - } - else { - if ($hname) { $ohvalue = 1; $ohname = $hname; } else { $ohvalue = -1; } - if ($fname) { $ofvalue = 1; $ofname = $fname; } else { $ofvalue = -1; } - } - if ($resetpagenum || $pagenumstyle || $suppress) { - $this->PageNumSubstitutions[] = array('from'=>($this->page), 'reset'=> $resetpagenum, 'type'=>$pagenumstyle, 'suppress'=>$suppress); - } - // PAGED MEDIA - CROP / CROSS MARKS from @PAGE - $this->show_marks = $marks; - - // Background color - if (isset($bg['BACKGROUND-COLOR'])) { - $cor = $this->ConvertColor($bg['BACKGROUND-COLOR']); - if ($cor) { - $this->bodyBackgroundColor = $cor; - } - } - else { $this->bodyBackgroundColor = false; } // mPDF 4.2 - -/*-- GRADIENTS --*/ - if (isset($bg['BACKGROUND-GRADIENT'])) { - $this->bodyBackgroundGradient = $bg['BACKGROUND-GRADIENT']; - } - else { $this->bodyBackgroundGradient = false; } // mPDF 4.2 -/*-- END GRADIENTS --*/ -/*-- BACKGROUND-IMAGES --*/ - // Tiling Patterns - if (isset($bg['BACKGROUND-IMAGE']) && $bg['BACKGROUND-IMAGE']) { // mPDF 4.3.011 - $file = $bg['BACKGROUND-IMAGE']; - $sizesarray = $this->Image($file,0,0,0,0,'','',false, false, false, false, false); // mPDF 4.3.032 - if (isset($sizesarray['IMAGE_ID'])) { - $image_id = $sizesarray['IMAGE_ID']; - $orig_w = $sizesarray['WIDTH']*$this->k; // in user units i.e. mm - $orig_h = $sizesarray['HEIGHT']*$this->k; // (using $this->img_dpi) - $x_repeat = true; - $y_repeat = true; - if ($bg['BACKGROUND-REPEAT']=='no-repeat' || $bg['BACKGROUND-REPEAT']=='repeat-x') { $y_repeat = false; } - if ($bg['BACKGROUND-REPEAT']=='no-repeat' || $bg['BACKGROUND-REPEAT']=='repeat-y') { $x_repeat = false; } - $x_pos = 0; - $y_pos = 0; - if ($bg['BACKGROUND-POSITION']) { - $ppos = preg_split('/\s+/',$bg['BACKGROUND-POSITION']); - $x_pos = $ppos[0]; - $y_pos = $ppos[1]; - if (!stristr($x_pos ,'%') ) { $x_pos = $this->ConvertSize($x_pos ,$this->pgwidth,$this->FontSize); } - if (!stristr($y_pos ,'%') ) { $y_pos = $this->ConvertSize($y_pos ,$this->pgwidth,$this->FontSize); } - } - // mPDF 4.3.015 - if (isset($bg['BACKGROUND-IMAGE-RESIZE'])) { $resize = $bg['BACKGROUND-IMAGE-RESIZE']; } - else { $resize = 0; } - // mPDF 4.3.017 - if (isset($bg['BACKGROUND-IMAGE-OPACITY'])) { $opacity = $bg['BACKGROUND-IMAGE-OPACITY']; } - else { $opacity = 1; } - $this->bodyBackgroundImage = array('image_id'=>$image_id, 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$x_pos, 'y_pos'=>$y_pos, 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat, 'resize'=>$resize, 'opacity'=>$opacity); // mPDF 4.3.015 4.3.017 - // $this->bodyBackgroundGradient = false; // mPDF 4.2 - } - } - else { $this->bodyBackgroundImage = false; } // mPDF 4.2 -/*-- END BACKGROUND-IMAGES --*/ - - $this->page_box['current'] = $psel; - $this->page_box['using'] = true; - } -/*-- END CSS-PAGE --*/ - - //Page orientation - if(!$orientation) - $orientation=$this->DefOrientation; - else { - $orientation=strtoupper(substr($orientation,0,1)); - if($orientation!=$this->DefOrientation) - $this->OrientationChanges[$this->page]=true; - } - if($orientation!=$this->CurOrientation || $newformat) { // mPDF 4.2.024 - - //Change orientation - if($orientation=='P') { - $this->wPt=$this->fwPt; - $this->hPt=$this->fhPt; - $this->w=$this->fw; - $this->h=$this->fh; - if (($this->forcePortraitHeaders || $this->forcePortraitMargins) && $this->DefOrientation=='P') { - $this->tMargin = $this->orig_tMargin; - $this->bMargin = $this->orig_bMargin; - $this->DeflMargin = $this->orig_lMargin; - $this->DefrMargin = $this->orig_rMargin; - $this->margin_header = $this->orig_hMargin; - $this->margin_footer = $this->orig_fMargin; - } - else { $resetHTMLHeadersrequired = true; } // *HTMLHEADERS-FOOTERS* - } - else { - $this->wPt=$this->fhPt; - $this->hPt=$this->fwPt; - $this->w=$this->fh; - $this->h=$this->fw; - if (($this->forcePortraitHeaders || $this->forcePortraitMargins) && $this->DefOrientation=='P') { - $this->tMargin = $this->orig_lMargin; - $this->bMargin = $this->orig_rMargin; - $this->DeflMargin = $this->orig_bMargin; - $this->DefrMargin = $this->orig_tMargin; - $this->margin_header = $this->orig_hMargin; - $this->margin_footer = $this->orig_fMargin; - } - else { $resetHTMLHeadersrequired = true; } // *HTMLHEADERS-FOOTERS* - - } - $this->CurOrientation=$orientation; - $this->ResetMargins(); - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->PageBreakTrigger=$this->h-$this->bMargin; - } - - $this->pageDim[$this->page]['w']=$this->w ; - $this->pageDim[$this->page]['h']=$this->h ; - // If Page Margins are re-defined - // strlen()>0 is used to pick up (integer) 0, (string) '0', or set value - if ((strlen($mgl)>0 && $this->DeflMargin != $mgl) || (strlen($mgr)>0 && $this->DefrMargin != $mgr) || (strlen($mgt)>0 && $this->tMargin != $mgt) || (strlen($mgb)>0 && $this->bMargin != $mgb) || (strlen($mgh)>0 && $this->margin_header!=$mgh) || (strlen($mgf)>0 && $this->margin_footer!=$mgf)) { - if (strlen($mgl)>0) $this->DeflMargin = $mgl; - if (strlen($mgr)>0) $this->DefrMargin = $mgr; - if (strlen($mgt)>0) $this->tMargin = $mgt; - if (strlen($mgb)>0) $this->bMargin = $mgb; - if (strlen($mgh)>0) $this->margin_header=$mgh; - if (strlen($mgf)>0) $this->margin_footer=$mgf; - $this->ResetMargins(); - $this->SetAutoPageBreak($this->autoPageBreak,$this->bMargin); - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $resetHTMLHeadersrequired = true; // *HTMLHEADERS-FOOTERS* - } - - // mPDF 4.2 Moved page-box stuff - // Moved in v1.4 to allow for changes in page orientation (Sets lMargin, rMargin, MarginCorrection) - $this->ResetMargins(); - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; // mPDF 4.3.007C - $this->SetAutoPageBreak($this->autoPageBreak,$this->bMargin); - - // Reset column top margin - $this->y0 = $this->tMargin; - - $this->x=$this->lMargin; - $this->y=$this->tMargin; - $this->FontFamily=''; - - - // HEADERS AND FOOTERS - if ($ohvalue<0 || strtoupper($ohvalue)=='OFF') { - $this->HTMLHeader = ''; - $this->headerDetails['odd'] = array(); - $resetHTMLHeadersrequired = true; // *HTMLHEADERS-FOOTERS* - } - else if ($ohname && $ohvalue>0) { -/*-- HTMLHEADERS-FOOTERS --*/ - if (preg_match('/^html_(.*)$/i',$ohname,$n)) { - if (isset($this->pageHTMLheaders[$n[1]])) { $this->HTMLHeader = $this->pageHTMLheaders[$n[1]]; } - else { $this->HTMLHeader = ''; } - $this->headerDetails['odd'] = array(); - $resetHTMLHeadersrequired = true; - } - else { -/*-- END HTMLHEADERS-FOOTERS --*/ - if (isset($this->pageheaders[$ohname])) { $this->headerDetails['odd'] = $this->pageheaders[$ohname]; } - else { $this->headerDetails['odd'] = array(); } - $this->HTMLHeader = ''; -/*-- HTMLHEADERS-FOOTERS --*/ - $resetHTMLHeadersrequired = false; - } -/*-- END HTMLHEADERS-FOOTERS --*/ - } - - if ($ehvalue<0 || strtoupper($ehvalue)=='OFF') { - $this->HTMLHeaderE = ''; - $this->headerDetails['even'] = array(); - $resetHTMLHeadersrequired = true; // *HTMLHEADERS-FOOTERS* - } - else if ($ehname && $ehvalue>0) { -/*-- HTMLHEADERS-FOOTERS --*/ - if (preg_match('/^html_(.*)$/i',$ehname,$n)) { - if (isset($this->pageHTMLheaders[$n[1]])) { $this->HTMLHeaderE = $this->pageHTMLheaders[$n[1]]; } - else { $this->HTMLHeaderE = ''; } - $this->headerDetails['even'] = array(); - $resetHTMLHeadersrequired = true; - } - else { -/*-- END HTMLHEADERS-FOOTERS --*/ - if (isset($this->pageheaders[$ehname])) { $this->headerDetails['even'] = $this->pageheaders[$ehname]; } - else { $this->headerDetails['even'] = array(); } - $this->HTMLHeaderE = ''; -/*-- HTMLHEADERS-FOOTERS --*/ - $resetHTMLHeadersrequired = false; - } -/*-- END HTMLHEADERS-FOOTERS --*/ - } - - if ($ofvalue<0 || strtoupper($ofvalue)=='OFF') { - $this->HTMLFooter = ''; - $this->footerDetails['odd'] = array(); - $resetHTMLHeadersrequired = true; // *HTMLHEADERS-FOOTERS* - } - else if ($ofname && $ofvalue>0) { -/*-- HTMLHEADERS-FOOTERS --*/ - if (preg_match('/^html_(.*)$/i',$ofname,$n)) { - if (isset($this->pageHTMLfooters[$n[1]])) { $this->HTMLFooter = $this->pageHTMLfooters[$n[1]]; } - else { $this->HTMLFooter = ''; } - $this->footerDetails['odd'] = array(); - $resetHTMLHeadersrequired = true; - } - else { -/*-- END HTMLHEADERS-FOOTERS --*/ - if (isset($this->pagefooters[$ofname])) { $this->footerDetails['odd'] = $this->pagefooters[$ofname]; } - else { $this->footerDetails['odd'] = array(); } - $this->HTMLFooter = ''; -/*-- HTMLHEADERS-FOOTERS --*/ - $resetHTMLHeadersrequired = true; - } -/*-- END HTMLHEADERS-FOOTERS --*/ - } - - if ($efvalue<0 || strtoupper($efvalue)=='OFF') { - $this->HTMLFooterE = ''; - $this->footerDetails['even'] = array(); - $resetHTMLHeadersrequired = true; // *HTMLHEADERS-FOOTERS* - } - else if ($efname && $efvalue>0) { -/*-- HTMLHEADERS-FOOTERS --*/ - if (preg_match('/^html_(.*)$/i',$efname,$n)) { - if (isset($this->pageHTMLfooters[$n[1]])) { $this->HTMLFooterE = $this->pageHTMLfooters[$n[1]]; } - else { $this->HTMLFooterE = ''; } - $this->footerDetails['even'] = array(); - $resetHTMLHeadersrequired = true; - } - else { -/*-- END HTMLHEADERS-FOOTERS --*/ - if (isset($this->pagefooters[$efname])) { $this->footerDetails['even'] = $this->pagefooters[$efname]; } - else { $this->footerDetails['even'] = array(); } - $this->HTMLFooterE = ''; -/*-- HTMLHEADERS-FOOTERS --*/ - $resetHTMLHeadersrequired = true; - } -/*-- END HTMLHEADERS-FOOTERS --*/ - } - -/*-- HTMLHEADERS-FOOTERS --*/ - if ($resetHTMLHeadersrequired) { - $this->SetHTMLHeader($this->HTMLHeader ); - $this->SetHTMLHeader($this->HTMLHeaderE ,'E'); - $this->SetHTMLFooter($this->HTMLFooter ); - $this->SetHTMLFooter($this->HTMLFooterE ,'E'); - } -/*-- END HTMLHEADERS-FOOTERS --*/ - - // mPDF 4.0 - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $this->_setAutoHeaderHeight($this->headerDetails['even'], $this->HTMLHeaderE); - $this->_setAutoFooterHeight($this->footerDetails['even'], $this->HTMLFooterE); - } - else { // ODD or DEFAULT - $this->_setAutoHeaderHeight($this->headerDetails['odd'], $this->HTMLHeader); - $this->_setAutoFooterHeight($this->footerDetails['odd'], $this->HTMLFooter); - } - // Reset column top margin - $this->y0 = $this->tMargin; - - $this->x=$this->lMargin; - $this->y=$this->tMargin; -} - - -// mPDF 4.0 -function _setAutoHeaderHeight(&$det, &$htmlh) { - if ($this->setAutoTopMargin=='pad') { - if ($htmlh['h']) { $h = $htmlh['h']; } - else if ($det) { $h = $this->_getHFHeight($det,'H'); } - else { $h = 0; } - $this->tMargin = $this->margin_header + $h + $this->orig_tMargin; - } - else if ($this->setAutoTopMargin=='stretch') { - if ($htmlh['h']) { $h = $htmlh['h']; } - else if ($det) { $h = $this->_getHFHeight($det,'H'); } - else { $h = 0; } - $this->tMargin = max($this->orig_tMargin, $this->margin_header + $h + $this->autoMarginPadding); - } -} - -// mPDF 4.0 -function _setAutoFooterHeight(&$det, &$htmlf) { - if ($this->setAutoBottomMargin=='pad') { - if ($htmlf['h']) { $h = $htmlf['h']; } - else if ($det) { $h = $this->_getHFHeight($det,'F'); } - else { $h = 0; } - $this->bMargin = $this->margin_footer + $h + $this->orig_bMargin; - $this->PageBreakTrigger=$this->h-$this->bMargin ; - } - else if ($this->setAutoBottomMargin=='stretch') { - if ($htmlf['h']) { $h = $htmlf['h']; } - else if ($det) { $h = $this->_getHFHeight($det,'F'); } - else { $h = 0; } - $this->bMargin = max($this->orig_bMargin, $this->margin_footer + $h + $this->autoMarginPadding); - $this->PageBreakTrigger=$this->h-$this->bMargin ; - } -} -// mPDF 4.0 -function _getHFHeight(&$det,$end) { - $h = 0; - if(count($det)) { - foreach(array('L','C','R') AS $pos) { - if (isset($det[$pos]['content']) && $det[$pos]['content']) { - if (isset($det[$pos]['font-size']) && $det[$pos]['font-size']) { $hfsz = $det[$pos]['font-size']; } - else { $hfsz = $this->default_font_size; } - $h = max($h,$hfsz/$this->k); - } - } - if ($det['line'] && $end=='H') { $h += $h/$this->k*$this->header_line_spacing; } - else if ($det['line'] && $end=='F') { $h += $h/$this->k*$this->footer_line_spacing; } - } - return $h; -} - - -function _endpage() { -/*-- CSS-IMAGE-FLOAT --*/ - $this->printfloatbuffer(); -/*-- END CSS-IMAGE-FLOAT --*/ - - //End of page contents - $this->state=1; -} - -// mPDF 4.2.006 -function _newobj($obj_id=false,$onlynewobj=false) { - if (!$obj_id) { - $obj_id = ++$this->n; - } - //Begin a new object - if (!$onlynewobj) { - $this->offsets[$obj_id] = strlen($this->buffer); - $this->_out($obj_id.' 0 obj'); - $this->_current_obj_id = $obj_id; // for later use with encryption - } -} - -function _dounderline($x,$y,$txt) { - // mPDF 4.0 changed to line instead of rectangle - // Now print line exactly where $y secifies - called from Text() and Cell() - adjust position there - // WORD SPACING - // Modified by Ivan Tcholakov, 28-JAN-2010. - // $w =($this->GetStringWidth($txt)*$this->k) + ($this->charspacing * mb_strlen( $txt, $this->mb_enc )) - // + ( $this->ws * mb_substr_count( $txt, ' ', $this->mb_enc )); - $w =($this->GetStringWidth($txt)*$this->k) + ($this->charspacing * api_strlen( $txt, $this->mb_enc )) - + ( $this->ws * api_substr_count( $txt, ' ', $this->mb_enc )); - // - //Draw a line - return sprintf('%.3f %.3f m %.3f %.3f l S',$x*$this->k,($this->h-$y)*$this->k,($x*$this->k)+$w,($this->h-$y)*$this->k); -} - - -// mPDF 4.2 -function _imageError($file, $firsttime, $msg) { - // Save re-trying image URL's which have already failed - $this->failedimages[$file] = true; - if ($firsttime && ($this->showImageErrors || $this->debug)) { - $this->Error("IMAGE Error (".$file."): ".$msg); - } - return false; -} - - -// mPDF 4.2 -function _getImage(&$file, $firsttime=true, $allowvector=true, $orig_srcpath=false) { // mPDF 4.2.029 / 4.3.012 - // firsttime i.e. whether to add to this->images - use false when calling iteratively - - // Image Data passed directly as var:varname - if (preg_match('/var:\s*(.*)/',$file, $v)) { - $data = $this->$v[1]; - $file = md5($data); - } - // mPDF 4.2.016 - if ($firsttime && preg_match('/(.*\/)([^\/]*)/',$file,$fm)) { - if (strlen($fm[2])) { $file = $fm[1].preg_replace('/ /','%20',$fm[2]); } - } - // mPDF 4.2.029 - if ($orig_srcpath && isset($this->images[$orig_srcpath])) { $file=$orig_srcpath; return $this->images[$orig_srcpath]; } - if (isset($this->images[$file])) { return $this->images[$file]; } - else if ($orig_srcpath && isset($this->formobjects[$orig_srcpath])) { $file=$orig_srcpath; return $this->formobjects[$file]; } - else if (isset($this->formobjects[$file])) { return $this->formobjects[$file]; } - // Save re-trying image URL's which have already failed - else if ($firsttime && isset($this->failedimages[$file])) { return $this->_imageError($file, $firsttime, ''); } - if (!$data) { - $type = ''; - $data = ''; - $mqr=ini_get("magic_quotes_runtime"); - if ($mqr) { set_magic_quotes_runtime(0); } - - // mPDF 4.2.029 - if ($orig_srcpath && $this->basepathIsLocal && $check = @fopen($orig_srcpath,"rb")) { - fclose($check); - $file=$orig_srcpath; - // An adaptation by Ivan Tcholakov, 29-JAN-2010. - // When the image is URL inside a course, the security system blocks reading it. - // A workaround: Let us use system paths when it is possible. - //$data = file_get_contents($file); - if (api_is_internal_path($file)) { - $data = file_get_contents(api_get_path(TO_SYS, $file)); - } else { - $data = file_get_contents($file); - } - // - $type = $this->_imageTypeFromString($data); - } - if (!$data && $check = @fopen($file,"rb")) { // mPDF 4.2.029 - fclose($check); - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$data = file_get_contents($file); - if (api_is_internal_path($file)) { - $data = file_get_contents(api_get_path(TO_SYS, $file)); - } else { - $data = file_get_contents($file); - } - // - $type = $this->_imageTypeFromString($data); - } - if ((!$data || !$type) && !ini_get('allow_url_fopen')) { // only worth trying if remote file and !ini_get('allow_url_fopen') - $this->file_get_contents_by_socket($file, $data); // needs full url?? even on local (never needed for local) - if ($data) { $type = $this->_imageTypeFromString($data); } - } - if ((!$data || !$type) && !ini_get('allow_url_fopen') && function_exists("curl_init")) { - $this->file_get_contents_by_curl($file, $data); // needs full url?? even on local (never needed for local) - if ($data) { $type = $this->_imageTypeFromString($data); } - } - - if ($mqr) { set_magic_quotes_runtime($mqr); } - } - if (!$data) { return $this->_imageError($file, $firsttime, 'Could not find image file'); } - if (!$type) { $type = $this->_imageTypeFromString($data); } - // mPDF 4.3.013 SVG files - if (($type == 'wmf' || $type == 'svg') && !$allowvector) { return $this->_imageError($file, $firsttime, 'WMF or SVG image file not supported in this context'); } - - // mPDF 4.3.013 SVG files - // SVG - if ($type == 'svg') { - if (!class_exists('SVG')) { include(_MPDF_PATH .'classes/svg.php'); } - $svg = new SVG($this); - $family=$this->FontFamily; - $style=$this->FontStyle; - $size=$this->FontSizePt; - $info = $svg->ImageSVG($data); - //Restore font - if($family) $this->SetFont($family,$style,$size,false); - if (!$info) { return $this->_imageError($file, $firsttime, 'Error parsing SVG file'); } - $info['type']='svg'; - $info['i']=count($this->formobjects)+1; - $this->formobjects[$file]=$info; - return $info; - } - - // JPEG - if ($type == 'jpeg' || $type == 'jpg') { - $hdr = $this->_jpgHeaderFromString($data); - if (!$hdr) { return $this->_imageError($file, $firsttime, 'Error parsing JPG header'); } - $a = $this->_jpgDataFromHeader($hdr); - // mPDF 4.2.018 - if ($a[2] == 'DeviceCMYK' && $this->PDFA) { - if (!function_exists("gd_info")) { $this->Error("JPG image may not use CMYK color space (".$file.")."); } - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "JPG image may not use CMYK color space - ".$file." - (Image converted to RGB. NB This will alter the colour profile of the image.)"; } - // convert to RGB image - $im = @imagecreatefromstring($data); - if ($im) { - $tempfile = _MPDF_TEMP_PATH.'_tempImgPNG'.RAND(1,10000).'.png'; // mPDF 4.3.007E - imageinterlace($im, false); - $check = @imagepng($im, $tempfile); - if (!$check) { return $this->_imageError($file, $firsttime, 'Error creating temporary file ('.$tempfile.') whilst using GD library to parse JPG(CMYK) image'); } - $info = $this->_getImage($tempfile, false); - if (!$info) { return $this->_imageError($file, $firsttime, 'Error parsing temporary file ('.$tempfile.') created with GD library to parse JPG(CMYK) image'); } - imagedestroy($im); - unlink($tempfile); - $info['type']='jpg'; - if ($firsttime) { - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - return $info; - } - else { return $this->_imageError($file, $firsttime, 'Error creating GD image file from JPG(CMYK) image'); } - } - $info = array('w'=>$a[0],'h'=>$a[1],'cs'=>$a[2],'bpc'=>$a[3],'f'=>'DCTDecode','data'=>$data); - $info['type']='jpg'; - if ($firsttime) { - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - return $info; - } - - // PNG - else if ($type == 'png') { - //Check signature - if(substr($data,0,8)!=$this->chrs[137].'PNG'.$this->chrs[13].$this->chrs[10].$this->chrs[26].$this->chrs[10]) { - return $this->_imageError($file, $firsttime, 'Error parsing PNG identifier'); - } - //Read header chunk - if(substr($data,12,4)!='IHDR') { - return $this->_imageError($file, $firsttime, 'Incorrect PNG file (no IHDR block found)'); - } - $w=$this->_fourbytes2int(substr($data,16,4)); - $h=$this->_fourbytes2int(substr($data,20,4)); - $bpc=$this->ords[substr($data,24,1)]; - $errpng = false; - $pngalpha = false; - if($bpc>8) { $errpng = 'not 8-bit depth'; } - $ct=$this->ords[substr($data,25,1)]; - if($ct==0) { $colspace='DeviceGray'; } - elseif($ct==2) { $colspace='DeviceRGB'; } - elseif($ct==3) { $colspace='Indexed'; } - else { $errpng = 'alpha channel'; $pngalpha = true; } - if($this->ords[substr($data,26,1)]!=0) { $errpng = 'compression method'; } - if($this->ords[substr($data,27,1)]!=0) { $errpng = 'filter method'; } - if($this->ords[substr($data,28,1)]!=0) { $errpng = 'interlaced file'; } - if ($errpng || $pngalpha) { - if (function_exists('gd_info')) { $gd = gd_info(); } - else {$gd = array(); } - if (!isset($gd['PNG Support'])) { return $this->_imageError($file, $firsttime, 'GD library required for PNG image ('.$errpng.')'); } - $im = imagecreatefromstring($data); - if (!$im) { return $this->_imageError($file, $firsttime, 'Error creating GD image from PNG file ('.$errpng.')'); } - $w = imagesx($im); - $h = imagesy($im); - if ($im) { - $tempfile = _MPDF_TEMP_PATH.'_tempImgPNG'.RAND(1,10000).'.png'; // mPDF 4.3.007E - // Alpha channel set - if ($pngalpha) { - // mPDF 4.2.018 - if ($this->PDFA) { $this->Error("PDFA1-b does not permit images with alpha channel transparency (".$file.")."); } - $imgalpha = imagecreate($w, $h); - // generate gray scale pallete - for ($c = 0; $c < 256; ++$c) { ImageColorAllocate($imgalpha, $c, $c, $c); } - // extract alpha channel - for ($xpx = 0; $xpx < $w; ++$xpx) { - for ($ypx = 0; $ypx < $h; ++$ypx) { - $colorindex = imagecolorat($im, $xpx, $ypx); - $col = imagecolorsforindex($im, $colorindex); - $gammacorr = 2.2; // gamma correction - $gamma = (pow((((127 - $col['alpha']) * 255 / 127) / 255), $gammacorr) * 255); - imagesetpixel($imgalpha, $xpx, $ypx, $gamma); - } - } - // create temp alpha file - $tempfile_alpha = _MPDF_TEMP_PATH.'_tempMskPNG'.RAND(1,10000).'.png'; // mPDF 4.3.007E - $check = @imagepng($imgalpha, $tempfile_alpha); - if (!$check) { return $this->_imageError($file, $firsttime, 'Failed to create temporary image file ('.$tempfile_alpha.') parsing PNG image with alpha channel ('.$errpng.')'); } - imagedestroy($imgalpha); - // extract image without alpha channel - $imgplain = imagecreatetruecolor($w, $h); - imagecopy($imgplain, $im, 0, 0, 0, 0, $w, $h); - // create temp image file - $check = @imagepng($imgplain, $tempfile); - if (!$check) { return $this->_imageError($file, $firsttime, 'Failed to create temporary image file ('.$tempfile.') parsing PNG image with alpha channel ('.$errpng.')'); } - imagedestroy($imgplain); - // embed mask image - $minfo = $this->_getImage($tempfile_alpha, false); - unlink($tempfile_alpha); - if (!$minfo) { return $this->_imageError($file, $firsttime, 'Error parsing temporary file ('.$tempfile_alpha.') created with GD library to parse PNG image'); } - $imgmask = count($this->images)+1; - $minfo['cs'] = 'DeviceGray'; - $minfo['i']=$imgmask ; - $this->images[$tempfile_alpha] = $minfo; - // embed image, masked with previously embedded mask - $info = $this->_getImage($tempfile, false); - unlink($tempfile); - if (!$info) { return $this->_imageError($file, $firsttime, 'Error parsing temporary file ('.$tempfile.') created with GD library to parse PNG image'); } - $info['masked'] = $imgmask; - $info['i']=count($this->images)+1; - $info['type']='png'; - $this->images[$file]=$info; - return $info; - } - else { // No alpha/transparency set - imagealphablending($im, false); - imagesavealpha($im, false); - imageinterlace($im, false); - $check = @imagepng($im, $tempfile ); - if (!$check) { return $this->_imageError($file, $firsttime, 'Failed to create temporary image file ('.$tempfile.') parsing PNG image ('.$errpng.')'); } - imagedestroy($im); - $info = $this->_getImage($tempfile, false) ; - unlink($tempfile ); - if (!$info) { return $this->_imageError($file, $firsttime, 'Error parsing temporary file ('.$tempfile.') created with GD library to parse PNG image'); } - $info['i']=count($this->images)+1; - $info['type']='png'; - $this->images[$file]=$info; - return $info; - } - } - } - - $parms='/DecodeParms <>'; - //Scan chunks looking for palette, transparency and image data - $pal=''; - $trns=''; - $pngdata=''; - $p = 33; - do { - $n=$this->_fourbytes2int(substr($data,$p,4)); $p += 4; - $type=substr($data,$p,4); $p += 4; - if($type=='PLTE') { - //Read palette - $pal=substr($data,$p,$n); $p += $n; - $p += 4; - } - elseif($type=='tRNS') { - //Read transparency info - $t=substr($data,$p,$n); $p += $n; - if($ct==0) $trns=array($this->ords[substr($t,1,1)]); - elseif($ct==2) $trns=array($this->ords[substr($t,1,1)],$this->ords[substr($t,3,1)],$this->ords[substr($t,5,1)]); - else - { - $pos=strpos($t,$this->chrs[0]); - if(is_int($pos)) $trns=array($pos); - } - $p += 4; - } - elseif($type=='IDAT') { - $pngdata.=substr($data,$p,$n); $p += $n; - $p += 4; - } - elseif($type=='IEND') { break; } - else if (preg_match('/[a-zA-Z]{4}/',$type)) { $p += $n+4; } - else { return $this->_imageError($file, $firsttime, 'Error parsing PNG image data'); } - } - while($n); - if (!$pngdata) { return $this->_imageError($file, $firsttime, 'Error parsing PNG image data - no IDAT data found'); } - if($colspace=='Indexed' and empty($pal)) { return $this->_imageError($file, $firsttime, 'Error parsing PNG image data - missing colour palette'); } - $info = array('w'=>$w,'h'=>$h,'cs'=>$colspace,'bpc'=>$bpc,'f'=>'FlateDecode','parms'=>$parms,'pal'=>$pal,'trns'=>$trns,'data'=>$pngdata); - $info['type']='png'; - if ($firsttime) { - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - return $info; - } - - // GIF - else if ($type == 'gif') { - if (function_exists('gd_info')) { $gd = gd_info(); } - else {$gd = array(); } - if (isset($gd['GIF Read Support']) && $gd['GIF Read Support']) { - $im = @imagecreatefromstring($data); - if ($im) { - $tempfile = _MPDF_TEMP_PATH.'_tempImgPNG'.RAND(1,10000).'.png'; // mPDF 4.3.007E - imagealphablending($im, false); - imagesavealpha($im, false); - imageinterlace($im, false); - $check = @imagepng($im, $tempfile); - if (!$check) { return $this->_imageError($file, $firsttime, 'Error creating temporary file ('.$tempfile.') whilst using GD library to parse GIF image'); } - $info = $this->_getImage($tempfile, false); - if (!$info) { return $this->_imageError($file, $firsttime, 'Error parsing temporary file ('.$tempfile.') created with GD library to parse GIF image'); } - imagedestroy($im); - unlink($tempfile); - $info['type']='gif'; - if ($firsttime) { - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - return $info; - } - else { return $this->_imageError($file, $firsttime, 'Error creating GD image file from GIF image'); } - } - - if (!class_exists('gif')) { - include_once(_MPDF_PATH.'classes/gif.php'); - $gif=new CGIF(); - } - - $h=0; - $w=0; - $gif->loadFile($data, 0); - - if(isset($gif->m_img->m_gih->m_bLocalClr) && $gif->m_img->m_gih->m_bLocalClr) { - $nColors = $gif->m_img->m_gih->m_nTableSize; - $pal = $gif->m_img->m_gih->m_colorTable->toString(); - if($bgColor != -1) { - $bgColor = $gif->m_img->m_gih->m_colorTable->colorIndex($bgColor); - } - $colspace='Indexed'; - } elseif(isset($gif->m_gfh->m_bGlobalClr) && $gif->m_gfh->m_bGlobalClr) { - $nColors = $gif->m_gfh->m_nTableSize; - $pal = $gif->m_gfh->m_colorTable->toString(); - if((isset($bgColor)) and $bgColor != -1) { - $bgColor = $gif->m_gfh->m_colorTable->colorIndex($bgColor); - } - $colspace='Indexed'; - } else { - $nColors = 0; - $bgColor = -1; - $colspace='DeviceGray'; - $pal=''; - } - - $trns=''; - if(isset($gif->m_img->m_bTrans) && $gif->m_img->m_bTrans && ($nColors > 0)) { - $trns=array($gif->m_img->m_nTrans); - } - $gifdata=$gif->m_img->m_data; - $w=$gif->m_gfh->m_nWidth; - $h=$gif->m_gfh->m_nHeight; - $gif->ClearData(); - - if($colspace=='Indexed' and empty($pal)) { - return $this->_imageError($file, $firsttime, 'Error parsing GIF image - missing colour palette'); - } - if ($this->compress) { - $gifdata=gzcompress($gifdata); - $info = array( 'w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>8, 'f'=>'FlateDecode', 'pal'=>$pal, 'trns'=>$trns, 'data'=>$gifdata); - } - else { - $info = array( 'w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>8, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$gifdata); - } - $info['type']='gif'; - if ($firsttime) { - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - return $info; - } - - // mPDF 4.5.011 - // BMP (Windows Bitmap) - else if ($type == 'bmp') { - // Adapted from script by Valentin Schmidt - // http://staff.dasdeck.de/valentin/fpdf/fpdf_bmp/ - $bfOffBits=$this->_fourbytes2int_le(substr($data,10,4)); - $width=$this->_fourbytes2int_le(substr($data,18,4)); - $height=$this->_fourbytes2int_le(substr($data,22,4)); - $flip = ($height<0); - if ($flip) $height =-$height; - $biBitCount=$this->_twobytes2int_le(substr($data,28,2)); - $biCompression=$this->_fourbytes2int_le(substr($data,30,4)); - $info = array('w'=>$width, 'h'=>$height); - if ($biBitCount<16){ - $info['cs'] = 'Indexed'; - $info['bpc'] = $biBitCount; - $palStr = substr($data,54,($bfOffBits-54)); - $pal = ''; - $cnt = strlen($palStr)/4; - for ($i=0;$i<$cnt;$i++){ - $n = 4*$i; - $pal .= $palStr{$n+2}.$palStr{$n+1}.$palStr{$n}; - } - $info['pal'] = $pal; - } - else{ - $info['cs'] = 'DeviceRGB'; - $info['bpc'] = 8; - } - switch ($biCompression){ - case 0: - $str = substr($data,$bfOffBits); - break; - case 1: # BI_RLE8 - $str = $this->rle8_decode(substr($data,$bfOffBits), $width); - break; - case 2: # BI_RLE4 - $str = $this->rle4_decode(substr($data,$bfOffBits), $width); - break; - } - $bmpdata = ''; - $padCnt = (4-ceil(($width/(8/$biBitCount)))%4)%4; - switch ($biBitCount){ - case 1: - case 4: - case 8: - $w = floor($width/(8/$biBitCount)) + ($width%(8/$biBitCount)?1:0); - $w_row = $w + $padCnt; - if ($flip){ - for ($y=0;$y<$height;$y++){ - $y0 = $y*$w_row; - for ($x=0;$x<$w;$x++) - $bmpdata .= $str{$y0+$x}; - } - }else{ - for ($y=$height-1;$y>=0;$y--){ - $y0 = $y*$w_row; - for ($x=0;$x<$w;$x++) - $bmpdata .= $str{$y0+$x}; - } - } - break; - - case 16: - $w_row = $width*2 + $padCnt; - if ($flip){ - for ($y=0;$y<$height;$y++){ - $y0 = $y*$w_row; - for ($x=0;$x<$width;$x++){ - $n = (ord( $str{$y0 + 2*$x + 1})*256 + ord( $str{$y0 + 2*$x})); - $b = ($n & 31)<<3; $g = ($n & 992)>>2; $r = ($n & 31744)>>7128; - $bmpdata .= chr($r) . chr($g) . chr($b); - } - } - }else{ - for ($y=$height-1;$y>=0;$y--){ - $y0 = $y*$w_row; - for ($x=0;$x<$width;$x++){ - $n = (ord( $str{$y0 + 2*$x + 1})*256 + ord( $str{$y0 + 2*$x})); - $b = ($n & 31)<<3; $g = ($n & 992)>>2; $r = ($n & 31744)>>7; - $bmpdata .= chr($r) . chr($g) . chr($b); - } - } - } - break; - - case 24: - case 32: - $byteCnt = $biBitCount/8; - $w_row = $width*$byteCnt + $padCnt; - - if ($flip){ - for ($y=0;$y<$height;$y++){ - $y0 = $y*$w_row; - for ($x=0;$x<$width;$x++){ - $i = $y0 + $x*$byteCnt ; # + 1 - $bmpdata .= $str{$i+2}.$str{$i+1}.$str{$i}; - } - } - }else{ - for ($y=$height-1;$y>=0;$y--){ - $y0 = $y*$w_row; - for ($x=0;$x<$width;$x++){ - $i = $y0 + $x*$byteCnt ; # + 1 - $bmpdata .= $str{$i+2}.$str{$i+1}.$str{$i}; - } - } - } - break; - - default: - return $this->_imageError($file, $firsttime, 'Error parsing BMP image - Unsupported image biBitCount'); - } - if ($this->compress) { - $bmpdata=gzcompress($bmpdata); - $info['f']='FlateDecode'; - } - $info['data']=$bmpdata; - $info['type']='bmp'; - if ($firsttime) { - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - return $info; - } - -/*-- IMAGES-WMF --*/ - // WMF - else if ($type == 'wmf') { - $this->gdiObjectArray = array(); - $a=unpack('stest',"\1\0"); - if ($a['test']!=1) - return $this->_imageError($file, $firsttime, 'Error parsing WMF image - Big-endian architecture not supported'); - // check for Aldus placeable metafile header - $key = unpack('Lmagic', substr($data, 0, 4)); - $p = 18; // WMF header - if ($key['magic'] == (int)0x9AC6CDD7) { $p +=22; } // Aldus header - // define some state variables - $wo=null; // window origin - $we=null; // window extent - $polyFillMode = 0; - $nullPen = false; - $nullBrush = false; - $endRecord = false; - $wmfdata = ''; - while ($p < strlen($data) && !$endRecord) { - $recordInfo = unpack('Lsize/Sfunc', substr($data, $p, 6)); $p += 6; - // size of record given in WORDs (= 2 bytes) - $size = $recordInfo['size']; - // func is number of GDI function - $func = $recordInfo['func']; - if ($size > 3) { - $parms = substr($data, $p, 2*($size-3)); $p += 2*($size-3); - } - switch ($func) { - case 0x020b: // SetWindowOrg - // do not allow window origin to be changed - // after drawing has begun - if (!$wmfdata) - $wo = array_reverse(unpack('s2', $parms)); - break; - case 0x020c: // SetWindowExt - // do not allow window extent to be changed - // after drawing has begun - if (!$wmfdata) - $we = array_reverse(unpack('s2', $parms)); - break; - case 0x02fc: // CreateBrushIndirect - $brush = unpack('sstyle/Cr/Cg/Cb/Ca/Shatch', $parms); - $brush['type'] = 'B'; - $this->_AddGDIObject($brush); - break; - case 0x02fa: // CreatePenIndirect - $pen = unpack('Sstyle/swidth/sdummy/Cr/Cg/Cb/Ca', $parms); - // convert width from twips to user unit - $pen['width'] /= (20 * $this->k); - $pen['type'] = 'P'; - $this->_AddGDIObject($pen); - break; - - // MUST create other GDI objects even if we don't handle them - case 0x06fe: // CreateBitmap - case 0x02fd: // CreateBitmapIndirect - case 0x00f8: // CreateBrush - case 0x02fb: // CreateFontIndirect - case 0x00f7: // CreatePalette - case 0x01f9: // CreatePatternBrush - case 0x06ff: // CreateRegion - case 0x0142: // DibCreatePatternBrush - $dummyObject = array('type'=>'D'); - $this->_AddGDIObject($dummyObject); - break; - case 0x0106: // SetPolyFillMode - $polyFillMode = unpack('smode', $parms); - $polyFillMode = $polyFillMode['mode']; - break; - case 0x01f0: // DeleteObject - $idx = unpack('Sidx', $parms); - $idx = $idx['idx']; - $this->_DeleteGDIObject($idx); - break; - case 0x012d: // SelectObject - $idx = unpack('Sidx', $parms); - $idx = $idx['idx']; - $obj = $this->_GetGDIObject($idx); - switch ($obj['type']) { - case 'B': - $nullBrush = false; - if ($obj['style'] == 1) { $nullBrush = true; } - else { - $wmfdata .= sprintf("%.3f %.3f %.3f rg\n",$obj['r']/255,$obj['g']/255,$obj['b']/255); - } - break; - case 'P': - $nullPen = false; - $dashArray = array(); - // dash parameters are custom - switch ($obj['style']) { - case 0: // PS_SOLID - break; - case 1: // PS_DASH - $dashArray = array(3,1); - break; - case 2: // PS_DOT - $dashArray = array(0.5,0.5); - break; - case 3: // PS_DASHDOT - $dashArray = array(2,1,0.5,1); - break; - case 4: // PS_DASHDOTDOT - $dashArray = array(2,1,0.5,1,0.5,1); - break; - case 5: // PS_NULL - $nullPen = true; - break; - } - if (!$nullPen) { - $wmfdata .= sprintf("%.3f %.3f %.3f RG\n",$obj['r']/255,$obj['g']/255,$obj['b']/255); - $wmfdata .= sprintf("%.3f w\n",$obj['width']*$this->k); - } - if (!empty($dashArray)) { - $s = '['; - for ($i=0; $ik; - if ($i != count($dashArray)-1) { $s .= ' '; } - } - $s .= '] 0 d'; - $wmfdata .= $s."\n"; - } - break; - } - break; - case 0x0325: // Polyline - case 0x0324: // Polygon - $coords = unpack('s'.($size-3), $parms); - $numpoints = $coords[1]; - for ($i = $numpoints; $i > 0; $i--) { - $px = $coords[2*$i]; - $py = $coords[2*$i+1]; - - if ($i < $numpoints) { $wmfdata .= $this->_LineTo($px, $py); } - else { $wmfdata .= $this->_MoveTo($px, $py); } - } - if ($func == 0x0325) { $op = 's'; } - else if ($func == 0x0324) { - if ($nullPen) { - if ($nullBrush) { $op = 'n'; } // no op - else { $op = 'f'; } // fill - } - else { - if ($nullBrush) { $op = 's'; } // stroke - else { $op = 'b'; } // stroke and fill - } - if ($polyFillMode==1 && ($op=='b' || $op=='f')) { $op .= '*'; } // use even-odd fill rule - } - $wmfdata .= $op."\n"; - break; - case 0x0538: // PolyPolygon - $coords = unpack('s'.($size-3), $parms); - $numpolygons = $coords[1]; - $adjustment = $numpolygons; - for ($j = 1; $j <= $numpolygons; $j++) { - $numpoints = $coords[$j + 1]; - for ($i = $numpoints; $i > 0; $i--) { - $px = $coords[2*$i + $adjustment]; - $py = $coords[2*$i+1 + $adjustment]; - if ($i == $numpoints) { $wmfdata .= $this->_MoveTo($px, $py); } - else { $wmfdata .= $this->_LineTo($px, $py); } - } - $adjustment += $numpoints * 2; - } - - if ($nullPen) { - if ($nullBrush) { $op = 'n'; } // no op - else { $op = 'f'; } // fill - } - else { - if ($nullBrush) { $op = 's'; } // stroke - else { $op = 'b'; } // stroke and fill - } - if ($polyFillMode==1 && ($op=='b' || $op=='f')) { $op .= '*'; } // use even-odd fill rule - $wmfdata .= $op."\n"; - break; - case 0x0000: - $endRecord = true; - break; - } - } - if (!$wmfdata) { return $this->_imageError($file, $firsttime, 'Error parsing WMF image'); } - $info = array('x'=>$wo[0],'y'=>$wo[1],'w'=>$we[0],'h'=>$we[1],'data'=>$wmfdata); - $info['i']=count($this->formobjects)+1; - $info['type']='wmf'; - $this->formobjects[$file]=$info; - return $info; - } -/*-- END IMAGES-WMF --*/ - - // UNKNOWN TYPE - try GD imagecreatefromstring - else { - if (function_exists('gd_info')) { $gd = gd_info(); } - else {$gd = array(); } - if (isset($gd['PNG Support']) && $gd['PNG Support']) { - $im = @imagecreatefromstring($data); - if (!$im) { return $this->_imageError($file, $firsttime, 'Error parsing image file - image type not recognised, and not supported by GD imagecreate'); } - $tempfile = _MPDF_TEMP_PATH.'_tempImgPNG'.RAND(1,10000).'.png'; // mPDF 4.3.007E - imagealphablending($im, false); - imagesavealpha($im, false); - imageinterlace($im, false); - $check = @imagepng($im, $tempfile); - if (!$check) { return $this->_imageError($file, $firsttime, 'Error creating temporary file ('.$tempfile.') whilst using GD library to parse unknown image type'); } - $info = $this->_getImage($tempfile, false); - imagedestroy($im); - unlink($tempfile); - if (!$info) { return $this->_imageError($file, $firsttime, 'Error parsing temporary file ('.$tempfile.') created with GD library to parse unknown image type'); } - $info['type']='png'; - if ($firsttime) { - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - return $info; - } - } - - return $this->_imageError($file, $firsttime, 'Error parsing image file - image type not recognised'); -} -//============================================================== - - -// mPDF 4.5.011 -# Decoder for RLE8 compression in windows bitmaps -# see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp -function rle8_decode ($str, $width){ - $lineWidth = $width + (3 - ($width-1) % 4); - $out = ''; - $cnt = strlen($str); - for ($i=0;$i<$cnt;$i++){ - $o = ord($str{$i}); - switch ($o){ - case 0: # ESCAPE - $i++; - switch (ord($str{$i})){ - case 0: # NEW LINE - $padCnt = $lineWidth - strlen($out)%$lineWidth; - if ($padCnt<$lineWidth) $out .= str_repeat(chr(0), $padCnt); # pad line - break; - case 1: # END OF FILE - $padCnt = $lineWidth - strlen($out)%$lineWidth; - if ($padCnt<$lineWidth) $out .= str_repeat(chr(0), $padCnt); # pad line - break 3; - case 2: # DELTA - $i += 2; - break; - default: # ABSOLUTE MODE - $num = ord($str{$i}); - for ($j=0;$j<$num;$j++) - $out .= $str{++$i}; - if ($num % 2) $i++; - } - break; - default: - $out .= str_repeat($str{++$i}, $o); - } - } - return $out; -} - -// mPDF 4.5.011 -# Decoder for RLE4 compression in windows bitmaps -# see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6x0u.asp -function rle4_decode ($str, $width){ - $w = floor($width/2) + ($width % 2); - $lineWidth = $w + (3 - ( ($width-1) / 2) % 4); - $pixels = array(); - $cnt = strlen($str); - for ($i=0;$i<$cnt;$i++){ - $o = ord($str{$i}); - switch ($o){ - case 0: # ESCAPE - $i++; - switch (ord($str{$i})){ - case 0: # NEW LINE - while (count($pixels)%$lineWidth!=0) - $pixels[]=0; - break; - case 1: # END OF FILE - while (count($pixels)%$lineWidth!=0) - $pixels[]=0; - break 3; - case 2: # DELTA - $i += 2; - break; - default: # ABSOLUTE MODE - $num = ord($str{$i}); - for ($j=0;$j<$num;$j++){ - if ($j%2==0){ - $c = ord($str{++$i}); - $pixels[] = ($c & 240)>>4; - } else - $pixels[] = $c & 15; - } - if ($num % 2) $i++; - } - break; - default: - $c = ord($str{++$i}); - for ($j=0;$j<$o;$j++) - $pixels[] = ($j%2==0 ? ($c & 240)>>4 : $c & 15); - } - } - - $out = ''; - if (count($pixels)%2) $pixels[]=0; - $cnt = count($pixels)/2; - for ($i=0;$i<$cnt;$i++) - $out .= chr(16*$pixels[2*$i] + $pixels[2*$i+1]); - return $out; -} - -//============================================================== -// mPDF 4.5.011 -function _fourbytes2int_le($s) { - //Read a 4-byte integer from string - return (ord($s[3])<<24) + (ord($s[2])<<16) + (ord($s[1])<<8) + ord($s[0]); // mPDF 4.4.012 -} -//============================================================== -// mPDF 4.5.011 -function _twobytes2int_le($s) { - //Read a 2-byte integer from string - return (ord(substr($s, 1, 1))<<8) + ord(substr($s, 0, 1)); -} - - -// mPDF 4.2 -function _fourbytes2int($s) { - //Read a 4-byte integer from string - return (ord($s[0])<<24) + (ord($s[1])<<16) + (ord($s[2])<<8) + ord($s[3]); // mPDF 4.4.012 -} -//============================================================== -// mPDF 4.2 -function _twobytes2int($s) { - //Read a 2-byte integer from string - return (ord(substr($s, 0, 1))<<8) + ord(substr($s, 1, 1)); -} - -//============================================================== -// mPDF 4.2 -function _jpgHeaderFromString(&$data) { - $p = 4; - $p += $this->_twobytes2int(substr($data, $p, 2)); // Length of initial marker block - $marker = substr($data, $p, 2); - while($marker != chr(255).chr(192) && $marker != chr(255).chr(194) && $p_twobytes2int(substr($data, $p+2, 2))) + 2; // Length of marker block - $marker = substr($data, $p, 2); - } - - if ($marker != chr(255).chr(192) && $marker != chr(255).chr(194)) { return false; } // mPDF 4.4.004 - return substr($data, $p+2, 10); -} -//============================================================== -// mPDF 4.2 -function _jpgDataFromHeader($hdr) { - $bpc = ord(substr($hdr, 2, 1)); - if (!$bpc) { $bpc = 8; } - $h = $this->_twobytes2int(substr($hdr, 3, 2)); - $w = $this->_twobytes2int(substr($hdr, 5, 2)); - $channels = ord(substr($hdr, 7, 1)); - if ($channels==3) { $colspace='DeviceRGB'; } - elseif($channels==4) { $colspace='DeviceCMYK'; } - else { $colspace='DeviceGray'; } - return array($w, $h, $colspace, $bpc); -} -//============================================================== -// mPDF 4.2 -function file_get_contents_by_curl($url, &$data) { - $timeout = 5; - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt($ch, CURLOPT_NOBODY, 0); - curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , 1 ); - curl_setopt ( $ch , CURLOPT_CONNECTTIMEOUT , $timeout ); - $data = curl_exec($ch); - curl_close($ch); -} -//============================================================== -// mPDF 4.2 -function file_get_contents_by_socket($url, &$data) { - $timeout = 1; - $p = parse_url($url); - $file = $p['path']; - if ($p['query']) { $file .= '?'.$p['query']; } - if(!($fh = @fsockopen($p['host'], 80, $errno, $errstr, $timeout))) { return false; } - $getstring = - "GET ".$file." HTTP/1.0 \r\n" . - "Host: ".$p['host']." \r\n" . - "Connection: close\r\n\r\n"; - fwrite($fh, $getstring); - // Get rid of HTTP header - $s = fgets($fh, 1024); - if (!$s) { return false; } - $httpheader .= $s; - while (!feof($fh)) { - $s = fgets($fh, 1024); - if ( $s == "\r\n" ) { break; } - } - $data = ''; - while (!feof($fh)) { - $data .= fgets($fh, 1024); - } - fclose($fh); -} - -//============================================================== -// mPDF 4.2 -function _imageTypeFromString(&$data) { - $type = ''; - if (substr($data, 6, 4)== 'JFIF' || substr($data, 6, 4)== 'Exif') { // mPDF 4.5.001 - $type = 'jpeg'; - } - else if (substr($data, 0, 6)== "GIF87a" || substr($data, 0, 6)== "GIF89a") { - $type = 'gif'; - } - else if (substr($data, 0, 8)== chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) { - $type = 'png'; - } -/*-- IMAGES-WMF --*/ - else if (substr($data, 0, 4)== chr(215).chr(205).chr(198).chr(154)) { - $type = 'wmf'; - } -/*-- END IMAGES-WMF --*/ - // mPDF 4.3.013 SVG files - else if (preg_match('//is',$data)) { - $type = 'svg'; - } - // mPDF 4.5.011 BMP images - else if (substr($data, 0, 2)== "BM") { - $type = 'bmp'; - } - return $type; -} -//============================================================== - -/*-- IMAGES-WMF --*/ -// WMF functions -function _MoveTo($x, $y) { - return "$x $y m\n"; -} - -// a line must have been started using _MoveTo() first -function _LineTo($x, $y) { - return "$x $y l\n"; -} - -function _AddGDIObject($obj) { - // find next available slot - $idx = 0; - if (!empty($this->gdiObjectArray)) { - $empty = false; - $i = 0; - while (!$empty) { - $empty = !isset($this->gdiObjectArray[$i]); - $i++; - } - $idx = $i-1; - } - $this->gdiObjectArray[$idx] = $obj; -} - -function _GetGDIObject($idx) { - return $this->gdiObjectArray[$idx]; -} - -function _DeleteGDIObject($idx) { - unset($this->gdiObjectArray[$idx]); -} -// END of WMF functions -/*-- END IMAGES-WMF --*/ - -// mPDF 4.3.013 SVG files -// Moved outside WMF as also needed for SVG -function _putformobjects() { - reset($this->formobjects); - while(list($file,$info)=each($this->formobjects)) { - $this->_newobj(); - $this->formobjects[$file]['n']=$this->n; - $this->_out('<_out('/Subtype /Form'); - $this->_out('/Group '.($this->n+1).' 0 R'); // mPDF 4.3.017 - $this->_out('/BBox ['.$info['x'].' '.$info['y'].' '.($info['w']+$info['x']).' '.($info['h']+$info['y']).']'); - if ($this->compress) - $this->_out('/Filter /FlateDecode'); - $data=($this->compress) ? gzcompress($info['data']) : $info['data']; - $this->_out('/Length '.strlen($data).'>>'); - $this->_putstream($data); - unset($this->formobjects[$file]['data']); - $this->_out('endobj'); - // mPDF 4.3.017 Required for SVG transparency (opacity) to work - $this->_newobj(); - $this->_out('<_out('/S /Transparency'); - $this->_out('>>'); - $this->_out('endobj'); - } -} - -function _freadint($f) -{ - //Read a 4-byte integer from file - $i=$this->ords[fread($f,1)]<<24; - $i+=$this->ords[fread($f,1)]<<16; - $i+=$this->ords[fread($f,1)]<<8; - $i+=$this->ords[fread($f,1)]; - return $i; -} - -function _UTF16BEtextstring($s) { - $s = $this->UTF8ToUTF16BE($s, true); -/*-- ENCRYPTION --*/ - if ($this->encrypted) { - $s = $this->_RC4($this->_objectkey($this->_current_obj_id), $s); // mPDF 4.2.006 - } -/*-- END ENCRYPTION --*/ - return '('. $this->_escape($s).')'; -} - -function _textstring($s) { -/*-- ENCRYPTION --*/ - if ($this->encrypted) { - $s = $this->_RC4($this->_objectkey($this->_current_obj_id), $s); // mPDF 4.2.006 - } -/*-- END ENCRYPTION --*/ - return '('. $this->_escape($s).')'; -} - - -function _escape($s) -{ - // the chr(13) substitution fixes the Bugs item #1421290. - return strtr($s, array(')' => '\\)', '(' => '\\(', '\\' => '\\\\', $this->chrs[13] => '\r')); -} - -function _putstream($s) { -/*-- ENCRYPTION --*/ - if ($this->encrypted) { - $s = $this->_RC4($this->_objectkey($this->_current_obj_id), $s); // mPDF 4.2.006 - } -/*-- END ENCRYPTION --*/ - $this->_out('stream'); - $this->_out($s); - $this->_out('endstream'); -} - - -function _out($s,$ln=true) { - if($this->state==2) { - if ($this->bufferoutput) { - $this->headerbuffer.= $s."\n"; - } -/*-- COLUMNS --*/ - else if (($this->ColActive) && (!$this->processingHeader) && (!$this->processingFooter)) { - // Captures everything in buffer for columns; Almost everything is sent from fn. Cell() except: - // Images sent from Image() or - // later sent as _out($textto) in printbuffer - // Line() - if (preg_match('/q \d+\.\d\d+ 0 0 (\d+\.\d\d+) \d+\.\d\d+ \d+\.\d\d+ cm \/(I|FO)\d+ Do Q/',$s,$m)) { // Image data // mPDF 4.5.007 - $h = ($m[1]/$this->k); - // Update/overwrite the lowest bottom of printing y value for a column - $this->ColDetails[$this->CurrCol]['bottom_margin'] = $this->y+$h; - } -/*-- TABLES --*/ - else if (preg_match('/\d+\.\d\d+ \d+\.\d\d+ \d+\.\d\d+ ([\-]{0,1}\d+\.\d\d+) re/',$s,$m) && $this->tableLevel>0) { // Rect in table - $h = ($m[1]/$this->k); - // Update/overwrite the lowest bottom of printing y value for a column - $this->ColDetails[$this->CurrCol]['bottom_margin'] = max($this->ColDetails[$this->CurrCol]['bottom_margin'],($this->y+$h)); - } -/*-- END TABLES --*/ - else { // Td Text Set in Cell() - if (isset($this->ColDetails[$this->CurrCol]['bottom_margin'])) { $h = $this->ColDetails[$this->CurrCol]['bottom_margin'] - $this->y; } - else { $h = 0; } - } - if ($h < 0) { $h = -$h; } - $this->columnbuffer[] = array( - 's' => $s, // Text string to output - 'col' => $this->CurrCol, // Column when printed - 'x' => $this->x, // x when printed - 'y' => $this->y, // this->y when printed (after column break) - 'h' => $h // actual y at bottom when printed = y+h - ); - } -/*-- END COLUMNS --*/ -/*-- TABLES --*/ - else if ($this->table_rotate && !$this->processingHeader && !$this->processingFooter) { - // Captures eveything in buffer for rotated tables; - $this->tablebuffer[] = array( - 's' => $s, // Text string to output - 'x' => $this->x, // x when printed - 'y' => $this->y, // y when printed (after column break) - ); - } -/*-- END TABLES --*/ - else if ($this->kwt && !$this->processingHeader && !$this->processingFooter) { - // Captures eveything in buffer for keep-with-table (h1-6); - $this->kwt_buffer[] = array( - 's' => $s, // Text string to output - 'x' => $this->x, // x when printed - 'y' => $this->y, // y when printed - ); - } - else if (($this->keep_block_together) && (!$this->processingHeader) && (!$this->processingFooter)) { - // mPDF 4.5.007 - if (!isset($this->ktBlock[$this->page]['bottom_margin'])) { - $this->ktBlock[$this->page]['bottom_margin'] = $this->y; - } - - // Captures eveything in buffer; - if (preg_match('/q \d+\.\d\d+ 0 0 (\d+\.\d\d+) \d+\.\d\d+ \d+\.\d\d+ cm \/(I|FO)\d+ Do Q/',$s,$m)) { // Image data // mPDF 4.5.007 - $h = ($m[1]/$this->k); - // Update/overwrite the lowest bottom of printing y value for Keep together block - $this->ktBlock[$this->page]['bottom_margin'] = $this->y+$h; - } - else { // Td Text Set in Cell() - if (isset($this->ktBlock[$this->page]['bottom_margin'])) { $h = $this->ktBlock[$this->page]['bottom_margin'] - $this->y; } - else { $h = 0; } - } - if ($h < 0) { $h = -$h; } - $this->divbuffer[] = array( - 'page' => $this->page, - 's' => $s, // Text string to output - 'x' => $this->x, // x when printed - 'y' => $this->y, // y when printed (after column break) - 'h' => $h // actual y at bottom when printed = y+h - ); - } - else { - $this->pages[$this->page] .= $s.($ln == true ? "\n" : ''); - } - - } - else { - $this->buffer .= $s.($ln == true ? "\n" : ''); - } -} - -/*-- WATERMARK --*/ -// add a watermark -function watermark( $texte, $angle=45, $fontsize=96, $alpha=0.2 ) -{ - - if ($this->PDFA) { $this->Error('PDFA does not permit transparency, so mPDF does not allow Watermarks!'); } // mPDF 4.2.018 - if (!$this->watermark_font) { $this->watermark_font = $this->default_font; } - $this->SetFont( $this->watermark_font, "B", $fontsize, false ); // Don't output - $texte= $this->purify_utf8_text($texte); - if ($this->text_input_as_HTML) { - $texte= $this->all_entities_to_utf8($texte); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $texte = mb_convert_encoding($texte,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $texte = api_convert_encoding($texte,$this->mb_enc,'UTF-8'); } - // - // DIRECTIONALITY - $this->magic_reverse_dir($texte); // *RTL* - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($texte); // *INDIC* - - $this->SetAlpha($alpha); - - $this->SetTextColor(0); - $szfont = $fontsize; - $loop = 0; - $maxlen = (min($this->w,$this->h) ); // sets max length of text as 7/8 width/height of page - while ( $loop == 0 ) - { - $this->SetFont( $this->watermark_font, "B", $szfont, false ); // Don't output - $offset = ((sin(deg2rad($angle))) * ($szfont/$this->k)); - - $strlen = $this->GetStringWidth($texte); - if ( $strlen > $maxlen - $offset ) - $szfont --; - else - $loop ++; - } - - $this->SetFont( $this->watermark_font, "B", $szfont-0.1, true, true); // Output The -0.1 is because SetFont above is not written to PDF - // Repeating it will not output anything as mPDF thinks it is set - $adj = ((cos(deg2rad($angle))) * ($strlen/2)); - $opp = ((sin(deg2rad($angle))) * ($strlen/2)); - $wx = ($this->w/2) - $adj + $offset/3; - $wy = ($this->h/2) + $opp; - $this->Rotate($angle,$wx,$wy); - $this->Text($wx,$wy,$texte); - $this->Rotate(0); - $this->SetTextColor(0,0,0); - - $this->SetAlpha(1); - -} - -// add a watermark Image -function watermarkImg( $src, $alpha=0.2 ) { - if ($this->PDFA) { $this->Error('PDFA does not permit transparency, so mPDF does not allow Watermarks!'); } // mPDF 4.2.018 - // mPDF 4.3.018 - if ($this->watermarkImgBehind) { $this->watermarkImgAlpha = $this->SetAlpha($alpha, 'Normal', true); } - else { $this->SetAlpha($alpha, $this->watermarkImgAlphaBlend); } // mPDF 4.4.002 - $this->Image($src,0,0,0,0,'','', true, true, true); - // mPDF 4.3.018 - if (!$this->watermarkImgBehind) { $this->SetAlpha(1); } -} -/*-- END WATERMARK --*/ - - -function Rotate($angle,$x=-1,$y=-1) -{ - if($x==-1) - $x=$this->x; - if($y==-1) - $y=$this->y; - if($this->angle!=0) - $this->_out('Q'); - $this->angle=$angle; - if($angle!=0) - { - $angle*=M_PI/180; - $c=cos($angle); - $s=sin($angle); - $cx=$x*$this->k; - $cy=($this->h-$y)*$this->k; - $this->_out(sprintf('q %.5f %.5f %.5f %.5f %.3f %.3f cm 1 0 0 1 %.3f %.3f cm',$c,$s,-$s,$c,$cx,$cy,-$cx,-$cy)); - } -} - -// From Invoice -function RoundedRect($x, $y, $w, $h, $r, $style = '') -{ - $k = $this->k; - $hp = $this->h; - if($style=='F') - $op='f'; - elseif($style=='FD' or $style=='DF') - $op='B'; - else - $op='S'; - $MyArc = 4/3 * (sqrt(2) - 1); - $this->_out(sprintf('%.3f %.3f m',($x+$r)*$k,($hp-$y)*$k )); - $xc = $x+$w-$r ; - $yc = $y+$r; - $this->_out(sprintf('%.3f %.3f l', $xc*$k,($hp-$y)*$k )); - - $this->_Arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc, $xc + $r, $yc); - $xc = $x+$w-$r ; - $yc = $y+$h-$r; - $this->_out(sprintf('%.3f %.3f l',($x+$w)*$k,($hp-$yc)*$k)); - $this->_Arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc, $yc + $r); - $xc = $x+$r ; - $yc = $y+$h-$r; - $this->_out(sprintf('%.3f %.3f l',$xc*$k,($hp-($y+$h))*$k)); - $this->_Arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc, $xc - $r, $yc); - $xc = $x+$r ; - $yc = $y+$r; - $this->_out(sprintf('%.3f %.3f l',($x)*$k,($hp-$yc)*$k )); - $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r); - $this->_out($op); -} - -function _Arc($x1, $y1, $x2, $y2, $x3, $y3) -{ - $h = $this->h; - $this->_out(sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c ', $x1*$this->k, ($h-$y1)*$this->k, - $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k)); -} - - -/*-- GRADIENTS --*/ -// mPDF 3.0 added - GRADIENTS - -// type = linear:2; radial: 3; -// Linear: $coords - array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). -// The default value is from left to right (x1=0, y1=0, x2=1, y2=0). -// Radial: $coords - array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, -// (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). -// (fx, fy) should be inside the circle, otherwise some areas will not be defined -// $col = array(R,G,B); or array(G) -function Gradient($x, $y, $w, $h, $type, $col1=array(), $col2=array(), $coords='', $extend='', $return=false) { - if (strtoupper(substr($type,0,1)) == 'L') { $type = 2; } - else if (strtoupper(substr($type,0,1)) == 'R') { $type = 3; } - if ($type < 1) { $type = 2; } - if (!isset($col1[1])) { $col1[1]=$col1[2]=$col1[0]; } - if (!isset($col2[1])) { $col2[1] = $col2[2] = $col2[0]; } - if (!is_array($coords) || count($coords) <1) { - if ($type == 2) { $coords=array(0,0,1,0); } - else { $coords=array(0.5,0.5,0.5,0.5,1); } - } - if (!is_array($extend) || count($extend) <1) { - $extend=array('true', 'true'); // These are supposed to be quoted - appear in PDF file as text - } - $s = ' q'; - $s .= sprintf(' %.3F %.3F %.3F %.3F re W n', $x*$this->k, ($this->h-$y)*$this->k, $w*$this->k, -$h*$this->k)."\n"; - $s .= sprintf(' %.3F 0 0 %.3F %.3F %.3F cm', $w*$this->k, $h*$this->k, $x*$this->k, ($this->h-($y+$h))*$this->k)."\n"; - $n = count($this->gradients) + 1; - $this->gradients[$n]['type'] = $type; - $this->gradients[$n]['col1'] = sprintf('%.3F %.3F %.3F', ($col1[0]/255), ($col1[1]/255), ($col1[2]/255)); - $this->gradients[$n]['col2'] = sprintf('%.3F %.3F %.3F', ($col2[0]/255), ($col2[1]/255), ($col2[2]/255)); - $this->gradients[$n]['coords'] = $coords; - $this->gradients[$n]['extend'] = $extend; - //paint the gradient - $s .= '/Sh'.$n.' sh '."\n"; - //restore previous Graphic State - $s .= ' Q '."\n"; - if ($return) { return $s; } - else { $this->_out($s); } -} -/*-- END GRADIENTS --*/ - - -//==================================================== - - - -/*-- DIRECTW --*/ -function Shaded_box( $text,$font='',$fontstyle='B',$szfont='',$width='70%',$style='DF',$radius=2.5,$fill='#FFFFFF',$color='#000000',$pad=2 ) -{ -// F (shading - no line),S (line, no shading),DF (both) - if (!$font) { $font= $this->default_font; } - if (!$szfont) { $szfont = ($this->default_font_size * 1.8); } - - $text = $this->purify_utf8_text($text); - if ($this->text_input_as_HTML) { - $text = $this->all_entities_to_utf8($text); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $text = mb_convert_encoding($text,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $text = api_convert_encoding($text,$this->mb_enc,'UTF-8'); } - // - // DIRECTIONALITY - $this->magic_reverse_dir($text); // *RTL* - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($text); // *INDIC* - $text = ' '.$text.' '; - if (!$width) { $width = $this->pgwidth; } else { $width=$this->ConvertSize($width,$this->pgwidth); } - $midpt = $this->lMargin+($this->pgwidth/2); - $r1 = $midpt-($width/2); //($this->w / 2) - 40; - $r2 = $r1 + $width; //$r1 + 80; - $y1 = $this->y; - - - $mid = ($r1 + $r2 ) / 2; - $loop = 0; - - while ( $loop == 0 ) - { - $this->SetFont( $font, $fontstyle, $szfont ); - $sz = $this->GetStringWidth( $text ); - if ( ($r1+$sz) > $r2 ) - $szfont --; - else - $loop ++; - } - - $y2 = $this->FontSize+($pad*2); - - $this->SetLineWidth(0.1); - $fc = $this->ConvertColor($fill); - $tc = $this->ConvertColor($color); - $this->SetFillColor($fc['R'],$fc['G'],$fc['B']); - $this->SetTextColor($tc['R'],$tc['G'],$tc['B']); - $this->RoundedRect($r1, $y1, ($r2 - $r1), $y2, $radius, $style); - $this->SetX( $r1); - $this->Cell($r2-$r1, $y2, $text, 0, 1, "C" ); - $this->SetY($y1+$y2+2); // +2 = mm margin below shaded box - $this->Reset(); -} -/*-- END DIRECTW --*/ - - -// mPDF 4.4.012 -function UTF8StringToArray($str) { - $out = array(); - $len = strlen($str); - for ($i = 0; $i < $len; $i++) { - $h = ord($str[$i]); - if ( $h <= 0x7F ) - $out[] = $h; - elseif ( $h >= 0xC2 ) { - if ( ($h <= 0xDF) && ($i < $len -1) ) - $out[] = ($h & 0x1F) << 6 | (ord($str{++$i}) & 0x3F); - elseif ( ($h <= 0xEF) && ($i < $len -2) ) - $out[] = ($h & 0x0F) << 12 | (ord($str{++$i}) & 0x3F) << 6 - | (ord($str{++$i}) & 0x3F); - elseif ( ($h <= 0xF4) && ($i < $len -3) ) - $out[] = ($h & 0x0F) << 18 | (ord($str{++$i}) & 0x3F) << 12 - | (ord($str{++$i}) & 0x3F) << 6 - | (ord($str{++$i}) & 0x3F); - } - } - return $out; -} - - -// mPDF 4.0 Convert utf-8 string to for Font Subsets -function UTF8toSubset($str) { - $ret = '<'; - // mPDF 4.0 - $str = preg_replace('/'.preg_quote($this->aliasNbPg,'/').'/', chr(7), $str ); - $str = preg_replace('/'.preg_quote($this->aliasNbPgGp,'/').'/', chr(8), $str ); - $unicode = $this->UTF8StringToArray($str); - $orig_fid = $this->CurrentFont['subsetfontids'][0]; - $last_fid = $this->CurrentFont['subsetfontids'][0]; - foreach($unicode as $c) { - // mPDF 4.0 - if ($c == 7 || $c == 8) { - if ($orig_fid != $last_fid) { - $ret .= '> Tj /F'.$orig_fid.' '.$this->FontSizePt.' Tf <'; - $last_fid = $orig_fid; - } - if ($c == 7) { $ret .= $this->aliasNbPg; } - else { $ret .= $this->aliasNbPgGp; } - continue; - } - for ($i=0; $i<99; $i++) { - // return c as decimal char - $init = array_search($c, $this->CurrentFont['subsets'][$i]); - if ($init!==false) { - if ($this->CurrentFont['subsetfontids'][$i] != $last_fid) { - $ret .= '> Tj /F'.$this->CurrentFont['subsetfontids'][$i].' '.$this->FontSizePt.' Tf <'; - $last_fid = $this->CurrentFont['subsetfontids'][$i]; - } - $ret .= sprintf("%02s", strtoupper(dechex($init))); - break; - } - else if (count($this->CurrentFont['subsets'][$i]) < 255) { - $n = count($this->CurrentFont['subsets'][$i]); - $this->CurrentFont['subsets'][$i][$n] = $c; - if ($this->CurrentFont['subsetfontids'][$i] != $last_fid) { - $ret .= '> Tj /F'.$this->CurrentFont['subsetfontids'][$i].' '.$this->FontSizePt.' Tf <'; - $last_fid = $this->CurrentFont['subsetfontids'][$i]; - } - $ret .= sprintf("%02s", strtoupper(dechex($n))); - break; - } - else if (!isset($this->CurrentFont['subsets'][($i+1)])) { - $this->CurrentFont['subsets'][($i+1)] = range(0,32); - $new_fid = count($this->fonts)+$this->extraFontSubsets+1; - $this->CurrentFont['subsetfontids'][($i+1)] = $new_fid; - $this->extraFontSubsets++; - } - } - } - $ret .= '>'; - if ($last_fid != $orig_fid) { - $ret .= ' Tj /F'.$orig_fid.' '.$this->FontSizePt.' Tf <> '; - } - return $ret; -} - - -// Converts UTF-8 strings to UTF16-BE. -function UTF8ToUTF16BE($str, $setbom=true) { - $outstr = ""; // string to be returned - if ($setbom) { - $outstr .= "\xFE\xFF"; // Byte Order Mark (BOM) - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$outstr .= mb_convert_encoding($str, 'UTF-16BE', 'UTF-8'); - $outstr .= api_convert_encoding($str, 'UTF-16BE', 'UTF-8'); - // - return $outstr; -} - - - - -function _getfontpath() { - // mPDF 4.0 Depracated. Use MPDF_FONTPATH - return defined('MPDF_FONTPATH') ? MPDF_FONTPATH : ''; -} - - - - -// ==================================================== -// ==================================================== -/*-- CJK --*/ -// from class PDF_Chinese CJK EXTENSIONS - - - -function AddCIDFont($family,$style,$name,$cw,$CMap,$registry,$desc) -{ - $fontkey=strtolower($family).strtoupper($style); - if(isset($this->fonts[$fontkey])) - $this->Error("Font already added: $family $style"); - $i=count($this->fonts)+$this->extraFontSubsets+1; - $name=str_replace(' ','',$name); - if ($family == 'sjis') { $up = -120; } else { $up = -130; } - // ? 'up' and 'ut' do not seem to be referenced anywhere - $this->fonts[$fontkey]=array('i'=>$i,'type'=>'Type0','name'=>$name,'up'=>$up,'ut'=>40,'cw'=>$cw,'CMap'=>$CMap,'registry'=>$registry,'MissingWidth'=>1000,'desc'=>$desc); -} - -function AddCJKFont($family) { - // mPDF 4.2.018 - if ($this->PDFA) { - $this->Error("Adobe CJK fonts cannot be embedded in mPDF (required for PDFA1-b)."); - } - if ($family == 'big5') { $this->AddBig5Font(); } - else if ($family == 'gb') { $this->AddGBFont(); } - else if ($family == 'sjis') { $this->AddSJISFont(); } - else if ($family == 'uhc') { $this->AddUHCFont(); } -} - -function AddBig5Font() -{ - //Add Big5 font with proportional Latin - $family='big5'; - $name='MSungStd-Light-Acro'; - $cw=$this->Big5_widths; - //$CMap='ETenms-B5-H'; - $CMap='UniCNS-UTF16-H'; - $desc = array( - 'Ascent' => 880, - 'Descent' => -120, - 'CapHeight' => 880, - 'Flags' => 6, - 'FontBBox' => '[-160 -249 1015 1071]', - 'ItalicAngle' => 0, - 'StemV' => 93, - ); - $registry=array('ordering'=>'CNS1','supplement'=>0); - $this->AddCIDFont($family,'',$name,$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'B',$name.',Bold',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'I',$name.',Italic',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'BI',$name.',BoldItalic',$cw,$CMap,$registry,$desc); -} - - -function AddGBFont() -{ - //Add GB font with proportional Latin - $family='gb'; - $name='STSongStd-Light-Acro'; - $cw=$this->GB_widths; - //$CMap='GBKp-EUC-H'; - $CMap='UniGB-UTF16-H'; - $registry=array('ordering'=>'GB1','supplement'=>2); - $desc = array( - 'Ascent' => 752, - 'Descent' => -271, - 'CapHeight' => 737, - 'Flags' => 6, - 'FontBBox' => '[-25 -254 1000 880]', - 'ItalicAngle' => 0, - 'StemV' => 58, - 'Style' => '<< /Panose <000000000400000000000000> >>', - ); - $this->AddCIDFont($family,'',$name,$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'B',$name.',Bold',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'I',$name.',Italic',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'BI',$name.',BoldItalic',$cw,$CMap,$registry,$desc); -} - - -function AddSJISFont() -{ - //Add SJIS font with proportional Latin - $family='sjis'; - $name='KozMinPro-Regular-Acro'; - $cw=$this->SJIS_widths; - //$CMap='90msp-RKSJ-H'; - $CMap='UniJIS-UTF16-H'; - $desc = array( - 'Ascent' => 880, - 'Descent' => -120, - 'CapHeight' => 740, - 'Flags' => 6, - 'FontBBox' => '[-195 -272 1110 1075]', - 'ItalicAngle' => 0, - 'StemV' => 86, - 'XHeight' => 502, - ); - $registry=array('ordering'=>'Japan1','supplement'=>2); - $this->AddCIDFont($family,'',$name,$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'B',$name.',Bold',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'I',$name.',Italic',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'BI',$name.',BoldItalic',$cw,$CMap,$registry,$desc); -} - -function AddUHCFont() -{ - //Add UHC font with proportional Latin - $family='uhc'; - $name='HYSMyeongJoStd-Medium-Acro'; - $cw=$this->UHC_widths; - //$CMap='KSCms-UHC-H'; - $CMap='UniKS-UTF16-H'; - $registry=array('ordering'=>'Korea1','supplement'=>1); - $desc = array( - 'Ascent' => 880, - 'Descent' => -120, - 'CapHeight' => 720, - 'Flags' => 6, - 'FontBBox' => '[-28 -148 1001 880]', - 'ItalicAngle' => 0, - 'StemV' => 60, - 'Style' => '<< /Panose <000000000600000000000000> >>', - ); - $this->AddCIDFont($family,'',$name,$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'B',$name.',Bold',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'I',$name.',Italic',$cw,$CMap,$registry,$desc); - $this->AddCIDFont($family,'BI',$name.',BoldItalic',$cw,$CMap,$registry,$desc); -} - -/*-- END CJK --*/ - - - - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -function SetAutoFont($af = AUTOFONT_ALL) { - if (!$this->is_MB) { return false; } - if (!$af && $af !== 0) { $af = AUTOFONT_ALL; } - $this->autoFontGroups = $af; - if ($this->autoFontGroups ) { - $this->useSubstitutions = false; - $this->useLang = true; - // mPDF 4.0 - if (AUTOFONT_RTL & $this->autoFontGroups) { $this->biDirectional = true; } // *RTL* - } -} - - -function SetDefaultFont($font) { - // Disallow embedded fonts to be used as defaults except in win-1252 - if ($this->codepage != 'win-1252' || $this->PDFA) { // mPDF 4.2.018 - if (strtolower($font) == 'times') { $font = 'serif'; } - if (strtolower($font) == 'courier') { $font = 'monospace'; } - if ((strtolower($font) == 'arial') || (strtolower($font) == 'helvetica')) { $font = 'sans-serif'; } - } - $font = $this->SetFont($font); // returns substituted font if necessary - $this->default_font = $font; - $this->original_default_font = $font; - if (!$this->watermark_font ) { $this->watermark_font = $font; } // *WATERMARK* - $this->defaultCSS['BODY']['FONT-FAMILY'] = $font; // mPDF 4.2 - $this->CSS['BODY']['FONT-FAMILY'] = $font; // mPDF 4.2 -} - -function SetDefaultFontSize($fontsize) { - $this->default_font_size = $fontsize; - $this->original_default_font_size = $fontsize; - $this->SetFontSize($fontsize); - $this->defaultCSS['BODY']['FONT-SIZE'] = $fontsize . 'pt'; - $this->CSS['BODY']['FONT-SIZE'] = $fontsize . 'pt'; // mPDF 4.2 -} - -// mPDF 4.2 -function SetDefaultBodyCSS($prop, $val) { - if ($prop) { - $this->defaultCSS['BODY'][strtoupper($prop)] = $val; - $this->CSS['BODY'][strtoupper($prop)] = $val; - } -} - - -function SetDirectionality($dir='ltr') { -/*-- RTL --*/ - if (strtolower($dir) == 'rtl') { - $this->directionality = 'rtl'; - $this->defaultAlign = 'R'; - $this->defaultTableAlign = 'R'; - // Swop L/R Margins so page 1 RTL is an 'even' page - $tmp = $this->DeflMargin; - $this->DeflMargin = $this->DefrMargin; - $this->DefrMargin = $tmp; - $this->orig_lMargin = $this->DeflMargin; - $this->orig_rMargin = $this->DefrMargin; - - $this->SetMargins($this->DeflMargin,$this->DefrMargin,$this->tMargin); - } - else { -/*-- END RTL --*/ - $this->directionality = 'ltr'; - $this->defaultAlign = 'L'; - $this->defaultTableAlign = 'L'; - } // *RTL* -} - -function reverse_align(&$align) { - if (strtolower($align) == 'right') { $align = 'left'; } - else if (strtolower($align) == 'left') { $align = 'right'; } - if (strtoupper($align) == 'R') { $align = 'L'; } - else if (strtoupper($align) == 'L') { $align = 'R'; } -} - - -// Added to set line-height-correction -function SetLineHeightCorrection($val) { - if ($val > 0) { $this->default_lineheight_correction = $val; } - else { $this->default_lineheight_correction = 1.2; } -} - -// Set a (fixed) lineheight to an actual value - either to named fontsize(pts) or default -// mPDF 4.2 -function SetLineHeight($FontPt='',$spacing = '') { - if ($this->shrin_k > 1) { $k = $this->shrin_k; } - else { $k = 1; } - if ($spacing > 0) { - if (preg_match('/mm/',$spacing)) { - $this->lineheight = ($spacing + 0.0) / $k; // convert to number - } - else { - if ($FontPt) { $this->lineheight = (($FontPt/$this->k) *$spacing); } - else { $this->lineheight = (($this->FontSizePt/$this->k) *$spacing); } - } - } - else { - if ($FontPt) { $this->lineheight = (($FontPt/$this->k) *$this->normalLineheight); } - else { $this->lineheight = (($this->FontSizePt/$this->k) *$this->normalLineheight); } - } -} - -// mPDF 4.2 -function _computeLineheight($lh, $fs='') { - if ($this->shrin_k > 1) { $k = $this->shrin_k; } - else { $k = 1; } - if (!$fs) { $fs = $this->FontSize; } - if (preg_match('/mm/',$lh)) { - return (($lh + 0.0) / $k); // convert to number - } - else if ($lh > 0) { - return ($fs * $lh); - } - else if (isset($this->normalLineheight)) { return ($fs * $this->normalLineheight); } - else return ($fs * $this->default_lineheight_correction); -} - - -function SetBasePath($str='') { - // mPDF 4.2.029 - if ( isset($_SERVER['HTTP_HOST']) ) { $host = $_SERVER['HTTP_HOST']; } - else if ( isset($_SERVER['SERVER_NAME']) ) { $host = $_SERVER['SERVER_NAME']; } - else { $host = ''; } - if (!$str) { - if ($_SERVER['SCRIPT_NAME']) { $currentPath = dirname($_SERVER['SCRIPT_NAME']); } - else { $currentPath = dirname($_SERVER['PHP_SELF']); } - $currentPath = str_replace("\\","/",$currentPath); - if ($currentPath == '/') { $currentPath = ''; } - if ($host) { $currpath = 'http://' . $host . $currentPath .'/'; } - else { $currpath = ''; } - $this->basepath = $currpath; - $this->basepathIsLocal = true; - return; - } - $str = preg_replace('/\?.*/','',$str); - if (!preg_match('/(http|https|ftp):\/\/.*\//i',$str)) { $str .= '/'; } - $str .= 'xxx'; // in case $str ends in / e.g. http://www.bbc.co.uk/ - $this->basepath = dirname($str) . "/"; // returns e.g. e.g. http://www.google.com/dir1/dir2/dir3/ - $this->basepath = str_replace("\\","/",$this->basepath); //If on Windows - $tr = parse_url($this->basepath); - if (isset($tr['host']) && ($tr['host'] == $host)) { $this->basepathIsLocal = true; } - else { $this->basepathIsLocal = false; } -} - -// mPDF 4.0 -function GetFullPath(&$path,$basepath='') { - // When parsing CSS need to pass temporary basepath - so links are relative to current stylesheet - if (!$basepath) { $basepath = $this->basepath; } - //Fix path value - $path = str_replace("\\","/",$path); //If on Windows - //Get link info and obtain its absolute path - $regexp = '|^./|'; // Inadvertently corrects "./path/etc" and "//www.domain.com/etc" - $path = preg_replace($regexp,'',$path); - - if(substr($path,0,1) == '#') { return; } - if (stristr($path,"mailto:") !== false) { return; } - if (strpos($path,"../") !== false ) { //It is a Relative Link - $backtrackamount = substr_count($path,"../"); - $maxbacktrack = substr_count($basepath,"/") - 1; - $filepath = str_replace("../",'',$path); - $path = $basepath; - //If it is an invalid relative link, then make it go to directory root - if ($backtrackamount > $maxbacktrack) $backtrackamount = $maxbacktrack; - //Backtrack some directories - for( $i = 0 ; $i < $backtrackamount + 1 ; $i++ ) $path = substr( $path, 0 , strrpos($path,"/") ); - $path = $path . "/" . $filepath; //Make it an absolute path - } - else if( strpos($path,":/") === false || strpos($path,":/") > 10) { //It is a Local Link - if (substr($path,0,1) == "/") { - $tr = parse_url($basepath); - $root = $tr['scheme'].'://'.$tr['host']; - $path = $root . $path; - } - else { $path = $basepath . $path; } - } - //Do nothing if it is an Absolute Link -} - - -// Used for external CSS files -function _get_file($path) { - // If local file try using local path (? quicker, but also allowed even if allow_url_fopen false) - $contents = ''; - // Modified by Ivan Tcholakov, 29-JUl-2010. - //$contents = @file_get_contents($path); - if (api_is_internal_path($path)) { - $contents = @file_get_contents(api_get_path(TO_SYS, $path)); - } else { - $contents = @file_get_contents($path); - } - // - if ($contents) { return $contents; } - if ($this->basepathIsLocal) { - $tr = parse_url($path); - $lp=getenv("SCRIPT_NAME"); - $ap=realpath($lp); - $ap=str_replace("\\","/",$ap); - $docroot=substr($ap,0,strpos($ap,$lp)); - // WriteHTML parses all paths to full URLs; may be local file name from calling ->Image() directly - if ($tr['scheme'] && $tr['host'] && $_SERVER["DOCUMENT_ROOT"] ) { - $localpath = $_SERVER["DOCUMENT_ROOT"] . $tr['path']; - } - // DOCUMENT_ROOT is not returned on IIS - else if ($docroot) { - $localpath = $docroot . $tr['path']; - } - else { $localpath = $path; } - $contents = @file_get_contents($localpath); - } - // if not use full URL - else if (!$contents && !ini_get('allow_url_fopen') && function_exists("curl_init")) { - $ch = curl_init($path); - curl_setopt($ch, CURLOPT_HEADER, 0); - curl_setopt ( $ch , CURLOPT_RETURNTRANSFER , 1 ); - $contents = curl_exec($ch); - curl_close($ch); - } - return $contents; -} - -function UseCSS($opt=true) -{ - $this->usecss=$opt; -} - -function UseTableHeader($opt=true) -{ - $this->usetableheader=$opt; -} - -function UsePRE($opt=true) -{ - $this->usepre=$opt; -} - -// Edited mPDF 3.0 - added offset & extras (prefix/suffix) -function docPageNum($num = 0, $extras = false) { - if ($num < 1) { $num = $this->page; } - $type = '1'; // set default decimal - $ppgno = $num; - $suppress = 0; - $offset = 0; - // mPDF 4.2.020 - $lastreset = 0; - foreach($this->PageNumSubstitutions AS $psarr) { - if ($num >= $psarr['from']) { - if ($psarr['reset']) { - if ($psarr['reset']>1) { $offset = $psarr['reset']-1; } - $ppgno = $num - $psarr['from'] + 1 + $offset; - // mPDF 4.2.020 - $lastreset = $psarr['from']; - } - if ($psarr['type']) { $type = $psarr['type']; } - if (strtoupper($psarr['suppress'])=='ON' || $psarr['suppress']==1) { $suppress = 1; } - else if (strtoupper($psarr['suppress'])=='OFF') { $suppress = 0; } - } - } - if ($suppress) { return ''; } - // mPDF 4.2.020 - foreach($this->pgsIns AS $k=>$v) { - if ($k>$lastreset && $k<$num) { - $ppgno -= $v; - } - } - if ($type=='A') { $ppgno = $this->dec2alpha($ppgno,true); } - else if ($type=='a') { $ppgno = $this->dec2alpha($ppgno,false);} - else if ($type=='I') { $ppgno = $this->dec2roman($ppgno,true); } - else if ($type=='i') { $ppgno = $this->dec2roman($ppgno,false); } - if ($extras) { $ppgno = $this->pagenumPrefix . $ppgno . $this->pagenumSuffix; } - return $ppgno; -} - -// mPDF 3.0 -function docPageSettings($num = 0) { - // Returns current type (numberstyle), suppression state for this page number; - // reset is only returned if set for this page number - if ($num < 1) { $num = $this->page; } - $type = '1'; // set default decimal - $ppgno = $num; - $suppress = 0; - $offset = 0; - $reset = ''; - foreach($this->PageNumSubstitutions AS $psarr) { - if ($num >= $psarr['from']) { - if ($psarr['reset']) { - if ($psarr['reset']>1) { $offset = $psarr['reset']-1; } - $ppgno = $num - $psarr['from'] + 1 + $offset; - } - if ($psarr['type']) { $type = $psarr['type']; } - if (strtoupper($psarr['suppress'])=='ON' || $psarr['suppress']==1) { $suppress = 1; } - else if (strtoupper($psarr['suppress'])=='OFF') { $suppress = 0; } - } - if ($num == $psarr['from']) { $reset = $psarr['reset']; } - } - if ($suppress) { $suppress = 'on'; } - else { $suppress = 'off'; } - return array($type, $suppress, $reset); -} - -function docPageNumTotal($num = 0, $extras = false) { - if ($num < 1) { $num = $this->page; } - $type = '1'; // set default decimal - $ppgstart = 1; - $ppgend = count($this->pages)+1; - $suppress = 0; - $offset = 0; - foreach($this->PageNumSubstitutions AS $psarr) { - if ($num >= $psarr['from']) { - if ($psarr['reset']) { - if ($psarr['reset']>1) { $offset = $psarr['reset']-1; } - $ppgstart = $psarr['from'] + $offset; - $ppgend = count($this->pages)+1 + $offset; - } - if ($psarr['type']) { $type = $psarr['type']; } - if (strtoupper($psarr['suppress'])=='ON' || $psarr['suppress']==1) { $suppress = 1; } - else if (strtoupper($psarr['suppress'])=='OFF') { $suppress = 0; } - } - if ($num < $psarr['from']) { - if ($psarr['reset']) { - $ppgend = $psarr['from'] + $offset; - break; - } - } - } - if ($suppress) { return ''; } - $ppgno = $ppgend-$ppgstart+$offset; - if ($extras) { $ppgno = $this->nbpgPrefix . $ppgno . $this->nbpgSuffix; } - return $ppgno; -} - -function RestartDocTemplate() { - $this->docTemplateStart = $this->page; -} - - - -//Page header -function Header($content='') { - - $this->cMarginL = 0; - $this->cMarginR = 0; - - // mPDF 4.2 - // Template moved to AddPage() - -/*-- HTMLHEADERS-FOOTERS --*/ - // mPDF 4.0 - if (($this->mirrorMargins && ($this->page%2==0) && $this->HTMLHeaderE) || ($this->mirrorMargins && ($this->page%2==1) && $this->HTMLHeader) || (!$this->mirrorMargins && $this->HTMLHeader)) { - $this->writeHTMLHeaders(); - return; - } -/*-- END HTMLHEADERS-FOOTERS --*/ - $this->processingHeader=true; - $h = $this->headerDetails; - if(count($h)) { - - if ($this->forcePortraitHeaders && $this->CurOrientation=='L' && $this->CurOrientation!=$this->DefOrientation) { - $this->_out(sprintf('q 0 -1 1 0 0 %.3f cm ',($this->h*$this->k))); - $yadj = $this->w - $this->h; - $headerpgwidth = $this->h - $this->orig_lMargin - $this->orig_rMargin; - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $headerlmargin = $this->orig_rMargin; - } - else { - $headerlmargin = $this->orig_lMargin; - } - } - else { - $yadj = 0; - $headerpgwidth = $this->pgwidth; - $headerlmargin = $this->lMargin; - } - - $this->y = $this->margin_header - $yadj ; - $this->SetTextColor(0); - $this->SUP = false; - $this->SUB = false; - $this->bullet = false; - - // only show pagenumber if numbering on - // mPDF 3.0 Add PageNum prefix/suffix - $pgno = $this->docPageNum($this->page, true); - - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $side = 'even'; - } - else { // ODD // OR NOT MIRRORING MARGINS/FOOTERS = DEFAULT - $side = 'odd'; - } - $maxfontheight = 0; - foreach(array('L','C','R') AS $pos) { - if (isset($h[$side][$pos]['content']) && $h[$side][$pos]['content']) { - if (isset($h[$side][$pos]['font-size']) && $h[$side][$pos]['font-size']) { $hfsz = $h[$side][$pos]['font-size']; } - else { $hfsz = $this->default_font_size; } - $maxfontheight = max($maxfontheight,$hfsz); - } - } - // LEFT-CENTER-RIGHT - foreach(array('L','C','R') AS $pos) { - if (isset($h[$side][$pos]['content']) && $h[$side][$pos]['content']) { - $hd = str_replace('{PAGENO}',$pgno,$h[$side][$pos]['content']); - // mPDF 3.0 - $hd = str_replace($this->aliasNbPgGp,$this->nbpgPrefix.$this->aliasNbPgGp.$this->nbpgSuffix,$hd); // {nbpg} - $hd = preg_replace('/\{DATE\s+(.*?)\}/e',"date('\\1')",$hd); - if (isset($h[$side][$pos]['font-family']) && $h[$side][$pos]['font-family']) { $hff = $h[$side][$pos]['font-family']; } - // mPDF 3.0 original_ in case pagebreak in middle of table - else { $hff = $this->original_default_font; } - if (isset($h[$side][$pos]['font-size']) && $h[$side][$pos]['font-size']) { $hfsz = $h[$side][$pos]['font-size']; } - // mPDF 3.0 original_ in case pagebreak in middle of table - else { $hfsz = $this->original_default_font_size; } // pts - $maxfontheight = max($maxfontheight,$hfsz); - $hfst = ''; - if (isset($h[$side][$pos]['font-style']) && $h[$side][$pos]['font-style']) { - $hfst = $h[$side][$pos]['font-style']; - } - if (isset($h[$side][$pos]['color']) && $h[$side][$pos]['color']) { - $hfcol = $h[$side][$pos]['color']; - $cor = $this->ConvertColor($hfcol); - if ($cor) { $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); } - } - else { $hfcol = ''; } - // mPDF 3.0 Force output - $this->SetFont($hff,$hfst,$hfsz,true,true); - $this->x = $headerlmargin ; - $this->y = $this->margin_header - $yadj ; - - $hd = $this->purify_utf8_text($hd); - if ($this->text_input_as_HTML) { - $hd = $this->all_entities_to_utf8($hd); - } - // CONVERT CODEPAGE - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $hd = mb_convert_encoding($hd,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $hd = api_convert_encoding($hd,$this->mb_enc,'UTF-8'); } - // - // DIRECTIONALITY RTL - $this->magic_reverse_dir($hd); // *RTL* - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($hd); // *INDIC* - $align = $pos; -/*-- RTL --*/ - if ($this->directionality == 'rtl') { - if ($pos == 'L') { $align = 'R'; } - else if ($pos == 'R') { $align = 'L'; } - } -/*-- END RTL --*/ - if ($pos!='L' && (stripos($hd,$this->aliasNbPg)!==false || stripos($hd,$this->aliasNbPgGp)!==false)) { - if (stripos($hd,$this->aliasNbPgGp)!==false) { $type= 'nbpggp'; } else { $type= 'nbpg'; } - $this->_out('{mpdfheader'.$type.' '.$pos.' ff='.$hff.' fs='.$hfst.' fz='.$hfsz.'}'); - $this->Cell($headerpgwidth ,$maxfontheight/$this->k ,$hd,0,0,$align,0,'',0,0,0,'M'); - $this->_out('Q'); - } - else { - $this->Cell($headerpgwidth ,$maxfontheight/$this->k ,$hd,0,0,$align,0,'',0,0,0,'M'); - } - if ($hfcol) { $this->SetTextColor(0); } - } - } - //Return Font to normal - $this->SetFont($this->default_font,'',$this->original_default_font_size); - // LINE - if (isset($h[$side]['line']) && $h[$side]['line']) { - $this->SetLineWidth(0.1); - $this->SetDrawColor(0); - $this->Line($headerlmargin , $this->margin_header + ($maxfontheight*(1+$this->header_line_spacing)/$this->k) - $yadj , $headerlmargin + $headerpgwidth, $this->margin_header + ($maxfontheight*(1+$this->header_line_spacing)/$this->k) - $yadj ); - } - if ($this->forcePortraitHeaders && $this->CurOrientation=='L' && $this->CurOrientation!=$this->DefOrientation) { - $this->_out('Q'); - } - } - $this->SetY($this->tMargin); - if ($this->ColActive) { $this->pgwidth = $this->ColWidth; } // *COLUMNS* - - $this->processingHeader=false; -} - - - -/*-- TABLES --*/ -function TableHeaderFooter($content='',$tablestartpage='',$tablestartcolumn ='',$horf = 'H') { - if((($this->usetableheader && $horf=='H') || $horf=='F') && !empty($content)) { // mPDF 3.0 - $table = &$this->table[1][1]; - // Advance down page by half width of top border - // mPDF 4.0 - if ($horf=='H') { // Only if header - if ($table['borders_separate']) { $adv = $table['border_spacing_V']/2 + $table['border_details']['T']['w'] + $table['padding']['T']; } - else { $adv = $table['max_cell_border_width']['T'] /2 ; } - if ($adv) { - if ($this->table_rotate) { - $this->y += ($adv); - } - else { - $this->DivLn($adv,$this->blklvl,true); - } - } - } - - if ($horf=='F') { // Table Footer - $firstrow = count($table['cells']) - $this->tablefooternrows; - $lastrow = count($table['cells']) - 1; - } - else { // Table Header - $firstrow = 0; - $lastrow = $this->tableheadernrows - 1; - } - - $topy = $content[$firstrow][0]['y']-$this->y; - - for ($i=$firstrow ; $i<=$lastrow; $i++) { - - $y = $this->y; - -/*-- COLUMNS --*/ - // If outside columns, this is done in PaintDivBB - if ($this->ColActive) { - //OUTER FILL BGCOLOR of DIVS - if ($this->blklvl > 0) { - $firstblockfill = $this->GetFirstBlockFill(); - if ($firstblockfill && $this->blklvl >= $firstblockfill) { - $divh = $content[$i][0]['h']; - $bak_x = $this->x; - $this->DivLn($divh,-3,false); - // Reset current block fill - $bcor = $this->blk[$this->blklvl]['bgcolorarray']; - $this->SetFillColor($bcor['R'],$bcor['G'],$bcor['B']); - $this->x = $bak_x; - } - } - } -/*-- END COLUMNS --*/ - - $colctr = 0; - foreach($content[$i] as $tablehf) - { - $colctr++; - $y = $tablehf['y'] - $topy; - - $this->y = $y; - //Set some cell values - $x = $tablehf['x']; - if (($this->mirrorMargins) && ($tablestartpage == 'ODD') && (($this->page)%2==0)) { // EVEN - $x = $x +$this->MarginCorrection; - } - else if (($this->mirrorMargins) && ($tablestartpage == 'EVEN') && (($this->page)%2==1)) { // ODD - $x = $x +$this->MarginCorrection; - } -/*-- COLUMNS --*/ - // Added to correct for Columns - if ($this->ColActive) { - if ($this->directionality == 'rtl') { // *RTL* - $x -= ($this->CurrCol - $tablestartcolumn) * ($this->ColWidth+$this->ColGap); // *RTL* - } // *RTL* - else { // *RTL* - $x += ($this->CurrCol - $tablestartcolumn) * ($this->ColWidth+$this->ColGap); - } // *RTL* - } -/*-- END COLUMNS --*/ - $w = $tablehf['w']; - $h = $tablehf['h']; - $va = $tablehf['va']; - $R = $tablehf['R']; - $mih = $tablehf['mih']; - $fill = $tablehf['bgcolor']; - $border = $tablehf['border']; - $border_details = $tablehf['border_details']; - $padding = $tablehf['padding']; - $this->tabletheadjustfinished = true; - - $textbuffer = $tablehf['textbuffer']; - - $align = $tablehf['a']; - //Align - $this->divalign=$align; - $this->x = $x; - - if ($table['borders_separate']) { - $tablefill = isset($table['bgcolor'][-1]) ? $table['bgcolor'][-1] : 0; // mPDF 4.3.005 - if ($tablefill) { - $color = $this->ConvertColor($tablefill); - if ($color) $this->SetFillColor($color['R'],$color['G'],$color['B']); - $xadj = ($table['border_spacing_H']/2); - $yadj = ($table['border_spacing_V']/2); - $wadj = $table['border_spacing_H']; - $hadj = $table['border_spacing_V']; - // mPDF 4.0 - if ($i == $firstrow && $horf=='H') { // Top - $yadj += $table['padding']['T']; - $hadj += $table['padding']['T']; - } - if (($i == ($lastrow) || (isset($tablehf['rowspan']) && ($i+$tablehf['rowspan']) == ($lastrow+1)) || (!isset($tablehf['rowspan']) && ($i+1) == ($lastrow+1))) && $horf=='F') { // Bottom - $hadj += $table['padding']['B']; - } - if ($colctr == 1) { // Left - $xadj += $table['padding']['L']; - $wadj += $table['padding']['L']; - } - if ($colctr == count($content[$i]) ) { // Right - $wadj += $table['padding']['R']; - } - $this->Rect($x - $xadj, $y - $yadj, $w + $wadj, $h + $hadj, 'F'); - } - } - - // TABLE BORDER - if separate - if ($table['borders_separate'] && $table['border']) { - $halfspaceL = $table['padding']['L'] + ($table['border_spacing_H']/2); - $halfspaceR = $table['padding']['R'] + ($table['border_spacing_H']/2); - $halfspaceT = $table['padding']['T'] + ($table['border_spacing_V']/2); - $halfspaceB = $table['padding']['B'] + ($table['border_spacing_V']/2); - $tbx = $x; - $tby = $y; - $tbw = $w; - $tbh = $h; - $tab_bord = 0; - $corner = ''; - if ($i == $firstrow && $horf=='H') { // Top - $tby -= $halfspaceT + ($table['border_details']['T']['w']/2); - $tbh += $halfspaceT + ($table['border_details']['T']['w']/2); - $this->setBorder($tab_bord , _BORDER_TOP); - $corner .= 'T'; - } - if (($i == ($lastrow) || (isset($tablehf['rowspan']) && ($i+$tablehf['rowspan']) == ($lastrow+1)) || (!isset($tablehf['rowspan']) && ($i+1) == ($lastrow+1))) && $horf=='F') { // Bottom - $tbh += $halfspaceB + ($table['border_details']['B']['w']/2); - $this->setBorder($tab_bord , _BORDER_BOTTOM); - $corner .= 'B'; - } - if ($colctr == 1) { // Top Left - $tbx -= $halfspaceL + ($table['border_details']['L']['w']/2); - $tbw += $halfspaceL + ($table['border_details']['L']['w']/2); - $this->setBorder($tab_bord , _BORDER_LEFT); - $corner .= 'L'; - } - if ($colctr == count($content[$i])) { // Right // mPDF 4.4.014 - $tbw += $halfspaceR + ($table['border_details']['R']['w']/2); - $this->setBorder($tab_bord , _BORDER_RIGHT); - $corner .= 'R'; - } - $this->_tableRect($tbx, $tby, $tbw, $tbh, $tab_bord , $table['border_details'], false, $table['borders_separate'], 'table', $corner, $table['border_spacing_V'], $table['border_spacing_H'] ); - } - - if ($table['empty_cells']!='hide' || !empty($textbuffer) || !$table['borders_separate']) { $paintcell = true; } - else { $paintcell = false; } - - //Vertical align - if ($R && INTVAL($R) > 0 && isset($va) && $va!='B') { $va='B';} - - if (!isset($va) || empty($va) || $va=='M') $this->y += ($h-$mih)/2; - elseif (isset($va) && $va=='B') $this->y += $h-$mih; - if ($fill && $paintcell) - { - $color = $this->ConvertColor($fill); - if ($color) $this->SetFillColor($color['R'],$color['G'],$color['B']); - if ($table['borders_separate']) { - $this->Rect($x+ ($table['border_spacing_H']/2), $y+ ($table['border_spacing_V']/2), $w- $table['border_spacing_H'], $h- $table['border_spacing_V'], 'F'); - } - else { - $this->Rect($x, $y, $w, $h, 'F'); - } - } - -/*-- GRADIENTS --*/ - if (isset($tablehf['gradient']) && $tablehf['gradient'] && $paintcell){ // mPDF 4.3.006 - $g = $this->parseBackgroundGradient($tablehf['gradient']); - if ($g) { - if ($table['borders_separate']) { - $px = $x+ ($table['border_spacing_H']/2); - $py = $y+ ($table['border_spacing_V']/2); - $pw = $w- $table['border_spacing_H']; - $ph = $h- $table['border_spacing_V']; - } - else { - $px = $x; - $py = $y; - $pw = $w; - $ph = $h; - } - $this->Gradient($px, $py, $pw, $ph, $g['type'], $g['col'], $g['col2'], $g['coords'], $g['extend']); - } - } -/*-- END GRADIENTS --*/ - -/*-- BACKGROUND-IMAGES --*/ - if (isset($tablehf['background-image']) && $paintcell){ // mPDF 4.3.006 - if ($tablehf['background-image']['image_id']) { // Background pattern - $n = count($this->patterns)+1; - if ($table['borders_separate']) { - $px = $x+ ($table['border_spacing_H']/2); - $py = $y+ ($table['border_spacing_V']/2); - $pw = $w- $table['border_spacing_H']; - $ph = $h- $table['border_spacing_V']; - } - else { - $px = $x; - $py = $y; - $pw = $w; - $ph = $h; - } - // mPDF 4.3.015 - list($orig_w, $orig_h, $x_repeat, $y_repeat) = $this->_resizeBackgroundImage($tablehf['background-image']['orig_w'], $tablehf['background-image']['orig_h'], $pw, $ph, $tablehf['background-image']['resize'], $tablehf['background-image']['x_repeat'] , $tablehf['background-image']['y_repeat']); - $this->patterns[$n] = array('x'=>$px, 'y'=>$py, 'w'=>$pw, 'h'=>$ph, 'pgh'=>$this->h, 'image_id'=>$tablehf['background-image']['image_id'], 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$tablehf['background-image']['x_pos'] , 'y_pos'=>$tablehf['background-image']['y_pos'] , 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat); // mPDF 4.3.015 - // mPDF 4.3.017 - if ($tablehf['background-image']['opacity']>0 && $tablehf['background-image']['opacity']<1) { $opac = $this->SetAlpha($tablehf['background-image']['opacity'],'Normal',true); } - else { $opac = ''; } - $this->_out(sprintf('q /Pattern cs /P%d scn %s %.3f %.3f %.3f %.3f re f Q', $n, $opac, $px*$this->k, ($this->h-$py)*$this->k, $pw*$this->k, -$ph*$this->k)); - } - } -/*-- END BACKGROUND-IMAGES --*/ - - //Border - if ($table['borders_separate'] && $paintcell && $border) { // mPDF 4.2.017 - $this->_tableRect($x+ ($table['border_spacing_H']/2)+($border_details['L']['w'] /2), $y+ ($table['border_spacing_V']/2)+($border_details['T']['w'] /2), $w-$table['border_spacing_H']-($border_details['L']['w'] /2)-($border_details['R']['w'] /2), $h- $table['border_spacing_V']-($border_details['T']['w'] /2)-($border_details['B']['w']/2), $border, $border_details, false, $table['borders_separate']); - } - else if ($paintcell && $border) { // mPDF 4.2.017 - $this->_tableRect($x, $y, $w, $h, $border, $border_details, true, $table['borders_separate']); // true causes buffer - } - - //Print cell content - // $this->divheight = $this->table_lineheight*$this->lineheight; // mPDF 4.2 - if (!empty($textbuffer)) { - - if ($R) { - $cellPtSize = $textbuffer[0][11] / $this->shrin_k; - $cellFontHeight = ($cellPtSize/$this->k); - $opx = $this->x; - $opy = $this->y; - $angle = INTVAL($R); - // Only allow 45 - 90 degrees (when bottom-aligned) or -90 - if ($angle > 90) { $angle = 90; } - else if ($angle > 0 && (isset($va) && $va!='B')) { $angle = 90; } - else if ($angle > 0 && $angle <45) { $angle = 45; } - else if ($angle < 0) { $angle = -90; } - $offset = ((sin(deg2rad($angle))) * 0.37 * $cellFontHeight); - if (isset($align) && $align =='R') { - $this->x += ($w) + ($offset) - ($cellFontHeight/3) - ($padding['R'] + $border_details['R']['w']); - } - else if (!isset($align ) || $align =='C') { - $this->x += ($w/2) + ($offset); - } - else { - $this->x += ($offset) + ($cellFontHeight/3)+($padding['L'] + $border_details['L']['w']); - } - $str = trim(implode(' ',$tablehf['text'])); // mPDF 4.4.012 - - if (!isset($va) || $va=='M') { - $this->y -= ($h-$mih)/2; //Undo what was added earlier VERTICAL ALIGN - if ($angle > 0) { $this->y += (($h-$mih)/2)+($padding['T'] + $border_details['T']['w']) + ($mih-($padding['T'] + $border_details['T']['w']+$border_details['B']['w']+$padding['B'])); } - else if ($angle < 0) { $this->y += (($h-$mih)/2)+($padding['T'] + $border_details['T']['w']); } - } - else if (isset($va) && $va=='B') { - $this->y -= $h-$mih; //Undo what was added earlier VERTICAL ALIGN - if ($angle > 0) { $this->y += $h-($border_details['B']['w']+$padding['B']); } - else if ($angle < 0) { $this->y += $h-$mih+($padding['T'] + $border_details['T']['w']); } - } - else if (isset($va) && $va=='T') { - if ($angle > 0) { $this->y += $mih-($border_details['B']['w']+$padding['B']); } - else if ($angle < 0) { $this->y += ($padding['T'] + $border_details['T']['w']); } - } - - $this->Rotate($angle,$this->x,$this->y); - $s_fs = $this->FontSizePt; - $s_f = $this->FontFamily; // mPDF 3.0 - $s_st = $this->FontStyle; // mPDF 3.0 - $this->SetFont($textbuffer[0][4],$textbuffer[0][2],$cellPtSize,true,true); - $this->Text($this->x,$this->y,$str); - $this->Rotate(0); - $this->SetFont($s_f,$s_st,$s_fs,true,true); - $this->x = $opx; - $this->y = $opy; - } - else { - if ($table['borders_separate']) { // NB twice border width - $xadj = $border_details['L']['w'] + $padding['L'] +($table['border_spacing_H']/2); - $wadj = $border_details['L']['w'] + $border_details['R']['w'] + $padding['L'] +$padding['R'] + $table['border_spacing_H']; - $yadj = $border_details['T']['w'] + $padding['T'] + ($table['border_spacing_H']/2); - } - else { - $xadj = $border_details['L']['w']/2 + $padding['L']; - $wadj = ($border_details['L']['w'] + $border_details['R']['w'])/2 + $padding['L'] + $padding['R']; - $yadj = $border_details['T']['w']/2 + $padding['T']; - } - - $this->divwidth=$w-($wadj); - $this->x += $xadj; - $this->y += $yadj; - $this->printbuffer($textbuffer,'',true); - } - - } - $textbuffer = array(); - } - $this->y = $y + $h; //Update y coordinate - } - - }//end of 'if usetableheader ...' -} -/*-- END TABLES --*/ - -/*-- HTMLHEADERS-FOOTERS --*/ -function SetHTMLHeader($header='',$OE='',$write=false) { - // mPDF 4.0 - $height = 0; - if (is_array($header) && isset($header['html']) && $header['html']) { - $Hhtml = $header['html']; - if ($this->setAutoTopMargin) { - if (isset($header['h'])) { $height = $header['h']; } - else { $height = $this->_gethtmlheight($Hhtml); } - } - } - else if (!is_array($header) && $header) { - $Hhtml = $header; - if ($this->setAutoTopMargin) { $height = $this->_gethtmlheight($Hhtml); } - } - else { $Hhtml = ''; } - // mPDF 4.0 - if ($OE != 'E') { $OE = 'O'; } - if ($OE == 'E') { - // mPDF 4.0 - if ($Hhtml) { - $this->HTMLHeaderE['html'] = $Hhtml; - $this->HTMLHeaderE['h'] = $height; - } - else { $this->HTMLHeaderE = ''; } - } - else { - // mPDF 4.0 - if ($Hhtml) { - $this->HTMLHeader['html'] = $Hhtml; - $this->HTMLHeader['h'] = $height; - } - else { $this->HTMLHeader = ''; } - } - if (!$this->mirrorMargins && $OE == 'E') { return; } - if ($Hhtml=='') { return; } - if ($OE == 'E') { - $this->headerDetails['even'] = array(); // override and clear any other non-HTML header/footer - } - else { - $this->headerDetails['odd'] = array(); // override and clear any non-HTML other header/footer - } - // mPDF 4.0 - if ($this->setAutoTopMargin=='pad') { - $this->tMargin = $this->margin_header + $height + $this->orig_tMargin; - if (isset($this->saveHTMLHeader[$this->page][$OE]['mt'])) { $this->saveHTMLHeader[$this->page][$OE]['mt'] = $this->tMargin; } - } - else if ($this->setAutoTopMargin=='stretch') { - $this->tMargin = max($this->orig_tMargin, $this->margin_header + $height + $this->autoMarginPadding); - if (isset($this->saveHTMLHeader[$this->page][$OE]['mt'])) { $this->saveHTMLHeader[$this->page][$OE]['mt'] = $this->tMargin; } - } - if ($write && $this->state!=0 && (($this->mirrorMargins && $OE == 'E' && ($this->page)%2==0) || ($this->mirrorMargins && $OE != 'E' && ($this->page)%2==1) || !$this->mirrorMargins)) { $this->writeHTMLHeaders(); } -} - -function SetHTMLFooter($footer='',$OE='') { - // mPDF 4.0 - $height = 0; - if (is_array($footer) && isset($footer['html']) && $footer['html']) { - $Fhtml = $footer['html']; - if ($this->setAutoBottomMargin) { - if (isset($footer['h'])) { $height = $footer['h']; } - else { $height = $this->_gethtmlheight($Fhtml); } - } - } - else if (!is_array($footer) && $footer) { - $Fhtml = $footer; - if ($this->setAutoBottomMargin) { $height = $this->_gethtmlheight($Fhtml); } - } - else { $Fhtml = ''; } - // mPDF 4.0 - if ($OE != 'E') { $OE = 'O'; } - if ($OE == 'E') { - // mPDF 4.0 - if ($Fhtml) { - $this->HTMLFooterE['html'] = $Fhtml; - $this->HTMLFooterE['h'] = $height; - } - else { $this->HTMLFooterE = ''; } - } - else { - // mPDF 4.0 - if ($Fhtml) { - $this->HTMLFooter['html'] = $Fhtml; - $this->HTMLFooter['h'] = $height; - } - else { $this->HTMLFooter = ''; } - } - if (!$this->mirrorMargins && $OE == 'E') { return; } - if ($Fhtml=='') { return false; } - if ($OE == 'E') { - $this->footerDetails['even'] = array(); // override and clear any other header/footer - } - else { - $this->footerDetails['odd'] = array(); // override and clear any other header/footer - } - // mPDF 4.0 - if ($this->setAutoBottomMargin=='pad') { - $this->bMargin = $this->margin_footer + $height + $this->orig_bMargin; - $this->PageBreakTrigger=$this->h-$this->bMargin ; - if (isset($this->saveHTMLHeader[$this->page][$OE]['mb'])) { $this->saveHTMLHeader[$this->page][$OE]['mb'] = $this->bMargin; } - } - else if ($this->setAutoBottomMargin=='stretch') { - $this->bMargin = max($this->orig_bMargin, $this->margin_footer + $height + $this->autoMarginPadding); - $this->PageBreakTrigger=$this->h-$this->bMargin ; - if (isset($this->saveHTMLHeader[$this->page][$OE]['mb'])) { $this->saveHTMLHeader[$this->page][$OE]['mb'] = $this->bMargin; } - } -} - -// mPDF 4.0 -function _getHtmlHeight($html) { - $save_state = $this->state; - $this->state = 2; - $this->Reset(); - $this->pageoutput[$this->page] = array(); - $save_x = $this->x; - $save_y = $this->y; - $this->x = $this->lMargin; - $this->y = $this->margin_header; - $html = str_replace('{PAGENO}',$this->pagenumPrefix.$this->docPageNum($this->page).$this->pagenumSuffix,$html); - $html = str_replace($this->aliasNbPgGp,$this->nbpgPrefix.$this->docPageNumTotal($this->page).$this->nbpgSuffix,$html ); - $html = str_replace($this->aliasNbPg,$this->page,$html ); - $html = preg_replace('/\{DATE\s+(.*?)\}/e',"date('\\1')",$html ); - $this->HTMLheaderPageLinks = array(); - $savepb = $this->pageBackgrounds; - $this->writingHTMLheader = true; - $this->WriteHTML($html , 4); // parameter 4 saves output to $this->headerbuffer - $this->writingHTMLheader = false; - $h = ($this->y - $this->margin_header); - $this->Reset(); - $this->pageoutput[$this->page] = array(); - $this->headerbuffer = ''; - $this->pageBackgrounds = $savepb; - $this->x = $save_x; - $this->y = $save_y; - $this->state = $save_state; - return $h; -} - - -// Called internally from Header -function writeHTMLHeaders() { - // mPDF 4.0 - if ($this->mirrorMargins && ($this->page)%2==0) { $OE = 'E'; } // EVEN - else { $OE = 'O'; } - if ($OE == 'E') { - $this->saveHTMLHeader[$this->page][$OE]['html'] = $this->HTMLHeaderE['html'] ; - } - else { - $this->saveHTMLHeader[$this->page][$OE]['html'] = $this->HTMLHeader['html'] ; - } - if ($this->forcePortraitHeaders && $this->CurOrientation=='L' && $this->CurOrientation!=$this->DefOrientation) { - $this->saveHTMLHeader[$this->page][$OE]['rotate'] = true; - $this->saveHTMLHeader[$this->page][$OE]['ml'] = $this->tMargin; - $this->saveHTMLHeader[$this->page][$OE]['mr'] = $this->bMargin; - $this->saveHTMLHeader[$this->page][$OE]['mh'] = $this->margin_header; - $this->saveHTMLHeader[$this->page][$OE]['mf'] = $this->margin_footer; - $this->saveHTMLHeader[$this->page][$OE]['pw'] = $this->h; - $this->saveHTMLHeader[$this->page][$OE]['ph'] = $this->w; - } - else { - $this->saveHTMLHeader[$this->page][$OE]['ml'] = $this->lMargin; - $this->saveHTMLHeader[$this->page][$OE]['mr'] = $this->rMargin; - $this->saveHTMLHeader[$this->page][$OE]['mh'] = $this->margin_header; - $this->saveHTMLHeader[$this->page][$OE]['mf'] = $this->margin_footer; - $this->saveHTMLHeader[$this->page][$OE]['pw'] = $this->w; - $this->saveHTMLHeader[$this->page][$OE]['ph'] = $this->h; - } -} - -function writeHTMLFooters() { - // mPDF 4.0 - if ($this->mirrorMargins && ($this->page)%2==0) { $OE = 'E'; } // EVEN - else { $OE = 'O'; } - if ($OE == 'E') { - $this->saveHTMLFooter[$this->page][$OE]['html'] = $this->HTMLFooterE['html'] ; - } - else { - $this->saveHTMLFooter[$this->page][$OE]['html'] = $this->HTMLFooter['html'] ; - } - if ($this->forcePortraitHeaders && $this->CurOrientation=='L' && $this->CurOrientation!=$this->DefOrientation) { - $this->saveHTMLFooter[$this->page][$OE]['rotate'] = true; - $this->saveHTMLFooter[$this->page][$OE]['ml'] = $this->tMargin; - $this->saveHTMLFooter[$this->page][$OE]['mr'] = $this->bMargin; - $this->saveHTMLFooter[$this->page][$OE]['mt'] = $this->rMargin; - $this->saveHTMLFooter[$this->page][$OE]['mb'] = $this->lMargin; - $this->saveHTMLFooter[$this->page][$OE]['mh'] = $this->margin_header; - $this->saveHTMLFooter[$this->page][$OE]['mf'] = $this->margin_footer; - $this->saveHTMLFooter[$this->page][$OE]['pw'] = $this->h; - $this->saveHTMLFooter[$this->page][$OE]['ph'] = $this->w; - } - else { - $this->saveHTMLFooter[$this->page][$OE]['ml'] = $this->lMargin; - $this->saveHTMLFooter[$this->page][$OE]['mr'] = $this->rMargin; - $this->saveHTMLFooter[$this->page][$OE]['mt'] = $this->tMargin; - $this->saveHTMLFooter[$this->page][$OE]['mb'] = $this->bMargin; - $this->saveHTMLFooter[$this->page][$OE]['mh'] = $this->margin_header; - $this->saveHTMLFooter[$this->page][$OE]['mf'] = $this->margin_footer; - $this->saveHTMLFooter[$this->page][$OE]['pw'] = $this->w; - $this->saveHTMLFooter[$this->page][$OE]['ph'] = $this->h; - } -} -/*-- END HTMLHEADERS-FOOTERS --*/ - -function DefHeaderByName($name,$arr) { - if (!$name) { $name = '_default'; } - $this->pageheaders[$name] = $arr; -} - -function DefFooterByName($name,$arr) { - if (!$name) { $name = '_default'; } - $this->pagefooters[$name] = $arr; -} - -function SetHeaderByName($name,$side='O',$write=false) { - if (!$name) { $name = '_default'; } - if ($side=='E') { $this->headerDetails['even'] = $this->pageheaders[$name]; } - else { $this->headerDetails['odd'] = $this->pageheaders[$name]; } - if ($write) { $this->Header(); } -} - -function SetFooterByName($name,$side='O') { - if (!$name) { $name = '_default'; } - if ($side=='E') { $this->footerDetails['even'] = $this->pagefooters[$name]; } - else { $this->footerDetails['odd'] = $this->pagefooters[$name]; } -} - -/*-- HTMLHEADERS-FOOTERS --*/ -function DefHTMLHeaderByName($name,$html) { - if (!$name) { $name = '_default'; } - // mPDF 4.0 - $this->pageHTMLheaders[$name]['html'] = $html; - $this->pageHTMLheaders[$name]['h'] = $this->_gethtmlheight($html); -} - -function DefHTMLFooterByName($name,$html) { - if (!$name) { $name = '_default'; } - // mPDF 4.0 - $this->pageHTMLfooters[$name]['html'] = $html; - $this->pageHTMLfooters[$name]['h'] = $this->_gethtmlheight($html); -} - -function SetHTMLHeaderByName($name,$side='O',$write=false) { - if (!$name) { $name = '_default'; } - $this->SetHTMLHeader($this->pageHTMLheaders[$name],$side,$write); -} - -function SetHTMLFooterByName($name,$side='O') { - if (!$name) { $name = '_default'; } - $this->SetHTMLFooter($this->pageHTMLfooters[$name],$side,$write); -} -/*-- END HTMLHEADERS-FOOTERS --*/ - - -function SetHeader($Harray=array(),$side='',$write=false) { - if (is_string($Harray)) { - if (strlen($Harray)==0) { - if ($side=='O') { $this->headerDetails['odd'] = array(); } - else if ($side=='E') { $this->headerDetails['even'] = array(); } - else { $this->headerDetails = array(); } - } - else if (strpos($Harray,'|') || strpos($Harray,'|')===0) { - $hdet = explode('|',$Harray); - $this->headerDetails = array ( - 'odd' => array ( - 'L' => array ('content' => $hdet[0], 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'C' => array ('content' => $hdet[1], 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'R' => array ('content' => $hdet[2], 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'line' => $this->defaultheaderline, - ), - 'even' => array ( - 'R' => array ('content' => $hdet[0], 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'C' => array ('content' => $hdet[1], 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'L' => array ('content' => $hdet[2], 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'line' => $this->defaultheaderline, - ) - ); - } - else { - $this->headerDetails = array ( - 'odd' => array ( - 'R' => array ('content' => $Harray, 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'line' => $this->defaultheaderline, - ), - 'even' => array ( - 'L' => array ('content' => $Harray, 'font-size' => $this->defaultheaderfontsize, 'font-style' => $this->defaultheaderfontstyle), - 'line' => $this->defaultheaderline, - ) - ); - } - } - else if (is_array($Harray)) { - if ($side=='O') { $this->headerDetails['odd'] = $Harray; } - else if ($side=='E') { $this->headerDetails['even'] = $Harray; } - else { $this->headerDetails = $Harray; } - } -/*-- HTMLHEADERS-FOOTERS --*/ - // Overwrite any HTML Header previously set - if ($side=='E') { $this->SetHTMLHeader('','E'); } - else if ($side=='O') { $this->SetHTMLHeader(''); } - else { - $this->SetHTMLHeader(''); - $this->SetHTMLHeader('','E'); - } -/*-- END HTMLHEADERS-FOOTERS --*/ - - if ($write) { - $save_y = $this->y; - $this->Header(); - $this->SetY($save_y) ; - } -} - -function SetFooter($Farray=array(),$side='') { - if (is_string($Farray)) { - if (strlen($Farray)==0) { - if ($side=='O') { $this->footerDetails['odd'] = array(); } - else if ($side=='E') { $this->footerDetails['even'] = array(); } - else { $this->footerDetails = array(); } - } - else if (strpos($Farray,'|') || strpos($Farray,'|')===0) { - $fdet = explode('|',$Farray); - $this->footerDetails = array ( - 'odd' => array ( - 'L' => array ('content' => $fdet[0], 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'C' => array ('content' => $fdet[1], 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'R' => array ('content' => $fdet[2], 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'line' => $this->defaultfooterline, - ), - 'even' => array ( - 'R' => array ('content' => $fdet[0], 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'C' => array ('content' => $fdet[1], 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'L' => array ('content' => $fdet[2], 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'line' => $this->defaultfooterline, - ) - ); - } - else { - $this->footerDetails = array ( - 'odd' => array ( - 'R' => array ('content' => $Farray, 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'line' => $this->defaultfooterline, - ), - 'even' => array ( - 'L' => array ('content' => $Farray, 'font-size' => $this->defaultfooterfontsize, 'font-style' => $this->defaultfooterfontstyle), - 'line' => $this->defaultfooterline, - ) - ); - } - } - else if (is_array($Farray)) { - if ($side=='O') { $this->footerDetails['odd'] = $Farray; } - else if ($side=='E') { $this->footerDetails['even'] = $Farray; } - else { $this->footerDetails = $Farray; } - } -/*-- HTMLHEADERS-FOOTERS --*/ - // Overwrite any HTML Footer previously set - if ($side=='E') { $this->SetHTMLFooter('','E'); } - else if ($side=='O') { $this->SetHTMLFooter(''); } - else { - $this->SetHTMLFooter(''); - $this->SetHTMLFooter('','E'); - } -/*-- END HTMLHEADERS-FOOTERS --*/ -} - -/*-- WATERMARK --*/ -function setUnvalidatedText($txt='', $alpha=-1) { - if ($alpha>=0) $this->watermarkTextAlpha = $alpha; - $this->watermarkText = $txt; -} -function SetWatermarkText($txt='', $alpha=-1) { - if ($alpha>=0) $this->watermarkTextAlpha = $alpha; - $this->watermarkText = $txt; -} - -function SetWatermarkImage($src, $alpha=-1, $size='D', $pos='F') { - if ($alpha>=0) $this->watermarkImageAlpha = $alpha; - $this->watermarkImage = $src; - $this->watermark_size = $size; - $this->watermark_pos = $pos; -} -/*-- END WATERMARK --*/ - - -//Page footer -function Footer() { -/*-- CSS-PAGE --*/ - // PAGED MEDIA - CROP / CROSS MARKS from @PAGE - if ($this->show_marks == 'CROP') { - // Show TICK MARKS - $this->SetLineWidth(0.1); // = 0.1 mm - $this->SetDrawColor(0); - $l = 18; // Default length in mm of crop line - $m = 8; // Distance of crop mark from margin in mm - $b = 8; // Non-printable border at edge of paper sheet in mm - $ax1 = $b; - $bx = $this->page_box['outer_width_LR'] - $m; - $ax = max($ax1, $bx-$l); - $cx1 = $this->w - $b; - $dx = $this->w - $this->page_box['outer_width_LR'] + $m; - $cx = min($cx1, $dx+$l); - $ay1 = $b; - $by = $this->page_box['outer_width_TB'] - $m; - $ay = max($ay1, $by-$l); - $cy1 = $this->h - $b; - $dy = $this->h - $this->page_box['outer_width_TB'] + $m; - $cy = min($cy1, $dy+$l); - - $this->Line($ax, $this->page_box['outer_width_TB'], $bx, $this->page_box['outer_width_TB']); - $this->Line($cx, $this->page_box['outer_width_TB'], $dx, $this->page_box['outer_width_TB']); - $this->Line($ax, $this->h - $this->page_box['outer_width_TB'], $bx, $this->h - $this->page_box['outer_width_TB']); - $this->Line($cx, $this->h - $this->page_box['outer_width_TB'], $dx, $this->h - $this->page_box['outer_width_TB']); - $this->Line($this->page_box['outer_width_LR'], $ay, $this->page_box['outer_width_LR'], $by); - $this->Line($this->page_box['outer_width_LR'], $cy, $this->page_box['outer_width_LR'], $dy); - $this->Line($this->w - $this->page_box['outer_width_LR'], $ay, $this->w - $this->page_box['outer_width_LR'], $by); - $this->Line($this->w - $this->page_box['outer_width_LR'], $cy, $this->w - $this->page_box['outer_width_LR'], $dy); - } - if ($this->show_marks == 'CROSS') { - $this->SetLineWidth(0.1); // = 0.1 mm - $this->SetDrawColor(0); - $l = 14 /2; // longer length of the cross line (half) - $w = 6 /2; // shorter width of the cross line (half) - $r = 1.2; // radius of circle - $m = 10; // Distance of cross mark from margin in mm - $x1 = $this->page_box['outer_width_LR'] - $m; - $x2 = $this->w - $this->page_box['outer_width_LR'] + $m; - $y1 = $this->page_box['outer_width_TB'] - $m; - $y2 = $this->h - $this->page_box['outer_width_TB'] + $m; - // Left - $this->Circle($x1, $this->h/2, $r, 'S') ; - $this->Line($x1-$w, $this->h/2, $x1+$w, $this->h/2); - $this->Line($x1, $this->h/2-$l, $x1, $this->h/2+$l); - // Right - $this->Circle($x2, $this->h/2, $r, 'S') ; - $this->Line($x2-$w, $this->h/2, $x2+$w, $this->h/2); - $this->Line($x2, $this->h/2-$l, $x2, $this->h/2+$l); - // Top - $this->Circle($this->w/2, $y1, $r, 'S') ; - $this->Line($this->w/2, $y1-$w, $this->w/2, $y1+$w); - $this->Line($this->w/2-$l, $y1, $this->w/2+$l, $y1); - // Bottom - $this->Circle($this->w/2, $y2, $r, 'S') ; - $this->Line($this->w/2, $y2-$w, $this->w/2, $y2+$w); - $this->Line($this->w/2-$l, $y2, $this->w/2+$l, $y2); - } - - - // If @page set non-HTML headers/footers named, they were not read until later in the HTML code - so now set them - if ($this->page==1) { - if ($this->firstPageBoxHeader) { - $this->headerDetails['odd'] = $this->pageheaders[$this->firstPageBoxHeader]; - $this->Header(); - } - if ($this->firstPageBoxFooter) { - $this->footerDetails['odd'] = $this->pagefooters[$this->firstPageBoxFooter]; - } - $this->firstPageBoxHeader=''; - $this->firstPageBoxFooter=''; - } -/*-- END CSS-PAGE --*/ - - - -/*-- HTMLHEADERS-FOOTERS --*/ - if (($this->mirrorMargins && ($this->page%2==0) && $this->HTMLFooterE) || ($this->mirrorMargins && ($this->page%2==1) && $this->HTMLFooter) || (!$this->mirrorMargins && $this->HTMLFooter)) { - $this->writeHTMLFooters(); -/*-- WATERMARK --*/ - if (($this->watermarkText) && ($this->showWatermarkText)) { - $this->watermark( $this->watermarkText, 45, 120, $this->watermarkTextAlpha); // Watermark text - } - if (($this->watermarkImage) && ($this->showWatermarkImage)) { - $this->watermarkImg( $this->watermarkImage, $this->watermarkImageAlpha); // Watermark image - } -/*-- END WATERMARK --*/ - return; - } -/*-- END HTMLHEADERS-FOOTERS --*/ - - $this->processingHeader=true; - $this->ResetMargins(); // necessary after columns - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; -/*-- WATERMARK --*/ - if (($this->watermarkText) && ($this->showWatermarkText)) { - $this->watermark( $this->watermarkText, 45, 120, $this->watermarkTextAlpha); // Watermark text - } - if (($this->watermarkImage) && ($this->showWatermarkImage)) { - $this->watermarkImg( $this->watermarkImage, $this->watermarkImageAlpha); // Watermark image - } -/*-- END WATERMARK --*/ - $h = $this->footerDetails; - if(count($h)) { - - if ($this->forcePortraitHeaders && $this->CurOrientation=='L' && $this->CurOrientation!=$this->DefOrientation) { - $this->_out(sprintf('q 0 -1 1 0 0 %.3f cm ',($this->h*$this->k))); - $headerpgwidth = $this->h - $this->orig_lMargin - $this->orig_rMargin; - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $headerlmargin = $this->orig_rMargin; - } - else { - $headerlmargin = $this->orig_lMargin; - } - } - else { - $yadj = 0; - $headerpgwidth = $this->pgwidth; - $headerlmargin = $this->lMargin; - } - $this->SetY(-$this->margin_footer); - - $this->SetTextColor(0); - $this->SUP = false; - $this->SUB = false; - $this->bullet = false; - - // only show pagenumber if numbering on - // mPDF 3.0 Add PageNum prefix/suffix - $pgno = $this->docPageNum($this->page, true); - - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $side = 'even'; - } - else { // ODD // OR NOT MIRRORING MARGINS/FOOTERS = DEFAULT - $side = 'odd'; - } - $maxfontheight = 0; - foreach(array('L','C','R') AS $pos) { - if (isset($h[$side][$pos]['content']) && $h[$side][$pos]['content']) { - if (isset($h[$side][$pos]['font-size']) && $h[$side][$pos]['font-size']) { $hfsz = $h[$side][$pos]['font-size']; } - else { $hfsz = $this->default_font_size; } - $maxfontheight = max($maxfontheight,$hfsz); - } - } - // LEFT-CENTER-RIGHT - foreach(array('L','C','R') AS $pos) { - if (isset($h[$side][$pos]['content']) && $h[$side][$pos]['content']) { - $hd = str_replace('{PAGENO}',$pgno,$h[$side][$pos]['content']); - // mPDF 3.0 - $hd = str_replace($this->aliasNbPgGp,$this->nbpgPrefix.$this->aliasNbPgGp.$this->nbpgSuffix,$hd); // {nbpg} - $hd = preg_replace('/\{DATE\s+(.*?)\}/e',"date('\\1')",$hd); - if (isset($h[$side][$pos]['font-family']) && $h[$side][$pos]['font-family']) { $hff = $h[$side][$pos]['font-family']; } - // mPDF 3.0 original_ in case pagebreak in middle of table - else { $hff = $this->original_default_font; } - if (isset($h[$side][$pos]['font-size']) && $h[$side][$pos]['font-size']) { $hfsz = $h[$side][$pos]['font-size']; } - // mPDF 3.0 original_ in case pagebreak in middle of table - else { $hfsz = $this->original_default_font_size; } - $maxfontheight = max($maxfontheight,$hfsz); - if (isset($h[$side][$pos]['font-style']) && $h[$side][$pos]['font-style']) { $hfst = $h[$side][$pos]['font-style']; } - else { $hfst = ''; } - if (isset($h[$side][$pos]['color']) && $h[$side][$pos]['color']) { - $hfcol = $h[$side][$pos]['color']; - $cor = $this->ConvertColor($hfcol); - if ($cor) { $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); } - } - else { $hfcol = ''; } - // mPDF 3.0 Force output - $this->SetFont($hff,$hfst,$hfsz,true,true); - $this->x = $headerlmargin ; - // mPDF 4.0 -// $this->y = $this->h - $this->margin_footer - ($maxfontheight/$this->k * 0.5) - 0.5; - $this->y = $this->h - $this->margin_footer - ($maxfontheight/$this->k); - $hd = $this->purify_utf8_text($hd); - if ($this->text_input_as_HTML) { - $hd = $this->all_entities_to_utf8($hd); - } - // CONVERT CODEPAGE - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $hd = mb_convert_encoding($hd,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $hd = api_convert_encoding($hd,$this->mb_enc,'UTF-8'); } - // - // DIRECTIONALITY RTL - $this->magic_reverse_dir($hd); // *RTL* - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($hd); // *INDIC* - $align = $pos; - if ($this->directionality == 'rtl') { - if ($pos == 'L') { $align = 'R'; } - else if ($pos == 'R') { $align = 'L'; } - } - - if ($pos!='L' && (stripos($hd,$this->aliasNbPg)!==false || stripos($hd,$this->aliasNbPgGp)!==false)) { - if (stripos($hd,$this->aliasNbPgGp)!==false) { $type= 'nbpggp'; } else { $type= 'nbpg'; } - $this->_out('{mpdfheader'.$type.' '.$pos.' ff='.$hff.' fs='.$hfst.' fz='.$hfsz.'}'); - // mPDF 4.0 - $this->Cell($headerpgwidth ,$maxfontheight/$this->k ,$hd,0,0,$align,0,'',0,0,0,'M'); - $this->_out('Q'); - } - else { - // mPDF 4.0 - $this->Cell($headerpgwidth ,$maxfontheight/$this->k ,$hd,0,0,$align,0,'',0,0,0,'M'); - } - if ($hfcol) { $this->SetTextColor(0); } - } - } - // Return Font to normal - $this->SetFont($this->default_font,'',$this->original_default_font_size); - - // LINE - // mPDF 4.0 - if (isset($h[$side]['line']) && $h[$side]['line']) { - $this->SetLineWidth(0.1); - $this->SetDrawColor(0); - // mPDF 4.0 - $this->Line($headerlmargin , $this->y-($maxfontheight*($this->footer_line_spacing)/$this->k), $headerlmargin +$headerpgwidth, $this->y-($maxfontheight*($this->footer_line_spacing)/$this->k)); - } - if ($this->forcePortraitHeaders && $this->CurOrientation=='L' && $this->CurOrientation!=$this->DefOrientation) { - $this->_out('Q'); - } - } - $this->processingHeader=false; - -} - -/*-- HYPHENATION --*/ -/////////////////// -/////////////////// -// HYPHENATION -/////////////////// -// Soft hyphs -function softHyphenate($word, $maxWidth) { - // Don't hyphenate web addresses - if (preg_match('/^(http:|www\.)/',$word)) { return array(false,'','',''); } - - // Get dictionary - $poss = array(); - $softhyphens = array(); - $offset = 0; - $p = true; - if ($this->is_MB) { // *UNICODE-FONTS* - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$wl = mb_strlen($word,'UTF-8'); // *UNICODE-FONTS* - $wl = api_strlen($word,'UTF-8'); // *UNICODE-FONTS* - // - } // *UNICODE-FONTS* - else { // *UNICODE-FONTS* - $wl = strlen($word); - } // *UNICODE-FONTS* - while($offset < $wl) { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$p = mb_strpos($word, "\xc2\xad", $offset, 'UTF-8'); - $p = api_strpos($word, "\xc2\xad", $offset, 'UTF-8'); - // - } - // mPDF 3.0 Soft Hyphens chr(173) - else -/*-- END UNICODE-FONTS --*/ - if ($this->FontFamily!='symbol' && $this->FontFamily!='zapfdingbats') { - $p = strpos($word, chr(173), $offset); - } - if ($p !== false) { $poss[] = $p - count($poss); } - else { break; } - $offset = $p+1; - } - $success = false; - foreach($poss AS $i) { -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$a = mb_substr($word,0,$i,'UTF-8'); - $a = api_substr($word,0,$i,'UTF-8'); - // - if ($this->GetStringWidth($a.'-') > $maxWidth) { break ; } - $pre = $a; - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$post = mb_substr($word,$i,mb_strlen($word,'UTF-8'),'UTF-8'); // mPDF 4.2.009 - //$prelength = mb_strlen($pre, 'UTF-8'); - $post = api_substr($word,$i,api_strlen($word,'UTF-8'),'UTF-8'); // mPDF 4.2.009 - $prelength = api_strlen($pre, 'UTF-8'); - // - } - else { -/*-- END UNICODE-FONTS --*/ - $a = substr($word,0,$i); - if ($this->GetStringWidth($a.'-') > $maxWidth) { break ; } - $pre = $a; - $post = substr($word,$i,strlen($word)); // mPDF 4.2.009 - $prelength = strlen($pre); - } // *UNICODE-FONTS* - $success = true; - } - return array($success,$pre,$post,$prelength); -} - -/////////////////// -// Word hyphenation -function hyphenateWord($word, $maxWidth) { - // Do everything inside this function in utf-8 - // Don't hyphenate web addresses - if (preg_match('/^(http:|www\.)/',$word)) { return array(false,'','',''); } - - - // Get dictionary - if (!$this->loadedSHYdictionary) { - if (file_exists(_MPDF_PATH.'patterns/dictionary.txt')) { - $this->SHYdictionary = file(_MPDF_PATH.'patterns/dictionary.txt',FILE_SKIP_EMPTY_LINES); - foreach($this->SHYdictionary as $entry) { - $entry = trim($entry); - $poss = array(); - $offset = 0; - $p = true; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$wl = mb_strlen($entry ,'UTF-8'); - $wl = api_strlen($entry ,'UTF-8'); - // - while($offset < $wl) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$p = mb_strpos($entry, '/', $offset, 'UTF-8'); - $p = api_strpos($entry, '/', $offset, 'UTF-8'); - // - if ($p !== false) { $poss[] = $p - count($poss); } - else { break; } - $offset = $p+1; - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (count($poss)) { $this->SHYdictionaryWords[str_replace('/', '', mb_strtolower($entry))] = $poss; } - if (count($poss)) { $this->SHYdictionaryWords[str_replace('/', '', api_strtolower($entry))] = $poss; } - // - } - } - $this->loadedSHYdictionary = true; - } - - if (!in_array($this->SHYlang,$this->SHYlanguages)) { return array(false,'','',''); } - // If no pattern loaded or not the best one - if (count($this->SHYpatterns) < 1 || ($this->loadedSHYpatterns && $this->loadedSHYpatterns != $this->SHYlang)) { - include(_MPDF_PATH."patterns/" . $this->SHYlang . ".php"); - $patterns = explode(' ', $patterns); // mPDF 4.4.012 - $new_patterns = array(); - for($i = 0; $i < count($patterns); $i++) { - $value = $patterns[$i]; - $new_patterns[preg_replace('/[0-9]/', '', $value)] = $value; // mPDF 4.4.012 - } - $this->SHYpatterns = $new_patterns; - $this->loadedSHYpatterns = $this->SHYlang; - } - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $word = mb_convert_encoding($word,'UTF-8',$this->mb_enc); } - if (!$this->is_MB) { $word = api_convert_encoding($word,'UTF-8',$this->mb_enc); } - // - - $prepre = ''; - $postpost = ''; - $startpunctuation = "\xc2\xab\xc2\xbf\xe2\x80\x98\xe2\x80\x9b\xe2\x80\x9c\xe2\x80\x9f"; - $endpunctuation = "\xe2\x80\x9e\xe2\x80\x9d\xe2\x80\x9a\xe2\x80\x99\xc2\xbb"; - $pre = ''; - $post = ''; - - - if (preg_match('/^(["\''.$startpunctuation .'])+(.{'.$this->SHYcharmin.',})$/u',$word,$m)) { - $prepre = $m[1]; - $word = $m[2]; - } - if (preg_match('/^(.{'.$this->SHYcharmin.',})([\'\.,;:!?"'.$endpunctuation .']+)$/u',$word,$m)) { - $word = $m[1]; - $postpost = $m[2]; - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if(mb_strlen($word,'UTF-8') < $this->SHYcharmin) { - if(api_strlen($word,'UTF-8') < $this->SHYcharmin) { - // - return array(false,'','',''); - } - $success = false; - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if(isset($this->SHYdictionaryWords[mb_strtolower($word)])) { - // foreach($this->SHYdictionaryWords[mb_strtolower($word)] AS $i) { - // $a = $prepre . mb_substr($word,0,$i,'UTF-8'); - // if (!$this->is_MB) { $testa = mb_convert_encoding($a,$this->mb_enc,'UTF-8'); } - if(isset($this->SHYdictionaryWords[api_strtolower($word)])) { - foreach($this->SHYdictionaryWords[api_strtolower($word)] AS $i) { - $a = $prepre . api_substr($word,0,$i,'UTF-8'); - if (!$this->is_MB) { $testa = api_convert_encoding($a,$this->mb_enc,'UTF-8'); } - // - else { $testa = $a; } - if ($this->GetStringWidth($testa.'-') > $maxWidth) { break ; } - $pre = $a; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$post = mb_substr($word,$i,mb_strlen($word,'UTF-8'),'UTF-8') . $postpost; // mPDF 4.2.009 - $post = api_substr($word,$i,api_strlen($word,'UTF-8'),'UTF-8') . $postpost; // mPDF 4.2.009 - // - $success = true; - } - } - - if (!$success) { - $text_word = '_' . $word . '_'; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$word_length = mb_strlen($text_word,'UTF-8'); - $word_length = api_strlen($text_word,'UTF-8'); - // - - $single_character = preg_split('//u', $text_word); - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$text_word = mb_strtolower($text_word,'UTF-8'); - $text_word = api_strtolower($text_word,'UTF-8'); - // - $hyphenated_word = array(); - $numb3rs = array('0' => true, '1' => true, '2' => true, '3' => true, '4' => true, '5' => true, '6' => true, '7' => true, '8' => true, '9' => true); - for($position = 0; $position <= ($word_length - $this->SHYcharmin); $position++) { - $maxwins = min(($word_length - $position), $this->SHYcharmax); - for($win = $this->SHYcharmin; $win <= $maxwins; $win++) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if(isset($this->SHYpatterns[mb_substr($text_word, $position, $win,'UTF-8')])) { - // $pattern = $this->SHYpatterns[mb_substr($text_word, $position, $win,'UTF-8')]; - if(isset($this->SHYpatterns[api_substr($text_word, $position, $win,'UTF-8')])) { - $pattern = $this->SHYpatterns[api_substr($text_word, $position, $win,'UTF-8')]; - // - $digits = 1; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$pattern_length = mb_strlen($pattern,'UTF-8'); - $pattern_length = api_strlen($pattern,'UTF-8'); - // - - for($i = 0; $i < $pattern_length; $i++) { - $char = $pattern[$i]; - if(isset($numb3rs[$char])) { - $zero = ($i == 0) ? $position - 1 : $position + $i - $digits; - if(!isset($hyphenated_word[$zero]) || $hyphenated_word[$zero] != $char) $hyphenated_word[$zero] = $char; - $digits++; - } - } - } - } - } - - // Modified by Ivan Tcholakov, 28-JUN-2010. - //for($i = $this->SHYleftmin; $i <= (mb_strlen($word,'UTF-8') - $this->SHYrightmin); $i++) { - //if(isset($hyphenated_word[$i]) && $hyphenated_word[$i] % 2 != 0) { - // $a = $prepre . mb_substr($word,0,$i,'UTF-8'); - // if (!$this->is_MB) { $testa = mb_convert_encoding($a,$this->mb_enc,'UTF-8'); } - for($i = $this->SHYleftmin; $i <= (api_strlen($word,'UTF-8') - $this->SHYrightmin); $i++) { - if(isset($hyphenated_word[$i]) && $hyphenated_word[$i] % 2 != 0) { - $a = $prepre . api_substr($word,0,$i,'UTF-8'); - if (!$this->is_MB) { $testa = api_convert_encoding($a,$this->mb_enc,'UTF-8'); } - // - else { $testa = $a; } - if ($this->GetStringWidth($testa.'-') > $maxWidth + 0.0001) { break ; } - $pre = $a; - // Modified by Ivan Tcholakov, 28-JUN-2010. - //$post = mb_substr($word,$i,mb_strlen($word,'UTF-8'),'UTF-8') . $postpost; // mPDF 4.2.009 - $post = api_substr($word,$i,api_strlen($word,'UTF-8'),'UTF-8') . $postpost; // mPDF 4.2.009 - // - $success = true; - } - } - } - if (!$this->is_MB) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$pre = mb_convert_encoding($pre,$this->mb_enc,'UTF-8'); - //$post = mb_convert_encoding($post,$this->mb_enc,'UTF-8'); - $pre = api_convert_encoding($pre,$this->mb_enc,'UTF-8'); - $post = api_convert_encoding($post,$this->mb_enc,'UTF-8'); - // - $prelength = strlen($pre); - } - else { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$prelength = mb_strlen($pre); - $prelength = api_strlen($pre); - // - } - return array($success,$pre,$post,$prelength); - -} -/*-- END HYPHENATION --*/ - - - -/////////////////// -/// HTML parser /// -/////////////////// -function WriteHTML($html,$sub=0,$init=true,$close=true) { - // $sub ADDED - 0 = default; 1=headerCSS only; 2=HTML body (parts) only; 3 - HTML parses only - // 4 - writes HTML headers - // $close Leaves buffers etc. in current state, so that it can continue a block etc. - // $init - Clears and sets buffers to Top level block etc. - // mPDF 4.2.018 - if ($this->PDFA) { // default font may be set as core when win-1252 and PDFA not set until runtime - reset($this->fonts); - $df = key($this->fonts); - if ($df=='times' || $df == 'helvetica' || $df == 'courier') { - unset($this->fonts[$df]); - } - } - - // mPDF 4.2 - if (empty($html)) { $html = ''; } - if ($this->progressBar) { $this->UpdateProgressBar(1,0,'Parsing CSS & Headers'); } // *PROGRESS-BAR* - - if ($init) { - $this->headerbuffer=''; - $this->textbuffer = array(); - // mPDF 4.0 Fixed Pos block - $this->fixedPosBlockSave = array(); - } - - if ($sub == 1) { $html = ''; } // stylesheet only - - if ($this->allow_charset_conversion) { - if ($sub < 1) { - $this->ReadCharset($html); - } - if ($this->charset_in) { - $success = iconv($this->charset_in,'UTF-8//TRANSLIT',$html); - if ($success) { $html = $success; } - } - } - - $html = $this->purify_utf8($html,false); - if ($init) { - $this->blklvl = 0; - $this->lastblocklevelchange = 0; - $this->blk = array(); - // mPDF 4.0 - $this->initialiseBlock($this->blk[0]); - $this->blk[0]['width'] =& $this->pgwidth; - $this->blk[0]['inner_width'] =& $this->pgwidth; - // mPDF 3.0 - $this->blk[0]['blockContext'] = $this->blockContext; - } - - if ($sub < 2) { - $this->ReadMetaTags($html); - - // NB default stylesheet now in mPDF.css - read on initialising class - $html = $this->ReadCSS($html); - } - - // SET Blocklevel[0] CSS if defined in or from default - $properties = $this->MergeCSS('BLOCK','BODY',''); - - if ($sub == 1) { $this->setCSS($properties,'','BODY'); return ''; } - - if ($sub < 2) { -/*-- UNICODE-FONTS --*/ - if ($this->useLang && $this->is_MB && preg_match('/]*lang=[\'\"](.*?)[\'\"]/ism',$html,$m)) { - $html_lang = $m[1]; - } -/*-- END UNICODE-FONTS --*/ - - // allow in-line CSS for body tag to be parsed // Get tag inline CSS - if (preg_match('/]*)>(.*?)<\/body>/ism',$html,$m) || preg_match('/]*)>(.*)$/ism',$html,$m)) { - $html = $m[2]; - // mPDF 3.0 - Tiling Patterns - // Changed to allow style="background: url('bg.jpg')" - if (preg_match('/style=[\"](.*?)[\"]/ism',$m[1],$mm) || preg_match('/style=[\'](.*?)[\']/ism',$m[1],$mm)) { - $zproperties = $this->readInlineCSS($mm[1]); - $properties = $this->array_merge_recursive_unique($properties,$zproperties); - } -/*-- UNICODE-FONTS --*/ - if (isset($html_lang) && $html_lang) { $properties['LANG'] = $html_lang; } - if ($this->useLang && $this->is_MB && preg_match('/lang=[\'\"](.*?)[\'\"]/ism',$m[1],$mm)) { - $properties['LANG'] = $mm[1]; - } -/*-- END UNICODE-FONTS --*/ - } - } - $this->setCSS($properties,'','BODY'); - if (!isset($this->CSS['BODY'])) { $this->CSS['BODY'] = array(); } - - // mPDF 4.0 Not required(?) and messing up text-align for RTL -// $this->CSS['BODY'] = $this->array_merge_recursive_unique($this->CSS['BODY'], $properties); - -/*-- GRADIENTS --*/ - if (isset($properties['BACKGROUND-GRADIENT'])) { - $this->bodyBackgroundGradient = $properties['BACKGROUND-GRADIENT']; - } -/*-- END GRADIENTS --*/ -/*-- BACKGROUND-IMAGES --*/ - if (isset($properties['BACKGROUND-IMAGE']) && $properties['BACKGROUND-IMAGE']) { // mPDF 4.3.011 - $file = $properties['BACKGROUND-IMAGE']; - $sizesarray = $this->Image($file,0,0,0,0,'','',false, false, false, false, false); // mPDF 4.2.032 - if (isset($sizesarray['IMAGE_ID'])) { - $image_id = $sizesarray['IMAGE_ID']; - $orig_w = $sizesarray['WIDTH']*$this->k; // in user units i.e. mm - $orig_h = $sizesarray['HEIGHT']*$this->k; // (using $this->img_dpi) - $x_repeat = true; - $y_repeat = true; - if (isset($properties['BACKGROUND-REPEAT'])) { - if ($properties['BACKGROUND-REPEAT']=='no-repeat' || $properties['BACKGROUND-REPEAT']=='repeat-x') { $y_repeat = false; } - if ($properties['BACKGROUND-REPEAT']=='no-repeat' || $properties['BACKGROUND-REPEAT']=='repeat-y') { $x_repeat = false; } - } - $x_pos = 0; - $y_pos = 0; - if (isset($properties['BACKGROUND-POSITION'])) { - $ppos = preg_split('/\s+/',$properties['BACKGROUND-POSITION']); - $x_pos = $ppos[0]; - $y_pos = $ppos[1]; - if (!stristr($x_pos ,'%') ) { $x_pos = $this->ConvertSize($x_pos ,$this->pgwidth,$this->FontSize); } - if (!stristr($y_pos ,'%') ) { $y_pos = $this->ConvertSize($y_pos ,$this->pgwidth,$this->FontSize); } - } - // mPDF 4.3.015 - if (isset($properties['BACKGROUND-IMAGE-RESIZE'])) { $resize = $properties['BACKGROUND-IMAGE-RESIZE']; } - else { $resize = 0; } - // mPDF 4.3.017 - if (isset($properties['BACKGROUND-IMAGE-OPACITY'])) { $opacity = $properties['BACKGROUND-IMAGE-OPACITY']; } - else { $opacity = 1; } - $this->bodyBackgroundImage = array('image_id'=>$image_id, 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$x_pos, 'y_pos'=>$y_pos, 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat, 'resize'=>$resize, 'opacity'=>$opacity); // mPDF 4.3.015 4.3.017 - } - } -/*-- END BACKGROUND-IMAGES --*/ -/*-- CSS-PAGE --*/ - // mPDF 4.2 - // If page-box is set - if ($this->state==0 && $this->CSS['@PAGE']) { - $this->page_box['current'] = ''; - $this->page_box['using'] = true; - // mPDF 4.2 - list($pborientation,$pbmgl,$pbmgr,$pbmgt,$pbmgb,$pbmgh,$pbmgf,$hname,$fname,$bg,$resetpagenum,$pagenumstyle,$suppress,$marks,$newformat) = $this->SetPagedMediaCSS('', false, 'O'); - $this->DefOrientation = $this->CurOrientation = $pborientation; - $this->orig_lMargin = $this->DeflMargin = $pbmgl; - $this->orig_rMargin = $this->DefrMargin = $pbmgr; - $this->orig_tMargin = $this->tMargin = $pbmgt; - $this->orig_bMargin = $this->bMargin = $pbmgb; - $this->orig_hMargin = $this->margin_header = $pbmgh; - $this->orig_fMargin = $this->margin_footer = $pbmgf; - list($pborientation,$pbmgl,$pbmgr,$pbmgt,$pbmgb,$pbmgh,$pbmgf,$hname,$fname,$bg,$resetpagenum,$pagenumstyle,$suppress,$marks,$newformat) = $this->SetPagedMediaCSS('', true, 'O'); // first page - $this->show_marks = $marks; - if ($hname && !preg_match('/^html_(.*)$/i',$hname)) $this->firstPageBoxHeader = $hname; - if ($fname && !preg_match('/^html_(.*)$/i',$fname)) $this->firstPageBoxFooter = $fname; - } -/*-- END CSS-PAGE --*/ - - - if($this->state==0 && $sub!=1 && $sub!=3 && $sub!=4) { - $this->AddPage($this->CurOrientation); - } - - $parseonly = false; - $this->bufferoutput = false; - if ($sub == 3) { - $parseonly = true; - // Close any open block tags - for ($b= $this->blklvl;$b>0;$b--) { $this->CloseTag($this->blk[$b]['tag']); } - // Output any text left in buffer - if (count($this->textbuffer)) { $this->printbuffer($this->textbuffer); } - $this->textbuffer=array(); - } - else if ($sub == 4) { - // Close any open block tags - for ($b= $this->blklvl;$b>0;$b--) { $this->CloseTag($this->blk[$b]['tag']); } - // Output any text left in buffer - if (count($this->textbuffer)) { $this->printbuffer($this->textbuffer); } - $this->bufferoutput = true; - $this->textbuffer=array(); - $this->headerbuffer=''; - $properties = $this->MergeCSS('BLOCK','BODY',''); - $this->setCSS($properties,'','BODY'); - } - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //mb_internal_encoding('UTF-8'); - _api_mb_internal_encoding('UTF-8'); - // - - $html = $this->AdjustHTML($html,$this->directionality,$this->usepre, $this->tabSpaces); //Try to make HTML look more like XHTML - - if ($this->autoFontGroups) { $html = $this->AutoFont($html); } - -/*-- HTMLHEADERS-FOOTERS --*/ - preg_match_all('/]*)>(.*?)<\/htmlpageheader>/si',$html,$h); - for($i=0;$ipageHTMLheaders[$n[1]]['html'] = $h[2][$i]; - $this->pageHTMLheaders[$n[1]]['h'] = $this->_gethtmlheight($h[2][$i]); - } - } - preg_match_all('/]*)>(.*?)<\/htmlpagefooter>/si',$html,$f); - for($i=0;$ipageHTMLfooters[$n[1]]['html'] = $f[2][$i]; - $this->pageHTMLfooters[$n[1]]['h'] = $this->_gethtmlheight($f[2][$i]); - } - } -/*-- END HTMLHEADERS-FOOTERS --*/ - $html = preg_replace('//si','',$html); - $html = preg_replace('//si','',$html); - -/*-- HTMLHEADERS-FOOTERS --*/ - - // mPDF 4.2 - if (isset($hname) && preg_match('/^html_(.*)$/i',$hname,$n)) $this->SetHTMLHeader($this->pageHTMLheaders[$n[1]],'O',true); - if (isset($fname) && preg_match('/^html_(.*)$/i',$fname,$n)) $this->SetHTMLFooter($this->pageHTMLfooters[$n[1]],'O'); - -/*-- END HTMLHEADERS-FOOTERS --*/ - - $html=str_replace('SubstituteChars($html); - - // mPDF 4.0 - if (preg_match("/([".$this->pregRTLchars."])/u", $html)) { $this->biDirectional = true; } // *RTL* - - // Don't allow non-breaking spaces that are converted to substituted chars or will break anyway and mess up table width calc. - $html = str_replace('160',$this->chrs[32],$html); - $html = str_replace('','|',$html); - $html = str_replace('','|',$html); - $html = str_replace('','|',$html); - - //Add new supported tags in the DisableTags function - $html=strip_tags($html,$this->enabledtags); //remove all unsupported tags, but the ones inside the 'enabledtags' string - - //Explode the string in order to parse the HTML code - $a=preg_split('/<(.*?)>/ms',$html,-1,PREG_SPLIT_DELIM_CAPTURE); - // ? more accurate regexp that allows e.g. - // if changing - also change in fn.SubstituteChars() - // $a = preg_split ('/<((?:[^<>]+(?:"[^"]*"|\'[^\']*\')?)+)>/ms', $html, -1, PREG_SPLIT_DELIM_CAPTURE); - - if ($this->mb_enc) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //mb_internal_encoding($this->mb_enc); - _api_mb_internal_encoding($this->mb_enc); - // - } - $pbc = 0; // *PROGRESS-BAR* - if ($this->progressBar) { $this->UpdateProgressBar(1,0); } // *PROGRESS-BAR* - - $this->subPos = 0; - $cnt = count($a); // mPDF 4.2 - for($i=0;$i<$cnt; $i++) { // mPDF 4.2 - $e = $a[$i]; - if($i%2==0) { - //TEXT - if ($this->blk[$this->blklvl]['hide']) { continue; } - - // mPDF 4.0 - if ($this->inFixedPosBlock) { $this->fixedPosBlock .= $e; continue; } // *CSS-POSITION* - if (strlen($e) == 0) { continue; } - - $e = strcode2utf($e); - $e = $this->lesser_entity_decode($e); - -/*-- UNICODE-FONTS --*/ - // mPDF 4.2 - // mPDF 4.3.004 Not specialcontent (textarea / select) - if ($this->useSubstitutionsMB && $this->is_MB && !$this->isCJK && !$this->usingCoreFont && $this->subPos<$i && !$this->specialcontent) { - $cnt += $this->SubstituteCharsMB($a, $i, $e); - } -/*-- END UNICODE-FONTS --*/ - - if (($this->directionality == 'rtl') || (($this->directionality == 'ltr') && ($this->biDirectional))) { // *RTL* - // mPDF 4.0 Removed rtlAsArabicFarsi - $e = preg_replace("/([".$this->pregRTLchars."]+)/ue", '$this->ArabJoin(stripslashes(\'\\1\'))', $e); // *RTL* - } // *RTL* - - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($e); // *INDIC* - - // CONVERT CODEPAGE - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $e = mb_convert_encoding($e,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $e = api_convert_encoding($e,$this->mb_enc,'UTF-8'); } - // -/*-- UNICODE-FONTS --*/ - if (($this->is_MB && !$this->isCJK) && (!$this->usingCoreFont)) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($this->toupper) { $e = mb_strtoupper($e,$this->mb_enc); } - //if ($this->tolower) { $e = mb_strtolower($e,$this->mb_enc); } - if ($this->toupper) { $e = api_strtoupper($e,$this->mb_enc); } - if ($this->tolower) { $e = api_strtolower($e,$this->mb_enc); } - // - } - else -/*-- END UNICODE-FONTS --*/ - if (!$this->isCJK) { - if ($this->toupper) { $e = strtoupper($e); } - if ($this->tolower) { $e = strtolower($e); } - } - if (($this->tts) || ($this->ttz) || ($this->tta)) { - $es = explode('|',$e); - $e = ''; - foreach($es AS $val) { - $e .= $this->chrs[$val]; - } - } - //Adjust lineheight - //$this->SetLineHeight($this->FontSizePt); //should be inside printbuffer? // does nothing - -/*-- FORMS --*/ - // FORM ELEMENTS - if ($this->specialcontent) { - //SELECT tag (form element) - if ($this->specialcontent == "type=select") { - $e = ltrim($e); - $stringwidth = $this->GetStringWidth($e); - if (!isset($this->selectoption['MAXWIDTH']) || $stringwidth > $this->selectoption['MAXWIDTH']) { $this->selectoption['MAXWIDTH'] = $stringwidth; } - if (!isset($this->selectoption['SELECTED']) || $this->selectoption['SELECTED'] == '') { $this->selectoption['SELECTED'] = $e; } - // mPDD 1.4 Active Forms - if (isset($this->selectoption['ACTIVE']) && $this->selectoption['ACTIVE']) { - $this->selectoption['ITEMS'][]=array('exportValue'=>$this->selectoption['currentVAL'], 'content'=>$e, 'selected'=>$this->selectoption['currentSEL']); - } - } - // TEXTAREA - else { - $objattr = unserialize($this->specialcontent); - $objattr['text'] = $e; - $te = "\xbb\xa4\xactype=textarea,objattr=".serialize($objattr)."\xbb\xa4\xac"; - if ($this->tdbegin) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array($te,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - else { - $this->textbuffer[] = array($te,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - } - } -/*-- END FORMS --*/ - - // TABLE -/*-- TABLES --*/ - else if ($this->tableLevel) { - if ($this->tdbegin) { - if (($this->ignorefollowingspaces) and !$this->ispre) { $e = ltrim($e); } - if ($e || $e==='0') { - // mPDF 3.0 - if (($this->blockjustfinished || $this->listjustfinished) && $this->cell[$this->row][$this->col]['s']>0) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['text'][] = "\n"; - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - $this->cell[$this->row][$this->col]['s'] = 0;// reset - } - // mPDF 3.0 - $this->blockjustfinished=false; - $this->listjustfinished=false; - - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['text'][] = $e; - if (!isset($this->cell[$this->row][$this->col]['R']) || !$this->cell[$this->row][$this->col]['R']) { - if (isset($this->cell[$this->row][$this->col]['s'])) { - $this->cell[$this->row][$this->col]['s'] += $this->GetStringWidth($e); - } - else { $this->cell[$this->row][$this->col]['s'] = $this->GetStringWidth($e); } - } - if ($this->tableLevel==1 && $this->useGraphs) { - $this->graphs[$this->currentGraphId]['data'][$this->row][$this->col] = $e; - } - $this->nestedtablejustfinished = false; - // mPDF 3.0 - $this->linebreakjustfinished=false; - } - } - } -/*-- END TABLES --*/ - // ALL ELSE - else { - if ($this->ignorefollowingspaces and !$this->ispre) { $e = ltrim($e); } - if ($e || $e==='0') $this->textbuffer[] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - } - - - else { // TAG ** - // mPDF 4.0 - if($e[0]=='/') { // mPDF 4.4.012 -/*-- PROGRESS-BAR --*/ - // mPDF 4.2 Progress bar - if ($this->progressBar) { // 10% increments - if (intval($i*10/$cnt) != $pbc) { $pbc = intval($i*10/$cnt); $this->UpdateProgressBar(1,$pbc*10,$tag); } - } -/*-- END PROGRESS-BAR --*/ - - // Check for tags where HTML specifies optional end tags, - // and/or does not allow nesting e.g. P inside P, or - $endtag = strtoupper(substr($e,1)); - // mPDF 4.0 - if($this->blk[$this->blklvl]['hide']) { - if (in_array($endtag, $this->outerblocktags) || in_array($endtag, $this->innerblocktags)) { - unset($this->blk[$this->blklvl]); - $this->blklvl--; - } - continue; - } - -/*-- CSS-POSITION --*/ - if ($this->inFixedPosBlock) { - if (in_array($endtag, $this->outerblocktags) || in_array($endtag, $this->innerblocktags)) { $this->fixedPosBlockDepth--; } - if ($this->fixedPosBlockDepth == 0) { - $this->fixedPosBlockSave[] = array($this->fixedPosBlock, $this->fixedPosBlockBBox, $this->page); - $this->fixedPosBlock = ''; - $this->inFixedPosBlock = false; - continue; - } - $this->fixedPosBlock .= '<'.$e.'>'; - continue; - } -/*-- END CSS-POSITION --*/ - if ($this->allow_html_optional_endtags && !$parseonly) { - if (($endtag == 'DIV' || $endtag =='FORM' || $endtag =='CENTER') && $this->lastoptionaltag == 'P') { $this->CloseTag($this->lastoptionaltag ); } - if ($this->lastoptionaltag == 'LI' && $endtag == 'OL') { $this->CloseTag($this->lastoptionaltag ); } - if ($this->lastoptionaltag == 'LI' && $endtag == 'UL') { $this->CloseTag($this->lastoptionaltag ); } - if ($this->lastoptionaltag == 'DD' && $endtag == 'DL') { $this->CloseTag($this->lastoptionaltag ); } - if ($this->lastoptionaltag == 'DT' && $endtag == 'DL') { $this->CloseTag($this->lastoptionaltag ); } - if ($this->lastoptionaltag == 'OPTION' && $endtag == 'SELECT') { $this->CloseTag($this->lastoptionaltag ); } -/*-- TABLES --*/ - if ($endtag == 'TABLE') { - if ($this->lastoptionaltag == 'THEAD' || $this->lastoptionaltag == 'TBODY' || $this->lastoptionaltag == 'TFOOT') { - $this->CloseTag($this->lastoptionaltag); - } - if ($this->lastoptionaltag == 'TR') { $this->CloseTag('TR'); } - if ($this->lastoptionaltag == 'TD' || $this->lastoptionaltag == 'TH') { $this->CloseTag($this->lastoptionaltag ); $this->CloseTag('TR'); } - } - if ($endtag == 'THEAD' || $endtag == 'TBODY' || $endtag == 'TFOOT') { - if ($this->lastoptionaltag == 'TR') { $this->CloseTag('TR'); } - if ($this->lastoptionaltag == 'TD' || $this->lastoptionaltag == 'TH') { $this->CloseTag($this->lastoptionaltag ); $this->CloseTag('TR'); } - } - if ($endtag == 'TR') { - if ($this->lastoptionaltag == 'TD' || $this->lastoptionaltag == 'TH') { $this->CloseTag($this->lastoptionaltag ); } - } -/*-- END TABLES --*/ - } - $this->CloseTag($endtag); - } - - else { // OPENING TAG - if($this->blk[$this->blklvl]['hide']) { - if (strpos($e,' ')) { $te = strtoupper(substr($e,0,strpos($e,' '))); } - else { $te = strtoupper($e); } - if (in_array($te, $this->outerblocktags) || in_array($te, $this->innerblocktags)) { - $this->blklvl++; - $this->blk[$this->blklvl]['hide']=true; - } - continue; - } - -/*-- CSS-POSITION --*/ - if ($this->inFixedPosBlock) { - if (strpos($e,' ')) { $te = strtoupper(substr($e,0,strpos($e,' '))); } - else { $te = strtoupper($e); } - $this->fixedPosBlock .= '<'.$e.'>'; - if (in_array($te, $this->outerblocktags) || in_array($te, $this->innerblocktags)) { $this->fixedPosBlockDepth++; } - continue; - } -/*-- END CSS-POSITION --*/ - $regexp = '|=\'(.*?)\'|s'; // eliminate single quotes, if any - $e = preg_replace($regexp,"=\"\$1\"",$e); - // changes anykey=anyvalue to anykey="anyvalue" (only do this inside tags) - if (substr($e,0,10)!='pageheader' && substr($e,0,10)!='pagefooter') { - $regexp = '| (\\w+?)=([^\\s>"]+)|si'; - $e = preg_replace($regexp," \$1=\"\$2\"",$e); - } - - //Fix path values, if needed - $orig_srcpath = ''; // mPDF 4.2.029 - if ((stristr($e,"href=") !== false) or (stristr($e,"src=") !== false) ) { - $regexp = '/ (href|src)="(.*?)"/i'; - preg_match($regexp,$e,$auxiliararray); - if (isset($auxiliararray[2])) { $path = $auxiliararray[2]; } - else { $path = ''; } - // mPDF 4.2 Special case for img src="var:varname" - leave unchanged - // mPDF 3.0 - if (trim($path) != '' && !(stristr($e,"src=") !== false && substr($path,0,4)=='var:')) { - $orig_srcpath = $path; // mPDF 4.2.029 - $this->GetFullPath($path); // mPDF 4.0 - $regexp = '/ (href|src)="(.*?)"/i'; - $e = preg_replace($regexp,' \\1="'.$path.'"',$e); - } - }//END of Fix path values - - - //Extract attributes - $contents=array(); - // mPDF 3.0 - Tiling Patterns - // Changed to allow style="background: url('bg.jpg')" - preg_match_all('/\\S*=["][^"]*["]/',$e,$contents1); - preg_match_all('/\\S*=[\'][^\']*[\']/',$e,$contents2); - $contents = array_merge($contents1, $contents2); - preg_match('/\\S+/',$e,$a2); - $tag=strtoupper($a2[0]); - $attr=array(); - if ($orig_srcpath) { $attr['ORIG_SRC'] = $orig_srcpath; } // mPDF 4.2.029 - if (!empty($contents)) { - foreach($contents[0] as $v) { - // mPDF 3.0 - Tiling Patterns - // Changed to allow style="background: url('bg.jpg')" - if(preg_match('/^([^=]*)=["]?([^"]*)["]?$/',$v,$a3) || preg_match('/^([^=]*)=[\']?([^\']*)[\']?$/',$v,$a3)) { - if (strtoupper($a3[1])=='ID' || strtoupper($a3[1])=='CLASS') { // 4.2.013 Omits STYLE - $attr[strtoupper($a3[1])]=trim(strtoupper($a3[2])); - } - // includes header-style-right etc. used for - else if (preg_match('/^(HEADER|FOOTER)-STYLE/i',$a3[1])) { - $attr[strtoupper($a3[1])]=trim(strtoupper($a3[2])); - } - else { - $attr[strtoupper($a3[1])]=trim($a3[2]); - } - } - } - } - $this->OpenTag($tag,$attr); -/*-- CSS-POSITION --*/ - // mPDF 4.0 Fixed Pos block - if ($this->inFixedPosBlock) { - $this->fixedPosBlockBBox = array($tag,$attr, $this->x, $this->y); - $this->fixedPosBlock = ''; - $this->fixedPosBlockDepth = 1; - } -/*-- END CSS-POSITION --*/ - } - - } // end TAG - } //end of foreach($a as $i=>$e) - - if ($close) { - - // Close any open block tags - for ($b= $this->blklvl;$b>0;$b--) { $this->CloseTag($this->blk[$b]['tag']); } - - // Output any text left in buffer - if (count($this->textbuffer) && !$parseonly) { $this->printbuffer($this->textbuffer); } - if (!$parseonly) $this->textbuffer=array(); - -/*-- CSS-FLOAT --*/ - // If ended with a float, need to move to end page - $currpos = $this->page*1000 + $this->y; - if (isset($this->blk[$this->blklvl]['float_endpos']) && $this->blk[$this->blklvl]['float_endpos'] > $currpos) { - $old_page = $this->page; - $new_page = intval($this->blk[$this->blklvl]['float_endpos'] /1000); - if ($old_page != $new_page) { - $s = $this->PrintPageBackgrounds(); - // Writes after the marker so not overwritten later by page background etc. - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', '\\1'."\n".$s."\n", $this->pages[$this->page]); - $this->pageBackgrounds = array(); - $this->page = $new_page; - $this->ResetMargins(); - $this->Reset(); - $this->pageoutput[$this->page] = array(); - } - $this->y = (($this->blk[$this->blklvl]['float_endpos'] *1000) % 1000000)/1000; // mod changes operands to integers before processing - } -/*-- END CSS-FLOAT --*/ - -/*-- CSS-IMAGE-FLOAT --*/ - $this->printfloatbuffer(); -/*-- END CSS-IMAGE-FLOAT --*/ - - //Create Internal Links, if needed - if (!empty($this->internallink) ) { - foreach($this->internallink as $k=>$v) { - if (strpos($k,"#") !== false ) { continue; } //ignore - $ypos = $v['Y']; - $pagenum = $v['PAGE']; - $sharp = "#"; - while (array_key_exists($sharp.$k,$this->internallink)) { - $internallink = $this->internallink[$sharp.$k]; - $this->SetLink($internallink,$ypos,$pagenum); - $sharp .= "#"; - } - } - } - - $this->linemaxfontsize = ''; - $this->lineheight_correction = $this->default_lineheight_correction; - - $this->bufferoutput = false; - -/*-- CSS-POSITION --*/ - // mPDF 4.0 Fixed Pos block - if (count($this->fixedPosBlockSave) && $sub != 4) { - foreach($this->fixedPosBlockSave AS $fpbs) { - $old_page = $this->page; - $this->page = $fpbs[2]; - $this->WriteFixedPosHTML($fpbs[0], 0, 0, 100, 100,'auto', $fpbs[1]); // 0,0,10,10 are overwritten by bbox - $this->page = $old_page; - } - } -/*-- END CSS-POSITION --*/ - - } -} - -/*-- CSS-POSITION --*/ -// mPDF 4.0 -function WriteFixedPosHTML($html='',$x, $y, $w, $h, $overflow='visible', $bounding=array()) { - // $overflow can be 'hidden', 'visible' or 'auto' - 'auto' causes autofit to size - // Annotations disabled - // Links do work - // Will always go on current page (or start Page 1 if required) - // Probably INCOMPATIBLE WITH keep with table, columns etc. - // Called externally or interally via
    - // When used internally, $x $y $w $h and $overflow are all overridden by $bounding - - $overflow = strtolower($overflow); - if($this->state==0) { - $this->AddPage($this->CurOrientation); - } - $save_y = $this->y; - $save_x = $this->x; - // mPDF 4.1 // Allows Image in fixedposdiv to be full height - $this->fullImageHeight = $this->h; - $save_cols = false; -/*-- COLUMNS --*/ - if ($this->ColActive) { - $save_cols = true; - $save_nbcol = $this->NbCol; // other values of gap and vAlign will not change by setting Columns off - $this->SetColumns(0); - } -/*-- END COLUMNS --*/ - $save_annots = $this->title2annots; // *ANNOTATIONS* - $this->writingHTMLheader = true; // a FIX to stop pagebreaks etc. - $this->writingHTMLfooter = true; - $this->InFooter = true; // suppresses autopagebreaks - $save_bgs = $this->pageBackgrounds; - $checkinnerhtml = preg_replace('/\s/','',$html); // mPDF 4.2 - - if ($w > $this->w) { $x = 0; $w = $this->w; } - if ($h > $this->h) { $y = 0; $h = $this->h; } - if ($x > $this->w) { $x = $this->w - $w; } - if ($y > $this->h) { $y = $this->h - $h; } - - if (!empty($bounding)) { - // $cont_ containing block = full physical page (position: absolute) or page inside margins (position: fixed) - // $bbox_ Bounding box is the
    which is positioned absolutely/fixed - // top/left/right/bottom/width/height/background*/border*/padding*/margin* are taken from bounding - // font*[family/size/style/weight]/line-height/text*[align/decoration/transform/indent]/color are transferred to $inner - // as an enclosing
    (after having checked ID/CLASS) - // $x, $y, $w, $h are inside of $bbox_ = containing box for $inner_ - // $inner_ InnerHTML is the contents of that block to be output - $tag = $bounding[0]; - $attr = $bounding[1]; - $orig_x0 = $bounding[2]; - $orig_y0 = $bounding[3]; - - // As in WriteHTML() initialising - $this->blklvl = 0; - $this->lastblocklevelchange = 0; - $this->blk = array(); - $this->initialiseBlock($this->blk[0]); - - $this->blk[0]['width'] =& $this->pgwidth; - $this->blk[0]['inner_width'] =& $this->pgwidth; - - $this->blk[0]['blockContext'] = $this->blockContext; - - $properties = $this->MergeCSS('BLOCK','BODY',''); - $this->setCSS($properties,'','BODY'); - $this->blklvl = 1; - $this->initialiseBlock($this->blk[1]); - $this->blk[1]['tag'] = $tag; - $this->blk[1]['attr'] = $attr; - - $this->Reset(); - $p = $this->MergeCSS('BLOCK',$tag,$attr); - if (isset($p['OVERFLOW'])) { $overflow = strtolower($p['OVERFLOW']); } - if (strtolower($p['POSITION']) == 'fixed') { - $cont_w = $this->pgwidth; // $this->blk[0]['inner_width']; - $cont_h = $this->h - $this->tMargin - $this->bMargin; - $cont_x = $this->lMargin; - $cont_y = $this->tMargin; - } - else { - $cont_w = $this->w; // ABSOLUTE; - $cont_h = $this->h; - $cont_x = 0; - $cont_y = 0; - } - - // Pass on in-line properties to the innerhtml - $css = ''; - if (isset($p['TEXT-ALIGN'])) { $css .= 'text-align: '.strtolower($p['TEXT-ALIGN']).'; '; } - if (isset($p['TEXT-TRANSFORM'])) { $css .= 'text-transform: '.strtolower($p['TEXT-TRANSFORM']).'; '; } - if (isset($p['TEXT-INDENT'])) { $css .= 'text-indent: '.strtolower($p['TEXT-INDENT']).'; '; } - if (isset($p['TEXT-DECORATION'])) { $css .= 'text-decoration: '.strtolower($p['TEXT-DECORATION']).'; '; } - if (isset($p['FONT-FAMILY'])) { $css .= 'font-family: '.strtolower($p['FONT-FAMILY']).'; '; } - if (isset($p['FONT-STYLE'])) { $css .= 'font-style: '.strtolower($p['FONT-STYLE']).'; '; } - if (isset($p['FONT-WEIGHT'])) { $css .= 'font-weight: '.strtolower($p['FONT-WEIGHT']).'; '; } - if (isset($p['FONT-SIZE'])) { $css .= 'font-size: '.strtolower($p['FONT-SIZE']).'; '; } - if (isset($p['LINE-HEIGHT'])) { $css .= 'line-height: '.strtolower($p['LINE-HEIGHT']).'; '; } - if (isset($p['COLOR'])) { $css .= 'color: '.strtolower($p['COLOR']).'; '; } - if ($css) { - $html = '
    '.$html.'
    '; - } - - // Copy over (only) the properties to set for border and background - $pb = array(); - $pb['MARGIN-TOP'] = $p['MARGIN-TOP']; - $pb['MARGIN-RIGHT'] = $p['MARGIN-RIGHT']; - $pb['MARGIN-BOTTOM'] = $p['MARGIN-BOTTOM']; - $pb['MARGIN-LEFT'] = $p['MARGIN-LEFT']; - $pb['PADDING-TOP'] = $p['PADDING-TOP']; - $pb['PADDING-RIGHT'] = $p['PADDING-RIGHT']; - $pb['PADDING-BOTTOM'] = $p['PADDING-BOTTOM']; - $pb['PADDING-LEFT'] = $p['PADDING-LEFT']; - $pb['BORDER-TOP'] = $p['BORDER-TOP']; - $pb['BORDER-RIGHT'] = $p['BORDER-RIGHT']; - $pb['BORDER-BOTTOM'] = $p['BORDER-BOTTOM']; - $pb['BORDER-LEFT'] = $p['BORDER-LEFT']; - if (isset($p['BACKGROUND-COLOR'])) { $pb['BACKGROUND-COLOR'] = $p['BACKGROUND-COLOR']; } - if (isset($p['BACKGROUND-IMAGE'])) { $pb['BACKGROUND-IMAGE'] = $p['BACKGROUND-IMAGE']; } // *BACKGROUND-IMAGES* - // mPDF 4.3.015 - if (isset($p['BACKGROUND-IMAGE-RESIZE'])) { $pb['BACKGROUND-IMAGE-RESIZE'] = $p['BACKGROUND-IMAGE-RESIZE']; } // *BACKGROUND-IMAGES* - // mPDF 4.3.017 - if (isset($p['BACKGROUND-IMAGE-OPACITY'])) { $pb['BACKGROUND-IMAGE-OPACITY'] = $p['BACKGROUND-IMAGE-OPACITY']; } // *BACKGROUND-IMAGES* - if (isset($p['BACKGROUND-REPEAT'])) { $pb['BACKGROUND-REPEAT'] = $p['BACKGROUND-REPEAT']; } // *BACKGROUND-IMAGES* - if (isset($p['BACKGROUND-POSITION'])) { $pb['BACKGROUND-POSITION'] = $p['BACKGROUND-POSITION']; } // *BACKGROUND-IMAGES* - if (isset($p['BACKGROUND-GRADIENT'])) { $pb['BACKGROUND-GRADIENT'] = $p['BACKGROUND-GRADIENT']; } // *GRADIENTS* - - $this->setCSS($pb,'BLOCK',$tag); - //================================================================ - $bbox_dir = $p['DIR']; - $bbox_br = $this->blk[1]['border_right']['w']; - $bbox_bl = $this->blk[1]['border_left']['w']; - $bbox_bt = $this->blk[1]['border_top']['w']; - $bbox_bb = $this->blk[1]['border_bottom']['w']; - $bbox_pr = $this->blk[1]['padding_right']; - $bbox_pl = $this->blk[1]['padding_left']; - $bbox_pt = $this->blk[1]['padding_top']; - $bbox_pb = $this->blk[1]['padding_bottom']; - $bbox_mr = $this->blk[1]['margin_right']; - if (strtolower($p['MARGIN-RIGHT'])=='auto') { $bbox_mr = 'auto'; } - $bbox_ml = $this->blk[1]['margin_left']; - if (strtolower($p['MARGIN-LEFT'])=='auto') { $bbox_ml = 'auto'; } - $bbox_mt = $this->blk[1]['margin_top']; - if (strtolower($p['MARGIN-TOP'])=='auto') { $bbox_mt = 'auto'; } - $bbox_mb = $this->blk[1]['margin_bottom']; - if (strtolower($p['MARGIN-BOTTOM'])=='auto') { $bbox_mb = 'auto'; } - if (isset($p['LEFT']) && strtolower($p['LEFT'])!='auto') { $bbox_left = $this->ConvertSize($p['LEFT'], $cont_w, $this->FontSize,false); } - else { $bbox_left = 'auto'; } - if (isset($p['TOP']) && strtolower($p['TOP'])!='auto') { $bbox_top = $this->ConvertSize($p['TOP'], $cont_h, $this->FontSize,false); } - else { $bbox_top = 'auto'; } - if (isset($p['RIGHT']) && strtolower($p['RIGHT'])!='auto') { $bbox_right = $this->ConvertSize($p['RIGHT'], $cont_w, $this->FontSize,false); } - else { $bbox_right = 'auto'; } - if (isset($p['BOTTOM']) && strtolower($p['BOTTOM'])!='auto') { $bbox_bottom = $this->ConvertSize($p['BOTTOM'], $cont_h, $this->FontSize,false); } - else { $bbox_bottom = 'auto'; } - if (isset($p['WIDTH']) && strtolower($p['WIDTH'])!='auto') { $inner_w = $this->ConvertSize($p['WIDTH'], $cont_w, $this->FontSize,false); } - else { $inner_w = 'auto'; } - if (isset($p['HEIGHT']) && strtolower($p['HEIGHT'])!='auto') { $inner_h = $this->ConvertSize($p['HEIGHT'], $cont_h, $this->FontSize,false); } - else { $inner_h = 'auto'; } - //================================================================ - // mPDF 4.2 - if ($checkinnerhtml=='' && $inner_h==='auto') { $inner_h = 0.0001; } - if ($checkinnerhtml=='' && $inner_w==='auto') { $inner_w = $this->GetStringWidth('WW'); } - //================================================================ - // Algorithm from CSS2.1 See http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height - if ($bbox_top==='auto' && $inner_h==='auto' && $bbox_bottom==='auto') { - if ($bbox_mt==='auto') { $bbox_mt = 0; } - if ($bbox_mb==='auto') { $bbox_mb = 0; } - $bbox_top = $orig_y0 - $bbox_mt - $cont_y; - // solve for $bbox_bottom when content_h known - $inner_h=='auto' && $bbox_bottom=='auto' - } - else if ($bbox_top!=='auto' && $inner_h!=='auto' && $bbox_bottom!=='auto') { - if ($bbox_mt==='auto' && $bbox_mb==='auto') { - $x = $cont_h - $bbox_top - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_bottom; - $bbox_mt = $bbox_mb = ($x/2); - } - else if ($bbox_mt==='auto') { - $bbox_mt = $cont_h - $bbox_top - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_mb - $bbox_bottom; - } - else if ($bbox_mb==='auto') { - $bbox_mb = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_bottom; - } - else { - $bbox_bottom = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_mt; - } - } - else { - if ($bbox_mt==='auto') { $bbox_mt = 0; } - if ($bbox_mb==='auto') { $bbox_mb = 0; } - if ($bbox_top==='auto' && $inner_h==='auto' && $bbox_bottom!=='auto') { - // solve for $bbox_top when content_h known - $inner_h=='auto' && $bbox_top =='auto' - } - else if ($bbox_top==='auto' && $bbox_bottom==='auto' && $inner_h!=='auto') { - $bbox_top = $orig_y0 - $bbox_mt - $cont_y; - $bbox_bottom = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_mt; - } - else if ($inner_h==='auto' && $bbox_bottom==='auto' && $bbox_top!=='auto') { - // solve for $bbox_bottom when content_h known - $inner_h=='auto' && $bbox_bottom=='auto' - } - else if ($bbox_top==='auto' && $inner_h!=='auto' && $bbox_bottom!=='auto') { - $bbox_top = $cont_h - $bbox_mt - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_mt - $bbox_bottom; - } - else if ($inner_h==='auto' && $bbox_top!=='auto' && $bbox_bottom!=='auto') { - $inner_h = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $bbox_pb - $bbox_bb - $bbox_mt - $bbox_bottom; - } - else if ($bbox_bottom==='auto' && $bbox_top!=='auto' && $inner_h!=='auto') { - $bbox_bottom = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_mt; - } - } - - // THEN DO SAME FOR WIDTH - // http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width - if ($bbox_left==='auto' && $inner_w==='auto' && $bbox_right==='auto') { - if ($bbox_ml==='auto') { $bbox_ml = 0; } - if ($bbox_mr==='auto') { $bbox_mr = 0; } - // IF containing element RTL, should set $bbox_right - $bbox_left = $orig_x0 - $bbox_ml - $cont_x; - // solve for $bbox_right when content_w known - $inner_w=='auto' && $bbox_right=='auto' - } - else if ($bbox_left!=='auto' && $inner_w!=='auto' && $bbox_right!=='auto') { - if ($bbox_ml==='auto' && $bbox_mr==='auto') { - $x = $cont_w - $bbox_left - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_right; - $bbox_ml = $bbox_mr = ($x/2); - } - else if ($bbox_ml==='auto') { - $bbox_ml = $cont_w - $bbox_left - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_mr - $bbox_right; - } - else if ($bbox_mr==='auto') { - $bbox_mr = $cont_w - $bbox_left - $bbox_ml - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_right; - } - else { - $bbox_right = $cont_w - $bbox_left - $bbox_ml - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_ml; - } - } - else { - if ($bbox_ml==='auto') { $bbox_ml = 0; } - if ($bbox_mr==='auto') { $bbox_mr = 0; } - if ($bbox_left==='auto' && $inner_w==='auto' && $bbox_right!=='auto') { - // solve for $bbox_left when content_w known - $inner_w=='auto' && $bbox_left =='auto' - } - else if ($bbox_left==='auto' && $bbox_right==='auto' && $inner_w!=='auto') { - // IF containing element RTL, should set $bbox_right - $bbox_left = $orig_x0 - $bbox_ml - $cont_x; - $bbox_right = $cont_w - $bbox_left - $bbox_ml - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_ml; - } - else if ($inner_w==='auto' && $bbox_right==='auto' && $bbox_left!=='auto') { - // solve for $bbox_right when content_w known - $inner_w=='auto' && $bbox_right=='auto' - } - else if ($bbox_left==='auto' && $inner_w!=='auto' && $bbox_right!=='auto') { - $bbox_left = $cont_w - $bbox_ml - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_ml - $bbox_right; - } - else if ($inner_w==='auto' && $bbox_left!=='auto' && $bbox_right!=='auto') { - $inner_w = $cont_w - $bbox_left - $bbox_ml - $bbox_bl - $bbox_pl - $bbox_pr - $bbox_br - $bbox_ml - $bbox_right; - } - else if ($bbox_right==='auto' && $bbox_left!=='auto' && $inner_w!=='auto') { - $bbox_right = $cont_w - $bbox_left - $bbox_ml - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_ml; - } - } - - //================================================================ - //================================================================ -/*-- BACKGROUND-IMAGES --*/ - if (isset($pb['BACKGROUND-IMAGE']) && $pb['BACKGROUND-IMAGE']) { // mPDF 4.3.011 - $file = $pb['BACKGROUND-IMAGE']; - $sizesarray = $this->Image($file,0,0,0,0,'','',false, false, false, false, false); // mPDF 4.3.012D - if (isset($sizesarray['IMAGE_ID'])) { - $image_id = $sizesarray['IMAGE_ID']; - $orig_w = $sizesarray['WIDTH']*$this->k; // in user units i.e. mm - $orig_h = $sizesarray['HEIGHT']*$this->k; // (using $this->img_dpi) - $x_repeat = true; - $y_repeat = true; - if (isset($pb['BACKGROUND-REPEAT'])) { - if ($pb['BACKGROUND-REPEAT']=='no-repeat' || $pb['BACKGROUND-REPEAT']=='repeat-x') { $y_repeat = false; } - if ($pb['BACKGROUND-REPEAT']=='no-repeat' || $pb['BACKGROUND-REPEAT']=='repeat-y') { $x_repeat = false; } - } - $x_pos = 0; - $y_pos = 0; - if (isset($pb['BACKGROUND-POSITION'])) { - $ppos = preg_split('/\s+/',$pb['BACKGROUND-POSITION']); - $x_pos = $ppos[0]; - $y_pos = $ppos[1]; - if (!stristr($x_pos ,'%') ) { $x_pos = $this->ConvertSize($x_pos ,$this->blk[1]['inner_width'],$this->FontSize); } - if (!stristr($y_pos ,'%') ) { $y_pos = $this->ConvertSize($y_pos ,$this->blk[1]['inner_width'],$this->FontSize); } - } - // mPDF 4.3.015 - if (isset($pb['BACKGROUND-IMAGE-RESIZE'])) { $resize = $pb['BACKGROUND-IMAGE-RESIZE']; } - else { $resize = 0; } - // mPDF 4.3.017 - if (isset($pb['BACKGROUND-IMAGE-OPACITY'])) { $opacity = $pb['BACKGROUND-IMAGE-OPACITY']; } - else { $opacity = 1; } - $this->blk[1]['background-image'] = array('image_id'=>$image_id, 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$x_pos, 'y_pos'=>$y_pos, 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat, 'resize'=>$resize, 'opacity'=>$opacity); // mPDF 4.3.015 4.3.017 - } - } -/*-- END BACKGROUND-IMAGES --*/ - - //================================================================ - $y = $cont_y + $bbox_top + $bbox_mt + $bbox_bt + $bbox_pt; - $h = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $bbox_pb - $bbox_bb - $bbox_mb - $bbox_bottom; - $x = $cont_x + $bbox_left + $bbox_ml + $bbox_bl + $bbox_pl; - $w = $cont_w - $bbox_left - $bbox_ml - $bbox_bl - $bbox_pl - $bbox_pr - $bbox_br - $bbox_mr - $bbox_right; - // Set (temporary) values for x y w h to do first paint, if values are auto - if ($inner_h==='auto' && $bbox_top==='auto') { - $y = $cont_y + $bbox_mt + $bbox_bt + $bbox_pt; - $h = $cont_h - ($bbox_bottom + $bbox_mt + $bbox_mb + $bbox_bt + $bbox_bb + $bbox_pt + $bbox_pb); - } - else if ($inner_h==='auto' && $bbox_bottom==='auto') { - $y = $cont_y + $bbox_top + $bbox_mt + $bbox_bt + $bbox_pt; - $h = $cont_h - ($bbox_top + $bbox_mt + $bbox_mb + $bbox_bt + $bbox_bb + $bbox_pt + $bbox_pb); - } - if ($inner_w==='auto' && $bbox_left==='auto') { - $x = $cont_x + $bbox_ml + $bbox_bl + $bbox_pl; - $w = $cont_w - ($bbox_right + $bbox_ml + $bbox_mr + $bbox_bl + $bbox_br + $bbox_pl + $bbox_pr); - } - else if ($inner_w==='auto' && $bbox_right==='auto') { - $x = $cont_x + $bbox_left + $bbox_ml + $bbox_bl + $bbox_pl; - $w = $cont_w - ($bbox_left + $bbox_ml + $bbox_mr + $bbox_bl + $bbox_br + $bbox_pl + $bbox_pr); - } - $bbox_y = $cont_y + $bbox_top + $bbox_mt; - $bbox_x = $cont_x + $bbox_left + $bbox_ml; - $saved_block1 = $this->blk[1]; - unset($p); - unset($pb); - //================================================================ - if ($inner_w==='auto') { // do a first write - $this->lMargin=$x; - $this->rMargin=$this->w - $w - $x; - // SET POSITION & FONT VALUES - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->pageoutput[$this->page]=array(); - $this->x = $x; - $this->y = $y; - $this->HTMLheaderPageLinks = array(); - $this->pageBackgrounds = array(); - $this->maxPosR = 0; - $this->maxPosL = $this->w; // For RTL - $this->WriteHTML($html , 4); - $inner_w = $this->maxPosR - $this->lMargin; - if ($bbox_right==='auto') { - $bbox_right = $cont_w - $bbox_left - $bbox_ml - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_ml; - } - else if ($bbox_left==='auto') { - $bbox_left = $cont_w - $bbox_ml - $bbox_bl - $bbox_pl - $inner_w - $bbox_pr - $bbox_br - $bbox_ml - $bbox_right; - $bbox_x = $cont_x + $bbox_left + $bbox_ml ; - $inner_x = $bbox_x + $bbox_bl + $bbox_pl; - $x = $inner_x; - } - $w = $inner_w; - $bbox_y = $cont_y + $bbox_top + $bbox_mt; - $bbox_x = $cont_x + $bbox_left + $bbox_ml; - } - - if ($inner_h==='auto') { // do a first write - $this->lMargin=$x; - $this->rMargin=$this->w - $w - $x; - // SET POSITION & FONT VALUES - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->pageoutput[$this->page]=array(); - $this->x = $x; - $this->y = $y; - $this->HTMLheaderPageLinks = array(); - $this->pageBackgrounds = array(); - $this->WriteHTML($html , 4); - $inner_h = $this->y - $y; - if ($overflow!='hidden' && $overflow!='visible') { // constrained - if (($this->y + $bbox_pb + $bbox_bb) > ($cont_y + $cont_h)) { - $adj = ($this->y + $bbox_pb + $bbox_bb) - ($cont_y + $cont_h); - $inner_h -= $adj; - } - } - if ($bbox_bottom==='auto') { - $bbox_bottom = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_mb; - } - else if ($bbox_top==='auto') { - $bbox_top = $cont_h - $bbox_mt - $bbox_bt - $bbox_pt - $inner_h - $bbox_pb - $bbox_bb - $bbox_mb - $bbox_bottom; - if ($overflow!='hidden' && $overflow!='visible') { // constrained - if ($bbox_top < 0) { - $bbox_top = 0; - $inner_h = $cont_h - $bbox_top - $bbox_mt - $bbox_bt - $bbox_pt - $bbox_pb - $bbox_bb - $bbox_mb - $bbox_bottom; - } - } - $bbox_y = $cont_y + $bbox_top + $bbox_mt; - $inner_y = $bbox_y + $bbox_bt + $bbox_pt; - $y = $inner_y; - } - $h = $inner_h; - $bbox_y = $cont_y + $bbox_top + $bbox_mt; - $bbox_x = $cont_x + $bbox_left + $bbox_ml; - } - $inner_w = $w; - $inner_h = $h; - - } - - - $this->lMargin=$x; - $this->rMargin=$this->w - $w - $x; - // SET POSITION & FONT VALUES - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->pageoutput[$this->page]=array(); - $this->x = $x; - $this->y = $y; - $this->HTMLheaderPageLinks = array(); - $this->pageBackgrounds = array(); - $this->WriteHTML($html , 4); // parameter 4 saves output to $this->headerbuffer - $actual_h = $this->y - $y; - $use_w = $w; - $use_h = $h; - $ratio = $actual_h / $use_w; - if ($overflow!='hidden' && $overflow!='visible') { - $target = $h/$w; - if (($ratio / $target ) > 1) { - $nl = CEIL($actual_h / $this->lineheight); - $l = $use_w * $nl; - $est_w = sqrt(($l * $this->lineheight) / $target) * 0.8; - $use_w += ($est_w - $use_w) - ($w/100); - } - $bpcstart = ($ratio / $target); // *PROGRESS-BAR* - $bpcctr = 1; // *PROGRESS-BAR* - while(($ratio / $target ) > 1) { -/*-- PROGRESS-BAR --*/ - if ($this->progressBar) { $this->UpdateProgressBar(4,intval(100/($ratio/$target)),('Auto-sizing fixed-position block: '.$bpcctr++)); } -/*-- END PROGRESS-BAR --*/ - $this->x = $x; - $this->y = $y; - - // mPDF 4.2 - if (($ratio / $target) > 1.5 || ($ratio / $target) < 0.6) { - $use_w += ($w/$this->incrementFPR1); - } - else if (($ratio / $target) > 1.2 || ($ratio / $target) < 0.85) { - $use_w += ($w/$this->incrementFPR2); - } - else if (($ratio / $target) > 1.1 || ($ratio / $target) < 0.91) { - $use_w += ($w/$this->incrementFPR3); - } - else { - $use_w += ($w/$this->incrementFPR4); - } - - $use_h = $use_w * $target ; - $this->rMargin=$this->w - $use_w - $x; - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->HTMLheaderPageLinks = array(); - $this->pageBackgrounds = array(); - $this->WriteHTML($html , 4); // parameter 4 saves output to $this->headerbuffer - $actual_h = $this->y - $y; - $ratio = $actual_h / $use_w; - } - if ($this->progressBar) { $this->UpdateProgressBar(4,'100',' '); } // *PROGRESS-BAR* - } - $shrink_f = $w/$use_w; - - //================================================================ - - $this->pages[$this->page] .= '___BEFORE_BORDERS___'; - $block_s = $this->PrintPageBackgrounds(); // Save to print later inside clipping path - $this->pageBackgrounds = array(); - - //================================================================ - if (!empty($bounding)) { - // WHEN HEIGHT // BOTTOM EDGE IS KNOWN and $this->y is set to the bottom - // Re-instate saved $this->blk[1] - $this->blk[1] = $saved_block1; - - // These are only needed when painting border/background - $this->blk[1]['width'] = $bbox_w = $cont_w - $bbox_left - $bbox_ml - $bbox_mr - $bbox_right; - $this->blk[1]['x0'] = $bbox_x; - $this->blk[1]['y0'] = $bbox_y; - $this->blk[1]['startpage'] = $this->page; - $this->blk[1]['y1'] = $bbox_y + $bbox_bt + $bbox_pt + $inner_h + $bbox_pb + $bbox_bb ; - $this->PaintDivBB('',0,1); // Prints borders and sets backgrounds in $this->pageBackgrounds - } - - $s = $this->PrintPageBackgrounds(); - $this->pages[$this->page] = preg_replace('/___BEFORE_BORDERS___/', "\n".$s."\n", $this->pages[$this->page]); - $this->pageBackgrounds = array(); - - // Clipping Output - if ($overflow=='hidden') { - //Bounding rectangle to clip - $clip_y1 = $this->y; - if (!empty($bounding) && ($this->y + $bbox_pb + $bbox_bb) > ($bbox_y + $bbox_bt + $bbox_pt + $inner_h + $bbox_pb + $bbox_bb )) { - $clip_y1 = ($bbox_y + $bbox_bt + $bbox_pt + $inner_h + $bbox_pb + $bbox_bb ) - ($bbox_pb + $bbox_bb); - } - //$op = 'W* n'; // Clipping - $op = 'W n'; // Clipping alternative mode - $this->_out("q"); - $ch = $clip_y1 - $y; - $this->_out(sprintf('%.3f %.3f %.3f %.3f re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$ch*$this->k,$op)); - if (!empty($block_s)) { - $tmp = "q\n".sprintf('%.3f %.3f %.3f %.3f re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$ch*$this->k,$op); - $tmp .= "\n".$block_s."\nQ"; - $block_s = $tmp ; - } - } - - - if (!empty($block_s)) { - if ($shrink_f != 1) { // i.e. autofit has resized the box - $tmp = "q\n".$this->transformScale(($shrink_f*100),($shrink_f*100), $x, $y, true); - $tmp .= "\n".$block_s."\nQ"; - $block_s = $tmp ; - } - - $this->_out($block_s); - } - - - - if ($shrink_f != 1) { // i.e. autofit has resized the box - $this->StartTransform(); - $this->transformScale(($shrink_f*100),($shrink_f*100), $x, $y); - } - - $this->_out($this->headerbuffer); - - if ($shrink_f != 1) { // i.e. autofit has resized the box - $this->StopTransform(); - } - - if ($overflow=='hidden') { - //End clipping - $this->_out("Q"); - } - - - // Page Links - foreach($this->HTMLheaderPageLinks AS $lk) { - if ($shrink_f != 1) { // i.e. autofit has resized the box - $lx1 = (($lk[0]/$this->k)-$x); - $lx2 = $x + ($lx1 * $shrink_f); - $lk[0] = $lx2*$this->k; - $ly1 = (($this->h-($lk[1]/$this->k))-$y); - $ly2 = $y + ($ly1 * $shrink_f); - $lk[1] = ($this->h-$ly2)*$this->k; - $lk[2] *= $shrink_f; // width - $lk[3] *= $shrink_f; // height - } - $this->PageLinks[$this->page][]=$lk; - } - // Restore - $this->headerbuffer = ''; - $this->HTMLheaderPageLinks = array(); - $this->pageBackgrounds = $save_bgs; - $this->writingHTMLheader = false; - // mPDF 4.0 - $this->writingHTMLfooter = false; - // mPDF 4.1 - $this->fullImageHeight = false; - $this->ResetMargins(); - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->SetXY($save_x,$save_y) ; - $this->title2annots = $save_annots; // *ANNOTATIONS* - $this->InFooter = false; // turns back on autopagebreaks - $this->pageoutput[$this->page]=array(); - $this->pageoutput[$this->page]['Font']=''; -/*-- COLUMNS --*/ - if ($save_cols) { - $this->SetColumns($save_nbcol,$this->colvAlign,$this->ColGap); - } -/*-- END COLUMNS --*/ -} -/*-- END CSS-POSITION --*/ - - -// mPDF 4.0 -function initialiseBlock(&$blk) { - $blk['margin_top'] = 0; - $blk['margin_left'] = 0; - $blk['margin_bottom'] = 0; - $blk['margin_right'] = 0; - $blk['padding_top'] = 0; - $blk['padding_left'] = 0; - $blk['padding_bottom'] = 0; - $blk['padding_right'] = 0; - $blk['border_top']['w'] = 0; - $blk['border_left']['w'] = 0; - $blk['border_bottom']['w'] = 0; - $blk['border_right']['w'] = 0; - $blk['hide'] = false; - $blk['outer_left_margin'] = 0; - $blk['outer_right_margin'] = 0; - $blk['cascadeCSS'] = array(); - $blk['block-align'] = false; - $blk['bgcolor'] = false; - $blk['page_break_after_avoid'] = false; - $blk['keep_block_together'] = false; - $blk['float'] = false; - $blk['line_height'] = ''; - $blk['margin_collapse'] = false; -} - -// mPDF 4.0 -function border_details($bd) { - $prop = preg_split('/\s+/',trim($bd)); - // mPDF 4.0 - if (isset($this->blk[$this->blklvl]['inner_width'])) { $refw = $this->blk[$this->blklvl]['inner_width']; } - else if (isset($this->blk[$this->blklvl-1]['inner_width'])) { $refw = $this->blk[$this->blklvl-1]['inner_width']; } - else { $refw = $this->w; } - if ( count($prop) == 1 ) { - $bsize = $this->ConvertSize($prop[0],$refw,$this->FontSize,false); - if ($bsize > 0) { - return array('s' => 1, 'w' => $bsize, 'c' => array('R'=>0,'G'=>0,'B'=>0), 'style'=>'solid'); - } - else { return array('w' => 0, 's' => 0); } // mPDF 3.0 - } - // mPDF 4.0 - else if (count($prop) == 2 ) { - // 1px solid - if (in_array($prop[1],$this->borderstyles) || $prop[1] == 'none' || $prop[1] == 'hidden' ) { $prop[2] = ''; } - // solid #000000 - else if (in_array($prop[0],$this->borderstyles) || $prop[0] == 'none' || $prop[0] == 'hidden' ) { $prop[0] = ''; $prop[1] = $prop[0]; $prop[2] = $prop[1]; } - // 1px #000000 - else { $prop[1] = ''; $prop[2] = $prop[1]; } - } - else if ( count($prop) == 3 ) { - // Change #000000 1px solid to 1px solid #000000 (proper) - if (substr($prop[0],0,1) == '#') { $tmp = $prop[0]; $prop[0] = $prop[1]; $prop[1] = $prop[2]; $prop[2] = $tmp; } - // Change solid #000000 1px to 1px solid #000000 (proper) - else if (substr($prop[0],1,1) == '#') { $tmp = $prop[1]; $prop[0] = $prop[2]; $prop[1] = $prop[0]; $prop[2] = $tmp; } - // Change solid 1px #000000 to 1px solid #000000 (proper) - else if (in_array($prop[0],$this->borderstyles) || $prop[0] == 'none' || $prop[0] == 'hidden' ) { - $tmp = $prop[0]; $prop[0] = $prop[1]; $prop[1] = $tmp; - } - } - else { return array(); } - // Size - $bsize = $this->ConvertSize($prop[0],$refw,$this->FontSize,false); - //color - $coul = $this->ConvertColor($prop[2]); // returns array - // Style - $prop[1] = strtolower($prop[1]); - if (in_array($prop[1],$this->borderstyles) && $bsize > 0) { $on = 1; } - else if ($prop[1] == 'hidden') { $on = 1; $bsize = 0; $coul = ''; } - else if ($prop[1] == 'none') { $on = 0; $bsize = 0; $coul = ''; } - else { $on = 0; $bsize = 0; $coul = ''; $prop[1] = ''; } - return array('s' => $on, 'w' => $bsize, 'c' => $coul, 'style'=> $prop[1] ); -} - -// mPDF 4.0 -function _fix_borderStr($bd) { - $prop = preg_split('/\s+/',trim($bd)); - $w = 'medium'; // mPDF 4.3.010 - $c = '#000000'; - $s = 'none'; - - if ( count($prop) == 1 ) { - // solid - if (in_array($prop[0],$this->borderstyles) || $prop[0] == 'none' || $prop[0] == 'hidden' ) { $s = $prop[0]; } - // #000000 - else if (is_array($this->ConvertColor($prop[0]))) { $c = $prop[0]; } - // 1px - else { $w = $prop[0]; } - } - else if (count($prop) == 2 ) { - // 1px solid - if (in_array($prop[1],$this->borderstyles) || $prop[1] == 'none' || $prop[1] == 'hidden' ) { $w = $prop[0]; $s = $prop[1]; } - // solid #000000 - else if (in_array($prop[0],$this->borderstyles) || $prop[0] == 'none' || $prop[0] == 'hidden' ) { $s = $prop[0]; $c = $prop[1]; } - // 1px #000000 - else { $w = $prop[0]; $c = $prop[1]; } - } - else if ( count($prop) == 3 ) { - // Change #000000 1px solid to 1px solid #000000 (proper) - if (substr($prop[0],0,1) == '#') { $c = $prop[0]; $w = $prop[1]; $s = $prop[2]; } - // Change solid #000000 1px to 1px solid #000000 (proper) - else if (substr($prop[0],1,1) == '#') { $s = $prop[0]; $c = $prop[1]; $w = $prop[2]; } - // Change solid 1px #000000 to 1px solid #000000 (proper) - else if (in_array($prop[0],$this->borderstyles) || $prop[0] == 'none' || $prop[0] == 'hidden' ) { - $s = $prop[0]; $w = $prop[1]; $c = $prop[2]; - } - else { $w = $prop[0]; $s = $prop[1]; $c = $prop[2]; } - } - else { return ''; } - $s = strtolower($s); - return $w.' '.$s.' '.$c; -} - - - -// NEW FUNCTION FOR CSS MARGIN or PADDING called from SetCSS -function fixCSS($prop) { - if (!is_array($prop) || (count($prop)==0)) return array(); - $newprop = array(); - foreach($prop AS $k => $v) { - // mPDF 4.2.013 Change all CSS properties to lowercase, except those that are case sensitive - if ($k != 'BACKGROUND-IMAGE' && $k != 'BACKGROUND' && $k != 'ODD-HEADER-NAME' && $k != 'EVEN-HEADER-NAME' && $k != 'ODD-FOOTER-NAME' && $k != 'EVEN-FOOTER-NAME' && $k != 'HEADER' && $k != 'FOOTER') { - $v = strtolower($v); - } - - // mPDF 4.0 - FONT shorthand - if ($k == 'FONT') { - $s = trim($v); - preg_match_all('/\"(.*?)\"/',$s,$ff); - if (count($ff[1])) { - foreach($ff[1] AS $ffp) { - $w = preg_split('/\s+/',$ffp); - $s = preg_replace('/\"'.$ffp.'\"/',$w[0],$s); - } - } - preg_match_all('/\'(.*?)\'/',$s,$ff); - if (count($ff[1])) { - foreach($ff[1] AS $ffp) { - $w = preg_split('/\s+/',$ffp); - $s = preg_replace('/\''.$ffp.'\'/',$w[0],$s); - } - } - $s = preg_replace('/\s*,\s*/',',',$s); - $bits = preg_split('/\s+/',$s); - if (count($bits)>1) { - $k = 'FONT-FAMILY'; $v = $bits[(count($bits)-1)]; - $fs = $bits[(count($bits)-2)]; - if (preg_match('/(.*?)\/(.*)/',$fs, $fsp)) { - $newprop['FONT-SIZE'] = $fsp[1]; - $newprop['LINE-HEIGHT'] = $fsp[2]; - } - else { $newprop['FONT-SIZE'] = $fs; } - if (preg_match('/(italic|oblique)/i',$s)) { $newprop['FONT-STYLE'] = 'italic'; } - else { $newprop['FONT-STYLE'] = 'normal'; } - if (preg_match('/bold/i',$s)) { $newprop['FONT-WEIGHT'] = 'bold'; } - else { $newprop['FONT-WEIGHT'] = 'normal'; } - if (preg_match('/small-caps/i',$s)) { $newprop['TEXT-TRANSFORM'] = 'uppercase'; } - } - } - if ($k == 'FONT-FAMILY') { - $aux_fontlist = explode(",",$v); - $fonttype = trim($aux_fontlist[0]); - // mPDF 4.0 - $fonttype = preg_replace('/["\']*(.*?)["\']*/','\\1',$fonttype); - $aux_fontlist = explode(" ",$fonttype); - $fonttype = $aux_fontlist[0]; - $v = strtolower(trim($fonttype)); - if (($this->is_MB && in_array($v,$this->available_unifonts)) || - (!$this->is_MB && in_array($v,$this->available_fonts)) || in_array($v, array('sjis','uhc','big5','gb')) || - in_array($v,$this->sans_fonts) || in_array($v,$this->serif_fonts) || in_array($v,$this->mono_fonts) ) { - $newprop[$k] = $v; - } - } - else if ($k == 'MARGIN') { - $tmp = $this->expand24($v); - $newprop['MARGIN-TOP'] = $tmp['T']; - $newprop['MARGIN-RIGHT'] = $tmp['R']; - $newprop['MARGIN-BOTTOM'] = $tmp['B']; - $newprop['MARGIN-LEFT'] = $tmp['L']; - } -/*-- BORDER-RADIUS --*/ - else if ($k == 'BORDER-RADIUS' || $k == 'BORDER-TOP-LEFT-RADIUS' || $k == 'BORDER-TOP-RIGHT-RADIUS' || $k == 'BORDER-BOTTOM-LEFT-RADIUS' || $k == 'BORDER-BOTTOM-RIGHT-RADIUS') { - $tmp = $this->border_radius_expand($v,$k); - if (isset($tmp['TL-H'])) $newprop['BORDER-TOP-LEFT-RADIUS-H'] = $tmp['TL-H']; - if (isset($tmp['TL-V'])) $newprop['BORDER-TOP-LEFT-RADIUS-V'] = $tmp['TL-V']; - if (isset($tmp['TR-H'])) $newprop['BORDER-TOP-RIGHT-RADIUS-H'] = $tmp['TR-H']; - if (isset($tmp['TR-V'])) $newprop['BORDER-TOP-RIGHT-RADIUS-V'] = $tmp['TR-V']; - if (isset($tmp['BL-H'])) $newprop['BORDER-BOTTOM-LEFT-RADIUS-H'] = $tmp['BL-H']; - if (isset($tmp['BL-V'])) $newprop['BORDER-BOTTOM-LEFT-RADIUS-V'] = $tmp['BL-V']; - if (isset($tmp['BR-H'])) $newprop['BORDER-BOTTOM-RIGHT-RADIUS-H'] = $tmp['BR-H']; - if (isset($tmp['BR-V'])) $newprop['BORDER-BOTTOM-RIGHT-RADIUS-V'] = $tmp['BR-V']; - } -/*-- END BORDER-RADIUS --*/ - else if ($k == 'PADDING') { - $tmp = $this->expand24($v); - $newprop['PADDING-TOP'] = $tmp['T']; - $newprop['PADDING-RIGHT'] = $tmp['R']; - $newprop['PADDING-BOTTOM'] = $tmp['B']; - $newprop['PADDING-LEFT'] = $tmp['L']; - } - // mPDF 4.0 - else if ($k == 'BORDER') { - if ($v == '1') { $v = '1px solid #000000'; } - else { $v = $this->_fix_borderStr($v); } - $newprop['BORDER-TOP'] = $v; - $newprop['BORDER-RIGHT'] = $v; - $newprop['BORDER-BOTTOM'] = $v; - $newprop['BORDER-LEFT'] = $v; - } - else if ($k == 'BORDER-TOP') { - $newprop['BORDER-TOP'] = $this->_fix_borderStr($v); - } - else if ($k == 'BORDER-RIGHT') { - $newprop['BORDER-RIGHT'] = $this->_fix_borderStr($v); - } - else if ($k == 'BORDER-BOTTOM') { - $newprop['BORDER-BOTTOM'] = $this->_fix_borderStr($v); - } - else if ($k == 'BORDER-LEFT') { - $newprop['BORDER-LEFT'] = $this->_fix_borderStr($v); - } - // mPDF 4.0 - else if ($k == 'BORDER-STYLE') { - $e = $this->expand24($v); - $newprop['BORDER-TOP-STYLE'] = $e['T']; - $newprop['BORDER-RIGHT-STYLE'] = $e['R']; - $newprop['BORDER-BOTTOM-STYLE'] = $e['B']; - $newprop['BORDER-LEFT-STYLE'] = $e['L']; - } - else if ($k == 'BORDER-WIDTH') { - $e = $this->expand24($v); - $newprop['BORDER-TOP-WIDTH'] = $e['T']; - $newprop['BORDER-RIGHT-WIDTH'] = $e['R']; - $newprop['BORDER-BOTTOM-WIDTH'] = $e['B']; - $newprop['BORDER-LEFT-WIDTH'] = $e['L']; - } - else if ($k == 'BORDER-COLOR') { - $e = $this->expand24($v); - $newprop['BORDER-TOP-COLOR'] = $e['T']; - $newprop['BORDER-RIGHT-COLOR'] = $e['R']; - $newprop['BORDER-BOTTOM-COLOR'] = $e['B']; - $newprop['BORDER-LEFT-COLOR'] = $e['L']; - } - - else if ($k == 'BORDER-SPACING') { - $prop = preg_split('/\s+/',trim($v)); - if (count($prop) == 1 ) { - $newprop['BORDER-SPACING-H'] = $prop[0]; - $newprop['BORDER-SPACING-V'] = $prop[0]; - } - else if (count($prop) == 2 ) { - $newprop['BORDER-SPACING-H'] = $prop[0]; - $newprop['BORDER-SPACING-V'] = $prop[1]; - } - } - else if ($k == 'SIZE') { - $prop = preg_split('/\s+/',trim($v)); - if (preg_match('/(auto|portrait|landscape)/',$prop[0])) { - $newprop['SIZE'] = strtoupper($prop[0]); - } - else if (count($prop) == 1 ) { - $newprop['SIZE']['W'] = $this->ConvertSize($prop[0]); - $newprop['SIZE']['H'] = $this->ConvertSize($prop[0]); - } - else if (count($prop) == 2 ) { - $newprop['SIZE']['W'] = $this->ConvertSize($prop[0]); - $newprop['SIZE']['H'] = $this->ConvertSize($prop[1]); - } - } - // mPDF 4.2.024 - else if ($k == 'SHEET-SIZE') { - $prop = preg_split('/\s+/',trim($v)); - if (count($prop) == 2 ) { - $newprop['SHEET-SIZE'] = array($this->ConvertSize($prop[0]), $this->ConvertSize($prop[1])); - } - else { - if(preg_match('/([0-9a-zA-Z]*)-L/i',$v,$m)) { // e.g. A4-L = A$ landscape - $ft = $this->_getPageFormat($m[1]); - $format = array($ft[1],$ft[0]); - } - else { $format = $this->_getPageFormat($v); } - if ($format) { $newprop['SHEET-SIZE'] = array($format[0]/$this->k, $format[1]/$this->k); } - } - } - // mPDF 3.0 - Tiling Patterns - else if ($k == 'BACKGROUND') { - $bg = $this->parseCSSbackground($v); - if ($bg['c']) { $newprop['BACKGROUND-COLOR'] = $bg['c']; } - // mPDF 4.3.002 - else { $newprop['BACKGROUND-COLOR'] = 'transparent'; } // mPDF 4.3.002 -/*-- BACKGROUND-IMAGES --*/ - if ($bg['i']) { - $newprop['BACKGROUND-IMAGE'] = $bg['i']; - if ($bg['r']) { $newprop['BACKGROUND-REPEAT'] = $bg['r']; } - if ($bg['p']) { $newprop['BACKGROUND-POSITION'] = $bg['p']; } - } - else { $newprop['BACKGROUND-IMAGE'] = ''; } // mPDF 4.3.002 / 4.3.011 - -/*-- END BACKGROUND-IMAGES --*/ - } -/*-- BACKGROUND-IMAGES --*/ - else if ($k == 'BACKGROUND-IMAGE') { - if (preg_match('/url\([\'\"]{0,1}(.*?)[\'\"]{0,1}\)/i',$v,$m)) { // 4.2.013 - $newprop['BACKGROUND-IMAGE'] = $m[1]; - } - // mPDF 4.3.011 - else if (strtolower($v)=='none') { $newprop['BACKGROUND-IMAGE'] = ''; } - } - // mPDF 3.0 - Tiling Patterns - else if ($k == 'BACKGROUND-REPEAT') { - if (preg_match('/(repeat-x|repeat-y|no-repeat|repeat)/i',$v,$m)) { - $newprop['BACKGROUND-REPEAT'] = strtolower($m[1]); - } - } - // mPDF 3.0 - Tiling Patterns - else if ($k == 'BACKGROUND-POSITION') { - $s = $v; - $bits = preg_split('/\s+/',trim($s)); - // These should be Position x1 or x2 - if (count($bits)==1) { - if (preg_match('/bottom/',$bits[0])) { $bg['p'] = '50% 100%'; } - else if (preg_match('/top/',$bits[0])) { $bg['p'] = '50% 0%'; } - else { $bg['p'] = $bits[0] . ' 50%'; } - } - else if (count($bits)==2) { - // Can be either right center or center right - if (preg_match('/(top|bottom)/',$bits[0]) || preg_match('/(left|right)/',$bits[1])) { - $bg['p'] = $bits[1] . ' '.$bits[0]; - } - else { - $bg['p'] = $bits[0] . ' '.$bits[1]; - } - } - if ($bg['p']) { - $bg['p'] = preg_replace('/(left|top)/','0%',$bg['p']); - $bg['p'] = preg_replace('/(right|bottom)/','100%',$bg['p']); - $bg['p'] = preg_replace('/(center)/','50%',$bg['p']); - if (!preg_match('/[\-]{0,1}\d+(in|cm|mm|pt|pc|em|ex|px|%)* [\-]{0,1}\d+(in|cm|mm|pt|pc|em|ex|px|%)*/',$bg['p'])) { - $bg['p'] = false; - } - } - if ($bg['p']) { $newprop['BACKGROUND-POSITION'] = $bg['p']; } - } -/*-- END BACKGROUND-IMAGES --*/ - else { - $newprop[$k] = $v; - } - } - // mPDF 4.0 -// $this->_mergeBorders($newprop,$newprop); - return $newprop; -} - - -// mPDF 3.0 - Tiling Patterns -function parseCSSbackground($s) { - // $s = strtolower($s); // mPDF 4.2.013 - $bg = array('c'=>false, 'i'=>false, 'r'=>false, 'p'=>false, ); - if (preg_match('/url\(/i',$s)) { // mPDF 4.2.013 - // If color, set and strip it off - if (preg_match('/^\s*(#[0-9a-fA-F]{3,6}|rgb\(.*?\)|[a-zA-Z]{3,})\s+(url\(.*)/i',$s,$m)) { // mPDF 4.2.013 - $bg['c'] = strtolower($m[1]); // mPDF 4.2.013 - $s = $m[2]; - } -/*-- BACKGROUND-IMAGES --*/ - if (preg_match('/url\([\'\"]{0,1}(.*?)[\'\"]{0,1}\)\s*(.*)/i',$s,$m)) { // mPDF 4.2.013 - $bg['i'] = $m[1]; - $s = strtolower($m[2]); // mPDF 4.2.013 - if (preg_match('/(repeat-x|repeat-y|no-repeat|repeat)/',$s,$m)) { - $bg['r'] = $m[1]; - } - // Remove repeat, attachment (discarded) and also any inherit - $s = preg_replace('/(repeat-x|repeat-y|no-repeat|repeat|scroll|fixed|inherit)/','',$s); - $bits = preg_split('/\s+/',trim($s)); - // These should be Position x1 or x2 - if (count($bits)==1) { - if (preg_match('/bottom/',$bits[0])) { $bg['p'] = '50% 100%'; } - else if (preg_match('/top/',$bits[0])) { $bg['p'] = '50% 0%'; } - else { $bg['p'] = $bits[0] . ' 50%'; } - } - else if (count($bits)==2) { - // Can be either right center or center right - if (preg_match('/(top|bottom)/',$bits[0]) || preg_match('/(left|right)/',$bits[1])) { - $bg['p'] = $bits[1] . ' '.$bits[0]; - } - else { - $bg['p'] = $bits[0] . ' '.$bits[1]; - } - } - if ($bg['p']) { - $bg['p'] = preg_replace('/(left|top)/','0%',$bg['p']); - $bg['p'] = preg_replace('/(right|bottom)/','100%',$bg['p']); - $bg['p'] = preg_replace('/(center)/','50%',$bg['p']); - if (!preg_match('/[\-]{0,1}\d+(in|cm|mm|pt|pc|em|ex|px|%)* [\-]{0,1}\d+(in|cm|mm|pt|pc|em|ex|px|%)*/',$bg['p'])) { - $bg['p'] = false; - } - } - } -/*-- END BACKGROUND-IMAGES --*/ - } - else if (preg_match('/^\s*(#[0-9a-fA-F]{3,6}|rgb\(.*?\)|[a-zA-Z]{3,})/i',$s,$m)) { $bg['c'] = strtolower($m[1]); } // mPDF 4.2.013 - return ($bg); -} - -/*-- GRADIENTS --*/ -// mPDF 3.0 Gradients -function parseBackgroundGradient($bg) { - // background-gradient: linear #00FFFF #FFFF00 0 0.5 1 0.5; or - // background-gradient: radial #00FFFF #FFFF00 0.5 0.5 1 1 1.2; - $v = trim($bg); - $bgr = preg_split('/\s+/',$v); - $g = array(); - if (count($bgr)> 6) { - if (strtoupper(substr($bgr[0],0,1)) == 'L' && count($bgr)==7) { // linear - $g['type'] = 2; - //$coords = array(0,0,1,1 ); // 0 0 1 0 or 0 1 1 1 is L 2 R; 1,1,0,1 is R2L; 1,1,1,0 is T2B; 1,0,1,1 is B2T - // Linear: $coords - array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). - // The default value is from left to right (x1=0, y1=0, x2=1, y2=0). - $g['coords'] = array($bgr[3], $bgr[4], $bgr[5], $bgr[6]); - } - else if (count($bgr)==8) { // radial - $g['type'] = 3; - // Radial: $coords - array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, - // (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). - // (fx, fy) should be inside the circle, otherwise some areas will not be defined - $g['coords'] = array($bgr[3], $bgr[4], $bgr[5], $bgr[6], $bgr[7]); - } - $cor = $this->ConvertColor($bgr[1]); - if ($cor) { $g['col'] = array($cor['R'],$cor['G'],$cor['B']); } - else { $g['col'] = array(255); } - $cor = $this->ConvertColor($bgr[2]); - if ($cor) { $g['col2'] = array($cor['R'],$cor['G'],$cor['B']); } - else { $g['col2'] = array(255); } - $g['extend'] = array('true','true'); - return $g; - } - return false; -} -/*-- END GRADIENTS --*/ - -function expand24($mp) { - $prop = preg_split('/\s+/',trim($mp)); - if (count($prop) == 1 ) { - return array('T' => $prop[0], 'R' => $prop[0], 'B' => $prop[0], 'L'=> $prop[0]); - } - if (count($prop) == 2 ) { - return array('T' => $prop[0], 'R' => $prop[1], 'B' => $prop[0], 'L'=> $prop[1]); - } - // mPDF 4.0 - if (count($prop) == 3 ) { - return array('T' => $prop[0], 'R' => $prop[1], 'B' => $prop[2], 'L'=> $prop[1]); - } - if (count($prop) == 4 ) { - return array('T' => $prop[0], 'R' => $prop[1], 'B' => $prop[2], 'L'=> $prop[3]); - } - return array(); -} - -/*-- BORDER-RADIUS --*/ -function border_radius_expand($val,$k) { - $b = array(); - if ($k == 'BORDER-RADIUS') { - $hv = explode('/',trim($val)); - $prop = preg_split('/\s+/',trim($hv[0])); - if (count($prop)==1) { - $b['TL-H'] = $b['TR-H'] = $b['BR-H'] = $b['BL-H'] = $prop[0]; - } - else if (count($prop)==2) { - $b['TL-H'] = $b['BR-H'] = $prop[0]; - $b['TR-H'] = $b['BL-H'] = $prop[1]; - } - else if (count($prop)==3) { - $b['TL-H'] = $prop[0]; - $b['TR-H'] = $b['BL-H'] = $prop[1]; - $b['BR-H'] = $prop[2]; - } - else if (count($prop)==4) { - $b['TL-H'] = $prop[0]; - $b['TR-H'] = $prop[1]; - $b['BR-H'] = $prop[2]; - $b['BL-H'] = $prop[3]; - } - if (count($hv)==2) { - $prop = preg_split('/\s+/',trim($hv[1])); - if (count($prop)==1) { - $b['TL-V'] = $b['TR-V'] = $b['BR-V'] = $b['BL-V'] = $prop[0]; - } - else if (count($prop)==2) { - $b['TL-V'] = $b['BR-V'] = $prop[0]; - $b['TR-V'] = $b['BL-V'] = $prop[1]; - } - else if (count($prop)==3) { - $b['TL-V'] = $prop[0]; - $b['TR-V'] = $b['BL-V'] = $prop[1]; - $b['BR-V'] = $prop[2]; - } - else if (count($prop)==4) { - $b['TL-V'] = $prop[0]; - $b['TR-V'] = $prop[1]; - $b['BR-V'] = $prop[2]; - $b['BL-V'] = $prop[3]; - } - } - else { - $b['TL-V'] = $b['TL-H']; - $b['TR-V'] = $b['TR-H']; - $b['BL-V'] = $b['BL-H']; - $b['BR-V'] = $b['BR-H']; - } - return $b; - } - - // Parse 2 - $h = 0; - $v = 0; - $prop = preg_split('/\s+/',trim($val)); - if (count($prop)==1) { $h = $v = $val; } - else { $h = $prop[0]; $v = $prop[1]; } - if ($h==0 || $v==0) { $h = $v = 0; } - if ($k == 'BORDER-TOP-LEFT-RADIUS') { - $b['TL-H'] = $h; - $b['TL-V'] = $v; - } - else if ($k == 'BORDER-TOP-RIGHT-RADIUS') { - $b['TR-H'] = $h; - $b['TR-V'] = $v; - } - else if ($k == 'BORDER-BOTTOM-LEFT-RADIUS') { - $b['BL-H'] = $h; - $b['BL-V'] = $v; - } - else if ($k == 'BORDER-BOTTOM-RIGHT-RADIUS') { - $b['BR-H'] = $h; - $b['BR-V'] = $v; - } - return $b; - -} -/*-- END BORDER-RADIUS --*/ - -// mPDF 4.2 -// Return either a number (factor) - based on current set fontsize (if % or em) - or exact lineheight (with 'mm' after it) -function fixLineheight($v) { - $lh = false; - if (preg_match('/^[0-9\.,]*$/',$v) && $v >= 0) { return ($v + 0); } - else if (strtoupper($v) == 'NORMAL') { - return $this->normalLineheight; - } - else { - $tlh = $this->ConvertSize($v,$this->FontSize,$this->FontSize,true); - if ($tlh) { return ($tlh.'mm'); } - } - return $this->normalLineheight; -} - -/*-- BORDER-RADIUS --*/ -// mPDF 3.0 -function _borderPadding($a, $b, &$px, &$py) { - // $px and py are padding long axis (x) and short axis (y) - $added = 0; // extra padding - - $x = $a-$px; - $y = $b-$py; - // Check if Falls within ellipse of border radius - if ( ( (($x+$added)*($x+$added))/($a*$a) + (($y+$added)*($y+$added))/($b*$b) ) <=1 ) { return false; } - - $t = atan2($y,$x); - - $newx = $b / sqrt((($b*$b)/($a*$a)) + ( tan($t) * tan($t) ) ); - $newy = $a / sqrt((($a*$a)/($b*$b)) + ( (1/tan($t)) * (1/tan($t)) ) ); - $px = max($px, $a - $newx + $added); - $py = max($py, $b - $newy + $added); -} -/*-- END BORDER-RADIUS --*/ - - -/*-- TABLES --*/ -function setBorderDominance($prop, $val) { - if (isset($prop['BORDER-LEFT']) && $prop['BORDER-LEFT']) { $this->cell_border_dominance_L = $val; } - if (isset($prop['BORDER-RIGHT']) && $prop['BORDER-RIGHT']) { $this->cell_border_dominance_R = $val; } - if (isset($prop['BORDER-TOP']) && $prop['BORDER-TOP']) { $this->cell_border_dominance_T = $val; } - if (isset($prop['BORDER-BOTTOM']) && $prop['BORDER-BOTTOM']) { $this->cell_border_dominance_B = $val; } -} -/*-- END TABLES --*/ - -// mPDF 4.0 -function _mergeCSS(&$p, &$t) { - // Save Cascading CSS e.g. "div.topic p" at this block level - if (isset($p) && $p) { - $carry = $p; - if ($t) { - $t = $this->array_merge_recursive_unique($t, $carry); - } - else { $t = $carry; } - } -} - -// for CSS handling -function array_merge_recursive_unique($array1, $array2) { - $arrays = func_get_args(); - $narrays = count($arrays); - $ret = $arrays[0]; - for ($i = 1; $i < $narrays; $i ++) { - foreach ($arrays[$i] as $key => $value) { - if (((string) $key) === ((string) intval($key))) { // integer or string as integer key - append - $ret[] = $value; - } - else { // string key - merge - if (is_array($value) && isset($ret[$key])) { - $ret[$key] = $this->array_merge_recursive_unique($ret[$key], $value); - } - else { - $ret[$key] = $value; - } - } - } - } - return $ret; -} - - -// mPDF 4.0 -function _mergeFullCSS(&$p, &$t, $tag, $classes, $id) { - $this->_mergeCSS($p[$tag], $t); - // STYLESHEET CLASS e.g. .smallone{} .redletter{} - foreach($classes AS $class) { - $this->_mergeCSS($p['CLASS>>'.$class], $t); - } - // STYLESHEET CLASS e.g. #smallone{} #redletter{} - if (isset($id)) { - $this->_mergeCSS($p['ID>>'.$id], $t); - } - // STYLESHEET CLASS e.g. .smallone{} .redletter{} - foreach($classes AS $class) { - $this->_mergeCSS($p[$tag.'>>CLASS>>'.$class], $t); - } - // STYLESHEET CLASS e.g. #smallone{} #redletter{} - if (isset($id)) { - $this->_mergeCSS($p[$tag.'>>ID>>'.$id], $t); - } -} - -// mPDF 4.0 -function _set_mergedCSS(&$m, &$p, $d=true, $bd=false) { - if (isset($m)) { - if ((isset($m['depth']) && $m['depth']>1) || $d==false) { // include check for 'depth' - if ($bd) { $this->setBorderDominance($m, $bd); } // *TABLES* - if (is_array($m)) { - $p = array_merge($p,$m); - $this->_mergeBorders($p,$m); // mPDF 4.0 - } - } - } -} - -// mPDF 4.0 -function _mergeBorders(&$b, &$a) { // Merges $a['BORDER-TOP-STYLE'] to $b['BORDER-TOP'] etc. - foreach(array('TOP','RIGHT','BOTTOM','LEFT') AS $side) { - foreach(array('STYLE','WIDTH','COLOR') AS $el) { - if (isset($a['BORDER-'.$side.'-'.$el])) { // e.g. $b['BORDER-TOP-STYLE'] - $s = trim($a['BORDER-'.$side.'-'.$el]); - if (isset($b['BORDER-'.$side])) { // e.g. $b['BORDER-TOP'] - $p = trim($b['BORDER-'.$side]); - } - else { $p = ''; } - if ($el=='STYLE') { - if ($p) { $b['BORDER-'.$side] = preg_replace('/(\S+)\s+(\S+)\s+(\S+)/', '\\1 '.$s.' \\3', $p); } - else { $b['BORDER-'.$side] = '0px '.$s.' #000000'; } - } - else if ($el=='WIDTH') { - if ($p) { $b['BORDER-'.$side] = preg_replace('/(\S+)\s+(\S+)\s+(\S+)/', $s.' \\2 \\3', $p); } - else { $b['BORDER-'.$side] = $s.' none #000000'; } - } - else if ($el=='COLOR') { - if ($p) { $b['BORDER-'.$side] = preg_replace('/(\S+)\s+(\S+)\s+(\S+)/', '\\1 \\2 '.$s, $p); } - else { $b['BORDER-'.$side] = '0px none '.$s; } - } - unset($a['BORDER-'.$side.'-'.$el]); - } - } - } -} - - -function MergeCSS($inherit,$tag,$attr) { - $p = array(); - $zp = array(); - - $classes = array(); - if (isset($attr['CLASS'])) { - $classes = preg_split('/\s+/',$attr['CLASS']); - } - //=============================================== -/*-- TABLES --*/ - // Set Inherited properties - if ($inherit == 'TOPTABLE') { // $tag = TABLE - //=============================================== - // Save Cascading CSS e.g. "div.topic p" at this block level - - if (isset($this->blk[$this->blklvl]['cascadeCSS'])) { - $this->tablecascadeCSS[0] = $this->blk[$this->blklvl]['cascadeCSS']; - } - else { - $this->tablecascadeCSS[0] = $this->cascadeCSS; - } - } - //=============================================== - // Set Inherited properties - if ($inherit == 'TOPTABLE' || $inherit == 'TABLE') { - //Cascade everything from last level that is not an actual property, or defined by current tag/attributes - if (isset($this->tablecascadeCSS[$this->tbCSSlvl-1]) && is_array($this->tablecascadeCSS[$this->tbCSSlvl-1])) { - foreach($this->tablecascadeCSS[$this->tbCSSlvl-1] AS $k=>$v) { -// if ($k != $tag && !preg_match('/^CLASS>>('.implode('|',$classes).')$/i',$k) && !preg_match('/^'.$tag.'>>CLASS>>('.implode('|',$classes).')$/i',$k) && $k != 'ID>>'.$attr['ID'] && $k != $tag.'>>ID>>'.$attr['ID'] && (preg_match('/(ID|CLASS)>>/',$k) || preg_match('/^('.$this->allowedCSStags.')(>>.*){0,1}$/',$k))) { - $this->tablecascadeCSS[$this->tbCSSlvl][$k] = $v; -// } - } - } - // mPDF 4.0 - $this->_mergeFullCSS($this->cascadeCSS, $this->tablecascadeCSS[$this->tbCSSlvl], $tag, $classes, $attr['ID']); - //=============================================== - // Cascading forward CSS e.g. "table.topic td" for this table in $this->tablecascadeCSS - //=============================================== - // STYLESHEET TAG e.g. table - // mPDF 4.0 - $this->_mergeFullCSS($this->tablecascadeCSS[$this->tbCSSlvl-1], $this->tablecascadeCSS[$this->tbCSSlvl], $tag, $classes, $attr['ID']); - //=============================================== - } -/*-- END TABLES --*/ - //=============================================== -/*-- LISTS --*/ - // Set Inherited properties - if ($inherit == 'TOPLIST') { // $tag = UL,OL - //=============================================== - // Save Cascading CSS e.g. "div.topic p" at this block level - if (isset($this->blk[$this->blklvl]['cascadeCSS'])) { - $this->listcascadeCSS[0] = $this->blk[$this->blklvl]['cascadeCSS']; - } - else { - $this->listcascadeCSS[0] = $this->cascadeCSS; - } - } - //=============================================== - // Set Inherited properties - if ($inherit == 'TOPLIST' || $inherit == 'LIST') { - //Cascade everything from last level that is not an actual property, or defined by current tag/attributes - if (isset($this->listcascadeCSS[$this->listCSSlvl-1]) && is_array($this->listcascadeCSS[$this->listCSSlvl-1])) { - foreach($this->listcascadeCSS[$this->listCSSlvl-1] AS $k=>$v) { - $this->listcascadeCSS[$this->listCSSlvl][$k] = $v; - } - } - // mPDF 4.0 - $this->_mergeFullCSS($this->cascadeCSS, $this->listcascadeCSS[$this->listCSSlvl], $tag, $classes, $attr['ID']); - //=============================================== - // Cascading forward CSS e.g. "table.topic td" for this list in $this->listcascadeCSS - //=============================================== - // STYLESHEET TAG e.g. table - // mPDF 4.0 - $this->_mergeFullCSS($this->listcascadeCSS[$this->listCSSlvl-1], $this->listcascadeCSS[$this->listCSSlvl], $tag, $classes, $attr['ID']); - //=============================================== - } -/*-- END LISTS --*/ - //=============================================== - // Set Inherited properties - if ($inherit == 'BLOCK') { - if (isset($this->blk[$this->blklvl-1]['cascadeCSS']) && is_array($this->blk[$this->blklvl-1]['cascadeCSS'])) { - foreach($this->blk[$this->blklvl-1]['cascadeCSS'] AS $k=>$v) { -// if ($k != $tag && !preg_match('/^CLASS>>('.implode('|',$classes).')$/i',$k) && !preg_match('/^'.$tag.'>>CLASS>>('.implode('|',$classes).')$/i',$k) && $k != 'ID>>'.$attr['ID'] && $k != $tag.'>>ID>>'.$attr['ID'] && (preg_match('/(ID|CLASS)>>/',$k) || preg_match('/^('.$this->allowedCSStags.')(>>.*){0,1}$/',$k))) { - $this->blk[$this->blklvl]['cascadeCSS'][$k] = $v; -// } - - } - } - - //=============================================== - // Save Cascading CSS e.g. "div.topic p" at this block level - // mPDF 4.0 - if (!isset($attr['ID'])) { - $attr['ID'] = null; - } - $this->_mergeFullCSS($this->cascadeCSS, $this->blk[$this->blklvl]['cascadeCSS'], $tag, $classes, $attr['ID']); - //=============================================== - // Cascading forward CSS - //=============================================== - // mPDF 4.0 - $this->_mergeFullCSS($this->blk[$this->blklvl-1]['cascadeCSS'], $this->blk[$this->blklvl]['cascadeCSS'], $tag, $classes, $attr['ID']); - //=============================================== - // Block properties - if (isset($this->blk[$this->blklvl-1]['margin_collapse']) && $this->blk[$this->blklvl-1]['margin_collapse']) { $p['MARGIN-COLLAPSE'] = 'COLLAPSE'; } // custom tag, but follows CSS principle that border-collapse is inherited - if (isset($this->blk[$this->blklvl-1]['line_height']) && $this->blk[$this->blklvl-1]['line_height']) { $p['LINE-HEIGHT'] = $this->blk[$this->blklvl-1]['line_height']; } - if (isset($this->blk[$this->blklvl-1]['align']) && $this->blk[$this->blklvl-1]['align']) { - if ($this->blk[$this->blklvl-1]['align'] == 'L') { $p['TEXT-ALIGN'] = 'left'; } - else if ($this->blk[$this->blklvl-1]['align'] == 'J') { $p['TEXT-ALIGN'] = 'justify'; } - else if ($this->blk[$this->blklvl-1]['align'] == 'R') { $p['TEXT-ALIGN'] = 'right'; } - else if ($this->blk[$this->blklvl-1]['align'] == 'C') { $p['TEXT-ALIGN'] = 'center'; } - } - // mPDF 3.0 - if ($this->ColActive || $this->keep_block_together) { - if (isset($this->blk[$this->blklvl-1]['bgcolor']) && $this->blk[$this->blklvl-1]['bgcolor']) { // Doesn't officially inherit, but default value is transparent (?=inherited) - $cor = $this->blk[$this->blklvl-1]['bgcolorarray' ]; - $p['BACKGROUND-COLOR'] = 'RGB('.$cor['R'].','.$cor['G'].','.$cor['B'].')'; - } - } - - // mPDF 4.0 - if (isset($this->blk[$this->blklvl-1]['text_indent']) && ($this->blk[$this->blklvl-1]['text_indent'] || $this->blk[$this->blklvl-1]['text_indent']===0)) { $p['TEXT-INDENT'] = $this->blk[$this->blklvl-1]['text_indent']; } - - // mPDF 4.0 - $biilp = $this->blk[$this->blklvl-1]['InlineProperties']; - if (isset($biilp[ 'family' ]) && $biilp[ 'family' ]) { $p['FONT-FAMILY'] = $biilp[ 'family' ]; } - if (isset($biilp[ 'I' ]) && $biilp[ 'I' ]) { $p['FONT-STYLE'] = 'italic'; } - if (isset($biilp[ 'sizePt' ]) && $biilp[ 'sizePt' ]) { $p['FONT-SIZE'] = $biilp[ 'sizePt' ] . 'pt'; } - if (isset($biilp[ 'B' ]) && $biilp[ 'B' ]) { $p['FONT-WEIGHT'] = 'bold'; } - if (isset($biilp[ 'colorarray' ]) && $biilp[ 'colorarray' ]) { - $cor = $biilp[ 'colorarray' ]; - $p['COLOR'] = 'RGB('.$cor['R'].','.$cor['G'].','.$cor['B'].')'; - } - if (isset($biilp[ 'toupper' ]) && $biilp[ 'toupper' ]) { $p['TEXT-TRANSFORM'] = 'uppercase'; } - else if (isset($biilp[ 'tolower' ]) && $biilp[ 'tolower' ]) { $p['TEXT-TRANSFORM'] = 'lowercase'; } - // CSS says text-decoration is not inherited, but IE7 does?? - if (isset($biilp[ 'underline' ]) && $biilp[ 'underline' ]) { $p['TEXT-DECORATION'] = 'underline'; } - - } - //=============================================== - //=============================================== -/*-- LISTS --*/ - // Set Inherited properties - // mPDF 4.2 - if ($inherit == 'TOPLIST') { - if ($this->listCSSlvl == 1) { - $bilp = $this->blk[$this->blklvl]['InlineProperties']; - if (isset($bilp[ 'family' ]) && $bilp[ 'family' ]) { $p['FONT-FAMILY'] = $bilp[ 'family' ]; } - if (isset($bilp[ 'I' ]) && $bilp[ 'I' ]) { $p['FONT-STYLE'] = 'italic'; } - if (isset($bilp[ 'sizePt' ]) && $bilp[ 'sizePt' ]) { $p['FONT-SIZE'] = $bilp[ 'sizePt' ] . 'pt'; } - if (isset($bilp[ 'B' ]) && $bilp[ 'B' ]) { $p['FONT-WEIGHT'] = 'bold'; } - if (isset($bilp[ 'colorarray' ]) && $bilp[ 'colorarray' ]) { - $cor = $bilp[ 'colorarray' ]; - $p['COLOR'] = 'RGB('.$cor['R'].','.$cor['G'].','.$cor['B'].')'; - } - if (isset($bilp[ 'toupper' ]) && $bilp[ 'toupper' ]) { $p['TEXT-TRANSFORM'] = 'uppercase'; } - else if (isset($bilp[ 'tolower' ]) && $bilp[ 'tolower' ]) { $p['TEXT-TRANSFORM'] = 'lowercase'; } - // CSS says text-decoration is not inherited, but IE7 does?? - if (isset($bilp[ 'underline' ]) && $bilp[ 'underline' ]) { $p['TEXT-DECORATION'] = 'underline'; } - if ($tag=='LI') { - $lilp = $this->InlineProperties['LIST'][$this->listlvl][$this->listoccur[$this->listlvl]]; - if (isset($lilp[ 'family' ]) && $lilp[ 'family' ]) { $p['FONT-FAMILY'] = $lilp[ 'family' ]; } - if (isset($lilp[ 'I' ]) && $lilp[ 'I' ]) { $p['FONT-STYLE'] = 'italic'; } - if (isset($lilp[ 'sizePt' ]) && $lilp[ 'sizePt' ]) { $p['FONT-SIZE'] = $lilp[ 'sizePt' ] . 'pt'; } - if (isset($lilp[ 'B' ]) && $lilp[ 'B' ]) { $p['FONT-WEIGHT'] = 'bold'; } - if (isset($lilp[ 'colorarray' ]) && $lilp[ 'colorarray' ]) { - $cor = $lilp[ 'colorarray' ]; - $p['COLOR'] = 'RGB('.$cor['R'].','.$cor['G'].','.$cor['B'].')'; - } - if (isset($lilp[ 'toupper' ]) && $lilp[ 'toupper' ]) { $p['TEXT-TRANSFORM'] = 'uppercase'; } - else if (isset($lilp[ 'tolower' ]) && $lilp[ 'tolower' ]) { $p['TEXT-TRANSFORM'] = 'lowercase'; } - // CSS says text-decoration is not inherited, but IE7 does?? - if (isset($lilp[ 'underline' ]) && $lilp[ 'underline' ]) { $p['TEXT-DECORATION'] = 'underline'; } - } - } - } -/*-- END LISTS --*/ - //=============================================== - //=============================================== - // DEFAULT for this TAG set in DefaultCSS - if (isset($this->defaultCSS[$tag])) { - $zp = $this->fixCSS($this->defaultCSS[$tag]); -/*-- RTL --*/ - // mPDF 4.0 $rtlCSS can be any value - if ($this->directionality == 'rtl') { - if (isset($zp['TEXT-ALIGN'])) { $this->reverse_align($zp['TEXT-ALIGN']); } // mPDF 4.0 - $pl = $zp['PADDING-LEFT']; - $pr = $zp['PADDING-RIGHT']; - if ($pl || $pr) { $zp['PADDING-RIGHT'] = $pl; $zp['PADDING-LEFT'] = $pr; } - $ml = $zp['MARGIN-LEFT']; - $mr = $zp['MARGIN-RIGHT']; - if ($ml || $mr) { $zp['MARGIN-RIGHT'] = $ml; $zp['MARGIN-LEFT'] = $mr; } - $bl = $zp['BORDER-LEFT']; - $br = $zp['BORDER-RIGHT']; - if ($bl || $br) { $zp['BORDER-RIGHT'] = $bl; $zp['BORDER-LEFT'] = $br; } - } -/*-- END RTL --*/ - if (is_array($zp)) { // Default overwrites Inherited - $p = array_merge($p,$zp); // !! Note other way round !! - $this->_mergeBorders($p,$zp); // mPDF 4.0 - } - } - //=============================================== -/*-- TABLES --*/ - // mPDF 4.0 cellPadding overwrites TD/TH default but not specific CSS set on cell - if (($tag=='TD' || $tag=='TH') && ($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cell_padding'] || $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cell_padding']===0)) { // mPDF 4.4.014 - $p['PADDING-LEFT'] = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cell_padding']; - $p['PADDING-RIGHT'] = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cell_padding']; - $p['PADDING-TOP'] = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cell_padding']; - $p['PADDING-BOTTOM'] = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cell_padding']; - } -/*-- END TABLES --*/ - //=============================================== - // STYLESHEET TAG e.g. h1 p div table - if (isset($this->CSS[$tag]) && $this->CSS[$tag]) { - $zp = $this->CSS[$tag]; - if ($tag=='TD' || $tag=='TH') { $this->setBorderDominance($zp, 9); } // *TABLES* // *TABLES-ADVANCED-BORDERS* - if (is_array($zp)) { - // mPDF 4.0 - if (($this->directionality == 'rtl') && ($this->rtlCSS > 0) && isset($zp['TEXT-ALIGN'])) { $this->reverse_align($zp['TEXT-ALIGN']); } // *RTL* - $p = array_merge($p,$zp); - $this->_mergeBorders($p,$zp); // mPDF 4.0 - } - } - //=============================================== - // STYLESHEET CLASS e.g. .smallone{} .redletter{} - foreach($classes AS $class) { - $zp = array(); - if (isset($this->CSS['CLASS>>'.$class]) && $this->CSS['CLASS>>'.$class]) { $zp = $this->CSS['CLASS>>'.$class]; } - if ($tag=='TD' || $tag=='TH') { $this->setBorderDominance($zp, 9); } // *TABLES* // *TABLES-ADVANCED-BORDERS* - if (is_array($zp)) { - // mPDF 4.0 - if (($this->directionality == 'rtl') && ($this->rtlCSS > 0) && isset($zp['TEXT-ALIGN'])) { $this->reverse_align($zp['TEXT-ALIGN']); } // *RTL* - $p = array_merge($p,$zp); - $this->_mergeBorders($p,$zp); // mPDF 4.0 - } - } - //=============================================== - // STYLESHEET ID e.g. #smallone{} #redletter{} - if (isset($attr['ID']) && isset($this->CSS['ID>>'.$attr['ID']]) && $this->CSS['ID>>'.$attr['ID']]) { - $zp = $this->CSS['ID>>'.$attr['ID']]; - if ($tag=='TD' || $tag=='TH') { $this->setBorderDominance($zp, 9); } // *TABLES* // *TABLES-ADVANCED-BORDERS* - if (is_array($zp)) { - // mPDF 4.0 - if (($this->directionality == 'rtl') && ($this->rtlCSS > 0) && isset($zp['TEXT-ALIGN'])) { $this->reverse_align($zp['TEXT-ALIGN']); } // *RTL* - $p = array_merge($p,$zp); - $this->_mergeBorders($p,$zp); // mPDF 4.0 - } - } - //=============================================== - // STYLESHEET CLASS e.g. p.smallone{} div.redletter{} - foreach($classes AS $class) { - $zp = array(); - if (isset($this->CSS[$tag.'>>CLASS>>'.$class]) && $this->CSS[$tag.'>>CLASS>>'.$class]) { $zp = $this->CSS[$tag.'>>CLASS>>'.$class]; } - if ($tag=='TD' || $tag=='TH') { $this->setBorderDominance($zp, 9); } // *TABLES* // *TABLES-ADVANCED-BORDERS* - if (is_array($zp)) { - // mPDF 4.0 - if (($this->directionality == 'rtl') && ($this->rtlCSS > 0) && isset($zp['TEXT-ALIGN'])) { $this->reverse_align($zp['TEXT-ALIGN']); } // *RTL* - $p = array_merge($p,$zp); - $this->_mergeBorders($p,$zp); // mPDF 4.0 - } - } - //=============================================== - // STYLESHEET CLASS e.g. p#smallone{} div#redletter{} - if (isset($attr['ID']) && isset($this->CSS[$tag.'>>ID>>'.$attr['ID']]) && $this->CSS[$tag.'>>ID>>'.$attr['ID']]) { - $zp = $this->CSS[$tag.'>>ID>>'.$attr['ID']]; - if ($tag=='TD' || $tag=='TH') { $this->setBorderDominance($zp, 9); } // *TABLES* // *TABLES-ADVANCED-BORDERS* - if (is_array($zp)) { - // mPDF 4.0 - if (($this->directionality == 'rtl') && ($this->rtlCSS > 0) && isset($zp['TEXT-ALIGN'])) { $this->reverse_align($zp['TEXT-ALIGN']); } // *RTL* - $p = array_merge($p,$zp); - $this->_mergeBorders($p,$zp); // mPDF 4.0 - } - } - //=============================================== - // Cascaded e.g. div.class p only works for block level - if ($inherit == 'BLOCK') { - // mPDF 4.0 - $this->_set_mergedCSS($this->blk[$this->blklvl-1]['cascadeCSS'][$tag], $p); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->blk[$this->blklvl-1]['cascadeCSS']['CLASS>>'.$class], $p); - } - $this->_set_mergedCSS($this->blk[$this->blklvl-1]['cascadeCSS']['ID>>'.$attr['ID']], $p); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->blk[$this->blklvl-1]['cascadeCSS'][$tag.'>>CLASS>>'.$class], $p); - } - $this->_set_mergedCSS($this->blk[$this->blklvl-1]['cascadeCSS'][$tag.'>>ID>>'.$attr['ID']], $p); - } - // mPDF 4.0 - else if ($inherit == 'INLINE') { - // mPDF 4.0 - $this->_set_mergedCSS($this->blk[$this->blklvl]['cascadeCSS'][$tag], $p); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->blk[$this->blklvl]['cascadeCSS']['CLASS>>'.$class], $p); - } - $this->_set_mergedCSS($this->blk[$this->blklvl]['cascadeCSS']['ID>>'.$attr['ID']], $p); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->blk[$this->blklvl]['cascadeCSS'][$tag.'>>CLASS>>'.$class], $p); - } - $this->_set_mergedCSS($this->blk[$this->blklvl]['cascadeCSS'][$tag.'>>ID>>'.$attr['ID']], $p); - } -/*-- TABLES --*/ - else if ($inherit == 'TOPTABLE' || $inherit == 'TABLE') { // NB looks at $this->tablecascadeCSS-1 for cascading CSS - // false, 9 = don't check for 'depth' and do set border dominance - // mPDF 4.0 - $this->_set_mergedCSS($this->tablecascadeCSS[$this->tbCSSlvl-1][$tag], $p, false, 9); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->tablecascadeCSS[$this->tbCSSlvl-1]['CLASS>>'.$class], $p, false, 9); - } - $this->_set_mergedCSS($this->tablecascadeCSS[$this->tbCSSlvl-1]['ID>>'.$attr['ID']], $p, false, 9); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->tablecascadeCSS[$this->tbCSSlvl-1][$tag.'>>CLASS>>'.$class], $p, false, 9); - } - $this->_set_mergedCSS($this->tablecascadeCSS[$this->tbCSSlvl-1][$tag.'>>ID>>'.$attr['ID']], $p, false, 9); - } -/*-- END TABLES --*/ - //=============================================== -/*-- LISTS --*/ - else if ($inherit == 'TOPLIST' || $inherit == 'LIST') { // NB looks at $this->listcascadeCSS-1 for cascading CSS - // false = don't check for 'depth' - // mPDF 4.0 - $this->_set_mergedCSS($this->listcascadeCSS[$this->listCSSlvl-1][$tag], $p, false); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->listcascadeCSS[$this->listCSSlvl-1]['CLASS>>'.$class], $p, false); - } - $this->_set_mergedCSS($this->listcascadeCSS[$this->listCSSlvl-1]['ID>>'.$attr['ID']], $p, false); - foreach($classes AS $class) { - $this->_set_mergedCSS($this->listcascadeCSS[$this->listCSSlvl-1][$tag.'>>CLASS>>'.$class], $p, false); - } - $this->_set_mergedCSS($this->listcascadeCSS[$this->listCSSlvl-1][$tag.'>>ID>>'.$attr['ID']], $p, false); - } -/*-- END LISTS --*/ - //=============================================== - //=============================================== - // INLINE STYLE e.g. style="CSS:property" - if (isset($attr['STYLE'])) { - $zp = $this->readInlineCSS($attr['STYLE']); - if ($tag=='TD' || $tag=='TH') { $this->setBorderDominance($zp, 9); } // *TABLES* // *TABLES-ADVANCED-BORDERS* - if (is_array($zp)) { - // mPDF 4.0 - if (($this->directionality == 'rtl') && ($this->rtlCSS > 1) && isset($zp['TEXT-ALIGN'])) { // *RTL* - $this->reverse_align($zp['TEXT-ALIGN']); // *RTL* - } // *RTL* - $p = array_merge($p,$zp); - $this->_mergeBorders($p,$zp); // mPDF 4.0 - } - } - //=============================================== - //=============================================== - // INLINE ATTRIBUTES e.g. .. ALIGN="CENTER"> - if (isset($attr['LANG']) and $attr['LANG']!='') { - $p['LANG'] = $attr['LANG']; - } - if (isset($attr['COLOR']) and $attr['COLOR']!='') { - $p['COLOR'] = $attr['COLOR']; - } - if ($tag != 'INPUT') { - if (isset($attr['WIDTH']) and $attr['WIDTH']!='') { - $p['WIDTH'] = $attr['WIDTH']; - } - if (isset($attr['HEIGHT']) and $attr['HEIGHT']!='') { - $p['HEIGHT'] = $attr['HEIGHT']; - } - } - if ($tag == 'FONT') { - if (isset($attr['FACE'])) { - $p['FONT-FAMILY'] = $attr['FACE']; - } - if (isset($attr['SIZE']) and $attr['SIZE']!='') { - $s = ''; - if ($attr['SIZE'] === '+1') { $s = '120%'; } - else if ($attr['SIZE'] === '-1') { $s = '86%'; } - else if ($attr['SIZE'] === '1') { $s = 'XX-SMALL'; } - else if ($attr['SIZE'] == '2') { $s = 'X-SMALL'; } - else if ($attr['SIZE'] == '3') { $s = 'SMALL'; } - else if ($attr['SIZE'] == '4') { $s = 'MEDIUM'; } - else if ($attr['SIZE'] == '5') { $s = 'LARGE'; } - else if ($attr['SIZE'] == '6') { $s = 'X-LARGE'; } - else if ($attr['SIZE'] == '7') { $s = 'XX-LARGE'; } - if ($s) $p['FONT-SIZE'] = $s; - } - } - if (isset($attr['VALIGN']) and $attr['VALIGN']!='') { - $p['VERTICAL-ALIGN'] = $attr['VALIGN']; - } - if (isset($attr['VSPACE']) and $attr['VSPACE']!='') { - $p['MARGIN-TOP'] = $attr['VSPACE']; - $p['MARGIN-BOTTOM'] = $attr['VSPACE']; - } - if (isset($attr['HSPACE']) and $attr['HSPACE']!='') { - $p['MARGIN-LEFT'] = $attr['HSPACE']; - $p['MARGIN-RIGHT'] = $attr['HSPACE']; - } - //=============================================== - return $p; -} - - -/*-- CSS-PAGE --*/ -// mPDF 4.2 -function SetPagedMediaCSS($name='', $first, $oddEven) { - if ($oddEven == 'E') { - if ($this->directionality=='rtl') { $side = 'R'; } - else { $side = 'L'; } - } - else { - if ($this->directionality=='rtl') { $side = 'L'; } - else { $side = 'R'; } - } - $name = strtoupper($name); - $p = array(); - $p['SIZE'] = 'AUTO'; - - // Uses mPDF original margins as default - $p['MARGIN-RIGHT'] = strval($this->orig_rMargin).'mm'; - $p['MARGIN-LEFT'] = strval($this->orig_lMargin).'mm'; - $p['MARGIN-TOP'] = strval($this->orig_tMargin).'mm'; - $p['MARGIN-BOTTOM'] = strval($this->orig_bMargin).'mm'; - $p['MARGIN-HEADER'] = strval($this->orig_hMargin).'mm'; - $p['MARGIN-FOOTER'] = strval($this->orig_fMargin).'mm'; - - // Basic page + selector - if (isset($this->CSS['@PAGE'])) { $zp = $this->CSS['@PAGE']; } - else { $zp = array(); } - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - - if (isset($p['EVEN-HEADER-NAME']) && $oddEven=='E') { - $p['HEADER'] = $p['EVEN-HEADER-NAME']; unset($p['EVEN-HEADER-NAME']); - } - if (isset($p['ODD-HEADER-NAME']) && $oddEven!='E') { - $p['HEADER'] = $p['ODD-HEADER-NAME']; unset($p['ODD-HEADER-NAME']); - } - if (isset($p['EVEN-FOOTER-NAME']) && $oddEven=='E') { - $p['FOOTER'] = $p['EVEN-FOOTER-NAME']; unset($p['EVEN-FOOTER-NAME']); - } - if (isset($p['ODD-FOOTER-NAME']) && $oddEven!='E') { - $p['FOOTER'] = $p['ODD-FOOTER-NAME']; unset($p['ODD-FOOTER-NAME']); - } - - // If right/Odd page - if (isset($this->CSS['@PAGE>>PSEUDO>>RIGHT']) && $side=='R') { - $zp = $this->CSS['@PAGE>>PSEUDO>>RIGHT']; - } - else { $zp = array(); } - // mPDF 4.2.022 Disallow size or sheet-size on :LEFT or :RIGHT or :FIRST - if (isset($zp['SIZE'])) { unset($zp['SIZE']); } - if (isset($zp['SHEET-SIZE'])) { unset($zp['SHEET-SIZE']); } // mPDF 4.2.024 - // Disallow margin-left or -right on :LEFT or :RIGHT - if (isset($zp['MARGIN-LEFT'])) { unset($zp['MARGIN-LEFT']); } - if (isset($zp['MARGIN-RIGHT'])) { unset($zp['MARGIN-RIGHT']); } - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - - // If left/Even page - if (isset($this->CSS['@PAGE>>PSEUDO>>LEFT']) && $side=='L') { // mPDF 4.2 This had RIGHT in error - $zp = $this->CSS['@PAGE>>PSEUDO>>LEFT']; - } - else { $zp = array(); } - // mPDF 4.2.022 Disallow size or sheet-size on :LEFT or :RIGHT or :FIRST - if (isset($zp['SIZE'])) { unset($zp['SIZE']); } - if (isset($zp['SHEET-SIZE'])) { unset($zp['SHEET-SIZE']); } // mPDF 4.2.024 - // Disallow margin-left or -right on :LEFT or :RIGHT - if (isset($zp['MARGIN-LEFT'])) { unset($zp['MARGIN-LEFT']); } - if (isset($zp['MARGIN-RIGHT'])) { unset($zp['MARGIN-RIGHT']); } - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - - // If first page - if (isset($this->CSS['@PAGE>>PSEUDO>>FIRST']) && $first) { $zp = $this->CSS['@PAGE>>PSEUDO>>FIRST']; } - else { $zp = array(); } - // mPDF 4.2.022 Disallow size or sheet-size on :LEFT or :RIGHT or :FIRST - if (isset($zp['SIZE'])) { unset($zp['SIZE']); } - if (isset($zp['SHEET-SIZE'])) { unset($zp['SHEET-SIZE']); } // mPDF 4.2.024 - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - - // If named page - if ($name) { - if (isset($this->CSS['@PAGE>>NAMED>>'.$name])) { $zp = $this->CSS['@PAGE>>NAMED>>'.$name]; } - else { $zp = array(); } - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - - if (isset($p['EVEN-HEADER-NAME']) && $oddEven=='E') { - $p['HEADER'] = $p['EVEN-HEADER-NAME']; unset($p['EVEN-HEADER-NAME']); - } - if (isset($p['ODD-HEADER-NAME']) && $oddEven!='E') { - $p['HEADER'] = $p['ODD-HEADER-NAME']; unset($p['ODD-HEADER-NAME']); - } - if (isset($p['EVEN-FOOTER-NAME']) && $oddEven=='E') { - $p['FOOTER'] = $p['EVEN-FOOTER-NAME']; unset($p['EVEN-FOOTER-NAME']); - } - if (isset($p['ODD-FOOTER-NAME']) && $oddEven!='E') { - $p['FOOTER'] = $p['ODD-FOOTER-NAME']; unset($p['ODD-FOOTER-NAME']); - } - - // If named right/Odd page - if (isset($this->CSS['@PAGE>>NAMED>>'.$name.'>>PSEUDO>>RIGHT']) && $side=='R') { $zp = $this->CSS['@PAGE>>NAMED>>'.$name.'>>PSEUDO>>RIGHT']; } - else { $zp = array(); } - // mPDF 4.2.022 Disallow size or sheet-size on :LEFT or :RIGHT or :FIRST - if (isset($zp['SIZE'])) { unset($zp['SIZE']); } - if (isset($zp['SHEET-SIZE'])) { unset($zp['SHEET-SIZE']); } // mPDF 4.2.024 - // Disallow margin-left or -right on :LEFT or :RIGHT - if (isset($zp['MARGIN-LEFT'])) { unset($zp['MARGIN-LEFT']); } - if (isset($zp['MARGIN-RIGHT'])) { unset($zp['MARGIN-RIGHT']); } - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - - // If named left/Even page - if (isset($this->CSS['@PAGE>>NAMED>>'.$name.'>>PSEUDO>>LEFT']) && $side=='L') { $zp = $this->CSS['@PAGE>>NAMED>>'.$name.'>>PSEUDO>>LEFT']; } - else { $zp = array(); } - // mPDF 4.2.022 Disallow size or sheet-size on :LEFT or :RIGHT or :FIRST - if (isset($zp['SIZE'])) { unset($zp['SIZE']); } - if (isset($zp['SHEET-SIZE'])) { unset($zp['SHEET-SIZE']); } // mPDF 4.2.024 - // Disallow margin-left or -right on :LEFT or :RIGHT - if (isset($zp['MARGIN-LEFT'])) { unset($zp['MARGIN-LEFT']); } - if (isset($zp['MARGIN-RIGHT'])) { unset($zp['MARGIN-RIGHT']); } - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - - // If named first page - if (isset($this->CSS['@PAGE>>NAMED>>'.$name.'>>PSEUDO>>FIRST']) && $first) { $zp = $this->CSS['@PAGE>>NAMED>>'.$name.'>>PSEUDO>>FIRST']; } - else { $zp = array(); } - // mPDF 4.2.022 Disallow size or sheet-size on :LEFT or :RIGHT or :FIRST - if (isset($zp['SIZE'])) { unset($zp['SIZE']); } - if (isset($zp['SHEET-SIZE'])) { unset($zp['SHEET-SIZE']); } // mPDF 4.2.024 - if (is_array($zp) && !empty($zp)) { $p = array_merge($p,$zp); } - } - - // mPDF 4.2 - $orientation = $mgl = $mgr = $mgt = $mgb = $mgh = $mgf = ''; - $header = $footer = ''; - $resetpagenum = $pagenumstyle = $suppress = ''; - $marks = ''; - $bg = array(); - // mPDF 4.2.024 - $newformat = ''; - - // mPDF 4.2.024 - if (isset($p['SHEET-SIZE']) && is_array($p['SHEET-SIZE'])) { - $newformat = $p['SHEET-SIZE']; - if ($newformat[0] > $newformat[1]) { // landscape - $newformat = array_reverse($newformat); - $p['ORIENTATION'] = 'L'; - } - else { $p['ORIENTATION'] = 'P'; } - $this->_setPageSize($newformat, $p['ORIENTATION']); - } - - if (isset($p['SIZE']) && is_array($p['SIZE']) && !$newformat) { // mPDF 4.2.024 - if ($p['SIZE']['W'] > $p['SIZE']['H']) { $p['ORIENTATION'] = 'L'; } - else { $p['ORIENTATION'] = 'P'; } - } - if (is_array($p['SIZE'])) { - if ($p['SIZE']['W'] > $this->fw) { $p['SIZE']['W'] = $this->fw; } // mPD 4.2 use fw not fPt - if ($p['SIZE']['H'] > $this->fh) { $p['SIZE']['H'] = $this->fh; } - if (($p['ORIENTATION']==$this->DefOrientation && !$newformat) || ($newformat && $p['ORIENTATION']=='P')) { // mPDF 4.2.024 - $outer_width_LR = ($this->fw - $p['SIZE']['W'])/2; - $outer_width_TB = ($this->fh - $p['SIZE']['H'])/2; - } - else { - $outer_width_LR = ($this->fh - $p['SIZE']['W'])/2; - $outer_width_TB = ($this->fw - $p['SIZE']['H'])/2; - } - $pgw = $p['SIZE']['W']; - $pgh = $p['SIZE']['H']; - } - else { // AUTO LANDSCAPE PORTRAIT - $outer_width_LR = 0; - $outer_width_TB = 0; - // mPDF 4.2.024 If new sheet size not specified, set orientation based on page-box - if (!$newformat) { - if (strtoupper($p['SIZE']) == 'AUTO') { $p['ORIENTATION']=$this->DefOrientation; } - else if (strtoupper($p['SIZE']) == 'LANDSCAPE') { $p['ORIENTATION']='L'; } - else { $p['ORIENTATION']='P'; } - } - if (($p['ORIENTATION']==$this->DefOrientation && !$newformat) || ($newformat && $p['ORIENTATION']=='P')) { // mPDF 4.2.024 - $pgw = $this->fw; - $pgh = $this->fh; - } - else { - $pgw = $this->fh; - $pgh = $this->fw; - } - } - - if (isset($p['HEADER']) && $p['HEADER']) { $header = $p['HEADER']; } - if (isset($p['FOOTER']) && $p['FOOTER']) { $footer = $p['FOOTER']; } - if (isset($p['RESETPAGENUM']) && $p['RESETPAGENUM']) { $resetpagenum = $p['RESETPAGENUM']; } - if (isset($p['PAGENUMSTYLE']) && $p['PAGENUMSTYLE']) { $pagenumstyle = $p['PAGENUMSTYLE']; } - if (isset($p['SUPPRESS']) && $p['SUPPRESS']) { $suppress = $p['SUPPRESS']; } - - if (strtoupper($p['MARKS']) == 'CROP') { $marks = 'CROP'; } - else if (strtoupper($p['MARKS']) == 'CROSS') { $marks = 'CROSS'; } - - // mPDF 3.0 - if (isset($p['BACKGROUND-COLOR']) && $p['BACKGROUND-COLOR']) { $bg['BACKGROUND-COLOR'] = $p['BACKGROUND-COLOR']; } - if (isset($p['BACKGROUND-GRADIENT']) && $p['BACKGROUND-GRADIENT']) { $bg['BACKGROUND-GRADIENT'] = $p['BACKGROUND-GRADIENT']; } // *GRADIENTS* - if (isset($p['BACKGROUND-IMAGE']) && $p['BACKGROUND-IMAGE']) { $bg['BACKGROUND-IMAGE'] = $p['BACKGROUND-IMAGE']; } // *BACKGROUND-IMAGES* - if (isset($p['BACKGROUND-REPEAT']) && $p['BACKGROUND-REPEAT']) { $bg['BACKGROUND-REPEAT'] = $p['BACKGROUND-REPEAT']; } // *BACKGROUND-IMAGES* - if (isset($p['BACKGROUND-POSITION']) && $p['BACKGROUND-POSITION']) { $bg['BACKGROUND-POSITION'] = $p['BACKGROUND-POSITION']; } // *BACKGROUND-IMAGES* - - if (isset($p['MARGIN-LEFT'])) { $mgl = $this->ConvertSize($p['MARGIN-LEFT'],$pgw) + $outer_width_LR; } - if (isset($p['MARGIN-RIGHT'])) { $mgr = $this->ConvertSize($p['MARGIN-RIGHT'],$pgw) + $outer_width_LR; } - if (isset($p['MARGIN-BOTTOM'])) { $mgb = $this->ConvertSize($p['MARGIN-BOTTOM'],$pgh) + $outer_width_TB; } - if (isset($p['MARGIN-TOP'])) { $mgt = $this->ConvertSize($p['MARGIN-TOP'],$pgh) + $outer_width_TB; } - if (isset($p['MARGIN-HEADER'])) { $mgh = $this->ConvertSize($p['MARGIN-HEADER'],$pgh) + $outer_width_TB; } - if (isset($p['MARGIN-FOOTER'])) { $mgf = $this->ConvertSize($p['MARGIN-FOOTER'],$pgh) + $outer_width_TB; } - - if (isset($p['ORIENTATION']) && $p['ORIENTATION']) { $orientation = $p['ORIENTATION']; } - $this->page_box['outer_width_LR'] = $outer_width_LR; // Used in MARKS:crop etc. - $this->page_box['outer_width_TB'] = $outer_width_TB; - // mPDF 4.2 - // mPDF 4.2.024 - return array($orientation,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$header,$footer,$bg,$resetpagenum,$pagenumstyle,$suppress,$marks,$newformat); -} -/*-- END CSS-PAGE --*/ - -function PreviewBlockCSS($tag,$attr) { - // Looks ahead from current block level to a new level - $p = array(); - $zp = array(); - $oldcascadeCSS = $this->blk[$this->blklvl]['cascadeCSS']; - $classes = array(); - if (isset($attr['CLASS'])) { $classes = preg_split('/\s+/',$attr['CLASS']); } - //=============================================== - // DEFAULT for this TAG set in DefaultCSS - if (isset($this->defaultCSS[$tag])) { - $zp = $this->fixCSS($this->defaultCSS[$tag]); - if (is_array($zp)) { $p = array_merge($zp,$p); } // Inherited overwrites default - } - // STYLESHEET TAG e.g. h1 p div table - if (isset($this->CSS[$tag])) { - $zp = $this->CSS[$tag]; - if (is_array($zp)) { $p = array_merge($p,$zp); } - } - // STYLESHEET CLASS e.g. .smallone{} .redletter{} - foreach($classes AS $class) { - $zp = array(); - if (isset($this->CSS['CLASS>>'.$class])) { $zp = $this->CSS['CLASS>>'.$class]; } - if (is_array($zp)) { $p = array_merge($p,$zp); } - } - // STYLESHEET ID e.g. #smallone{} #redletter{} - if (isset($attr['ID']) && isset($this->CSS['ID>>'.$attr['ID']])) { - $zp = $this->CSS['ID>>'.$attr['ID']]; - if (is_array($zp)) { $p = array_merge($p,$zp); } - } - // STYLESHEET CLASS e.g. p.smallone{} div.redletter{} - foreach($classes AS $class) { - $zp = array(); - if (isset($this->CSS[$tag.'>>CLASS>>'.$class])) { $zp = $this->CSS[$tag.'>>CLASS>>'.$class]; } - if (is_array($zp)) { $p = array_merge($p,$zp); } - } - // STYLESHEET CLASS e.g. p#smallone{} div#redletter{} - if (isset($attr['ID']) && isset($this->CSS[$tag.'>>ID>>'.$attr['ID']])) { - $zp = $this->CSS[$tag.'>>ID>>'.$attr['ID']]; - if (is_array($zp)) { $p = array_merge($p,$zp); } - } - //=============================================== - // STYLESHEET TAG e.g. div h1 div p - // mPDF 4.0 - $this->_set_mergedCSS($oldcascadeCSS[$tag], $p); - // STYLESHEET CLASS e.g. .smallone{} .redletter{} - foreach($classes AS $class) { - // mPDF 4.0 - $this->_set_mergedCSS($oldcascadeCSS['CLASS>>'.$class], $p); - } - // STYLESHEET CLASS e.g. #smallone{} #redletter{} - if (isset($attr['ID'])) { - // mPDF 4.0 - $this->_set_mergedCSS($oldcascadeCSS['ID>>'.$attr['ID']], $p); - } - // STYLESHEET CLASS e.g. div.smallone{} p.redletter{} - foreach($classes AS $class) { - // mPDF 4.0 - $this->_set_mergedCSS($oldcascadeCSS[$tag.'>>CLASS>>'.$class], $p); - } - // STYLESHEET CLASS e.g. div#smallone{} p#redletter{} - if (isset($attr['ID'])) { - // mPDF 4.0 - $this->_set_mergedCSS($oldcascadeCSS[$tag.'>>ID>>'.$attr['ID']], $p); - } - //=============================================== - // INLINE STYLE e.g. style="CSS:property" - if (isset($attr['STYLE'])) { - $zp = $this->readInlineCSS($attr['STYLE']); - if (is_array($zp)) { $p = array_merge($p,$zp); } - } - //=============================================== - return $p; -} - - - -/*-- CSS-FLOAT --*/ -// Added mPDF 3.0 Float DIV - CLEAR -function ClearFloats($clear, $blklvl=0) { - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($blklvl,true); - $end = $currpos = ($this->page*1000 + $this->y); - if ($clear == 'BOTH' && ($l_exists || $r_exists)) { -// mPDF 4.0 $this->Reset(); - $this->pageoutput[$this->page] = array(); - $end = max($l_max, $r_max, $currpos); - } - else if ($clear == 'RIGHT' && $r_exists) { -// mPDF 4.0 $this->Reset(); - $this->pageoutput[$this->page] = array(); - $end = max($r_max, $currpos); - } - else if ($clear == 'LEFT' && $l_exists ) { -// mPDF 4.0 $this->Reset(); - $this->pageoutput[$this->page] = array(); - $end = max($l_max, $currpos); - } - else { return; } - $old_page = $this->page; - $new_page = intval($end/1000); - if ($old_page != $new_page) { - $s = $this->PrintPageBackgrounds(); - // Writes after the marker so not overwritten later by page background etc. - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', '\\1'."\n".$s."\n", $this->pages[$this->page]); - $this->pageBackgrounds = array(); - $this->page = $new_page; - } - $this->ResetMargins(); -// mPDF 4.0 $this->Reset(); - $this->pageoutput[$this->page] = array(); - $this->y = (($end*1000) % 1000000)/1000; // mod changes operands to integers before processing -} - - -// Added mPDF 3.0 Float DIV -function GetFloatDivInfo($blklvl=0,$clear=false) { - // If blklvl specified, only returns floats at that level - for ClearFloats - $l_exists = false; - $r_exists = false; - $l_max = 0; - $r_max = 0; - $l_width = 0; - $r_width = 0; - if (count($this->floatDivs)) { - $currpos = ($this->page*1000 + $this->y); - foreach($this->floatDivs AS $f) { - if (($clear && $f['blockContext'] == $this->blk[$blklvl]['blockContext']) || (!$clear && $currpos >= $f['startpos'] && $currpos < ($f['endpos']-0.001) && $f['blklvl'] > $blklvl && $f['blockContext'] == $this->blk[$blklvl]['blockContext'])) { - if ($f['side']=='L') { - $l_exists= true; - $l_max = max($l_max, $f['endpos']); - $l_width = max($l_width , $f['w']); - } - if ($f['side']=='R') { - $r_exists= true; - $r_max = max($r_max, $f['endpos']); - $r_width = max($r_width , $f['w']); - } - } - } - } - return array($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width); -} -/*-- END CSS-FLOAT --*/ - - - - -function OpenTag($tag,$attr) -{ - - // What this gets: < $tag $attr['WIDTH']="90px" > does not get content here - // Correct tags where HTML specifies optional end tags, - // and/or does not allow nesting e.g. P inside P, or - if ($this->allow_html_optional_endtags) { - if (($tag == 'P' || $tag == 'DIV' || $tag == 'H1' || $tag == 'H2' || $tag == 'H3' || $tag == 'H4' || $tag == 'H5' || $tag == 'H6' || $tag == 'UL' || $tag == 'OL' || $tag == 'TABLE' || $tag=='PRE' || $tag=='FORM' || $tag=='ADDRESS' || $tag=='BLOCKQUOTE' || $tag=='CENTER' || $tag=='DL' || $tag == 'HR' ) && $this->lastoptionaltag == 'P') { $this->CloseTag($this->lastoptionaltag ); } - if ($tag == 'DD' && $this->lastoptionaltag == 'DD') { $this->CloseTag($this->lastoptionaltag ); } - if ($tag == 'DD' && $this->lastoptionaltag == 'DT') { $this->CloseTag($this->lastoptionaltag ); } - if ($tag == 'DT' && $this->lastoptionaltag == 'DD') { $this->CloseTag($this->lastoptionaltag ); } - if ($tag == 'DT' && $this->lastoptionaltag == 'DT') { $this->CloseTag($this->lastoptionaltag ); } - if ($tag == 'LI' && $this->lastoptionaltag == 'LI') { $this->CloseTag($this->lastoptionaltag ); } - if (($tag == 'TD' || $tag == 'TH') && $this->lastoptionaltag == 'TD') { $this->CloseTag($this->lastoptionaltag ); } // *TABLES* - if (($tag == 'TD' || $tag == 'TH') && $this->lastoptionaltag == 'TH') { $this->CloseTag($this->lastoptionaltag ); } // *TABLES* - if ($tag == 'TR' && $this->lastoptionaltag == 'TR') { $this->CloseTag($this->lastoptionaltag ); } // *TABLES* - if ($tag == 'TR' && $this->lastoptionaltag == 'TD') { $this->CloseTag($this->lastoptionaltag ); $this->CloseTag('TR'); $this->CloseTag('THEAD'); } // *TABLES* - if ($tag == 'TR' && $this->lastoptionaltag == 'TH') { $this->CloseTag($this->lastoptionaltag ); $this->CloseTag('TR'); $this->CloseTag('THEAD'); } // *TABLES* - if ($tag == 'OPTION' && $this->lastoptionaltag == 'OPTION') { $this->CloseTag($this->lastoptionaltag ); } - } - - // mPDF 4.2 Baseline = S - $align = array('left'=>'L','center'=>'C','right'=>'R','top'=>'T','text-top'=>'TT','middle'=>'M','baseline'=>'BS','bottom'=>'B','text-bottom'=>'TB','justify'=>'J'); - - $this->ignorefollowingspaces=false; - - //Opening tag - switch($tag){ - - // mPDF 4.2.031 - case 'DOTTAB': - $objattr = array(); - $objattr['type'] = 'dottab'; - $dots=str_repeat('.', 3)." "; // minimum number of dots - $objattr['width'] = $this->GetStringWidth($dots); - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - $e = "\xbb\xa4\xactype=dottab,objattr=".serialize($objattr)."\xbb\xa4\xac"; -/*-- TABLES --*/ - // Output it to buffers - if ($this->tableLevel) { - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - $this->cell[$this->row][$this->col]['s'] = 0 ;// reset - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - else { -/*-- END TABLES --*/ - $this->textbuffer[] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } // *TABLES* - break; - - case 'PAGEHEADER': - case 'PAGEFOOTER': - $this->ignorefollowingspaces = true; - if ($attr['NAME']) { $pname = $attr['NAME']; } - else { $pname = '_default'; } - - if ($tag=='PAGEHEADER') { $p = &$this->pageheaders[$pname]; } - else { $p = &$this->pagefooters[$pname]; } - - $p['L']=array(); - $p['C']=array(); - $p['R']=array(); - $p['L']['font-style'] = ''; - $p['C']['font-style'] = ''; - $p['R']['font-style'] = ''; - - if (isset($attr['CONTENT-LEFT'])) { - $p['L']['content'] = $attr['CONTENT-LEFT']; - } - if (isset($attr['CONTENT-CENTER'])) { - $p['C']['content'] = $attr['CONTENT-CENTER']; - } - if (isset($attr['CONTENT-RIGHT'])) { - $p['R']['content'] = $attr['CONTENT-RIGHT']; - } - - if (isset($attr['HEADER-STYLE']) || isset($attr['FOOTER-STYLE'])) { // font-family,size,weight,style,color - if ($tag=='PAGEHEADER') { $properties = $this->readInlineCSS($attr['HEADER-STYLE']); } - else { $properties = $this->readInlineCSS($attr['FOOTER-STYLE']); } - if (isset($properties['FONT-FAMILY'])) { - $p['L']['font-family'] = $properties['FONT-FAMILY']; - $p['C']['font-family'] = $properties['FONT-FAMILY']; - $p['R']['font-family'] = $properties['FONT-FAMILY']; - } - if (isset($properties['FONT-SIZE'])) { - $p['L']['font-size'] = $this->ConvertSize($properties['FONT-SIZE']) * $this->k; - $p['C']['font-size'] = $this->ConvertSize($properties['FONT-SIZE']) * $this->k; - $p['R']['font-size'] = $this->ConvertSize($properties['FONT-SIZE']) * $this->k; - } - if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT']=='BOLD') { - $p['L']['font-style'] = 'B'; - $p['C']['font-style'] = 'B'; - $p['R']['font-style'] = 'B'; - } - if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE']=='ITALIC') { - $p['L']['font-style'] .= 'I'; - $p['C']['font-style'] .= 'I'; - $p['R']['font-style'] .= 'I'; - } - if (isset($properties['COLOR'])) { - $p['L']['color'] = $properties['COLOR']; - $p['C']['color'] = $properties['COLOR']; - $p['R']['color'] = $properties['COLOR']; - } - } - if (isset($attr['HEADER-STYLE-LEFT']) || isset($attr['FOOTER-STYLE-LEFT'])) { - if ($tag=='PAGEHEADER') { $properties = $this->readInlineCSS($attr['HEADER-STYLE-LEFT']); } - else { $properties = $this->readInlineCSS($attr['FOOTER-STYLE-LEFT']); } - if (isset($properties['FONT-FAMILY'])) { $p['L']['font-family'] = $properties['FONT-FAMILY']; } - if (isset($properties['FONT-SIZE'])) { $p['L']['font-size'] = $this->ConvertSize($properties['FONT-SIZE']) * $this->k; } - if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT']=='BOLD') { $p['L']['font-style'] ='B'; } - if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE']=='ITALIC') { $p['L']['font-style'] .='I'; } - if (isset($properties['COLOR'])) { $p['L']['color'] = $properties['COLOR']; } - } - if (isset($attr['HEADER-STYLE-CENTER']) || isset($attr['FOOTER-STYLE-CENTER'])) { - if ($tag=='PAGEHEADER') { $properties = $this->readInlineCSS($attr['HEADER-STYLE-CENTER']); } - else { $properties = $this->readInlineCSS($attr['FOOTER-STYLE-CENTER']); } - if (isset($properties['FONT-FAMILY'])) { $p['C']['font-family'] = $properties['FONT-FAMILY']; } - if (isset($properties['FONT-SIZE'])) { $p['C']['font-size'] = $this->ConvertSize($properties['FONT-SIZE']) * $this->k; } - if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT']=='BOLD') { $p['C']['font-style'] = 'B'; } - if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE']=='ITALIC') { $p['C']['font-style'] .= 'I'; } - if (isset($properties['COLOR'])) { $p['C']['color'] = $properties['COLOR']; } - } - if (isset($attr['HEADER-STYLE-RIGHT']) || isset($attr['FOOTER-STYLE-RIGHT'])) { - if ($tag=='PAGEHEADER') { $properties = $this->readInlineCSS($attr['HEADER-STYLE-RIGHT']); } - else { $properties = $this->readInlineCSS($attr['FOOTER-STYLE-RIGHT']); } - if (isset($properties['FONT-FAMILY'])) { $p['R']['font-family'] = $properties['FONT-FAMILY']; } - if (isset($properties['FONT-SIZE'])) { $p['R']['font-size'] = $this->ConvertSize($properties['FONT-SIZE']) * $this->k; } - if (isset($properties['FONT-WEIGHT']) && $properties['FONT-WEIGHT']=='BOLD') { $p['R']['font-style'] = 'B'; } - if (isset($properties['FONT-STYLE']) && $properties['FONT-STYLE']=='ITALIC') { $p['R']['font-style'] .= 'I'; } - if (isset($properties['COLOR'])) { $p['R']['color'] = $properties['COLOR']; } - } - if (isset($attr['LINE']) && $attr['LINE']) { // 0|1|on|off - if ($attr['LINE']=='1' || strtoupper($attr['LINE'])=='ON') { $lineset=1; } - else { $lineset=0; } - $p['line'] = $lineset; - } - break; - - -/*-- HTMLHEADERS-FOOTERS --*/ - case 'SETHTMLPAGEHEADER': - case 'SETHTMLPAGEFOOTER': - $this->ignorefollowingspaces = true; - if (isset($attr['NAME']) && $attr['NAME']) { $pname = $attr['NAME']; } - else { $pname = '_default'; } - if (isset($attr['PAGE']) && $attr['PAGE']) { // O|odd|even|E|ALL|[blank] - if (strtoupper($attr['PAGE'])=='O' || strtoupper($attr['PAGE'])=='ODD') { $side='odd'; } - else if (strtoupper($attr['PAGE'])=='E' || strtoupper($attr['PAGE'])=='EVEN') { $side='even'; } - else if (strtoupper($attr['PAGE'])=='ALL') { $side='both'; } - else { $side='odd'; } - } - else { $side='odd'; } - if (isset($attr['VALUE']) && $attr['VALUE']) { // -1|1|on|off - if ($attr['VALUE']=='1' || strtoupper($attr['VALUE'])=='ON') { $set=1; } - else if ($attr['VALUE']=='-1' || strtoupper($attr['VALUE'])=='OFF') { $set=0; } - else { $set=1; } - } - else { $set=1; } - if (isset($attr['SHOW-THIS-PAGE']) && $attr['SHOW-THIS-PAGE'] && $tag=='SETHTMLPAGEHEADER') { $write = 1; } - else { $write = 0; } - if ($side=='odd' || $side=='both') { - if ($set && $tag=='SETHTMLPAGEHEADER') { $this->SetHTMLHeader($this->pageHTMLheaders[$pname],'O',$write); } - else if ($set && $tag=='SETHTMLPAGEFOOTER') { $this->SetHTMLFooter($this->pageHTMLfooters[$pname],'O'); } - else if ($tag=='SETHTMLPAGEHEADER') { $this->SetHTMLHeader('','O'); } - else { $this->SetHTMLFooter('','O'); } - } - if ($side=='even' || $side=='both') { - if ($set && $tag=='SETHTMLPAGEHEADER') { $this->SetHTMLHeader($this->pageHTMLheaders[$pname],'E',$write); } - else if ($set && $tag=='SETHTMLPAGEFOOTER') { $this->SetHTMLFooter($this->pageHTMLfooters[$pname],'E'); } - else if ($tag=='SETHTMLPAGEHEADER') { $this->SetHTMLHeader('','E'); } - else { $this->SetHTMLFooter('','E'); } - } - break; -/*-- END HTMLHEADERS-FOOTERS --*/ - - case 'SETPAGEHEADER': - case 'SETPAGEFOOTER': - $this->ignorefollowingspaces = true; - if (isset($attr['NAME']) && $attr['NAME']) { $pname = $attr['NAME']; } - else { $pname = '_default'; } - if (isset($attr['PAGE']) && $attr['PAGE']) { // O|odd|even|E|ALL|[blank] - if (strtoupper($attr['PAGE'])=='O' || strtoupper($attr['PAGE'])=='ODD') { $side='odd'; } - else if (strtoupper($attr['PAGE'])=='E' || strtoupper($attr['PAGE'])=='EVEN') { $side='even'; } - else if (strtoupper($attr['PAGE'])=='ALL') { $side='both'; } - else { $side='odd'; } - } - else { $side='odd'; } - if (isset($attr['VALUE']) && $attr['VALUE']) { // -1|1|on|off - if ($attr['VALUE']=='1' || strtoupper($attr['VALUE'])=='ON') { $set=1; } - else if ($attr['VALUE']=='-1' || strtoupper($attr['VALUE'])=='OFF') { $set=0; } - else { $set=1; } - } - else { $set=1; } - if ($side=='odd' || $side=='both') { - if ($set && $tag=='SETPAGEHEADER') { $this->headerDetails['odd'] = $this->pageheaders[$pname]; } - else if ($set && $tag=='SETPAGEFOOTER') { $this->footerDetails['odd'] = $this->pagefooters[$pname]; } - else if ($tag=='SETPAGEHEADER') { $this->headerDetails['odd'] = array(); } - else { $this->footerDetails['odd'] = array(); } - // mPDF 4.0 - if (!$this->mirrorMargins || ($this->page)%2!=0) { // ODD - if ($tag=='SETPAGEHEADER') { $this->_setAutoHeaderHeight($this->headerDetails['odd'],$this->HTMLHeader); } - if ($tag=='SETPAGEFOOTER') { $this->_setAutoFooterHeight($this->footerDetails['odd'],$this->HTMLFooter); } - } - } - if ($side=='even' || $side=='both') { - if ($set && $tag=='SETPAGEHEADER') { $this->headerDetails['even'] = $this->pageheaders[$pname]; } - else if ($set && $tag=='SETPAGEFOOTER') { $this->footerDetails['even'] = $this->pagefooters[$pname]; } - else if ($tag=='SETPAGEHEADER') { $this->headerDetails['even'] = array(); } - else { $this->footerDetails['even'] = array(); } - // mPDF 4.0 - if ($this->mirrorMargins && ($this->page)%2==0) { // EVEN - if ($tag=='SETPAGEHEADER') { $this->_setAutoHeaderHeight($this->headerDetails['even'],$this->HTMLHeaderE); } - if ($tag=='SETPAGEFOOTER') { $this->_setAutoFooterHeight($this->footerDetails['even'],$this->HTMLFooterE); } - } - } - if (isset($attr['SHOW-THIS-PAGE']) && $attr['SHOW-THIS-PAGE'] && $tag=='SETPAGEHEADER') { - $this->Header(); - } - break; - - -/*-- TOC --*/ - case 'TOC': //added custom-tag - set Marker for insertion later of ToC - if (isset($attr['FONT-SIZE']) && $attr['FONT-SIZE']) { $tocfontsize = $attr['FONT-SIZE']; } else { $tocfontsize = ''; } - if (isset($attr['FONT']) && $attr['FONT']) { $tocfont = $attr['FONT']; } else { $tocfont = ''; } - if (isset($attr['INDENT']) && $attr['INDENT']) { $tocindent = $attr['INDENT']; } else { $tocindent = ''; } - if (isset($attr['RESETPAGENUM']) && $attr['RESETPAGENUM']) { $resetpagenum = $attr['RESETPAGENUM']; } else { $resetpagenum = ''; } - if (isset($attr['PAGENUMSTYLE']) && $attr['PAGENUMSTYLE']) { $pagenumstyle = $attr['PAGENUMSTYLE']; } else { $pagenumstyle= ''; } - if (isset($attr['SUPPRESS']) && $attr['SUPPRESS']) { $suppress = $attr['SUPPRESS']; } else { $suppress = ''; } - if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) { $toc_orientation = $attr['TOC-ORIENTATION']; } else { $toc_orientation = ''; } - if (isset($attr['PAGING']) && (strtoupper($attr['PAGING'])=='OFF' || $attr['PAGING']==='0')) { $paging = false; } - else { $paging = true; } - if (isset($attr['LINKS']) && (strtoupper($attr['LINKS'])=='ON' || $attr['LINKS']==1)) { $links = true; } - else { $links = false; } - if (isset($attr['NAME']) && $attr['NAME']) { $toc_id = strtolower($attr['NAME']); } else { $toc_id = 0; } - $this->TOC($tocfont,$tocfontsize,$tocindent,$resetpagenum, $pagenumstyle, $suppress, $toc_orientation, $paging, $links, $toc_id); - break; - - - - case 'TOCPAGEBREAK': // custom-tag - set Marker for insertion later of ToC AND adds PAGEBREAK - if (isset($attr['NAME']) && $attr['NAME']) { $toc_id = strtolower($attr['NAME']); } else { $toc_id = 0; } - if ($toc_id) { - if (isset($attr['FONT-SIZE'])) { $this->m_TOC[$toc_id]['TOCfontsize'] = $attr['FONT-SIZE']; } else { $this->m_TOC[$toc_id]['TOCfontsize'] = $this->default_font_size; } - if (isset($attr['FONT'])) { $this->m_TOC[$toc_id]['TOCfont'] = $attr['FONT']; } else { $this->m_TOC[$toc_id]['TOCfont'] = $this->default_font; } - if (isset($attr['INDENT']) && $attr['INDENT']) { $this->m_TOC[$toc_id]['TOCindent'] = $attr['INDENT']; } else { $this->m_TOC[$toc_id]['TOCindent'] = ''; } - if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) { $this->m_TOC[$toc_id]['TOCorientation'] = $attr['TOC-ORIENTATION']; } else { $this->m_TOC[$toc_id]['TOCorientation'] = ''; } - if (isset($attr['PAGING']) && (strtoupper($attr['PAGING'])=='OFF' || $attr['PAGING']==='0')) { $this->m_TOC[$toc_id]['TOCusePaging'] = false; } - else { $this->m_TOC[$toc_id]['TOCusePaging'] = true; } - if (isset($attr['LINKS']) && (strtoupper($attr['LINKS'])=='ON' || $attr['LINKS']==1)) { $this->m_TOC[$toc_id]['TOCuseLinking'] = true; } - else { $this->m_TOC[$toc_id]['TOCuseLinking'] = false; } - - $this->m_TOC[$toc_id]['TOC_margin_left'] = $this->m_TOC[$toc_id]['TOC_margin_right'] = $this->m_TOC[$toc_id]['TOC_margin_top'] = $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $this->m_TOC[$toc_id]['TOC_margin_header'] = $this->m_TOC[$toc_id]['TOC_margin_footer'] = ''; - if (isset($attr['TOC-MARGIN-RIGHT'])) { $this->m_TOC[$toc_id]['TOC_margin_right'] = $this->ConvertSize($attr['TOC-MARGIN-RIGHT'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-LEFT'])) { $this->m_TOC[$toc_id]['TOC_margin_left'] = $this->ConvertSize($attr['TOC-MARGIN-LEFT'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-TOP'])) { $this->m_TOC[$toc_id]['TOC_margin_top'] = $this->ConvertSize($attr['TOC-MARGIN-TOP'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-BOTTOM'])) { $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $this->ConvertSize($attr['TOC-MARGIN-BOTTOM'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-HEADER'])) { $this->m_TOC[$toc_id]['TOC_margin_header'] = $this->ConvertSize($attr['TOC-MARGIN-HEADER'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-FOOTER'])) { $this->m_TOC[$toc_id]['TOC_margin_footer'] = $this->ConvertSize($attr['TOC-MARGIN-FOOTER'],$this->w,$this->FontSize,false); } - $this->m_TOC[$toc_id]['TOC_odd_header_name'] = $this->m_TOC[$toc_id]['TOC_even_header_name'] = $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $this->m_TOC[$toc_id]['TOC_even_footer_name'] = ''; - if (isset($attr['TOC-ODD-HEADER-NAME']) && $attr['TOC-ODD-HEADER-NAME']) { $this->m_TOC[$toc_id]['TOC_odd_header_name'] = $attr['TOC-ODD-HEADER-NAME']; } - if (isset($attr['TOC-EVEN-HEADER-NAME']) && $attr['TOC-EVEN-HEADER-NAME']) { $this->m_TOC[$toc_id]['TOC_even_header_name'] = $attr['TOC-EVEN-HEADER-NAME']; } - if (isset($attr['TOC-ODD-FOOTER-NAME']) && $attr['TOC-ODD-FOOTER-NAME']) { $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $attr['TOC-ODD-FOOTER-NAME']; } - if (isset($attr['TOC-EVEN-FOOTER-NAME']) && $attr['TOC-EVEN-FOOTER-NAME']) { $this->m_TOC[$toc_id]['TOC_even_footer_name'] = $attr['TOC-EVEN-FOOTER-NAME']; } - $this->m_TOC[$toc_id]['TOC_odd_header_value'] = $this->m_TOC[$toc_id]['TOC_even_header_value'] = $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = $this->m_TOC[$toc_id]['TOC_even_footer_value'] = 0; - if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_odd_header_value'] = 1; } - else if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_odd_header_value'] = -1; } - if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_even_header_value'] = 1; } - else if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_even_header_value'] = -1; } - if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = 1; } - else if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = -1; } - if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='ON')) { $this->m_TOC[$toc_id]['TOC_even_footer_value'] = 1; } - else if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='OFF')) { $this->m_TOC[$toc_id]['TOC_even_footer_value'] = -1; } - // mPDF 4.2 - if (isset($attr['TOC-PAGE-SELECTOR']) && $attr['TOC-PAGE-SELECTOR']) { $this->m_TOC[$toc_id]['TOC_page_selector'] = $attr['TOC-PAGE-SELECTOR']; } - else { $this->m_TOC[$toc_id]['TOC_page_selector'] = ''; } - // mPDF 4.2.04 - if (isset($attr['TOC-SHEET-SIZE']) && $attr['TOC-SHEET-SIZE']) { $this->m_TOC[$toc_id]['TOCsheetsize'] = $attr['TOC-SHEET-SIZE']; } else { $this->m_TOC[$toc_id]['TOCsheetsize'] = ''; } - - - if (isset($attr['TOC-PREHTML']) && $attr['TOC-PREHTML']) { $this->m_TOC[$toc_id]['TOCpreHTML'] = htmlspecialchars_decode($attr['TOC-PREHTML'],ENT_QUOTES); } - if (isset($attr['TOC-POSTHTML']) && $attr['TOC-POSTHTML']) { $this->m_TOC[$toc_id]['TOCpostHTML'] = htmlspecialchars_decode($attr['TOC-POSTHTML'],ENT_QUOTES); } - // mPDF 3.0 - if (isset($attr['TOC-BOOKMARKTEXT']) && $attr['TOC-BOOKMARKTEXT']) { $this->m_TOC[$toc_id]['TOCbookmarkText'] = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'],ENT_QUOTES); } // *BOOKMARKS* - } - else { - if (isset($attr['FONT-SIZE'])) { $this->TOCfontsize = $attr['FONT-SIZE']; } else { $this->TOCfontsize = $this->default_font_size; } - if (isset($attr['FONT'])) { $this->TOCfont = $attr['FONT']; } else { $this->TOCfont = $this->default_font; } - if (isset($attr['INDENT']) && $attr['INDENT']) { $this->TOCindent = $attr['INDENT']; } else { $this->TOCindent = ''; } - if (isset($attr['TOC-ORIENTATION']) && $attr['TOC-ORIENTATION']) { $this->TOCorientation = $attr['TOC-ORIENTATION']; } else { $this->TOCorientation = ''; } - if (isset($attr['PAGING']) && (strtoupper($attr['PAGING'])=='OFF' || $attr['PAGING']==='0')) { $this->TOCusePaging = false; } - else { $this->TOCusePaging = true; } - if (isset($attr['LINKS']) && (strtoupper($attr['LINKS'])=='ON' || $attr['LINKS']==1)) { $this->TOCuseLinking = true; } - else { $this->TOCuseLinking = false; } - - $this->TOC_margin_left = $this->TOC_margin_right = $this->TOC_margin_top = $this->TOC_margin_bottom = $this->TOC_margin_header = $this->TOC_margin_footer = ''; - if (isset($attr['TOC-MARGIN-RIGHT'])) { $this->TOC_margin_right = $this->ConvertSize($attr['TOC-MARGIN-RIGHT'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-LEFT'])) { $this->TOC_margin_left = $this->ConvertSize($attr['TOC-MARGIN-LEFT'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-TOP'])) { $this->TOC_margin_top = $this->ConvertSize($attr['TOC-MARGIN-TOP'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-BOTTOM'])) { $this->TOC_margin_bottom = $this->ConvertSize($attr['TOC-MARGIN-BOTTOM'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-HEADER'])) { $this->TOC_margin_header = $this->ConvertSize($attr['TOC-MARGIN-HEADER'],$this->w,$this->FontSize,false); } - if (isset($attr['TOC-MARGIN-FOOTER'])) { $this->TOC_margin_footer = $this->ConvertSize($attr['TOC-MARGIN-FOOTER'],$this->w,$this->FontSize,false); } - $this->TOC_odd_header_name = $this->TOC_even_header_name = $this->TOC_odd_footer_name = $this->TOC_even_footer_name = ''; - if (isset($attr['TOC-ODD-HEADER-NAME']) && $attr['TOC-ODD-HEADER-NAME']) { $this->TOC_odd_header_name = $attr['TOC-ODD-HEADER-NAME']; } - if (isset($attr['TOC-EVEN-HEADER-NAME']) && $attr['TOC-EVEN-HEADER-NAME']) { $this->TOC_even_header_name = $attr['TOC-EVEN-HEADER-NAME']; } - if (isset($attr['TOC-ODD-FOOTER-NAME']) && $attr['TOC-ODD-FOOTER-NAME']) { $this->TOC_odd_footer_name = $attr['TOC-ODD-FOOTER-NAME']; } - if (isset($attr['TOC-EVEN-FOOTER-NAME']) && $attr['TOC-EVEN-FOOTER-NAME']) { $this->TOC_even_footer_name = $attr['TOC-EVEN-FOOTER-NAME']; } - $this->TOC_odd_header_value = $this->TOC_even_header_value = $this->TOC_odd_footer_value = $this->TOC_even_footer_value = 0; - if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='ON')) { $this->TOC_odd_header_value = 1; } - else if (isset($attr['TOC-ODD-HEADER-VALUE']) && ($attr['TOC-ODD-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-HEADER-VALUE'])=='OFF')) { $this->TOC_odd_header_value = -1; } - if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='ON')) { $this->TOC_even_header_value = 1; } - else if (isset($attr['TOC-EVEN-HEADER-VALUE']) && ($attr['TOC-EVEN-HEADER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-HEADER-VALUE'])=='OFF')) { $this->TOC_even_header_value = -1; } - if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='ON')) { $this->TOC_odd_footer_value = 1; } - else if (isset($attr['TOC-ODD-FOOTER-VALUE']) && ($attr['TOC-ODD-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-ODD-FOOTER-VALUE'])=='OFF')) { $this->TOC_odd_footer_value = -1; } - if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='ON')) { $this->TOC_even_footer_value = 1; } - else if (isset($attr['TOC-EVEN-FOOTER-VALUE']) && ($attr['TOC-EVEN-FOOTER-VALUE']=='-1' || strtoupper($attr['TOC-EVEN-FOOTER-VALUE'])=='OFF')) { $this->TOC_even_footer_value = -1; } - // mPDF 4.2 - if (isset($attr['TOC-PAGE-SELECTOR']) && $attr['TOC-PAGE-SELECTOR']) { $this->TOC_page_selector = $attr['TOC-PAGE-SELECTOR']; } - else { $this->TOC_page_selector = ''; } - // mPDF 4.2.04 - if (isset($attr['TOC-SHEET-SIZE']) && $attr['TOC-SHEET-SIZE']) { $this->TOCsheetsize = $attr['TOC-SHEET-SIZE']; } else { $this->TOCsheetsize = ''; } - - - if (isset($attr['TOC-PREHTML']) && $attr['TOC-PREHTML']) { $this->TOCpreHTML = htmlspecialchars_decode($attr['TOC-PREHTML'],ENT_QUOTES); } - if (isset($attr['TOC-POSTHTML']) && $attr['TOC-POSTHTML']) { $this->TOCpostHTML = htmlspecialchars_decode($attr['TOC-POSTHTML'],ENT_QUOTES); } - if (isset($attr['TOC-BOOKMARKTEXT']) && $attr['TOC-BOOKMARKTEXT']) { $this->TOCbookmarkText = htmlspecialchars_decode($attr['TOC-BOOKMARKTEXT'],ENT_QUOTES); } // *BOOKMARKS* - } - // mPDF 3.0 - if ($this->y == $this->tMargin && (!$this->mirrorMargins ||($this->mirrorMargins && $this->page % 2==1))) { - if ($toc_id) { $this->m_TOC[$toc_id]['TOCmark'] = $this->page; } - else { $this->TOCmark = $this->page; } - // Don't add a page - if ($this->page==1 && count($this->PageNumSubstitutions)==0) { - $resetpagenum = ''; - $pagenumstyle = ''; - $suppress = ''; - if (isset($attr['RESETPAGENUM'])) { $resetpagenum = $attr['RESETPAGENUM']; } - if (isset($attr['PAGENUMSTYLE'])) { $pagenumstyle = $attr['PAGENUMSTYLE']; } - if (isset($attr['SUPPRESS'])) { $suppress = $attr['SUPPRESS']; } - if (!$suppress) { $suppress = 'off'; } - if (!$resetpagenum) { $resetpagenum= 1; } - $this->PageNumSubstitutions[] = array('from'=>1, 'reset'=> $resetpagenum, 'type'=>$pagenumstyle, 'suppress'=> $suppress); - } - break; - } - // No break - continues as PAGEBREAK... -/*-- END TOC --*/ - - - case 'PAGE_BREAK': //custom-tag - case 'PAGEBREAK': //custom-tag - case 'NEWPAGE': //custom-tag - case 'FORMFEED': //custom-tag - - $save_blklvl = $this->blklvl; - $save_blk = $this->blk; - $save_silp = $this->saveInlineProperties(); - $save_spanlvl = $this->spanlvl; - $save_ilp = $this->InlineProperties; - - // Close any open block tags - for ($b= $this->blklvl;$b>0;$b--) { $this->CloseTag($this->blk[$b]['tag']); } - if(!empty($this->textbuffer)) { //Output previously buffered content - $this->printbuffer($this->textbuffer); - $this->textbuffer=array(); - } - $this->ignorefollowingspaces = true; - $save_cols = false; -/*-- COLUMNS --*/ - if ($this->ColActive) { - $save_cols = true; - $save_nbcol = $this->NbCol; // other values of gap and vAlign will not change by setting Columns off - $this->SetColumns(0); - } -/*-- END COLUMNS --*/ - - // mPDF 4.2.024 - if (isset($attr['SHEET-SIZE']) && $tag != 'FORMFEED' && !$this->restoreBlockPageBreaks) { - // Convert to same types as accepted in initial mPDF() A4, A4-L, or array(w,h) - $prop = preg_split('/\s+/',trim($attr['SHEET-SIZE'])); - if (count($prop) == 2 ) { - $newformat = array($this->ConvertSize($prop[0]), $this->ConvertSize($prop[1])); - } - else { $newformat = $attr['SHEET-SIZE']; } - } - else { $newformat = ''; } - - - $mgr = $mgl = $mgt = $mgb = $mgh = $mgf = ''; - if (isset($attr['MARGIN-RIGHT'])) { $mgr = $this->ConvertSize($attr['MARGIN-RIGHT'],$this->w,$this->FontSize,false); } - if (isset($attr['MARGIN-LEFT'])) { $mgl = $this->ConvertSize($attr['MARGIN-LEFT'],$this->w,$this->FontSize,false); } - if (isset($attr['MARGIN-TOP'])) { $mgt = $this->ConvertSize($attr['MARGIN-TOP'],$this->w,$this->FontSize,false); } - if (isset($attr['MARGIN-BOTTOM'])) { $mgb = $this->ConvertSize($attr['MARGIN-BOTTOM'],$this->w,$this->FontSize,false); } - if (isset($attr['MARGIN-HEADER'])) { $mgh = $this->ConvertSize($attr['MARGIN-HEADER'],$this->w,$this->FontSize,false); } - if (isset($attr['MARGIN-FOOTER'])) { $mgf = $this->ConvertSize($attr['MARGIN-FOOTER'],$this->w,$this->FontSize,false); } - $ohname = $ehname = $ofname = $efname = ''; - if (isset($attr['ODD-HEADER-NAME'])) { $ohname = $attr['ODD-HEADER-NAME']; } - if (isset($attr['EVEN-HEADER-NAME'])) { $ehname = $attr['EVEN-HEADER-NAME']; } - if (isset($attr['ODD-FOOTER-NAME'])) { $ofname = $attr['ODD-FOOTER-NAME']; } - if (isset($attr['EVEN-FOOTER-NAME'])) { $efname = $attr['EVEN-FOOTER-NAME']; } - $ohvalue = $ehvalue = $ofvalue = $efvalue = 0; - if (isset($attr['ODD-HEADER-VALUE']) && ($attr['ODD-HEADER-VALUE']=='1' || strtoupper($attr['ODD-HEADER-VALUE'])=='ON')) { $ohvalue = 1; } - else if (isset($attr['ODD-HEADER-VALUE']) && ($attr['ODD-HEADER-VALUE']=='-1' || strtoupper($attr['ODD-HEADER-VALUE'])=='OFF')) { $ohvalue = -1; } - if (isset($attr['EVEN-HEADER-VALUE']) && ($attr['EVEN-HEADER-VALUE']=='1' || strtoupper($attr['EVEN-HEADER-VALUE'])=='ON')) { $ehvalue = 1; } - else if (isset($attr['EVEN-HEADER-VALUE']) && ($attr['EVEN-HEADER-VALUE']=='-1' || strtoupper($attr['EVEN-HEADER-VALUE'])=='OFF')) { $ehvalue = -1; } - if (isset($attr['ODD-FOOTER-VALUE']) && ($attr['ODD-FOOTER-VALUE']=='1' || strtoupper($attr['ODD-FOOTER-VALUE'])=='ON')) { $ofvalue = 1; } - else if (isset($attr['ODD-FOOTER-VALUE']) && ($attr['ODD-FOOTER-VALUE']=='-1' || strtoupper($attr['ODD-FOOTER-VALUE'])=='OFF')) { $ofvalue = -1; } - if (isset($attr['EVEN-FOOTER-VALUE']) && ($attr['EVEN-FOOTER-VALUE']=='1' || strtoupper($attr['EVEN-FOOTER-VALUE'])=='ON')) { $efvalue = 1; } - else if (isset($attr['EVEN-FOOTER-VALUE']) && ($attr['EVEN-FOOTER-VALUE']=='-1' || strtoupper($attr['EVEN-FOOTER-VALUE'])=='OFF')) { $efvalue = -1; } - - if (isset($attr['ORIENTATION']) && (strtoupper($attr['ORIENTATION'])=='L' || strtoupper($attr['ORIENTATION'])=='LANDSCAPE')) { $orient = 'L'; } - else if (isset($attr['ORIENTATION']) && (strtoupper($attr['ORIENTATION'])=='P' || strtoupper($attr['ORIENTATION'])=='PORTRAIT')) { $orient = 'P'; } - else { $orient = $this->CurOrientation; } - - // mPDF 4.2 - if (isset($attr['PAGE-SELECTOR']) && $attr['PAGE-SELECTOR']) { $pagesel = $attr['PAGE-SELECTOR']; } - else { $pagesel = ''; } - - $resetpagenum = ''; - $pagenumstyle = ''; - $suppress = ''; - if (isset($attr['RESETPAGENUM'])) { $resetpagenum = $attr['RESETPAGENUM']; } - if (isset($attr['PAGENUMSTYLE'])) { $pagenumstyle = $attr['PAGENUMSTYLE']; } - if (isset($attr['SUPPRESS'])) { $suppress = $attr['SUPPRESS']; } - - if ($tag == 'TOCPAGEBREAK') { $type = 'NEXT-ODD'; } - else if(isset($attr['TYPE'])) { $type = strtoupper($attr['TYPE']); } - else { $type = ''; } - - // mPDF 4.2 - if ($type == 'E' || $type == 'EVEN') { $this->AddPage($orient,'E', $resetpagenum, $pagenumstyle, $suppress,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$ohname,$ehname,$ofname,$efname,$ohvalue,$ehvalue,$ofvalue,$efvalue,$pagesel,$newformat); } - else if ($type == 'O' || $type == 'ODD') { $this->AddPage($orient,'O', $resetpagenum, $pagenumstyle, $suppress,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$ohname,$ehname,$ofname,$efname,$ohvalue,$ehvalue,$ofvalue,$efvalue,$pagesel,$newformat); } - else if ($type == 'NEXT-ODD') { $this->AddPage($orient,'NEXT-ODD', $resetpagenum, $pagenumstyle, $suppress,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$ohname,$ehname,$ofname,$efname,$ohvalue,$ehvalue,$ofvalue,$efvalue,$pagesel,$newformat); } - else if ($type == 'NEXT-EVEN') { $this->AddPage($orient,'NEXT-EVEN', $resetpagenum, $pagenumstyle, $suppress,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$ohname,$ehname,$ofname,$efname,$ohvalue,$ehvalue,$ofvalue,$efvalue,$pagesel,$newformat); } - else { $this->AddPage($orient,'', $resetpagenum, $pagenumstyle, $suppress,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$ohname,$ehname,$ofname,$efname,$ohvalue,$ehvalue,$ofvalue,$efvalue,$pagesel,$newformat); } - -/*-- TOC --*/ - if ($tag == 'TOCPAGEBREAK') { - if ($toc_id) { $this->m_TOC[$toc_id]['TOCmark'] = $this->page; } - else { $this->TOCmark = $this->page; } - } -/*-- END TOC --*/ - -/*-- COLUMNS --*/ - if ($save_cols) { - // Restore columns - $this->SetColumns($save_nbcol,$this->colvAlign,$this->ColGap); - } -/*-- END COLUMNS --*/ - if (($tag == 'FORMFEED' || $this->restoreBlockPagebreaks) && !$this->tableLevel && !$this->listlvl) { - $this->blk = $save_blk; - // Re-open block tags - $t = $this->blk[0]['tag']; - $a = $this->blk[0]['attr']; - $this->blklvl = 0; - for ($b=0; $b<=$save_blklvl;$b++) { - $tc = $t; - $ac = $a; - $t = $this->blk[$b+1]['tag']; - $a = $this->blk[$b+1]['attr']; - unset($this->blk[$b+1]); - $this->OpenTag($tc,$ac); - } - $this->spanlvl = $save_spanlvl; - $this->InlineProperties = $save_ilp; - $this->restoreInlineProperties($save_silp); - } - - break; - - -/*-- TOC --*/ - case 'TOCENTRY': - if (isset($attr['CONTENT']) && $attr['CONTENT']) { - $objattr = array(); - $objattr['CONTENT'] = htmlspecialchars_decode($attr['CONTENT'],ENT_QUOTES); - $objattr['type'] = 'toc'; - if (isset($attr['LEVEL']) && $attr['LEVEL']) { $objattr['toclevel'] = $attr['LEVEL']; } else { $objattr['toclevel'] = 0; } - if (isset($attr['NAME']) && $attr['NAME']) { $objattr['toc_id'] = $attr['NAME']; } else { $objattr['toc_id'] = 0; } - $e = "\xbb\xa4\xactype=toc,objattr=".serialize($objattr)."\xbb\xa4\xac"; - if($this->tableLevel) { $this->cell[$this->row][$this->col]['textbuffer'][] = array($e); } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($e); - } // *TABLES* - } - break; -/*-- END TOC --*/ - -/*-- INDEX --*/ - case 'INDEXENTRY': - if (isset($attr['CONTENT']) && $attr['CONTENT']) { - // mPDF 3.0 - if (isset($attr['XREF']) && $attr['XREF']) { - $this->IndexEntry(htmlspecialchars_decode($attr['CONTENT'],ENT_QUOTES),$attr['XREF']); - break; - } - $objattr = array(); - $objattr['CONTENT'] = htmlspecialchars_decode($attr['CONTENT'],ENT_QUOTES); - $objattr['type'] = 'indexentry'; - $e = "\xbb\xa4\xactype=indexentry,objattr=".serialize($objattr)."\xbb\xa4\xac"; - if($this->tableLevel) { $this->cell[$this->row][$this->col]['textbuffer'][] = array($e); } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($e); - } // *TABLES* - } - break; - - // mPDF 3.0 - case 'INDEXINSERT': - if (isset($attr['FONT-SIZE'])) { $reffontsize = $attr['FONT-SIZE']; } else { $reffontsize = ''; } - if (isset($attr['LINE-SPACING']) && $attr['LINE-SPACING']) { $linespacing = $attr['LINE-SPACING']; } else { $linespacing = ''; } - if (isset($attr['DIV-FONT-SIZE']) && $attr['DIV-FONT-SIZE']) { $divlettfontsize = $attr['DIV-FONT-SIZE']; } else { $divlettfontsize = ''; } - if (isset($attr['FONT']) && $attr['FONT']) { $reffont = $attr['FONT']; } else { $reffont = ''; } - if (isset($attr['DIV-FONT']) && $attr['DIV-FONT']) { $divlettfont = $attr['DIV-FONT']; } else { $divlettfont = ''; } - if (isset($attr['COLS']) && $attr['COLS']) { $cols = $attr['COLS']; } else { $cols = 1; } - if (isset($attr['OFFSET']) && $attr['OFFSET']) { $offset = $attr['OFFSET']; } else { $offset = 3; } - if (isset($attr['GAP']) && $attr['GAP']) { $gap = $attr['GAP']; } else { $gap = 5; } - - if (isset($attr['USEDIVLETTERS']) && (strtoupper($attr['USEDIVLETTERS'])=='OFF' || $attr['USEDIVLETTERS']==-1 || $attr['USEDIVLETTERS']==='0')) { $usedivletters = 0; } - else { $usedivletters = 1; } - - if (isset($attr['LINKS']) && (strtoupper($attr['LINKS'])=='ON' || $attr['LINKS']==1)) { $links = true; } - else { $links = false; } - $this->CreateIndex($cols, $reffontsize, $linespacing, $offset, $usedivletters, $divlettfontsize, $gap, $reffont,$divlettfont, $links); - break; -/*-- END INDEX --*/ - -/*-- WATERMARK --*/ - // mPDF 3.0 - case 'WATERMARKTEXT': - if (isset($attr['CONTENT']) && $attr['CONTENT']) { $txt = htmlspecialchars_decode($attr['CONTENT'],ENT_QUOTES); } else { $txt = ''; } - if (isset($attr['ALPHA']) && $attr['ALPHA']>0) { $alpha = $attr['ALPHA']; } else { $alpha = -1; } - $this->SetWatermarkText($txt, $alpha); - break; - - // mPDF 3.0 - case 'WATERMARKIMAGE': - if (isset($attr['SRC'])) { $src = $attr['SRC']; } else { $src = ''; } - if (isset($attr['ALPHA']) && $attr['ALPHA']>0) { $alpha = $attr['ALPHA']; } else { $alpha = -1; } - if (isset($attr['SIZE']) && $attr['SIZE']) { - $size = $attr['SIZE']; - if (strpos($size,',')) { $size = explode(',',$size); } - } - else { $size = 'D'; } - if (isset($attr['POS']) && $attr['POS']) { - $pos = $attr['POS']; - if (strpos($pos,',')) { $pos = explode(',',$pos); } - } - else { $pos = 'P'; } - $this->SetWatermarkImage($src, $alpha, $size, $pos); - break; -/*-- END WATERMARK --*/ - -/*-- BOOKMARKS --*/ - case 'BOOKMARK': - if (isset($attr['CONTENT'])) { - // mPDF 3.0 - $objattr = array(); - $objattr['CONTENT'] = htmlspecialchars_decode($attr['CONTENT'],ENT_QUOTES); - $objattr['type'] = 'bookmark'; - if (isset($attr['LEVEL']) && $attr['LEVEL']) { $objattr['bklevel'] = $attr['LEVEL']; } else { $objattr['bklevel'] = 0; } - $e = "\xbb\xa4\xactype=bookmark,objattr=".serialize($objattr)."\xbb\xa4\xac"; - if($this->tableLevel) { $this->cell[$this->row][$this->col]['textbuffer'][] = array($e); } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($e); - } // *TABLES* - } - break; -/*-- END BOOKMARKS --*/ - -/*-- ANNOTATIONS --*/ - case 'ANNOTATION': - // mPDF 4.0 - if (isset($attr['CONTENT']) && !$this->writingHTMLheader && !$this->writingHTMLfooter) { // Stops annotations in FixedPos - $objattr = array(); - // mPDF 3.0 - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - $objattr['CONTENT'] = htmlspecialchars_decode($attr['CONTENT'],ENT_QUOTES); - $objattr['type'] = 'annot'; - $objattr['POPUP'] = ''; // mPDF 4.2.027 - } - else { break; } - if (isset($attr['POS-X'])) { $objattr['POS-X'] = $attr['POS-X']; } else { $objattr['POS-X'] = 0; } - if (isset($attr['POS-Y'])) { $objattr['POS-Y'] = $attr['POS-Y']; } else { $objattr['POS-Y'] = 0; } - if (isset($attr['ICON'])) { $objattr['ICON'] = $attr['ICON']; } else { $objattr['ICON'] = 'Note'; } - if (isset($attr['AUTHOR'])) { $objattr['AUTHOR'] = $attr['AUTHOR']; } else { $objattr['AUTHOR'] = ''; } - if (isset($attr['SUBJECT'])) { $objattr['SUBJECT'] = $attr['SUBJECT']; } else { $objattr['SUBJECT'] = ''; } - if (isset($attr['OPACITY']) && $attr['OPACITY']>0 && $attr['OPACITY']<=1) { $objattr['OPACITY'] = $attr['OPACITY']; } - else if ($this->annotMargin) { $objattr['OPACITY'] = 1; } - else { $objattr['OPACITY'] = $this->annotOpacity; } - if (isset($attr['COLOR'])) { - $cor = $this->ConvertColor($attr['COLOR']); - if ($cor) { $objattr['COLOR'] = array($cor['R'],$cor['G'],$cor['B']); } - else { $objattr['COLOR'] = array(255,255,0); } - } - else { $objattr['COLOR'] = array(255,255,0); } - // mPDF 4.2.027 - if (isset($attr['POPUP']) && !empty($attr['POPUP'])) { - $pop = preg_split('/\s+/',trim($attr['POPUP'])); - if (count($pop)>1) { $objattr['POPUP'] = $pop; } - else { $objattr['POPUP'] = true; } - } - $e = "\xbb\xa4\xactype=annot,objattr=".serialize($objattr)."\xbb\xa4\xac"; - if($this->tableLevel) { $this->cell[$this->row][$this->col]['textbuffer'][] = array($e); } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($e); - } // *TABLES* - break; -/*-- END ANNOTATIONS --*/ - - -/*-- COLUMNS --*/ - case 'COLUMNS': //added custom-tag - if (isset($attr['COLUMN-COUNT']) && ($attr['COLUMN-COUNT'] || $attr['COLUMN-COUNT']==='0')) { - // Close any open block tags - for ($b= $this->blklvl;$b>0;$b--) { $this->CloseTag($this->blk[$b]['tag']); } - if(!empty($this->textbuffer)) { //Output previously buffered content - $this->printbuffer($this->textbuffer); - $this->textbuffer=array(); - } - - if (isset($attr['VALIGN']) && $attr['VALIGN']) { - if ($attr['VALIGN'] == 'J') { $valign = 'J'; } - else { $valign = $align[$attr['VALIGN']]; } - } - else { $valign = ''; } - if (isset($attr['COLUMN-GAP']) && $attr['COLUMN-GAP']) { $this->SetColumns($attr['COLUMN-COUNT'],$valign,$attr['COLUMN-GAP']); } - else { $this->SetColumns($attr['COLUMN-COUNT'],$valign); } - } - $this->ignorefollowingspaces = true; - break; - - case 'COLUMN_BREAK': //custom-tag - case 'COLUMNBREAK': //custom-tag - case 'NEWCOLUMN': //custom-tag - $this->ignorefollowingspaces = true; - $this->NewColumn(); - $this->ColumnAdjust = false; // disables all column height adjustment for the page. - break; - -/*-- END COLUMNS --*/ - - - case 'BDO': - $this->biDirectional = true; - break; - - - case 'TTZ': - $this->ttz = true; - $this->InlineProperties[$tag] = $this->saveInlineProperties(); - $this->setCSS(array('FONT-FAMILY'=>'zapfdingbats','FONT-WEIGHT'=>'normal','FONT-STYLE'=>'normal'),'INLINE'); - break; - - case 'TTS': - $this->tts = true; - $this->InlineProperties[$tag] = $this->saveInlineProperties(); - $this->setCSS(array('FONT-FAMILY'=>'symbol','FONT-WEIGHT'=>'normal','FONT-STYLE'=>'normal'),'INLINE'); - break; - - case 'TTA': - $this->tta = true; - $this->InlineProperties[$tag] = $this->saveInlineProperties(); - // mPDF 4.0 - if (in_array($this->FontFamily,$this->mono_fonts)) { - $this->setCSS(array('FONT-FAMILY'=>'courier-embedded'),'INLINE'); - } - else if (in_array($this->FontFamily,$this->serif_fonts)) { - $this->setCSS(array('FONT-FAMILY'=>'times-embedded'),'INLINE'); - } - else { - $this->setCSS(array('FONT-FAMILY'=>'helvetica-embedded'),'INLINE'); - } - break; - - - - // INLINE PHRASES OR STYLES - case 'SUB': - case 'SUP': - case 'ACRONYM': - case 'BIG': - case 'SMALL': - case 'INS': - case 'S': - case 'STRIKE': - case 'DEL': - case 'STRONG': - case 'CITE': - case 'Q': - case 'EM': - case 'B': - case 'I': - case 'U': - case 'SAMP': - case 'CODE': - case 'KBD': - case 'TT': - case 'VAR': - case 'FONT': - case 'SPAN': -/*-- ANNOTATIONS --*/ - if ($this->title2annots && isset($attr['TITLE'])) { - $objattr = array(); - // mPDF 3.0 - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - - $objattr['CONTENT'] = $attr['TITLE']; - $objattr['type'] = 'annot'; - $objattr['POS-X'] = 0; - $objattr['POS-Y'] = 0; - $objattr['ICON'] = 'Comment'; - $objattr['AUTHOR'] = ''; - $objattr['SUBJECT'] = ''; - $objattr['OPACITY'] = $this->annotOpacity; - $objattr['COLOR'] = array(255,255,0); - $annot = "\xbb\xa4\xactype=annot,objattr=".serialize($objattr)."\xbb\xa4\xac"; - } -/*-- END ANNOTATIONS --*/ - - if ($tag == 'SPAN') { - $this->spanlvl++; - $this->InlineProperties['SPAN'][$this->spanlvl] = $this->saveInlineProperties(); - if (isset($annot)) { $this->InlineAnnots[$tag][$this->spanlvl] = $annot; } // *ANNOTATIONS* - } - else { - $this->InlineProperties[$tag] = $this->saveInlineProperties(); - if (isset($annot)) { $this->InlineAnnots[$tag] = $annot; } // *ANNOTATIONS* - } - $properties = $this->MergeCSS('INLINE',$tag,$attr); // mPDF 4.0 - if (!empty($properties)) $this->setCSS($properties,'INLINE'); - break; - - - case 'A': - if (isset($attr['NAME']) and $attr['NAME'] != '') { - // mPDF 3.0 - $e = ''; -/*-- BOOKMARKS --*/ - if ($this->anchor2Bookmark) { - $objattr = array(); - $objattr['CONTENT'] = htmlspecialchars_decode($attr['NAME'],ENT_QUOTES); - $objattr['type'] = 'bookmark'; - if (isset($attr['LEVEL']) && $attr['LEVEL']) { $objattr['bklevel'] = $attr['LEVEL']; } else { $objattr['bklevel'] = 0; } - $e = "\xbb\xa4\xactype=bookmark,objattr=".serialize($objattr)."\xbb\xa4\xac"; - } -/*-- END BOOKMARKS --*/ - if($this->tableLevel) { // *TABLES* - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,'','',array(),'',false,false,$attr['NAME']); // *TABLES* - } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($e,'','',array(),'',false,false,$attr['NAME']); //an internal link (adds a space for recognition) - } // *TABLES* - } - if (isset($attr['HREF'])) { - $this->InlineProperties['A'] = $this->saveInlineProperties(); - $properties = $this->MergeCSS('',$tag,$attr); - if (!empty($properties)) $this->setCSS($properties,'INLINE'); - $this->HREF=$attr['HREF']; - } - break; - - - - case 'BR': - // Added mPDF 3.0 Float DIV - CLEAR - if (isset($attr['STYLE'])) { - $properties = $this->readInlineCSS($attr['STYLE']); - if (isset($properties['CLEAR'])) { $this->ClearFloats(strtoupper($properties['CLEAR']),$this->blklvl); } // *CSS-FLOAT* - } - - -/*-- TABLES --*/ - if($this->tableLevel) { - // mPDF 3.0 - if ($this->blockjustfinished || $this->listjustfinished) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['text'][] = "\n"; - } - - $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['text'][] = "\n"; - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - $this->cell[$this->row][$this->col]['s'] = 0 ;// reset - } - else { -/*-- END TABLES --*/ - $this->textbuffer[] = array("\n",$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } // *TABLES* - $this->ignorefollowingspaces = true; - $this->blockjustfinished=false; - $this->listjustfinished=false; - // mPDF 3.0 - $this->linebreakjustfinished=true; - break; - - - // *********** BLOCKS ******************** - - //NB $outerblocktags = array('DIV','FORM','CENTER','DL'); - //NB $innerblocktags = array('P','BLOCKQUOTE','ADDRESS','PRE',''H1','H2','H3','H4','H5','H6','DT','DD'); - - case 'PRE': - $this->ispre=true; // ADDED - Prevents left trim of textbuffer in printbuffer() - - case 'DIV': - case 'FORM': - case 'CENTER': - - case 'BLOCKQUOTE': - case 'ADDRESS': - - case 'P': - case 'H1': - case 'H2': - case 'H3': - case 'H4': - case 'H5': - case 'H6': - case 'DL': - case 'DT': - case 'DD': - $p = $this->PreviewBlockCSS($tag,$attr); - if(isset($p['DISPLAY']) && strtolower($p['DISPLAY'])=='none') { - $this->blklvl++; - $this->blk[$this->blklvl]['hide'] = true; - return; - } -/*-- CSS-POSITION --*/ - // mPDF 4.0 - if ((isset($p['POSITION']) && (strtolower($p['POSITION'])=='fixed' || strtolower($p['POSITION'])=='absolute')) && $this->blklvl==0) { - if ($this->inFixedPosBlock) { - $this->Error("Cannot nest block with position:fixed or position:absolute"); - } - $this->inFixedPosBlock = true; - return; - } -/*-- END CSS-POSITION --*/ - // Start Block - $this->ignorefollowingspaces = true; - // mPDF 4.2 - if ($this->blockjustfinished && !count($this->textbuffer) && $this->y != $this->tMargin && $this->collapseBlockMargins) { $lastbottommargin = $this->lastblockbottommargin; } - else { $lastbottommargin = 0; } - $this->lastblockbottommargin = 0; - $this->blockjustfinished=false; - -/*-- LISTS --*/ - // mPDF 4.0 - if ($this->listlvl>0) { return; } -/*-- END LISTS --*/ - - $this->InlineProperties = array(); - $this->spanlvl = 0; - $this->listjustfinished=false; - $this->divbegin=true; - // mPDF 3.0 - $this->linebreakjustfinished=false; - -/*-- TABLES --*/ - if ($this->tableLevel) { - // mPDF 3.0 - // If already something on the line - if ($this->cell[$this->row][$this->col]['s'] > 0 && !$this->nestedtablejustfinished ) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['text'][] = "\n"; - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - $this->cell[$this->row][$this->col]['s'] = 0 ;// reset - } - // Cannot set block properties inside table - use Bold to indicate h1-h6 - if ($tag == 'CENTER' && $this->tdbegin) { $this->cell[$this->row][$this->col]['a'] = $align['center']; } - - $this->InlineProperties['BLOCKINTABLE'] = $this->saveInlineProperties(); - $properties = $this->MergeCSS('',$tag,$attr); - if (!empty($properties)) $this->setCSS($properties,'INLINE'); - - - break; - } -/*-- END TABLES --*/ - - if ($tag == 'P' || $tag == 'DT' || $tag == 'DD') { $this->lastoptionaltag = $tag; } // Save current HTML specified optional endtag - else { $this->lastoptionaltag = ''; } - - if ($this->lastblocklevelchange == 1) { $blockstate = 1; } // Top margins/padding only - else if ($this->lastblocklevelchange < 1) { $blockstate = 0; } // NO margins/padding - $this->printbuffer($this->textbuffer,$blockstate); - $this->textbuffer=array(); - - $this->blklvl++; - // mPDF 4.0 - $currblk =& $this->blk[$this->blklvl]; - $this->initialiseBlock($currblk); - $prevblk =& $this->blk[$this->blklvl-1]; - - $currblk['tag'] = $tag; - $currblk['attr'] = $attr; - - $this->Reset(); - $properties = $this->MergeCSS('BLOCK',$tag,$attr); - - $pagesel = ''; -/*-- CSS-PAGE --*/ - // mPDF 4.2 - if (isset($properties['PAGE'])) { $pagesel = $properties['PAGE']; } -/*-- END CSS-PAGE --*/ - - // If page-box has changed AND/OR PAGE-BREAK-BEFORE - $save_cols = false; - if (($pagesel && $pagesel != $this->page_box['current']) || (isset($properties['PAGE-BREAK-BEFORE']) && $properties['PAGE-BREAK-BEFORE'])) { - if ($this->blklvl>1) { - // Close any open block tags - for ($b= $this->blklvl;$b>0;$b--) { $this->CloseTag($this->blk[$b]['tag']); } - // Output any text left in buffer - if (count($this->textbuffer)) { $this->printbuffer($this->textbuffer); $this->textbuffer=array(); } - } -/*-- COLUMNS --*/ - if ($this->ColActive) { - $save_cols = true; - $save_nbcol = $this->NbCol; // other values of gap and vAlign will not change by setting Columns off - $this->SetColumns(0); - } -/*-- END COLUMNS --*/ - - - // Must Add new page if changed page properties - if (isset($properties['PAGE-BREAK-BEFORE'])) { - if (strtoupper($properties['PAGE-BREAK-BEFORE']) == 'RIGHT') { $this->AddPage($this->CurOrientation,'NEXT-ODD','','','','','', '','', '','','','','','',0,0,0,0,$pagesel); } - else if (strtoupper($properties['PAGE-BREAK-BEFORE']) == 'LEFT') { $this->AddPage($this->CurOrientation,'NEXT-EVEN','','','','','', '','', '','','','','','',0,0,0,0,$pagesel); } - else if (strtoupper($properties['PAGE-BREAK-BEFORE']) == 'ALWAYS') { $this->AddPage($this->CurOrientation,'','','','','','', '','', '','','','','','',0,0,0,0,$pagesel); } - else if ($this->page_box['current'] != $pagesel) { $this->AddPage($this->CurOrientation,'','','','','','', '','', '','','','','','',0,0,0,0,$pagesel); } // *CSS-PAGE* - } -/*-- CSS-PAGE --*/ - else if ($pagesel != $this->page_box['current']) { $this->AddPage($this->CurOrientation,'','','','','','', '','', '','','','','','',0,0,0,0,$pagesel); } -/*-- END CSS-PAGE --*/ - - // if using htmlheaders, the headers need to be rewritten when new page - // done by calling WriteHTML() within resethtmlheaders - // so block is reset to 0 - now we need to resurrect it - // As in WriteHTML() initialising - $this->blklvl = 0; - $this->lastblocklevelchange = 0; - $this->blk = array(); - // mPDF 4.0 - $this->initialiseBlock($this->blk[0]); - $this->blk[0]['width'] =& $this->pgwidth; - $this->blk[0]['inner_width'] =& $this->pgwidth; - // mPDF 3.0 - $this->blk[0]['blockContext'] = $this->blockContext; - $properties = $this->MergeCSS('BLOCK','BODY',''); - $this->setCSS($properties,'','BODY'); - $this->blklvl++; - // mPDF 4.0 - $currblk =& $this->blk[$this->blklvl]; - $prevblk =& $this->blk[$this->blklvl-1]; - - $this->initialiseBlock($currblk); - $currblk['tag'] = $tag; - $currblk['attr'] = $attr; - - $this->Reset(); - $properties = $this->MergeCSS('BLOCK',$tag,$attr); -/*-- COLUMNS --*/ - if ($save_cols) { - // Restore columns - $this->SetColumns($save_nbcol,$this->colvAlign,$this->ColGap); - } -/*-- END COLUMNS --*/ - } - - - if (isset($properties['PAGE-BREAK-INSIDE']) && strtoupper($properties['PAGE-BREAK-INSIDE']) == 'AVOID' && !$this->ColActive && !$this->keep_block_together) { - $currblk['keep_block_together'] = 1; - $currblk['y00'] = $this->y; - $this->keep_block_together = 1; - $this->divbuffer = array(); - $this->ktLinks = array(); - $this->ktAnnots = array(); - $this->ktBlock = array(); - $this->ktReference = array(); - $this->ktBMoutlines = array(); - $this->_kttoc = array(); - } - - // mPDF 4.2 Collaspe vertical block margins - if ($lastbottommargin && $properties['MARGIN-TOP']) { $currblk['lastbottommargin'] = $lastbottommargin; } - - $this->setCSS($properties,'BLOCK',$tag); //name(id/class/style) found in the CSS array! - $currblk['InlineProperties'] = $this->saveInlineProperties(); - - - if(isset($attr['ALIGN']) && $attr['ALIGN']) { $currblk['block-align'] = $align[strtolower($attr['ALIGN'])]; } - - - // mPDF 4.0 height - if (isset($properties['HEIGHT'])) { $currblk['css_set_height'] = $this->ConvertSize($properties['HEIGHT'],($this->h - $this->tMargin - $this->bMargin),$this->FontSize,false); } - else { $currblk['css_set_height'] = false; } - - - // Added mPDF 3.0 Float DIV - if (isset($prevblk['blockContext'])) { $currblk['blockContext'] = $prevblk['blockContext'] ; } // *CSS-FLOAT* - - if (isset($properties['CLEAR'])) { $this->ClearFloats(strtoupper($properties['CLEAR']), $this->blklvl-1); } // *CSS-FLOAT* - - $container_w = $prevblk['inner_width']; - $bdr = $currblk['border_right']['w']; - $bdl = $currblk['border_left']['w']; - $pdr = $currblk['padding_right']; - $pdl = $currblk['padding_left']; - - if (isset($currblk['css_set_width'])) { $setwidth = $currblk['css_set_width']; } - else { $setwidth = 0; } - -/*-- CSS-FLOAT --*/ - if (isset($properties['FLOAT']) && strtoupper($properties['FLOAT']) == 'RIGHT' && !$this->ColActive) { - // Cancel Keep-Block-together - $currblk['keep_block_together'] = false; - $currblk['y00'] = ''; - $this->keep_block_together = 0; - - $this->blockContext++; - $currblk['blockContext'] = $this->blockContext; - - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl-1); - - // DIV is too narrow for text to fit! - $maxw = $container_w - $l_width - $r_width; - if (($setwidth + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) > $maxw || ($maxw - ($currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr)) < $this->GetStringWidth('WW')) { - // Too narrow to fit - try to move down past L or R float - if ($l_max < $r_max && ($setwidth + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) <= ($container_w - $r_width) && (($container_w - $r_width) - ($currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr)) > $this->GetStringWidth('WW')) { - $this->ClearFloats('LEFT', $this->blklvl-1); - } - else if ($r_max < $l_max && ($setwidth + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) <= ($container_w - $l_width) && (($container_w - $l_width) - ($currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr)) > $this->GetStringWidth('WW')) { - $this->ClearFloats('RIGHT', $this->blklvl-1); - } - else { $this->ClearFloats('BOTH', $this->blklvl-1); } - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl-1); - } - - if ($r_exists) { $currblk['margin_right'] += $r_width; } - - $currblk['float'] = 'R'; - $currblk['float_start_y'] = $this->y; - if ($currblk['css_set_width']) { - $currblk['margin_left'] = $container_w - ($setwidth + $bdl + $pdl + $bdr + $pdr + $currblk['margin_right']); - $currblk['float_width'] = ($setwidth + $bdl + $pdl + $bdr + $pdr + $currblk['margin_right']); - } - else { - // *** If no width set - would need to buffer and keep track of max width, then Right-align if not full width - // and do borders and backgrounds - For now - just set to maximum width left - - if ($l_exists) { $currblk['margin_left'] += $l_width; } - $currblk['css_set_width'] = $container_w - ($currblk['margin_left'] + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr); - - $currblk['float_width'] = ($currblk['css_set_width'] + $bdl + $pdl + $bdr + $pdr + $currblk['margin_right']); - } - } - else if (isset($properties['FLOAT']) && strtoupper($properties['FLOAT']) == 'LEFT' && !$this->ColActive) { - // Cancel Keep-Block-together - $currblk['keep_block_together'] = false; - $currblk['y00'] = ''; - $this->keep_block_together = 0; - - $this->blockContext++; - $currblk['blockContext'] = $this->blockContext; - - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl-1); - - // DIV is too narrow for text to fit! - $maxw = $container_w - $l_width - $r_width; - if (($setwidth + $currblk['margin_left'] + $bdl + $pdl + $bdr + $pdr) > $maxw || ($maxw - ($currblk['margin_left'] + $bdl + $pdl + $bdr + $pdr)) < $this->GetStringWidth('WW')) { - // Too narrow to fit - try to move down past L or R float - if ($l_max < $r_max && ($setwidth + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) <= ($container_w - $r_width) && (($container_w - $r_width) - ($currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr)) > $this->GetStringWidth('WW')) { - $this->ClearFloats('LEFT', $this->blklvl-1); - } - else if ($r_max < $l_max && ($setwidth + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) <= ($container_w - $l_width) && (($container_w - $l_width) - ($currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr)) > $this->GetStringWidth('WW')) { - $this->ClearFloats('RIGHT', $this->blklvl-1); - } - else { $this->ClearFloats('BOTH', $this->blklvl-1); } - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl-1); - } - - if ($l_exists) { $currblk['margin_left'] += $l_width; } - - $currblk['float'] = 'L'; - $currblk['float_start_y'] = $this->y; - if ($setwidth) { - $currblk['margin_right'] = $container_w - ($setwidth + $bdl + $pdl + $bdr + $pdr + $currblk['margin_left']); - $currblk['float_width'] = ($setwidth + $bdl + $pdl + $bdr + $pdr + $currblk['margin_left']); - } - else { - // *** If no width set - would need to buffer and keep track of max width, then Right-align if not full width - // and do borders and backgrounds - For now - just set to maximum width left - - if ($r_exists) { $currblk['margin_right'] += $r_width; } - $currblk['css_set_width'] = $container_w - ($currblk['margin_left'] + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr); - - $currblk['float_width'] = ($currblk['css_set_width'] + $bdl + $pdl + $bdr + $pdr + $currblk['margin_left']); - } - } - - else { - // Don't allow overlap - if floats present - adjust padding to avoid overlap with Floats - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl-1); - $maxw = $container_w - $l_width - $r_width; - if (($setwidth + $currblk['margin_left'] + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) > $maxw || ($maxw - ($currblk['margin_right'] + $currblk['margin_left'] + $bdl + $pdl + $bdr + $pdr)) < $this->GetStringWidth('WW')) { - // Too narrow to fit - try to move down past L or R float - if ($l_max < $r_max && ($setwidth + $currblk['margin_left'] + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) <= ($container_w - $r_width) && (($container_w - $r_width) - ($currblk['margin_right'] + $currblk['margin_left'] + $bdl + $pdl + $bdr + $pdr)) > $this->GetStringWidth('WW')) { - $this->ClearFloats('LEFT', $this->blklvl-1); - } - else if ($r_max < $l_max && ($setwidth + $currblk['margin_left'] + $currblk['margin_right'] + $bdl + $pdl + $bdr + $pdr) <= ($container_w - $l_width) && (($container_w - $l_width) - ($currblk['margin_right'] + $currblk['margin_left'] + $bdl + $pdl + $bdr + $pdr)) > $this->GetStringWidth('WW')) { - $this->ClearFloats('RIGHT', $this->blklvl-1); - } - else { $this->ClearFloats('BOTH', $this->blklvl-1); } - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl-1); - } - if ($r_exists) { $currblk['padding_right'] = max(($r_width-$currblk['margin_right']-$bdr), $pdr); } - if ($l_exists) { $currblk['padding_left'] = max(($l_width-$currblk['margin_left']-$bdl), $pdl); } - } -/*-- END CSS-FLOAT --*/ - - -/*-- BORDER-RADIUS --*/ - // Automatically increase padding if required for border-radius - if ($this->autoPadding && !$this->ColActive && !$this->keep_block_together) { - if ($currblk['border_radius_TL_H']>$currblk['padding_left'] && $currblk['border_radius_TL_V']>$currblk['padding_top']) { - if ($currblk['border_radius_TL_H']>$currblk['border_radius_TL_V']) { - $this->_borderPadding($currblk['border_radius_TL_H'],$currblk['border_radius_TL_V'], $currblk['padding_left'], $currblk['padding_top']); - } - else { - $this->_borderPadding($currblk['border_radius_TL_V'],$currblk['border_radius_TL_H'], $currblk['padding_top'], $currblk['padding_left']); - } - } - if ($currblk['border_radius_TR_H']>$currblk['padding_right'] && $currblk['border_radius_TR_V']>$currblk['padding_top']) { - if ($currblk['border_radius_TR_H']>$currblk['border_radius_TR_V']) { - $this->_borderPadding($currblk['border_radius_TR_H'],$currblk['border_radius_TR_V'], $currblk['padding_right'], $currblk['padding_top']); - } - else { - $this->_borderPadding($currblk['border_radius_TR_V'],$currblk['border_radius_TR_H'], $currblk['padding_top'], $currblk['padding_right']); - } - } - if ($currblk['border_radius_BL_H']>$currblk['padding_left'] && $currblk['border_radius_BL_V']>$currblk['padding_bottom']) { - if ($currblk['border_radius_BL_H']>$currblk['border_radius_BL_V']) { - $this->_borderPadding($currblk['border_radius_BL_H'],$currblk['border_radius_BL_V'], $currblk['padding_left'], $currblk['padding_bottom']); - } - else { - $this->_borderPadding($currblk['border_radius_BL_V'],$currblk['border_radius_BL_H'], $currblk['padding_bottom'], $currblk['padding_left']); - } - } - if ($currblk['border_radius_BR_H']>$currblk['padding_right'] && $currblk['border_radius_BR_V']>$currblk['padding_bottom']) { - if ($currblk['border_radius_BR_H']>$currblk['border_radius_BR_V']) { - $this->_borderPadding($currblk['border_radius_BR_H'],$currblk['border_radius_BR_V'], $currblk['padding_right'], $currblk['padding_bottom']); - } - else { - $this->_borderPadding($currblk['border_radius_BR_V'],$currblk['border_radius_BR_H'], $currblk['padding_bottom'], $currblk['padding_right']); - } - } - } -/*-- END BORDER-RADIUS --*/ - - - // Hanging indent - if negative indent: ensure padding is >= indent - // mPDF 4.0 - $cbti = $this->ConvertSize($currblk['text_indent'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if ($cbti < 0) { - $hangind = -($cbti); - if ($this->directionality == 'rtl') { // *RTL* - $currblk['padding_right'] = max($currblk['padding_right'],$hangind); // *RTL* - } // *RTL* - else { // *RTL* - $currblk['padding_left'] = max($currblk['padding_left'],$hangind); - } // *RTL* - } - - if (isset($currblk['css_set_width'])) { - if (isset($properties['MARGIN-LEFT']) && isset($properties['MARGIN-RIGHT']) && strtolower($properties['MARGIN-LEFT'])=='auto' && strtolower($properties['MARGIN-RIGHT'])=='auto') { - // Try to reduce margins to accomodate - if still too wide, set margin-right/left=0 (reduces width) - $anyextra = $prevblk['inner_width'] - ($currblk['css_set_width'] + $currblk['border_left']['w'] + $currblk['padding_left'] + $currblk['border_right']['w'] + $currblk['padding_right']); - if ($anyextra>0) { - $currblk['margin_left'] = $currblk['margin_right'] = $anyextra /2; - } - else { - $currblk['margin_left'] = $currblk['margin_right'] = 0; - } - } - else if (isset($properties['MARGIN-LEFT']) && strtolower($properties['MARGIN-LEFT'])=='auto') { - // Try to reduce margin-left to accomodate - if still too wide, set margin-left=0 (reduces width) - $currblk['margin_left'] = $prevblk['inner_width'] - ($currblk['css_set_width'] + $currblk['border_left']['w'] + $currblk['padding_left'] + $currblk['border_right']['w'] + $currblk['padding_right'] + $currblk['margin_right']); - if ($currblk['margin_left'] < 0) { - $currblk['margin_left'] = 0; - } - } - else if (isset($properties['MARGIN-RIGHT']) && strtolower($properties['MARGIN-RIGHT'])=='auto') { - // Try to reduce margin-right to accomodate - if still too wide, set margin-right=0 (reduces width) - $currblk['margin_right'] = $prevblk['inner_width'] - ($currblk['css_set_width'] + $currblk['border_left']['w'] + $currblk['padding_left'] + $currblk['border_right']['w'] + $currblk['padding_right'] + $currblk['margin_left']); - if ($currblk['margin_right'] < 0) { - $currblk['margin_right'] = 0; - } - } - else { - if ($this->directionality == 'rtl') { // *RTL* - // Try to reduce margin-left to accomodate - if still too wide, set margin-left=0 (reduces width) - $currblk['margin_left'] = $prevblk['inner_width'] - ($currblk['css_set_width'] + $currblk['border_left']['w'] + $currblk['padding_left'] + $currblk['border_right']['w'] + $currblk['padding_right'] + $currblk['margin_right']); // *RTL* - if ($currblk['margin_left'] < 0) { // *RTL* - $currblk['margin_left'] = 0; // *RTL* - } // *RTL* - } // *RTL* - else { // *RTL* - // Try to reduce margin-right to accomodate - if still too wide, set margin-right=0 (reduces width) - $currblk['margin_right'] = $prevblk['inner_width'] - ($currblk['css_set_width'] + $currblk['border_left']['w'] + $currblk['padding_left'] + $currblk['border_right']['w'] + $currblk['padding_right'] + $currblk['margin_left']); - if ($currblk['margin_right'] < 0) { - $currblk['margin_right'] = 0; - } - } // *RTL* - } - } - - $currblk['outer_left_margin'] = $prevblk['outer_left_margin'] + $currblk['margin_left'] + $prevblk['border_left']['w'] + $prevblk['padding_left']; - $currblk['outer_right_margin'] = $prevblk['outer_right_margin'] + $currblk['margin_right'] + $prevblk['border_right']['w'] + $prevblk['padding_right']; - - $currblk['width'] = $this->pgwidth - ($currblk['outer_right_margin'] + $currblk['outer_left_margin']); - $currblk['inner_width'] = $currblk['width'] - ($currblk['border_left']['w'] + $currblk['padding_left'] + $currblk['border_right']['w'] + $currblk['padding_right']); - - // Check DIV is not now too narrow to fit text - $mw = $this->GetStringWidth('WW'); - if ($currblk['inner_width'] < $mw) { - $currblk['padding_left'] = 0; - $currblk['padding_right'] = 0; - $currblk['border_left']['w'] = 0.2; - $currblk['border_right']['w'] = 0.2; - $currblk['margin_left'] = 0; - $currblk['margin_right'] = 0; - $currblk['outer_left_margin'] = $prevblk['outer_left_margin'] + $currblk['margin_left'] + $prevblk['border_left']['w'] + $prevblk['padding_left']; - $currblk['outer_right_margin'] = $prevblk['outer_right_margin'] + $currblk['margin_right'] + $prevblk['border_right']['w'] + $prevblk['padding_right']; - $currblk['width'] = $this->pgwidth - ($currblk['outer_right_margin'] + $currblk['outer_left_margin']); - $currblk['inner_width'] = $this->pgwidth - ($currblk['outer_right_margin'] + $currblk['outer_left_margin'] + $currblk['border_left']['w'] + $currblk['padding_left'] + $currblk['border_right']['w'] + $currblk['padding_right']); -// if ($currblk['inner_width'] < $mw) { $this->Error("DIV is too narrow for text to fit!"); } - } - - $this->x = $this->lMargin + $currblk['outer_left_margin']; - -/*-- BACKGROUND-IMAGES --*/ - // mPDF 4.3.011 - if (isset($properties['BACKGROUND-IMAGE']) && $properties['BACKGROUND-IMAGE'] && !$this->kwt && !$this->ColActive && !$this->keep_block_together) { - $file = $properties['BACKGROUND-IMAGE']; - $sizesarray = $this->Image($file,0,0,0,0,'','',false, false, false, false, false); // mPDF 4.3.012D - if (isset($sizesarray['IMAGE_ID'])) { - $image_id = $sizesarray['IMAGE_ID']; - $orig_w = $sizesarray['WIDTH']*$this->k; // in user units i.e. mm - $orig_h = $sizesarray['HEIGHT']*$this->k; // (using $this->img_dpi) - $x_repeat = true; - $y_repeat = true; - if (isset($properties['BACKGROUND-REPEAT'])) { - if ($properties['BACKGROUND-REPEAT']=='no-repeat' || $properties['BACKGROUND-REPEAT']=='repeat-x') { $y_repeat = false; } - if ($properties['BACKGROUND-REPEAT']=='no-repeat' || $properties['BACKGROUND-REPEAT']=='repeat-y') { $x_repeat = false; } - } - $x_pos = 0; - $y_pos = 0; - if (isset($properties['BACKGROUND-POSITION'])) { - $ppos = preg_split('/\s+/',$properties['BACKGROUND-POSITION']); - $x_pos = $ppos[0]; - $y_pos = $ppos[1]; - if (!stristr($x_pos ,'%') ) { $x_pos = $this->ConvertSize($x_pos ,$currblk['inner_width'],$this->FontSize); } - if (!stristr($y_pos ,'%') ) { $y_pos = $this->ConvertSize($y_pos ,$currblk['inner_width'],$this->FontSize); } - } - // mPDF 4.3.015 - if (isset($properties['BACKGROUND-IMAGE-RESIZE'])) { $resize = $properties['BACKGROUND-IMAGE-RESIZE']; } - else { $resize = 0; } - // mPDF 4.3.017 - if (isset($properties['BACKGROUND-IMAGE-OPACITY'])) { $opacity = $properties['BACKGROUND-IMAGE-OPACITY']; } - else { $opacity = 1; } - $currblk['background-image'] = array('image_id'=>$image_id, 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$x_pos, 'y_pos'=>$y_pos, 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat, 'resize'=>$resize, 'opacity'=>$opacity); // mPDF 4.3.015 4.3.017 - } - } -/*-- END BACKGROUND-IMAGES --*/ - -/*-- TABLES --*/ - if ($this->use_kwt && isset($attr['KEEP-WITH-TABLE']) && !$this->ColActive && !$this->keep_block_together) { - $this->kwt = true; - $this->kwt_y0 = $this->y; - $this->kwt_x0 = $this->x; - $this->kwt_height = 0; - $this->kwt_buffer = array(); - $this->kwt_Links = array(); - $this->kwt_Annots = array(); - $this->kwt_moved = false; - $this->kwt_saved = false; - // mPDF 3.0 - $this->kwt_Reference = array(); - $this->kwt_BMoutlines = array(); - $this->kwt_toc = array(); - } - else { -/*-- END TABLES --*/ - $this->kwt = false; - } // *TABLES* - - //Save x,y coords in case we need to print borders... - $currblk['y0'] = $this->y; - $currblk['x0'] = $this->x; - $currblk['startpage'] = $this->page; - $this->oldy = $this->y; - - $this->lastblocklevelchange = 1 ; - - break; - - case 'HR': - // Added mPDF 3.0 Float DIV - CLEAR - if (isset($attr['STYLE'])) { - $properties = $this->readInlineCSS($attr['STYLE']); - if (isset($properties['CLEAR'])) { $this->ClearFloats(strtoupper($properties['CLEAR']),$this->blklvl); } // *CSS-FLOAT* - } - - $this->ignorefollowingspaces = true; - - $objattr = array(); - // mPDF 3.0 - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - $properties = $this->MergeCSS('',$tag,$attr); - if (isset($properties['MARGIN-TOP'])) { $objattr['margin_top'] = $this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-BOTTOM'])) { $objattr['margin_bottom'] = $this->ConvertSize($properties['MARGIN-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['WIDTH'])) { $objattr['width'] = $this->ConvertSize($properties['WIDTH'],$this->blk[$this->blklvl]['inner_width']); } - if (isset($properties['TEXT-ALIGN'])) { $objattr['align'] = $align[strtolower($properties['TEXT-ALIGN'])]; } - // mPDF 3.0 - if (isset($properties['MARGIN-LEFT']) && strtolower($properties['MARGIN-LEFT'])=='auto') { - $objattr['align'] = 'R'; - } - if (isset($properties['MARGIN-RIGHT']) && strtolower($properties['MARGIN-RIGHT'])=='auto') { - $objattr['align'] = 'L'; - if (isset($properties['MARGIN-RIGHT']) && strtolower($properties['MARGIN-RIGHT'])=='auto' && isset($properties['MARGIN-LEFT']) && strtolower($properties['MARGIN-LEFT'])=='auto') { - $objattr['align'] = 'C'; - } - } - if (isset($properties['COLOR'])) { $objattr['color'] = $this->ConvertColor($properties['COLOR']); } - if (isset($properties['HEIGHT'])) { $objattr['linewidth'] = $this->ConvertSize($properties['HEIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - - if(isset($attr['WIDTH']) && $attr['WIDTH'] != '') $objattr['width'] = $this->ConvertSize($attr['WIDTH'],$this->blk[$this->blklvl]['inner_width']); - if(isset($attr['ALIGN']) && $attr['ALIGN'] != '') $objattr['align'] = $align[strtolower($attr['ALIGN'])]; - if(isset($attr['COLOR']) && $attr['COLOR'] != '') $objattr['color'] = $this->ConvertColor($attr['COLOR']); - -/*-- TABLES --*/ - if ($this->tableLevel) { - $objattr['W-PERCENT'] = 100; - if (isset($properties['WIDTH']) && stristr($properties['WIDTH'],'%')) { - $properties['WIDTH'] += 0; //make "90%" become simply "90" - $objattr['W-PERCENT'] = $properties['WIDTH']; - } - if (isset($attr['WIDTH']) && stristr($attr['WIDTH'],'%')) { - $attr['WIDTH'] += 0; //make "90%" become simply "90" - $objattr['W-PERCENT'] = $attr['WIDTH']; - } - } -/*-- END TABLES --*/ - - $objattr['type'] = 'hr'; - $objattr['height'] = $objattr['linewidth'] + $objattr['margin_top'] + $objattr['margin_bottom']; - $e = "\xbb\xa4\xactype=image,objattr=".serialize($objattr)."\xbb\xa4\xac"; - - // Clear properties - tidy up - $properties = array(); - -/*-- TABLES --*/ - // Output it to buffers - if ($this->tableLevel) { - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - $this->cell[$this->row][$this->col]['s'] = 0 ;// reset - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - else { -/*-- END TABLES --*/ - $this->textbuffer[] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } // *TABLES* - - break; - - -/*-- BARCODES --*/ - // mPDF 4.0 - case 'BARCODE': - if(isset($attr['CODE']) && $attr['CODE']) { - $objattr = array(); - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['padding_top'] = 0; - $objattr['padding_bottom'] = 0; - $objattr['padding_left'] = 0; - $objattr['padding_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - $objattr['code'] = $attr['CODE']; - - if(isset($attr['TYPE'])) { - $objattr['btype'] = trim(strtoupper($attr['TYPE'])); - } - else { $objattr['btype'] = 'EAN13'; } // default - if (preg_match('/^(EAN13|ISBN|ISSN|EAN8|UPCA|UPCE)P([25])$/',$objattr['btype'],$m)) { - $objattr['btype'] = $m[1]; - $objattr['bsupp'] = $m[2]; - if (preg_match('/^(\S+)\s+(.*)$/',$objattr['code'],$mm)) { - $objattr['code'] = $mm[1]; - $objattr['bsupp_code'] = $mm[2]; - } - } - else { $objattr['bsupp'] = 0; } - - if(isset($attr['TEXT']) && $attr['TEXT']==1) { $objattr['showtext'] = 1; } - else { $objattr['showtext'] = 0; } - if(isset($attr['SIZE']) && $attr['SIZE']>0) { $objattr['bsize'] = $attr['SIZE']; } - else { $objattr['bsize'] = 1; } - if(isset($attr['HEIGHT']) && $attr['HEIGHT']>0) { $objattr['bheight'] = $attr['HEIGHT']; } - else { $objattr['bheight'] = 1; } - if(isset($attr['PR']) && $attr['PR']>0) { $objattr['pr_ratio'] = $attr['PR']; } - else { $objattr['pr_ratio'] = ''; } - $properties = $this->MergeCSS('',$tag,$attr); - if(isset($properties ['DISPLAY']) && strtolower($properties ['DISPLAY'])=='none') { - return; - } - if (isset($properties['MARGIN-TOP'])) { $objattr['margin_top']=$this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-BOTTOM'])) { $objattr['margin_bottom'] = $this->ConvertSize($properties['MARGIN-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-LEFT'])) { $objattr['margin_left'] = $this->ConvertSize($properties['MARGIN-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-RIGHT'])) { $objattr['margin_right'] = $this->ConvertSize($properties['MARGIN-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - - if (isset($properties['PADDING-TOP'])) { $objattr['padding_top']=$this->ConvertSize($properties['PADDING-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['PADDING-BOTTOM'])) { $objattr['padding_bottom'] = $this->ConvertSize($properties['PADDING-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['PADDING-LEFT'])) { $objattr['padding_left'] = $this->ConvertSize($properties['PADDING-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['PADDING-RIGHT'])) { $objattr['padding_right'] = $this->ConvertSize($properties['PADDING-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - - if (isset($properties['BORDER-TOP'])) { $objattr['border_top'] = $this->border_details($properties['BORDER-TOP']); } - if (isset($properties['BORDER-BOTTOM'])) { $objattr['border_bottom'] = $this->border_details($properties['BORDER-BOTTOM']); } - if (isset($properties['BORDER-LEFT'])) { $objattr['border_left'] = $this->border_details($properties['BORDER-LEFT']); } - if (isset($properties['BORDER-RIGHT'])) { $objattr['border_right'] = $this->border_details($properties['BORDER-RIGHT']); } - - if (isset($properties['VERTICAL-ALIGN'])) { $objattr['vertical-align'] = $align[strtolower($properties['VERTICAL-ALIGN'])]; } - if (isset($properties['COLOR']) && $properties['COLOR'] != '') { $objattr['color'] = $this->ConvertColor($properties['COLOR']); } - else { $objattr['color'] = false; } - if (isset($properties['BACKGROUND-COLOR']) && $properties['BACKGROUND-COLOR'] != '') { $objattr['bgcolor'] = $this->ConvertColor($properties['BACKGROUND-COLOR']); } - else { $objattr['bgcolor'] = false; } - - if (!class_exists('PDFBarcode')) { - include(_MPDF_PATH.'classes/barcode.php'); - $this->barcode = new PDFBarcode(); - } - - if ($objattr['btype'] == 'EAN13' || $objattr['btype'] == 'ISBN' || $objattr['btype'] == 'ISSN' || $objattr['btype'] == 'UPCA' || $objattr['btype'] == 'UPCE' || $objattr['btype'] == 'EAN8') { - $code = preg_replace('/\-/','',$objattr['code']); - if ($objattr['btype'] == 'ISSN' || $objattr['btype'] == 'ISBN') { - $arrcode = $this->barcode->getBarcodeArray($code, 'EAN13'); - } - else { $arrcode = $this->barcode->getBarcodeArray($code, $objattr['btype'] ); } - if ($arrcode === false) { $this->Error('Error in barcode string.'); } - - if ($objattr['bsupp'] == 2 || $objattr['bsupp'] == 5) { // EAN-2 or -5 Supplement - $supparrcode = $this->barcode->getBarcodeArray($objattr['bsupp_code'], 'EAN'.$objattr['bsupp'] ); - $w = ($arrcode["maxw"] + $arrcode['lightmL'] + $arrcode['lightmR'] + $supparrcode["maxw"] + $supparrcode['sepM']) * $arrcode['nom-X'] * $objattr['bsize']; - } - else { - $w = ($arrcode["maxw"] + $arrcode['lightmL'] + $arrcode['lightmR']) * $arrcode['nom-X'] * $objattr['bsize']; - } - $h = $arrcode['nom-H'] * $objattr['bsize'] * $objattr['bheight']; - // Add height for ISBN string + margin from top of bars - if (($objattr['showtext'] && $objattr['btype'] == 'EAN13') || $objattr['btype'] == 'ISBN' || $objattr['btype'] == 'ISSN') { - $tisbnm = 1.5 * $objattr['bsize']; // Top margin between TOP TEXT (isbn - if shown) & bars - $isbn_fontsize = 2.1 * $objattr['bsize']; - $h += $isbn_fontsize + $tisbnm ; - } - } - else if ($objattr['btype'] == 'IMB' || $objattr['btype'] == 'RM4SCC' || $objattr['btype'] == 'KIX' || $objattr['btype'] == 'POSTNET' || $objattr['btype'] == 'PLANET') { - $arrcode = $this->barcode->getBarcodeArray($objattr['code'], $objattr['btype'] ); - if ($arrcode === false) { $this->Error('Error in barcode string.'); } - $w = ($arrcode["maxw"] * $arrcode['nom-X'] * $objattr['bsize']) + $arrcode['quietL'] + $arrcode['quietR']; - $h = ($arrcode['nom-H'] * $objattr['bsize']) + (2*$arrcode['quietTB']); - } - else if (in_array($objattr['btype'], array('C128A','C128B','C128C','EAN128A','EAN128B','EAN128C','C39','C39+','C39E','C39E+','S25','S25+','I25','I25+','I25B','I25B+','C93','MSI','MSI+','CODABAR','CODE11'))) { - $arrcode = $this->barcode->getBarcodeArray($objattr['code'], $objattr['btype'], $objattr['pr_ratio'] ); - if ($arrcode === false) { $this->Error('Error in barcode string.'); } - $w = ($arrcode["maxw"] + $arrcode['lightmL'] + $arrcode['lightmR']) * $arrcode['nom-X'] * $objattr['bsize']; - $h = ((2*$arrcode['lightTB'] * $arrcode['nom-X']) + $arrcode['nom-H']) * $objattr['bsize'] * $objattr['bheight']; - } - else { break; } - - $extraheight = $objattr['padding_top'] + $objattr['padding_bottom'] + $objattr['margin_top'] + $objattr['margin_bottom'] + $objattr['border_top']['w'] + $objattr['border_bottom']['w']; - $extrawidth = $objattr['padding_left'] + $objattr['padding_right'] + $objattr['margin_left'] + $objattr['margin_right'] + $objattr['border_left']['w'] + $objattr['border_right']['w']; - - $objattr['type'] = 'barcode'; - $objattr['height'] = $h + $extraheight; - $objattr['width'] = $w + $extrawidth; - $objattr['barcode_height'] = $h; - $objattr['barcode_width'] = $w; -/*-- CSS-IMAGE-FLOAT --*/ - if (!$this->ColActive && !$this->tableLevel && !$this->listlvl && !$this->kwt && !$this->keep_block_together) { - if (isset($properties['FLOAT']) && (strtoupper($properties['FLOAT']) == 'RIGHT' || strtoupper($properties['FLOAT']) == 'LEFT')) { - $objattr['float'] = substr(strtoupper($properties['FLOAT']),0,1); - } - } -/*-- END CSS-IMAGE-FLOAT --*/ - - $e = "\xbb\xa4\xactype=barcode,objattr=".serialize($objattr)."\xbb\xa4\xac"; - - // Clear properties - tidy up - $properties = array(); - -/*-- TABLES --*/ - // Output it to buffers - if ($this->tableLevel) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['s'] += $objattr['width'] ; - } - else { -/*-- END TABLES --*/ - $this->textbuffer[] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - - } // *TABLES* - } - break; -/*-- END BARCODES --*/ - - - // *********** FORM ELEMENTS ******************** - -/*-- FORMS --*/ - case 'SELECT': - $this->lastoptionaltag = ''; // Save current HTML specified optional endtag - $this->InlineProperties[$tag] = $this->saveInlineProperties(); - $properties = $this->MergeCSS('',$tag,$attr); - if (isset($properties['FONT-FAMILY'])) { - if (!$this->isCJK) { - $this->SetFont($properties['FONT-FAMILY'],$this->FontStyle,0,false); - } - } - if (isset($properties['FONT-SIZE'])) { - $mmsize = $this->ConvertSize($properties['FONT-SIZE'],$this->default_font_size/$this->k); - $this->SetFontSize($mmsize*$this->k,false); - } - if (isset($properties['COLOR'])) { $this->selectoption['COLOR'] = $this->ConvertColor($properties['COLOR']); } - $this->specialcontent = "type=select"; - if(isset($attr['DISABLED'])) { $this->selectoption['DISABLED'] = $attr['DISABLED']; } - if(isset($attr['TITLE'])) { $this->selectoption['TITLE'] = $attr['TITLE']; } - if(isset($attr['MULTIPLE'])) { $this->selectoption['MULTIPLE'] = $attr['MULTIPLE']; } - if(isset($attr['SIZE']) && $attr['SIZE']>1) { $this->selectoption['SIZE'] = $attr['SIZE']; } - - $properties = array(); - break; - - case 'OPTION': - $this->lastoptionaltag = 'OPTION'; // Save current HTML specified optional endtag - $this->selectoption['ACTIVE'] = true; - $this->selectoption['currentSEL'] = false; - if (empty($this->selectoption)) { - $this->selectoption['MAXWIDTH'] = ''; - $this->selectoption['SELECTED'] = ''; - } - if (isset($attr['SELECTED'])) { - $this->selectoption['SELECTED'] = ''; - $this->selectoption['currentSEL'] = true; - } - // mPDD 1.4 Active Forms - $this->selectoption['currentVAL'] = $attr['VALUE']; - break; - - case 'TEXTAREA': - $objattr = array(); - // mPDF 3.0 - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - if(isset($attr['DISABLED'])) { $objattr['disabled'] = true; } - if(isset($attr['READONLY'])) { $objattr['readonly'] = true; } - if(isset($attr['TITLE'])) { $objattr['title'] = $attr['TITLE']; } - $this->InlineProperties[$tag] = $this->saveInlineProperties(); - $properties = $this->MergeCSS('',$tag,$attr); - if (isset($properties['FONT-FAMILY'])) { - if (!$this->isCJK) { - $this->SetFont($properties['FONT-FAMILY'],'',0,false); - } - } - if (isset($properties['FONT-SIZE'])) { - $mmsize = $this->ConvertSize($properties['FONT-SIZE'],$this->default_font_size/$this->k); - $this->SetFontSize($mmsize*$this->k,false); - } - if (isset($properties['COLOR'])) { $objattr['color'] = $this->ConvertColor($properties['COLOR']); } - $objattr['fontfamily'] = $this->FontFamily; - $objattr['fontsize'] = $this->FontSizePt; - - $this->SetLineHeight('',$this->textarea_lineheight); - $formLineHeight = $this->lineheight; - - $w = 0; - $h = 0; - if(isset($properties['WIDTH'])) $w = $this->ConvertSize($properties['WIDTH'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if(isset($properties['HEIGHT'])) $h = $this->ConvertSize($properties['HEIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if ($properties['VERTICAL-ALIGN']) { $objattr['vertical-align'] = $align[strtolower($properties['VERTICAL-ALIGN'])]; } - - $colsize = 20; //HTML default value - $rowsize = 2; //HTML default value - if (isset($attr['COLS'])) $colsize = intval($attr['COLS']); - if (isset($attr['ROWS'])) $rowsize = intval($attr['ROWS']); - - $charsize = $this->GetStringWidth('w'); - if ($w) { $colsize = round(($w-($this->form_element_spacing['textarea']['outer']['h']*2)-($this->form_element_spacing['textarea']['inner']['h']*2))/$charsize); } - if ($h) { $rowsize = round(($h-($this->form_element_spacing['textarea']['outer']['v']*2)-($this->form_element_spacing['textarea']['inner']['v']*2))/$formLineHeight); } - - $objattr['type'] = 'textarea'; - $objattr['width'] = ($colsize * $charsize) + ($this->form_element_spacing['textarea']['outer']['h']*2)+($this->form_element_spacing['textarea']['inner']['h']*2); - $objattr['height'] = ($rowsize * $formLineHeight) + ($this->form_element_spacing['textarea']['outer']['v']*2)+($this->form_element_spacing['textarea']['inner']['v']*2); - $objattr['rows'] = $rowsize; - $objattr['cols'] = $colsize; - - $this->specialcontent = serialize($objattr); - - if ($this->tableLevel) { // *TABLES* - $this->cell[$this->row][$this->col]['s'] += $objattr['width'] ; // *TABLES* - } // *TABLES* - - // Clear properties - tidy up - $properties = array(); - break; - - - - // *********** FORM - INPUT ******************** - - case 'INPUT': - if (!isset($attr['TYPE'])) $attr['TYPE'] == 'TEXT'; - $objattr = array(); - // mPDF 3.0 - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - $objattr['type'] = 'input'; - if(isset($attr['DISABLED'])) { $objattr['disabled'] = true; } - if(isset($attr['READONLY'])) { $objattr['readonly'] = true; } - if(isset($attr['TITLE'])) { $objattr['title'] = $attr['TITLE']; } - else if(isset($attr['ALT'])) { $objattr['title'] = $attr['ALT']; } - - $this->InlineProperties[$tag] = $this->saveInlineProperties(); - $properties = $this->MergeCSS('',$tag,$attr); - $objattr['vertical-align'] = ''; - - if (isset($properties['FONT-FAMILY'])) { - if (!$this->isCJK) { - $this->SetFont($properties['FONT-FAMILY'],$this->FontStyle,0,false); - } - } - if (isset($properties['FONT-SIZE'])) { - $mmsize = $this->ConvertSize($properties['FONT-SIZE'],($this->default_font_size/$this->k)); - $this->SetFontSize($mmsize*$this->k,false); - } - if (isset($properties['COLOR'])) { $objattr['color'] = $this->ConvertColor($properties['COLOR']); } - $objattr['fontfamily'] = $this->FontFamily; - $objattr['fontsize'] = $this->FontSizePt; - - - $type = ''; - $texto=''; - $height = $this->FontSize; - $width = 0; - $spacesize = $this->GetStringWidth(' '); - - $w = 0; - if(isset($properties['WIDTH'])) $w = $this->ConvertSize($properties['WIDTH'],$this->blk[$this->blklvl]['inner_width']); - - if ($properties['VERTICAL-ALIGN']) { $objattr['vertical-align'] = $align[strtolower($properties['VERTICAL-ALIGN'])]; } - - switch(strtoupper($attr['TYPE'])){ - case 'HIDDEN': - $this->ignorefollowingspaces = true; //Eliminate exceeding left-side spaces - if ($this->InlineProperties[$tag]) { $this->restoreInlineProperties($this->InlineProperties[$tag]); } - unset($this->InlineProperties[$tag]); - break 2; - case 'CHECKBOX': //Draw Checkbox - $type = 'CHECKBOX'; - if (isset($attr['VALUE'])) $objattr['value'] = $attr['VALUE']; - if (isset($attr['CHECKED'])) { $objattr['checked'] = true; } - else { $objattr['checked'] = false; } - $width = $this->FontSize; - $height = $this->FontSize; - break; - - case 'RADIO': //Draw Radio button - $type = 'RADIO'; - if (isset($attr['CHECKED'])) $objattr['checked'] = true; - $width = $this->FontSize; - $height = $this->FontSize; - break; - -/*-- IMAGES-CORE --*/ - case 'IMAGE': // Draw an Image button - if(isset($attr['SRC'])) { - $type = 'IMAGE'; - $srcpath = $attr['SRC']; - $orig_srcpath = $attr['ORIG_SRC']; // mPDF 4.2.029 - // VSPACE and HSPACE converted to margins in MergeCSS - if (isset($properties['MARGIN-TOP'])) { $objattr['margin_top']=$this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-BOTTOM'])) { $objattr['margin_bottom'] = $this->ConvertSize($properties['MARGIN-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-LEFT'])) { $objattr['margin_left'] = $this->ConvertSize($properties['MARGIN-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-RIGHT'])) { $objattr['margin_right'] = $this->ConvertSize($properties['MARGIN-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - - - if (isset($properties['BORDER-TOP'])) { $objattr['border_top'] = $this->border_details($properties['BORDER-TOP']); } - if (isset($properties['BORDER-BOTTOM'])) { $objattr['border_bottom'] = $this->border_details($properties['BORDER-BOTTOM']); } - if (isset($properties['BORDER-LEFT'])) { $objattr['border_left'] = $this->border_details($properties['BORDER-LEFT']); } - if (isset($properties['BORDER-RIGHT'])) { $objattr['border_right'] = $this->border_details($properties['BORDER-RIGHT']); } - - if (isset($properties['VERTICAL-ALIGN'])) { $objattr['vertical-align'] = $align[strtolower($properties['VERTICAL-ALIGN'])]; } - - $w = 0; - $h = 0; - if(isset($properties['WIDTH'])) $w = $this->ConvertSize($properties['WIDTH'],$this->blk[$this->blklvl]['inner_width']); - if(isset($properties['HEIGHT'])) $h = $this->ConvertSize($properties['HEIGHT'],$this->blk[$this->blklvl]['inner_width']); - - $extraheight = $objattr['margin_top'] + $objattr['margin_bottom'] + $objattr['border_top']['w'] + $objattr['border_bottom']['w']; - $extrawidth = $objattr['margin_left'] + $objattr['margin_right'] + $objattr['border_left']['w'] + $objattr['border_right']['w']; - - // Image file - // mPDF 4.2 - $info=$this->_getImage($srcpath, true, false, $orig_srcpath); // mPDF 4.2.029 - if(!$info) { - $info = $this->_getImage($this->noImageFile); - if ($info) { - $srcpath = $this->noImageFile; - $w = ($info['w'] * (25.4/$this->dpi)); // mPDF 4.4.003 - $h = ($info['h'] * (25.4/$this->dpi)); // mPDF 4.4.003 - } - } - if(!$info) break; - - $objattr['file'] = $srcpath; - //Default width and height calculation if needed - if($w==0 and $h==0) { - //Put image at default dpi - $w=($info['w']/$this->k) * (72/$this->img_dpi); - $h=($info['h']/$this->k) * (72/$this->img_dpi); - } - // IF WIDTH OR HEIGHT SPECIFIED - if($w==0) $w=$h*$info['w']/$info['h']; - if($h==0) $h=$w*$info['h']/$info['w']; - // Resize to maximum dimensions of page - $maxWidth = $this->blk[$this->blklvl]['inner_width']; - $maxHeight = $this->h - ($this->tMargin + $this->bMargin + 10) ; // mPDF 4.1 - if ($this->fullImageHeight) { $maxHeight = $this->fullImageHeight; } // mPDF 4.1 - if ($w + $extrawidth > $maxWidth ) { - $w = $maxWidth - $extrawidth; - $h=$w*$info['h']/$info['w']; - } - if ($h + $extraheight > $maxHeight ) { - $h = $maxHeight - $extraheight; - $w=$h*$info['w']/$info['h']; - } - $height = $h + $extraheight; - $width = $w + $extrawidth; - $objattr['image_height'] = $h; - $objattr['image_width'] = $w; - $objattr['ID'] = $info['i']; - $texto = 'X'; - break; - } -/*-- END IMAGES-CORE --*/ - - case 'BUTTON': // Draw a button - case 'SUBMIT': - case 'RESET': - $type = strtoupper($attr['TYPE']); - if ($type=='IMAGE') { $type = 'BUTTON'; } // src path not found - if (isset($attr['VALUE'])) { - $objattr['value'] = $attr['VALUE']; - } - else { - $objattr['value'] = ucfirst(strtolower($type)); - } - $texto = " " . $objattr['value'] . " "; - $width = $this->GetStringWidth($texto) + ($this->form_element_spacing['button']['outer']['h']*2)+($this->form_element_spacing['button']['inner']['h']*2); - $height = $this->FontSize + ($this->form_element_spacing['button']['outer']['v']*2)+($this->form_element_spacing['button']['inner']['v']*2); - break; - - - case 'PASSWORD': - case 'TEXT': - default: - if ($type == '') { $type = 'TEXT'; } - if(strtoupper($attr['TYPE'])=='PASSWORD') { $type = 'PASSWORD'; } - if (isset($attr['VALUE'])) { - if ($type == 'PASSWORD') { - $num_stars = strlen($attr['VALUE']); - $texto = str_repeat('*',$num_stars); - } - else { $texto = $attr['VALUE']; } - } - - $xw = ($this->form_element_spacing['input']['outer']['h']*2)+($this->form_element_spacing['input']['inner']['h']*2); - $xh = ($this->form_element_spacing['input']['outer']['v']*2)+($this->form_element_spacing['input']['inner']['v']*2); - if ($w) { $width = $w + $xw; } - else { $width = (20 * $spacesize) + $xw; } // Default width in chars - if (isset($attr['SIZE']) and ctype_digit($attr['SIZE']) ) $width = ($attr['SIZE'] * $spacesize) + $xw; - $height = $this->FontSize + $xh; - break; - } - - $objattr['subtype'] = $type; - $objattr['text'] = $texto; - $objattr['width'] = $width; - $objattr['height'] = $height; - $e = "\xbb\xa4\xactype=input,objattr=".serialize($objattr)."\xbb\xa4\xac"; - - // Clear properties - tidy up - $properties = array(); - -/*-- TABLES --*/ - // Output it to buffers - if ($this->tableLevel) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - - $this->cell[$this->row][$this->col]['s'] += $objattr['width'] ; - - } - else { -/*-- END TABLES --*/ - $this->textbuffer[] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } // *TABLES* - - if ($this->InlineProperties[$tag]) { $this->restoreInlineProperties($this->InlineProperties[$tag]); } - unset($this->InlineProperties[$tag]); - - break; // END of INPUT -/*-- END FORMS --*/ - - - // *********** GRAPH ******************** - case 'JPGRAPH': - if (!$this->useGraphs) { break; } - if ($attr['TABLE']) { $gid = strtoupper($attr['TABLE']); } - else { $gid = '0'; } - if (!is_array($this->graphs[$gid]) || count($this->graphs[$gid])==0 ) { break; } - include_once(_MPDF_PATH.'graph.php'); - $this->graphs[$gid]['attr'] = $attr; - - // mPDF 4.0 - if (isset($this->graphs[$gid]['attr']['WIDTH']) && $this->graphs[$gid]['attr']['WIDTH']) { - $this->graphs[$gid]['attr']['cWIDTH']=$this->ConvertSize($this->graphs[$gid]['attr']['WIDTH'],$pgwidth); - } // mm - if (isset($this->graphs[$gid]['attr']['HEIGHT']) && $this->graphs[$gid]['attr']['HEIGHT']) { - $this->graphs[$gid]['attr']['cHEIGHT']=$this->ConvertSize($this->graphs[$gid]['attr']['HEIGHT'],$pgwidth); - } - - $graph_img = print_graph($this->graphs[$gid],$this->blk[$this->blklvl]['inner_width']); - if ($graph_img) { - // mPDF 4.3.016 - if(isset($attr['ROTATE'])) { - if ($attr['ROTATE']==90 || $attr['ROTATE']==-90) { - $tmpw = $graph_img['w']; - $graph_img['w']= $graph_img['h']; - $graph_img['h']= $tmpw; - } - } - $attr['SRC'] = $graph_img['file']; - $attr['WIDTH'] = $graph_img['w']; - $attr['HEIGHT'] = $graph_img['h']; - } - else { break; } - - // *********** IMAGE ******************** -/*-- IMAGES-CORE --*/ - case 'IMG': - if ($this->progressBar) { $this->UpdateProgressBar(1,'','IMG'); } // *PROGRESS-BAR* - $objattr = array(); - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - // mPDF 4.0 - $objattr['padding_top'] = 0; - $objattr['padding_bottom'] = 0; - $objattr['padding_left'] = 0; - $objattr['padding_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - if(isset($attr['SRC'])) { - $srcpath = $attr['SRC']; - $orig_srcpath = $attr['ORIG_SRC']; // mPDF 4.2.029 - $properties = $this->MergeCSS('',$tag,$attr); - if(isset($properties ['DISPLAY']) && strtolower($properties ['DISPLAY'])=='none') { - return; - } - // VSPACE and HSPACE converted to margins in MergeCSS - if (isset($properties['MARGIN-TOP'])) { $objattr['margin_top']=$this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-BOTTOM'])) { $objattr['margin_bottom'] = $this->ConvertSize($properties['MARGIN-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-LEFT'])) { $objattr['margin_left'] = $this->ConvertSize($properties['MARGIN-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['MARGIN-RIGHT'])) { $objattr['margin_right'] = $this->ConvertSize($properties['MARGIN-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - - // mPDF 4.0 - if (isset($properties['PADDING-TOP'])) { $objattr['padding_top']=$this->ConvertSize($properties['PADDING-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['PADDING-BOTTOM'])) { $objattr['padding_bottom'] = $this->ConvertSize($properties['PADDING-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['PADDING-LEFT'])) { $objattr['padding_left'] = $this->ConvertSize($properties['PADDING-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['PADDING-RIGHT'])) { $objattr['padding_right'] = $this->ConvertSize($properties['PADDING-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - - if (isset($properties['BORDER-TOP'])) { $objattr['border_top'] = $this->border_details($properties['BORDER-TOP']); } - if (isset($properties['BORDER-BOTTOM'])) { $objattr['border_bottom'] = $this->border_details($properties['BORDER-BOTTOM']); } - if (isset($properties['BORDER-LEFT'])) { $objattr['border_left'] = $this->border_details($properties['BORDER-LEFT']); } - if (isset($properties['BORDER-RIGHT'])) { $objattr['border_right'] = $this->border_details($properties['BORDER-RIGHT']); } - - if (isset($properties['VERTICAL-ALIGN'])) { $objattr['vertical-align'] = $align[strtolower($properties['VERTICAL-ALIGN'])]; } - $w = 0; - $h = 0; - // mPDF 4.0 - if(isset($properties['WIDTH'])) $w = $this->ConvertSize($properties['WIDTH'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if(isset($properties['HEIGHT'])) $h = $this->ConvertSize($properties['HEIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - - if(isset($attr['WIDTH'])) $w = $this->ConvertSize($attr['WIDTH'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if(isset($attr['HEIGHT'])) $h = $this->ConvertSize($attr['HEIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if (isset($properties['OPACITY']) && $properties['OPACITY'] > 0 && $properties['OPACITY'] <= 1) { $objattr['opacity'] = $properties['OPACITY']; } - if ($this->HREF) { $objattr['link'] = $this->HREF; } // ? this isn't used - - // mPDF 4.0 - $extraheight = $objattr['padding_top'] + $objattr['padding_bottom'] + $objattr['margin_top'] + $objattr['margin_bottom'] + $objattr['border_top']['w'] + $objattr['border_bottom']['w']; - $extrawidth = $objattr['padding_left'] + $objattr['padding_right'] + $objattr['margin_left'] + $objattr['margin_right'] + $objattr['border_left']['w'] + $objattr['border_right']['w']; - // Image file - $info=$this->_getImage($srcpath, true, true, $orig_srcpath); // mPDF 4.2.029 - if(!$info) { - $info = $this->_getImage($this->noImageFile); - if ($info) { - $srcpath = $this->noImageFile; - $w = ($info['w'] * (25.4/$this->dpi)); // mPDF 4.4.003 - $h = ($info['h'] * (25.4/$this->dpi)); // mPDF 4.4.003 - } - } - if(!$info) break; - - // mPDF 4.3.016 - if(isset($attr['ROTATE'])) { - if ($attr['ROTATE']==90 || $attr['ROTATE']==-90) { - $tmpw = $info['w']; - $info['w'] = $info['h']; - $info['h'] = $tmpw; - } - $objattr['ROTATE'] = $attr['ROTATE']; - } - - $objattr['file'] = $srcpath; - //Default width and height calculation if needed - if($w==0 and $h==0) { -/*-- IMAGES-WMF --*/ - if ($info['type']=='wmf') { - // WMF units are twips (1/20pt) - // divide by 20 to get points - // divide by k to get user units - $w = abs($info['w'])/(20*$this->k); - $h = abs($info['h']) / (20*$this->k); - } - else -/*-- END IMAGES-WMF --*/ - // mPDF 4.3.013 - if ($info['type']=='svg') { - // SVG units are pixels - $w = abs($info['w'])/$this->k; - $h = abs($info['h'])/$this->k; - } - else { - //Put image at default image dpi - $w=($info['w']/$this->k) * (72/$this->img_dpi); - $h=($info['h']/$this->k) * (72/$this->img_dpi); - } - } - // IF WIDTH OR HEIGHT SPECIFIED - if($w==0) $w=abs($h*$info['w']/$info['h']); - if($h==0) $h=abs($w*$info['h']/$info['w']); - - // Resize to maximum dimensions of page - $maxWidth = $this->blk[$this->blklvl]['inner_width']; - $maxHeight = $this->h - ($this->tMargin + $this->bMargin + 10) ; // mPDF 4.1 - if ($this->fullImageHeight) { $maxHeight = $this->fullImageHeight; } // mPDF 4.1 - if ($w + $extrawidth > $maxWidth ) { - $w = $maxWidth - $extrawidth; - $h=abs($w*$info['h']/$info['w']); - } - - if ($h + $extraheight > $maxHeight ) { - $h = $maxHeight - $extraheight; - $w=abs($h*$info['w']/$info['h']); - } - $objattr['type'] = 'image'; - $objattr['itype'] = $info['type']; - $objattr['orig_h'] = $info['h']; - $objattr['orig_w'] = $info['w']; -/*-- IMAGES-WMF --*/ - if ($info['type']=='wmf') { - $objattr['wmf_x'] = $info['x']; - $objattr['wmf_y'] = $info['y']; - } - else -/*-- END IMAGES-WMF --*/ - // mPDF 4.3.013 - if ($info['type']=='svg') { - $objattr['wmf_x'] = $info['x']; - $objattr['wmf_y'] = $info['y']; - } - $objattr['height'] = $h + $extraheight; - $objattr['width'] = $w + $extrawidth; - $objattr['image_height'] = $h; - $objattr['image_width'] = $w; -/*-- CSS-IMAGE-FLOAT --*/ - if (!$this->ColActive && !$this->tableLevel && !$this->listlvl && !$this->kwt && !$this->keep_block_together) { - if (isset($properties['FLOAT']) && (strtoupper($properties['FLOAT']) == 'RIGHT' || strtoupper($properties['FLOAT']) == 'LEFT')) { - $objattr['float'] = substr(strtoupper($properties['FLOAT']),0,1); - } - } -/*-- END CSS-IMAGE-FLOAT --*/ - - $e = "\xbb\xa4\xactype=image,objattr=".serialize($objattr)."\xbb\xa4\xac"; - - // Clear properties - tidy up - $properties = array(); - -/*-- TABLES --*/ - // Output it to buffers - if ($this->tableLevel) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['s'] += $objattr['width'] ; - } - else { -/*-- END TABLES --*/ - $this->textbuffer[] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - - } // *TABLES* -/*-- ANNOTATIONS --*/ - if ($this->title2annots && isset($attr['TITLE'])) { - $objattr = array(); - // mPDF 3.0 - $objattr['margin_top'] = 0; - $objattr['margin_bottom'] = 0; - $objattr['margin_left'] = 0; - $objattr['margin_right'] = 0; - $objattr['width'] = 0; - $objattr['height'] = 0; - $objattr['border_top']['w'] = 0; - $objattr['border_bottom']['w'] = 0; - $objattr['border_left']['w'] = 0; - $objattr['border_right']['w'] = 0; - $objattr['CONTENT'] = $attr['TITLE']; - $objattr['type'] = 'annot'; - $objattr['POS-X'] = 0; - $objattr['POS-Y'] = 0; - $objattr['ICON'] = 'Comment'; - $objattr['AUTHOR'] = ''; - $objattr['SUBJECT'] = ''; - $objattr['OPACITY'] = $this->annotOpacity; - $objattr['COLOR'] = array(255,255,0); - $e = "\xbb\xa4\xactype=annot,objattr=".serialize($objattr)."\xbb\xa4\xac"; - if($this->tableLevel) { // *TABLES* - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e); // *TABLES* - } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($e); - } // *TABLES* - } -/*-- END ANNOTATIONS --*/ - } - break; -/*-- END IMAGES-CORE --*/ - - -/*-- TABLES --*/ - - case 'TABLE': // TABLE-BEGIN - $this->tdbegin = false; - $this->lastoptionaltag = ''; - // Disable vertical justification in columns - if ($this->ColActive) { $this->colvAlign = ''; } // *COLUMNS* - if ($this->lastblocklevelchange == 1) { $blockstate = 1; } // Top margins/padding only - else if ($this->lastblocklevelchange < 1) { $blockstate = 0; } // NO margins/padding - // called from block after new div e.g.
    ... ... Outputs block top margin/border and padding - if (count($this->textbuffer) == 0 && $this->lastblocklevelchange == 1 && !$this->tableLevel && !$this->kwt) { - $this->newFlowingBlock( $this->blk[$this->blklvl]['width'],$this->lineheight,'',false,false,1,true); // true = newblock - $this->finishFlowingBlock(true); // true = END of flowing block - } - else if (!$this->tableLevel && count($this->textbuffer)) { $this->printbuffer($this->textbuffer,$blockstate); } - //else if (!$this->tableLevel) { $this->printbuffer($this->textbuffer,$blockstate); } - - $this->textbuffer=array(); - $this->lastblocklevelchange = -1; - if ($this->tableLevel) { // i.e. now a nested table coming... - // Save current level table - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['baseProperties']= $this->base_table_properties; - // $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['tablecascadeCSS'] = $this->tablecascadeCSS; - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cells'] = $this->cell; - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['currrow'] = $this->row; - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['currcol'] = $this->col; - } - $this->tableLevel++; - $this->tbCSSlvl++; - - // mPDF 3.0 - if (isset($this->tbctr[$this->tableLevel])) { $this->tbctr[$this->tableLevel]++; } - else { $this->tbctr[$this->tableLevel] = 1; } - - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['level'] = $this->tableLevel; - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['levelid'] = $this->tbctr[$this->tableLevel]; - - if ($this->tableLevel > $this->innermostTableLevel) { $this->innermostTableLevel = $this->tableLevel; } - if ($this->tableLevel > 1) { - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nestedpos'] = array($this->row,$this->col,$this->tbctr[($this->tableLevel-1)]); - } - //++++++++++++++++++++++++++++ - - $this->cell = array(); - $this->col=-1; //int - $this->row=-1; //int - $table = &$this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]; - - // mPDF 3.0 - $table['bgcolor'] = false; - $table['va'] = false; - $table['txta'] = false; - $table['topntail'] = false; - $table['thead-underline'] = false; - $table['border'] = false; - $table['border_details']['R']['w'] = 0; - $table['border_details']['L']['w'] = 0; - $table['border_details']['T']['w'] = 0; - $table['border_details']['B']['w'] = 0; - $table['border_details']['R']['style'] = ''; - $table['border_details']['L']['style'] = ''; - $table['border_details']['T']['style'] = ''; - $table['border_details']['B']['style'] = ''; - $table['max_cell_border_width']['R'] = 0; - $table['max_cell_border_width']['L'] = 0; - $table['max_cell_border_width']['T'] = 0; - $table['max_cell_border_width']['B'] = 0; - $table['padding']['L'] = false; - $table['padding']['R'] = false; - $table['padding']['T'] = false; - $table['padding']['B'] = false; - $table['margin']['L'] = false; - $table['margin']['R'] = false; - $table['margin']['T'] = false; - $table['margin']['B'] = false; - $table['a'] = false; - $table['border_spacing_H'] = false; - $table['border_spacing_V'] = false; - - $this->Reset(); - $this->InlineProperties = array(); - $this->spanlvl = 0; - $table['nc'] = $table['nr'] = 0; - $this->tablethead = 0; - $this->tabletfoot = 0; - $this->tabletheadjustfinished = false; - - // mPDF 4.2 - if ($this->blockjustfinished && !count($this->textbuffer) && $this->y != $this->tMargin && $this->collapseBlockMargins && $this->tableLevel==1) { $lastbottommargin = $this->lastblockbottommargin; } - else { $lastbottommargin = 0; } - $this->lastblockbottommargin = 0; - $this->blockjustfinished=false; - - if ($this->tableLevel==1) { $this->table_lineheight = $this->normalLineheight; } // mPDF 4.2 - // mPDF 3.0 - if ($this->tableLevel==1) { $this->tableheadernrows = 0; $this->tablefooternrows = 0; $this->usetableheader = false; } // mPDF 4.0 - - if ($this->tableLevel ==1) $this->base_table_properties = array(); - - // ADDED CSS FUNCIONS FOR TABLE - if ($this->tbCSSlvl==1) { - $properties = $this->MergeCSS('TOPTABLE',$tag,$attr); - } - else { - $properties = $this->MergeCSS('TABLE',$tag,$attr); - } - $w = ''; - if (isset($properties['WIDTH'])) { $w = $properties['WIDTH']; } - - if (isset($properties['BACKGROUND-COLOR'])) { $table['bgcolor'][-1] = $properties['BACKGROUND-COLOR']; } - else if (isset($properties['BACKGROUND'])) { $table['bgcolor'][-1] = $properties['BACKGROUND']; } - if (isset($properties['VERTICAL-ALIGN'])) { $table['va'] = $align[strtolower($properties['VERTICAL-ALIGN'])]; } - if (isset($properties['TEXT-ALIGN'])) { $table['txta'] = $align[strtolower($properties['TEXT-ALIGN'])]; } - if (isset($properties['AUTOSIZE']) && $properties['AUTOSIZE'] && $this->tableLevel ==1) { - $this->shrink_this_table_to_fit = $properties['AUTOSIZE']; - if ($this->shrink_this_table_to_fit < 1) { $this->shrink_this_table_to_fit = 0; } - } - if (isset($properties['ROTATE']) && $properties['ROTATE'] && $this->tableLevel ==1) { - $this->table_rotate = $properties['ROTATE']; - } - if (isset($properties['TOPNTAIL'])) { $table['topntail'] = $properties['TOPNTAIL']; } - if (isset($properties['THEAD-UNDERLINE'])) { $table['thead-underline'] = $properties['THEAD-UNDERLINE']; } - - if (isset($properties['BORDER'])) { - $bord = $this->border_details($properties['BORDER']); - if ($bord['s']) { - $table['border'] = _BORDER_ALL; - $table['border_details']['R'] = $bord; - $table['border_details']['L'] = $bord; - $table['border_details']['T'] = $bord; - $table['border_details']['B'] = $bord; - } - } - if (isset($properties['BORDER-RIGHT'])) { - if ($this->directionality == 'rtl') { // *RTL* - $table['border_details']['R'] = $this->border_details($properties['BORDER-LEFT']); // *RTL* - } // *RTL* - else { // *RTL* - $table['border_details']['R'] = $this->border_details($properties['BORDER-RIGHT']); - } // *RTL* - $this->setBorder($table['border'], _BORDER_RIGHT, $table['border_details']['R']['s']); - } - if (isset($properties['BORDER-LEFT'])) { - if ($this->directionality == 'rtl') { // *RTL* - $table['border_details']['L'] = $this->border_details($properties['BORDER-RIGHT']); // *RTL* - } // *RTL* - else { // *RTL* - $table['border_details']['L'] = $this->border_details($properties['BORDER-LEFT']); - } // *RTL* - $this->setBorder($table['border'], _BORDER_LEFT, $table['border_details']['L']['s']); - } - if (isset($properties['BORDER-BOTTOM'])) { - $table['border_details']['B'] = $this->border_details($properties['BORDER-BOTTOM']); - $this->setBorder($table['border'], _BORDER_BOTTOM, $table['border_details']['B']['s']); - } - if (isset($properties['BORDER-TOP'])) { - $table['border_details']['T'] = $this->border_details($properties['BORDER-TOP']); - $this->setBorder($table['border'], _BORDER_TOP, $table['border_details']['T']['s']); - } - if ($table['border']){ // mPDF 4.3.007 - $this->table_border_css_set = 1; - } - else { - $this->table_border_css_set = 0; - } - - if (isset($properties['FONT-FAMILY'])) { - if (!$this->isCJK) { - $this->default_font = $properties['FONT-FAMILY']; - $this->SetFont($this->default_font,'',0,false); - $this->base_table_properties['FONT-FAMILY'] = $properties['FONT-FAMILY']; - } - } - if (isset($properties['FONT-SIZE'])) { - $mmsize = $this->ConvertSize($properties['FONT-SIZE'],$this->default_font_size/$this->k); - if ($mmsize) { - $this->default_font_size = $mmsize*($this->k); - $this->SetFontSize($this->default_font_size,false); - $this->base_table_properties['FONT-SIZE'] = $properties['FONT-SIZE']; - } - } - - if (isset($properties['FONT-WEIGHT'])) { - if (strtoupper($properties['FONT-WEIGHT']) == 'BOLD') { $this->base_table_properties['FONT-WEIGHT'] = 'BOLD'; } - } - if (isset($properties['FONT-STYLE'])) { - if (strtoupper($properties['FONT-STYLE']) == 'ITALIC') { $this->base_table_properties['FONT-STYLE'] = 'ITALIC'; } - } - if (isset($properties['COLOR'])) { - $this->base_table_properties['COLOR'] = $properties['COLOR']; - } - - - if (isset($properties['PADDING-LEFT'])) { - $table['padding']['L'] = $this->ConvertSize($properties['PADDING-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['PADDING-RIGHT'])) { - $table['padding']['R'] = $this->ConvertSize($properties['PADDING-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['PADDING-TOP'])) { - $table['padding']['T'] = $this->ConvertSize($properties['PADDING-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['PADDING-BOTTOM'])) { - $table['padding']['B'] = $this->ConvertSize($properties['PADDING-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - - if (isset($properties['MARGIN-TOP'])) { - // mPDF 4.2 Collaspe vertical block margins - if ($lastbottommargin) { - $tmp = $this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if ($tmp > $lastbottommargin) { $properties['MARGIN-TOP'] -= $lastbottommargin; } - else { $properties['MARGIN-TOP'] = 0; } - } - $table['margin']['T'] = $this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - - if (isset($properties['MARGIN-BOTTOM'])) { - $table['margin']['B'] = $this->ConvertSize($properties['MARGIN-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['MARGIN-LEFT'])) { // mPDF 4.2 Error corrected - $table['margin']['L'] = $this->ConvertSize($properties['MARGIN-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - - if (isset($properties['MARGIN-RIGHT'])) { // mPDF 4.2 Error corrected - $table['margin']['R'] = $this->ConvertSize($properties['MARGIN-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['MARGIN-LEFT']) && isset($properties['MARGIN-RIGHT']) && strtolower($properties['MARGIN-LEFT'])=='auto' && strtolower($properties['MARGIN-RIGHT'])=='auto') { - $table['a'] = 'C'; - } - else if (isset($properties['MARGIN-LEFT']) && strtolower($properties['MARGIN-LEFT'])=='auto') { - $table['a'] = 'R'; - } - else if (isset($properties['MARGIN-RIGHT']) && strtolower($properties['MARGIN-RIGHT'])=='auto') { - $table['a'] = 'L'; - } - - // mPDF 4.2 - if (isset($properties['LINE-HEIGHT']) && $this->tableLevel==1) { - $this->table_lineheight = $this->fixLineheight($properties['LINE-HEIGHT']); - if (!$this->table_lineheight) { $this->table_lineheight = $this->normalLineheight; } - } - - if (isset($properties['BORDER-COLLAPSE']) && strtoupper($properties['BORDER-COLLAPSE'])=='SEPARATE') { - $table['borders_separate'] = true; - } - else { - $table['borders_separate'] = false; - } - - if (isset($properties['BORDER-SPACING-H'])) { - $table['border_spacing_H'] = $this->ConvertSize($properties['BORDER-SPACING-H'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['BORDER-SPACING-V'])) { - $table['border_spacing_V'] = $this->ConvertSize($properties['BORDER-SPACING-V'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - - if (isset($properties['EMPTY-CELLS'])) { - $table['empty_cells'] = strtolower($properties['EMPTY-CELLS']); // 'hide' or 'show' - } - else { $table['empty_cells'] = ''; } - - if (isset($properties['PAGE-BREAK-INSIDE']) && strtoupper($properties['PAGE-BREAK-INSIDE'])=='AVOID' && $this->tableLevel==1) { - $this->table_keep_together = true; - } - else if ($this->tableLevel==1) { - $this->table_keep_together = false; - } - - // mPDF 4.2 - if (isset($properties['OVERFLOW'])) { - $table['overflow'] = strtolower($properties['OVERFLOW']); // 'hidden' 'wrap' or 'visible' or 'auto' - } - - $properties = array(); - - if (!$table['borders_separate']) { $table['border_spacing_H'] = $table['border_spacing_V'] = 0; } - else if (isset($attr['CELLSPACING'])) { - $table['border_spacing_H'] = $table['border_spacing_V'] = $this->ConvertSize($attr['CELLSPACING'],$this->blk[$this->blklvl]['inner_width']); - } - - - if (isset($attr['CELLPADDING'])) { - $table['cell_padding'] = $attr['CELLPADDING']; - } - else { - $table['cell_padding'] = false; - } - - if (isset($attr['BORDER'])) { - $this->table_border_attr_set = 1; - if ($attr['BORDER']=='1') { - $bord = $this->border_details('#000000 1px solid'); - if ($bord['s']) { - $table['border'] = _BORDER_ALL; - $table['border_details']['R'] = $bord; - $table['border_details']['L'] = $bord; - $table['border_details']['T'] = $bord; - $table['border_details']['B'] = $bord; - } - } - } - else { - $this->table_border_attr_set = 0; - } - if (isset($attr['REPEAT_HEADER']) and $attr['REPEAT_HEADER'] == true) { $this->UseTableHeader(true); } - - - if (isset($attr['ALIGN'])) { $table['a'] = $align[strtolower($attr['ALIGN'])]; } - if (!$table['a']) { $table['a'] = $this->defaultTableAlign; } // mPDF 4.0 - if (isset($attr['BGCOLOR'])) { $table['bgcolor'][-1] = $attr['BGCOLOR']; } - // mPDF 4.0 This does not work - // if (isset($attr['HEIGHT'])) { $table['h'] = $this->ConvertSize($attr['HEIGHT'],$this->blk[$this->blklvl]['inner_width']); } - - if (isset($attr['WIDTH']) && $attr['WIDTH']) { $w = $attr['WIDTH']; } - if ($w) { // set here or earlier in $properties - $maxwidth = $this->blk[$this->blklvl]['inner_width']; - if ($table['borders_separate']) { - $tblblw = $table['margin']['L'] + $table['margin']['R'] + $table['border_details']['L']['w']/2 + $table['border_details']['R']['w']/2; - } - else { - $tblblw = $table['margin']['L'] + $table['margin']['R'] + $table['max_cell_border_width']['L']/2 + $table['max_cell_border_width']['R']/2; - } - if (strpos($w,'%') && $this->tableLevel == 1 && !$this->ignore_table_percents ) { - // % needs to be of inner box without table margins etc. - $maxwidth -= $tblblw ; - $wmm = $this->ConvertSize($w,$maxwidth,$this->FontSize,false); - $table['w'] = $wmm + $tblblw ; - } - if (strpos($w,'%') && $this->tableLevel > 1 && !$this->ignore_table_percents && $this->keep_table_proportions) { - $table['wpercent'] = $w + 0; // makes 80% -> 80 - } - if (!strpos($w,'%') && !$this->ignore_table_widths ) { - $wmm = $this->ConvertSize($w,$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - $table['w'] = $wmm + $tblblw ; - } - if (!$this->keep_table_proportions) { - if (isset($table['w']) && $table['w'] > $this->blk[$this->blklvl]['inner_width']) { $table['w'] = $this->blk[$this->blklvl]['inner_width']; } - } - } - - - if (isset($attr['AUTOSIZE']) && $this->tableLevel==1) { - $this->shrink_this_table_to_fit = $attr['AUTOSIZE']; - if ($this->shrink_this_table_to_fit < 1) { $this->shrink_this_table_to_fit = 1; } - } - if (isset($attr['ROTATE']) && $this->tableLevel==1) { - $this->table_rotate = $attr['ROTATE']; - } - - //++++++++++++++++++++++++++++ - // keeping block together on one page - // Autosize is now forced therefore keep block together disabled - if ($this->keep_block_together) { - $this->keep_block_together = 0; - $this->printdivbuffer(); - $this->blk[$this->blklvl]['keep_block_together'] = 0; - } - if ($this->table_rotate) { - $this->tbrot_Links = array(); - $this->tbrot_Annots = array(); - // mPDF 3.0 - $this->tbrot_Reference = array(); - $this->tbrot_BMoutlines = array(); - $this->tbrot_toc = array(); - } - - if ($this->kwt) { - if ($this->table_rotate) { $this->table_keep_together = true; } - $this->kwt = false; - $this->kwt_saved = true; - } - - if ($this->tableLevel==1 && $this->useGraphs) { - if (isset($attr['ID']) && $attr['ID']) { $this->currentGraphId = strtoupper($attr['ID']); } - else { $this->currentGraphId = '0'; } - $this->graphs[$this->currentGraphId] = array(); - } - - //++++++++++++++++++++++++++++ - $this->plainCell_properties = array(); - - - break; - - - - case 'THEAD': - $this->lastoptionaltag = $tag; // Save current HTML specified optional endtag - $this->tbCSSlvl++; - $this->tablethead = 1; - $this->UseTableHeader(true); - $properties = $this->MergeCSS('TABLE',$tag,$attr); - if (isset($properties['FONT-WEIGHT'])) { - if (strtoupper($properties['FONT-WEIGHT']) == 'BOLD') { $this->thead_font_weight = 'B'; } - else { $this->thead_font_weight = ''; } - } - - if (isset($properties['FONT-STYLE'])) { - if (strtoupper($properties['FONT-STYLE']) == 'ITALIC') { $this->thead_font_style = 'I'; } - else { $this->thead_font_style = ''; } - } - - if (isset($properties['VERTICAL-ALIGN'])) { - $this->thead_valign_default = $properties['VERTICAL-ALIGN']; - } - if (isset($properties['TEXT-ALIGN'])) { - $this->thead_textalign_default = $properties['TEXT-ALIGN']; - } - $properties = array(); - break; - - - case 'TFOOT': - $this->lastoptionaltag = $tag; // Save current HTML specified optional endtag - $this->tbCSSlvl++; - // mPDF 4.0 - $this->tabletfoot = 1; - // mPDF 3.0 - $this->tablethead = 0; - $properties = $this->MergeCSS('TABLE',$tag,$attr); - if (isset($properties['FONT-WEIGHT'])) { - if (strtoupper($properties['FONT-WEIGHT']) == 'BOLD') { $this->tfoot_font_weight = 'B'; } - else { $this->tfoot_font_weight = ''; } - } - - if (isset($properties['FONT-STYLE'])) { - if (strtoupper($properties['FONT-STYLE']) == 'ITALIC') { $this->tfoot_font_style = 'I'; } - else { $this->tfoot_font_style = ''; } - } - - if (isset($properties['VERTICAL-ALIGN'])) { - $this->tfoot_valign_default = $properties['VERTICAL-ALIGN']; - } - if (isset($properties['TEXT-ALIGN'])) { - $this->tfoot_textalign_default = $properties['TEXT-ALIGN']; - } - $properties = array(); - break; - - - case 'TBODY': - // mPDF 3.0 - $this->tablethead = 0; - $this->tabletfoot = 0; // mPDF 4.0 - $this->lastoptionaltag = $tag; // Save current HTML specified optional endtag - $this->tbCSSlvl++; - $this->MergeCSS('TABLE',$tag,$attr); - break; - - - case 'TR': - $this->lastoptionaltag = $tag; // Save current HTML specified optional endtag - $this->tbCSSlvl++; - $this->row++; - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nr']++; - $this->col = -1; - $properties = $this->MergeCSS('TABLE',$tag,$attr); - if (isset($properties['BACKGROUND-COLOR'])) { $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['bgcolor'][$this->row] = $properties['BACKGROUND-COLOR']; } - else if (isset($properties['BACKGROUND'])) { $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['bgcolor'][$this->row] = $properties['BACKGROUND']; } - if (isset($properties['TEXT-ROTATE'])) { - $this->trow_text_rotate = $properties['TEXT-ROTATE']; - } - if (isset($attr['TEXT-ROTATE'])) $this->trow_text_rotate = $attr['TEXT-ROTATE']; - - if (isset($attr['BGCOLOR'])) $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['bgcolor'][$this->row] = $attr['BGCOLOR']; - if ($this->tablethead) { $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_thead'][$this->row] = true; } - // mPDF 4.0 - if ($this->tabletfoot) { $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_tfoot'][$this->row] = true; } - $properties = array(); - break; - - - - case 'TH': - case 'TD': - $this->ignorefollowingspaces = true; - $this->lastoptionaltag = $tag; // Save current HTML specified optional endtag - $this->tbCSSlvl++; - $this->InlineProperties = array(); - $this->spanlvl = 0; - $this->tdbegin = true; - $this->col++; - while (isset($this->cell[$this->row][$this->col])) { $this->col++; } - //Update number column - if ($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nc'] < $this->col+1) { $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nc'] = $this->col+1; } - $this->cell[$this->row][$this->col] = array(); - $this->cell[$this->row][$this->col]['text'] = array(); - $this->cell[$this->row][$this->col]['s'] = 0 ; - - $table = &$this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]; - $cell = &$this->cell[$this->row][$this->col]; - - $cell['a'] = false; - $cell['R'] = false; - $cell['nowrap'] = false; - $cell['bgcolor'] = false; // mPDF 4.3.006 - $cell['padding']['L'] = false; - $cell['padding']['R'] = false; - $cell['padding']['T'] = false; - $cell['padding']['B'] = false; - if ($this->simpleTables && $this->row==0 && $this->col==0){ // mPDF 4.2.017 - $table['simple']['border'] = false; - $table['simple']['border_details']['R']['w'] = 0; - $table['simple']['border_details']['L']['w'] = 0; - $table['simple']['border_details']['T']['w'] = 0; - $table['simple']['border_details']['B']['w'] = 0; - $table['simple']['border_details']['R']['style'] = ''; - $table['simple']['border_details']['L']['style'] = ''; - $table['simple']['border_details']['T']['style'] = ''; - $table['simple']['border_details']['B']['style'] = ''; - } - else if (!$this->simpleTables) { - $cell['border'] = false; - $cell['border_details']['R']['w'] = 0; - $cell['border_details']['L']['w'] = 0; - $cell['border_details']['T']['w'] = 0; - $cell['border_details']['B']['w'] = 0; - $cell['border_details']['mbw']['BL'] = 0; - $cell['border_details']['mbw']['BR'] = 0; - $cell['border_details']['mbw']['RT'] = 0; - $cell['border_details']['mbw']['RB'] = 0; - $cell['border_details']['mbw']['TL'] = 0; - $cell['border_details']['mbw']['TR'] = 0; - $cell['border_details']['mbw']['LT'] = 0; - $cell['border_details']['mbw']['LB'] = 0; - $cell['border_details']['R']['style'] = ''; - $cell['border_details']['L']['style'] = ''; - $cell['border_details']['T']['style'] = ''; - $cell['border_details']['B']['style'] = ''; - $cell['border_details']['R']['s'] = 0; - $cell['border_details']['L']['s'] = 0; - $cell['border_details']['T']['s'] = 0; - $cell['border_details']['B']['s'] = 0; - $cell['border_details']['R']['c'] = array('R'=>0, 'G'=>0, 'B'=>0); - $cell['border_details']['L']['c'] = array('R'=>0, 'G'=>0, 'B'=>0); - $cell['border_details']['T']['c'] = array('R'=>0, 'G'=>0, 'B'=>0); - $cell['border_details']['B']['c'] = array('R'=>0, 'G'=>0, 'B'=>0); - $cell['border_details']['R']['dom'] = 0; - $cell['border_details']['L']['dom'] = 0; - $cell['border_details']['T']['dom'] = 0; - $cell['border_details']['B']['dom'] = 0; - } - - - // INHERITED TABLE PROPERTIES (or ROW for BGCOLOR) - // If cell bgcolor not set specifically, set to TR row bgcolor (if set) - // mPDF 4.3.006 - if ((!$cell['bgcolor']) && isset($table['bgcolor'][$this->row])) { - $cell['bgcolor'] = $table['bgcolor'][$this->row]; - } - else if (isset($table['bgcolor'][-1])) { - $cell['bgcolor'] = $table['bgcolor'][-1]; - } - - if ($table['va']) { $cell['va'] = $table['va']; } - if ($table['txta']) { $cell['a'] = $table['txta']; } - if ($this->table_border_attr_set) { - if ($table['border_details']) { - if (!$this->simpleTables){ // mPDF 4.2.017 - $cell['border_details']['R'] = $table['border_details']['R']; - $cell['border_details']['L'] = $table['border_details']['L']; - $cell['border_details']['T'] = $table['border_details']['T']; - $cell['border_details']['B'] = $table['border_details']['B']; - $cell['border'] = $table['border']; - $cell['border_details']['L']['dom'] = 1; - $cell['border_details']['R']['dom'] = 1; - $cell['border_details']['T']['dom'] = 1; - $cell['border_details']['B']['dom'] = 1; - } - else if ($this->simpleTables && $this->row==0 && $this->col==0){ - $table['simple']['border_details']['R'] = $table['border_details']['R']; - $table['simple']['border_details']['L'] = $table['border_details']['L']; - $table['simple']['border_details']['T'] = $table['border_details']['T']; - $table['simple']['border_details']['B'] = $table['border_details']['B']; - $table['simple']['border'] = $table['border']; - } - } - } - // INHERITED THEAD CSS Properties - if ($this->tablethead) { - if ($this->thead_valign_default) $cell['va'] = $align[strtolower($this->thead_valign_default)]; - if ($this->thead_textalign_default) $cell['a'] = $align[strtolower($this->thead_textalign_default)]; - if ($this->thead_font_weight == 'B') { $this->SetStyle('B',true); } - if ($this->thead_font_style == 'I') { $this->SetStyle('I',true); } - } - - // INHERITED TFOOT CSS Properties - if ($this->tabletfoot) { - if ($this->tfoot_valign_default) $cell['va'] = $align[strtolower($this->tfoot_valign_default)]; - if ($this->tfoot_textalign_default) $cell['a'] = $align[strtolower($this->tfoot_textalign_default)]; - if ($this->tfoot_font_weight == 'B') { $this->SetStyle('B',true); } - if ($this->tfoot_font_style == 'I') { $this->SetStyle('I',true); } - } - - - if ($this->trow_text_rotate){ // mPDF 4.3.006 - $cell['R'] = $this->trow_text_rotate; - } - - $this->cell_border_dominance_L = 0; - $this->cell_border_dominance_R = 0; - $this->cell_border_dominance_T = 0; - $this->cell_border_dominance_B = 0; - - $properties = $this->MergeCSS('TABLE',$tag,$attr); - $properties = $this->array_merge_recursive_unique($this->base_table_properties, $properties); - // mPDF 4.3.006 - if (isset($properties['BACKGROUND-COLOR'])) { $cell['bgcolor'] = $properties['BACKGROUND-COLOR']; } - else if (isset($properties['BACKGROUND'])) { $cell['bgcolor'] = $properties['BACKGROUND']; } - -/*-- GRADIENTS --*/ - // mPDF 4.3.006 - if (isset($properties['BACKGROUND-GRADIENT'])) { $cell['gradient'] = $properties['BACKGROUND-GRADIENT']; } - else { $cell['gradient'] = false; } -/*-- END GRADIENTS --*/ - -/*-- BACKGROUND-IMAGES --*/ - // mPDF 4.3.006 / 4.3.011 - if (isset($properties['BACKGROUND-IMAGE']) && $properties['BACKGROUND-IMAGE'] && !$this->ColActive && !$this->keep_block_together) { - $file = $properties['BACKGROUND-IMAGE']; - $sizesarray = $this->Image($file,0,0,0,0,'','',false, false, false, false, false); // mPDF 4.3.012D - if (isset($sizesarray['IMAGE_ID'])) { - $image_id = $sizesarray['IMAGE_ID']; - $orig_w = $sizesarray['WIDTH']*$this->k; // in user units i.e. mm - $orig_h = $sizesarray['HEIGHT']*$this->k; // (using $this->img_dpi) - $x_repeat = true; - $y_repeat = true; - if (isset($properties['BACKGROUND-REPEAT'])) { - if ($properties['BACKGROUND-REPEAT']=='no-repeat' || $properties['BACKGROUND-REPEAT']=='repeat-x') { $y_repeat = false; } - if ($properties['BACKGROUND-REPEAT']=='no-repeat' || $properties['BACKGROUND-REPEAT']=='repeat-y') { $x_repeat = false; } - } - $x_pos = 0; - $y_pos = 0; - if (isset($properties['BACKGROUND-POSITION'])) { - $ppos = preg_split('/\s+/',$properties['BACKGROUND-POSITION']); - $x_pos = $ppos[0]; - $y_pos = $ppos[1]; - if (!stristr($x_pos ,'%') ) { $x_pos = $this->ConvertSize($x_pos ,$this->blk[$this->blklvl]['inner_width'],$this->FontSize); } - if (!stristr($y_pos ,'%') ) { $y_pos = $this->ConvertSize($y_pos ,$this->blk[$this->blklvl]['inner_width'],$this->FontSize); } - } - // mPDF 4.3.015 - if (isset($properties['BACKGROUND-IMAGE-RESIZE'])) { $resize = $properties['BACKGROUND-IMAGE-RESIZE']; } - else { $resize = 0; } - // mPDF 4.3.017 - if (isset($properties['BACKGROUND-IMAGE-OPACITY'])) { $opacity = $properties['BACKGROUND-IMAGE-OPACITY']; } - else { $opacity = 0; } - $cell['background-image'] = array('image_id'=>$image_id, 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$x_pos, 'y_pos'=>$y_pos, 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat, 'resize'=>$resize, 'opacity'=>$opacity); // mPDF 4.3.015 mPDF 4.3.017 - - } - } -/*-- END BACKGROUND-IMAGES --*/ - - if (isset($properties['VERTICAL-ALIGN'])) { $cell['va']=$align[strtolower($properties['VERTICAL-ALIGN'])]; } - if (isset($properties['TEXT-ALIGN'])) { $cell['a'] = $align[strtolower($properties['TEXT-ALIGN'])]; } - - if (isset($properties['TEXT-ROTATE']) && $properties['TEXT-ROTATE']){ // mPDF 4.3.006 - $cell['R'] = $properties['TEXT-ROTATE']; - } - if (isset($properties['BORDER'])) { - $bord = $this->border_details($properties['BORDER']); - if ($bord['s']) { - if (!$this->simpleTables){ // mPDF 4.2.017 - $cell['border'] = _BORDER_ALL; - $cell['border_details']['R'] = $bord; - $cell['border_details']['L'] = $bord; - $cell['border_details']['T'] = $bord; - $cell['border_details']['B'] = $bord; - $cell['border_details']['L']['dom'] = $this->cell_border_dominance_L; - $cell['border_details']['R']['dom'] = $this->cell_border_dominance_R; - $cell['border_details']['T']['dom'] = $this->cell_border_dominance_T; - $cell['border_details']['B']['dom'] = $this->cell_border_dominance_B; - } - else if ($this->simpleTables && $this->row==0 && $this->col==0){ - $table['simple']['border'] = _BORDER_ALL; - $table['simple']['border_details']['R'] = $bord; - $table['simple']['border_details']['L'] = $bord; - $table['simple']['border_details']['T'] = $bord; - $table['simple']['border_details']['B'] = $bord; - } - } - } - - if (!$this->simpleTables){ // mPDF 4.2.017 - if (isset($properties['BORDER-RIGHT']) && $properties['BORDER-RIGHT']) { - $cell['border_details']['R'] = $this->border_details($properties['BORDER-RIGHT']); - $this->setBorder($cell['border'], _BORDER_RIGHT, $cell['border_details']['R']['s']); - $cell['border_details']['R']['dom'] = $this->cell_border_dominance_R; - } - if (isset($properties['BORDER-LEFT']) && $properties['BORDER-LEFT']) { - $cell['border_details']['L'] = $this->border_details($properties['BORDER-LEFT']); - $this->setBorder($cell['border'], _BORDER_LEFT, $cell['border_details']['L']['s']); - $cell['border_details']['L']['dom'] = $this->cell_border_dominance_L; - } - if (isset($properties['BORDER-BOTTOM']) && $properties['BORDER-BOTTOM']) { - $cell['border_details']['B'] = $this->border_details($properties['BORDER-BOTTOM']); - $this->setBorder($cell['border'], _BORDER_BOTTOM, $cell['border_details']['B']['s']); - $cell['border_details']['B']['dom'] = $this->cell_border_dominance_B; - } - if (isset($properties['BORDER-TOP']) && $properties['BORDER-TOP']) { - $cell['border_details']['T'] = $this->border_details($properties['BORDER-TOP']); - $this->setBorder($cell['border'], _BORDER_TOP, $cell['border_details']['T']['s']); - $cell['border_details']['T']['dom'] = $this->cell_border_dominance_T; - } - } - else if ($this->simpleTables && $this->row==0 && $this->col==0){ - if (isset($properties['BORDER-LEFT']) && $properties['BORDER-LEFT']) { - $bord = $this->border_details($properties['BORDER-LEFT']); - if ($bord['s']) { $table['simple']['border'] = _BORDER_ALL; } - else { $table['simple']['border'] = 0; } - $table['simple']['border_details']['R'] = $bord; - $table['simple']['border_details']['L'] = $bord; - $table['simple']['border_details']['T'] = $bord; - $table['simple']['border_details']['B'] = $bord; - } - } - - if ($this->simpleTables && $this->row==0 && $this->col==0 && !$table['borders_separate']){ // mPDF 4.2.017 - $table['border_details'] = $table['simple']['border_details']; - $table['border'] = $table['simple']['border']; - } - - // mPDF 4.3.009 Binary packed data - if ($this->packTableData && !$this->simpleTables) { - $cell['borderbin'] = $this->_packCellBorder($cell); - unset($cell['border']); - unset($cell['border_details']); - } - - // mPDF 4.3.006 - if (isset($properties['PADDING-LEFT'])) { - $cell['padding']['L'] = $this->ConvertSize($properties['PADDING-LEFT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['PADDING-RIGHT'])) { - $cell['padding']['R'] = $this->ConvertSize($properties['PADDING-RIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['PADDING-BOTTOM'])) { - $cell['padding']['B'] = $this->ConvertSize($properties['PADDING-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - if (isset($properties['PADDING-TOP'])) { - $cell['padding']['T'] = $this->ConvertSize($properties['PADDING-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - - $w = ''; - if (isset($properties['WIDTH'])) { $w = $properties['WIDTH']; } - if (isset($attr['WIDTH'])) { $w = $attr['WIDTH']; } - if ($w) { - if (strpos($w,'%') && !$this->ignore_table_percents ) { $cell['wpercent'] = $w + 0; } // makes 80% -> 80 - else if (!strpos($w,'%') && !$this->ignore_table_widths ) { $cell['w'] = $this->ConvertSize($w,$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - } - - // mPDF 4.0 - if (isset($properties['HEIGHT'])) { $cell['h'] = $this->ConvertSize($properties['HEIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - - if (isset($properties['COLOR'])) { - $cor = $this->ConvertColor($properties['COLOR']); - if ($cor) { - $this->colorarray = $cor; - $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); - $this->issetcolor=true; - } - } - if (isset($properties['FONT-FAMILY'])) { - if (!$this->isCJK) { - $this->SetFont($properties['FONT-FAMILY'],'',0,false); - } - } - if (isset($properties['FONT-SIZE'])) { - $mmsize = $this->ConvertSize($properties['FONT-SIZE'],$this->default_font_size/$this->k); - if ($mmsize) { - $this->SetFontSize($mmsize*($this->k),false); - } - } - // mPDF 4.2 - $cell['dfs'] = $this->FontSize; // Default Font size - if (isset($properties['FONT-WEIGHT'])) { - if (strtoupper($properties['FONT-WEIGHT']) == 'BOLD') { $this->SetStyle('B',true); } - } - if (isset($properties['FONT-STYLE'])) { - if (strtoupper($properties['FONT-STYLE']) == 'ITALIC') { $this->SetStyle('I',true); } - } - if (isset($properties['WHITE-SPACE'])) { - if (strtoupper($properties['WHITE-SPACE']) == 'NOWRAP') { $cell['nowrap']= 1; } - } - $properties = array(); - - - if (isset($attr['HEIGHT'])) $cell['h'] = $this->ConvertSize($attr['HEIGHT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - - if (isset($attr['ALIGN'])) $cell['a'] = $align[strtolower($attr['ALIGN'])]; - if (isset($attr['VALIGN'])) $cell['va'] = $align[strtolower($attr['VALIGN'])]; - - // mPDF 4.3.006 - if (isset($attr['BGCOLOR'])) $cell['bgcolor'] = $attr['BGCOLOR']; - - $cs = $rs = 1; - if (isset($attr['COLSPAN']) && $attr['COLSPAN']>1) $cs = $cell['colspan'] = $attr['COLSPAN']; - if ($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nc'] < $this->col+$cs) { - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nc'] = $this->col+$cs; - for($l=$this->col; $l < $this->col+$cs ;$l++) { - if ($l-$this->col) $this->cell[$this->row][$l] = 0; - } - } - if (isset($attr['ROWSPAN']) && $attr['ROWSPAN']>1) $rs = $cell['rowspan'] = $attr['ROWSPAN']; - for ($k=$this->row ; $k < $this->row+$rs ;$k++) { - for($l=$this->col; $l < $this->col+$cs ;$l++) { - if ($k-$this->row || $l-$this->col) $this->cell[$k][$l] = 0; - } - } - if (isset($attr['TEXT-ROTATE'])) { // mPDF 4.3.006 - $cell['R'] = $attr['TEXT-ROTATE']; - } - if (isset($attr['NOWRAP']) && $attr['NOWRAP']) $cell['nowrap']= 1; - unset($cell ); - break; - -/*-- END TABLES --*/ - - -/*-- LISTS --*/ - // *********** LISTS ******************** - - case 'OL': - case 'UL': - $this->listjustfinished = false; - // mPDF 4.2 - if ($this->blockjustfinished && !count($this->textbuffer) && $this->y != $this->tMargin && $this->collapseBlockMargins) { $lastbottommargin = $this->lastblockbottommargin; } - else { $lastbottommargin = 0; } - $this->lastblockbottommargin = 0; - $this->blockjustfinished=false; - // mPDF 3.0 - $this->linebreakjustfinished=false; - $this->lastoptionaltag = ''; // Save current HTML specified optional endtag - $this->listCSSlvl++; - if((!$this->tableLevel) && ($this->listlvl == 0)) { - // mPDF 4.2 - $blockstate = 0; - //if ($this->lastblocklevelchange == 1) { $blockstate = -1; } // Top margins/padding only - //else if ($this->lastblocklevelchange < 1) { $blockstate = 0; } // NO margins/padding - // called from block after new div e.g.
    ...
      ... Outputs block top margin/border and padding - if (count($this->textbuffer) == 0 && $this->lastblocklevelchange == 1 && !$this->tableLevel && !$this->kwt) { - $this->newFlowingBlock( $this->blk[$this->blklvl]['width'],$this->lineheight,'',false,false,1,true); // true = newblock - $this->finishFlowingBlock(true); // true = END of flowing block - } - else if (count($this->textbuffer)) { $this->printbuffer($this->textbuffer,$blockstate); } - $this->textbuffer=array(); - $this->lastblocklevelchange = -1; - } - // ol and ul types are mixed here - if ($this->listlvl == 0) { - $this->list_indent = array(); - $this->list_align = array(); - $this->list_lineheight = array(); - $this->InlineProperties['LIST'] = array(); - $this->InlineProperties['LISTITEM'] = array(); - } - -/*-- TABLES --*/ - // A simple list for inside a table - if($this->tableLevel) { - $this->list_indent[$this->listlvl] = 0; // mm default indent for each level - if ($tag == 'OL') $this->listtype = '1'; - else if ($tag == 'UL') $this->listtype = 'disc'; - if ($this->listlvl > 0) { - $this->listlist[$this->listlvl]['MAXNUM'] = $this->listnum; //save previous lvl's maxnum - } - $this->listlvl++; - $this->listnum = 0; // reset - $this->listlist[$this->listlvl] = array('TYPE'=>$this->listtype,'MAXNUM'=>$this->listnum); - break; - } -/*-- END TABLES --*/ - - // mPDF 4.2.018 - if ($this->PDFA && $tag == 'UL') { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "List bullets cannot use core font Zapfdingbats in PDFA1-b. (Substitute characters from current font used if available, otherwise substitutes hyphen '-')"; } - } - - if ($this->listCSSlvl==1) { - $properties = $this->MergeCSS('TOPLIST',$tag,$attr); - } - else { - $properties = $this->MergeCSS('LIST',$tag,$attr); - } - if (!empty($properties)) $this->setCSS($properties,'INLINE'); - // List-type - // mPDF 4.0 - $this->listtype = ''; - if (isset($attr['TYPE']) && $attr['TYPE']) { $this->listtype = $attr['TYPE']; } - else if (isset($properties['LIST-STYLE-TYPE'])) { - // mPDF 4.0 - $this->listtype = $this->_getListStyle($properties['LIST-STYLE-TYPE']); - } - else if (isset($properties['LIST-STYLE'])) { - // mPDF 4.0 - $this->listtype = $this->_getListStyle($properties['LIST-STYLE']); - } - if (!$this->listtype) { - if ($tag == 'OL') $this->listtype = '1'; - if ($tag == 'UL') { - // mPDF 4.0 - if ($this->listlvl % 3 == 0) $this->listtype = 'disc'; - elseif ($this->listlvl % 3 == 1) $this->listtype = 'circle'; - else $this->listtype = 'square'; - } - } - - if ($this->listlvl == 0) { - $this->inherit_lineheight = 0; - $this->listlvl++; // first depth level - $this->listnum = 0; // reset - $occur = $this->listoccur[$this->listlvl] = 1; - $this->listlist[$this->listlvl][1] = array('TYPE'=>$this->listtype,'MAXNUM'=>$this->listnum); - } - else { - if (!empty($this->textbuffer)) - { - $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl],$this->listitemtype); - $this->listnum++; - } - // Save current lineheight to inherit - $this->textbuffer = array(); - $occur = $this->listoccur[$this->listlvl]; - $this->listlist[$this->listlvl][$occur]['MAXNUM'] = $this->listnum; //save previous lvl's maxnum - $this->listlvl++; - $this->listnum = 0; // reset - - // mPDF 3.0 - if (!isset($this->listoccur[$this->listlvl]) || $this->listoccur[$this->listlvl] == 0) $this->listoccur[$this->listlvl] = 1; - else $this->listoccur[$this->listlvl]++; - $occur = $this->listoccur[$this->listlvl]; - $this->listlist[$this->listlvl][$occur] = array('TYPE'=>$this->listtype,'MAXNUM'=>$this->listnum); - } - - - // TOP LEVEL ONLY - if ($this->listlvl == 1) { - if (isset($properties['MARGIN-TOP'])) { - // mPDF 4.2 Collaspe vertical block margins - if ($lastbottommargin) { - $tmp = $this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - if ($tmp > $lastbottommargin) { $properties['MARGIN-TOP'] -= $lastbottommargin; } - else { $properties['MARGIN-TOP'] = 0; } - } - $this->DivLn($this->ConvertSize($properties['MARGIN-TOP'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false),$this->blklvl,true,1); // collapsible - } - if (isset($properties['MARGIN-BOTTOM'])) { - $this->list_margin_bottom = $this->ConvertSize($properties['MARGIN-BOTTOM'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); - } - // mPDF 4.0 - if (isset($this->blk[$this->blklvl]['line_height'])) { - $this->list_lineheight[$this->listlvl][$occur] = $this->blk[$this->blklvl]['line_height']; - } - } - $this->list_indent[$this->listlvl][$occur] = 5; // mm default indent for each level - if (isset($properties['TEXT-INDENT'])) { $this->list_indent[$this->listlvl][$occur] = $this->ConvertSize($properties['TEXT-INDENT'],$this->blk[$this->blklvl]['inner_width'],$this->FontSize,false); } - if (isset($properties['TEXT-ALIGN'])) { $this->list_align[$this->listlvl][$occur] = $align[strtolower($properties['TEXT-ALIGN'])]; } - - // mPDF 4.0 - if (isset($properties['LINE-HEIGHT'])) { - $this->list_lineheight[$this->listlvl][$occur] = $this->fixLineheight($properties['LINE-HEIGHT']); - - } - // mPDF 4.2 Inherit - else if ($this->listlvl>1 && isset($this->list_lineheight[($this->listlvl - 1)][1])) { - $this->list_lineheight[$this->listlvl][$occur] = end($this->list_lineheight[($this->listlvl - 1)]); - } - if (!isset($this->list_lineheight[$this->listlvl][$occur]) || !$this->list_lineheight[$this->listlvl][$occur]) { - $this->list_lineheight[$this->listlvl][$occur] = $this->normalLineheight; // mPDF 4.2 - } - - $this->InlineProperties['LIST'][$this->listlvl][$occur] = $this->saveInlineProperties(); - $properties = array(); - break; - - - - case 'LI': - // Start Block - $this->lastoptionaltag = $tag; // Save current HTML specified optional endtag - $this->ignorefollowingspaces = true; //Eliminate exceeding left-side spaces -/*-- TABLES --*/ - // A simple list for inside a table - if($this->tableLevel) { - $this->blockjustfinished=false; - - // If already something in the Cell - if ((isset($this->cell[$this->row][$this->col]['maxs']) && $this->cell[$this->row][$this->col]['maxs'] > 0 ) || $this->cell[$this->row][$this->col]['s'] > 0 ) { - $this->cell[$this->row][$this->col]['textbuffer'][] = array("\n",$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['text'][] = "\n"; - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - $this->cell[$this->row][$this->col]['s'] = 0 ; - } - if ($this->listlvl == 0) { //in case of malformed HTML code. Example:(...)

    1. Content
    2. Paragraph1

      (...) - $this->listlvl++; // first depth level - $this->listnum = 0; // reset - $this->listlist[$this->listlvl] = array('TYPE'=>'disc','MAXNUM'=>$this->listnum); - } - $this->listnum++; - switch($this->listlist[$this->listlvl]['TYPE']) { - case 'A': - $blt = $this->dec2alpha($this->listnum,true).$this->list_number_suffix; - break; - case 'a': - $blt = $this->dec2alpha($this->listnum,false).$this->list_number_suffix; - break; - case 'I': - $blt = $this->dec2roman($this->listnum,true).$this->list_number_suffix; - break; - case 'i': - $blt = $this->dec2roman($this->listnum,false).$this->list_number_suffix; - break; - case '1': - $blt = $this->listnum.$this->list_number_suffix; - break; - default: - // mPDF 4.2 - if ($this->listlvl % 3 == 1 && isset($this->CurrentFont['cw'][8226])) { $blt = "\xe2\x80\xa2"; } // • - else if ($this->listlvl % 3 == 2 && isset($this->CurrentFont['cw'][9900])) { $blt = "\xe2\x9a\xac"; } // ⚬ - else if ($this->listlvl % 3 == 0 && isset($this->CurrentFont['cw'][9642])) { $blt = "\xe2\x96\xaa"; } // ▪ - else { $blt = '-'; } - break; - } - -/*-- UNICODE-FONTS --*/ - // mPDF 3.0 - change to   spaces - if ($this->is_MB) { - $ls = str_repeat("\xc2\xa0\xc2\xa0",($this->listlvl-1)*2) . $blt . ' '; - } - else { -/*-- END UNICODE-FONTS --*/ - $ls = str_repeat(chr(160).chr(160),($this->listlvl-1)*2) . $blt . ' '; -/*-- UNICODE-FONTS --*/ - } -/*-- END UNICODE-FONTS --*/ - - $this->cell[$this->row][$this->col]['textbuffer'][] = array($ls,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['text'][] = $ls; - $this->cell[$this->row][$this->col]['s'] += $this->GetStringWidth($ls); - break; - } -/*-- END TABLES --*/ - //Observation: is ignored - if ($this->listlvl == 0) { //in case of malformed HTML code. Example:(...)

    3. Content
    4. Paragraph1

      (...) - //First of all, skip a line - $this->listlvl++; // first depth level - $this->listnum = 0; // reset - $this->listoccur[$this->listlvl] = 1; - $this->listlist[$this->listlvl][1] = array('TYPE'=>'disc','MAXNUM'=>$this->listnum); - } - if ($this->listnum == 0) { - $this->listnum++; - $this->textbuffer = array(); - } - else { - if (!empty($this->textbuffer)) { - $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl],$this->listitemtype); - $this->listnum++; - } - $this->textbuffer = array(); - } - - $this->listCSSlvl++; - $properties = $this->MergeCSS('LIST',$tag,$attr); - if (!empty($properties)) $this->setCSS($properties,'INLINE'); - $this->InlineProperties['LISTITEM'][$this->listlvl][$this->listoccur[$this->listlvl]][$this->listnum] = $this->saveInlineProperties(); - - // List-type - if (isset($attr['TYPE']) && $attr['TYPE']) { $this->listitemtype = $attr['TYPE']; } - else if (isset($properties['LIST-STYLE-TYPE'])) { - // mPDF 4.0 - $this->listitemtype = $this->_getListStyle($properties['LIST-STYLE-TYPE']); - } - else if (isset($properties['LIST-STYLE'])) { - // mPDF 4.0 - $this->listitemtype = $this->_getListStyle($properties['LIST-STYLE']); - } - else $this->listitemtype = ''; - - break; -/*-- END LISTS --*/ - - }//end of switch -} - -/*-- LISTS --*/ -// mPDF 4.0 -function _getListStyle($ls) { - if (stristr($ls,'disc')) { return 'disc'; } - else if (stristr($ls,'circle')) { return 'circle'; } - else if (stristr($ls,'square')) { return 'square'; } - else if (stristr($ls,'decimal')) { return '1'; } - else if (stristr($ls,'lower-roman')) { return 'i'; } - else if (stristr($ls,'upper-roman')) { return 'I'; } - else if (stristr($ls,'lower-latin')|| stristr($ls,'lower-alpha')) { return 'a'; } - else if (stristr($ls,'upper-latin') || stristr($ls,'upper-alpha')) { return 'A'; } - else if (stristr($ls,'none')) { return 'none'; } - else { return ''; } -} -/*-- END LISTS --*/ - - - -function CloseTag($tag) -{ - $this->ignorefollowingspaces = false; //Eliminate exceeding left-side spaces - //Closing tag - if($tag=='OPTION') { $this->selectoption['ACTIVE'] = false; $this->lastoptionaltag = ''; } - - if($tag=='TTS' or $tag=='TTA' or $tag=='TTZ') { - if ($this->InlineProperties[$tag]) { $this->restoreInlineProperties($this->InlineProperties[$tag]); } - unset($this->InlineProperties[$tag]); - $ltag = strtolower($tag); - $this->$ltag = false; - } - - - if($tag=='FONT' || $tag=='SPAN' || $tag=='CODE' || $tag=='KBD' || $tag=='SAMP' || $tag=='TT' || $tag=='VAR' - || $tag=='INS' || $tag=='STRONG' || $tag=='CITE' || $tag=='SUB' || $tag=='SUP' || $tag=='S' || $tag=='STRIKE' || $tag=='DEL' - || $tag=='Q' || $tag=='EM' || $tag=='B' || $tag=='I' || $tag=='U' | $tag=='SMALL' || $tag=='BIG' || $tag=='ACRONYM') { - - if ($tag == 'SPAN') { - if (isset($this->InlineProperties['SPAN'][$this->spanlvl]) && $this->InlineProperties['SPAN'][$this->spanlvl]) { $this->restoreInlineProperties($this->InlineProperties['SPAN'][$this->spanlvl]); } - unset($this->InlineProperties['SPAN'][$this->spanlvl]); - if (isset($this->InlineAnnots['SPAN'][$this->spanlvl]) && $this->InlineAnnots['SPAN'][$this->spanlvl]) { $annot = $this->InlineAnnots['SPAN'][$this->spanlvl]; } // *ANNOTATIONS* - unset($this->InlineAnnots['SPAN'][$this->spanlvl]); // *ANNOTATIONS* - $this->spanlvl--; - } - else { - if (isset($this->InlineProperties[$tag]) && $this->InlineProperties[$tag]) { $this->restoreInlineProperties($this->InlineProperties[$tag]); } - unset($this->InlineProperties[$tag]); - if (isset($this->InlineAnnots[$tag]) && $this->InlineAnnots[$tag]) { $annot = $this->InlineAnnots[$tag]; } // *ANNOTATIONS* - unset($this->InlineAnnots[$tag]); // *ANNOTATIONS* - } -/*-- ANNOTATIONS --*/ - if (isset($annot)) { - if($this->tableLevel) { // *TABLES* - $this->cell[$this->row][$this->col]['textbuffer'][] = array($annot); // *TABLES* - } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($annot); - } // *TABLES* - } -/*-- END ANNOTATIONS --*/ - } - - - if($tag=='A') { - $this->HREF=''; - if (isset($this->InlineProperties['A'])) { $this->restoreInlineProperties($this->InlineProperties['A']); } - unset($this->InlineProperties['A']); - } - - - -/*-- FORMS --*/ - // *********** FORM ELEMENTS ******************** - - if($tag=='TEXTAREA') { - $this->specialcontent = ''; - if ($this->InlineProperties[$tag]) { $this->restoreInlineProperties($this->InlineProperties[$tag]); } - unset($this->InlineProperties[$tag]); - } - - - if($tag=='SELECT') { - $this->lastoptionaltag = ''; - $texto = ''; - if (isset($this->selectoption['SELECTED'])) { $texto = $this->selectoption['SELECTED']; } - $w = $this->GetStringWidth($texto); - if ($w == 0) { $w = 5; } - $objattr['type'] = 'select'; // need to add into objattr - $objattr['text'] = $texto; - // mPDD 1.4 Active Forms - if (isset($this->selectoption['NAME'])) { $objattr['name'] = $this->selectoption['NAME']; } - if (isset($this->selectoption['ITEMS'])) { $objattr['items'] = $this->selectoption['ITEMS']; } - if (isset($this->selectoption['MULTIPLE'])) { $objattr['multiple'] = $this->selectoption['MULTIPLE']; } - if (isset($this->selectoption['DISABLED'])) { $objattr['disabled'] = $this->selectoption['DISABLED']; } - if (isset($this->selectoption['TITLE'])) { $objattr['title'] = $this->selectoption['TITLE']; } - if (isset($this->selectoption['COLOR'])) { $objattr['color'] = $this->selectoption['COLOR']; } - if (isset($this->selectoption['SIZE'])) { $objattr['size'] = $this->selectoption['SIZE']; } - if (isset($objattr['size']) && $objattr['size']>1) { $rows=$objattr['size']; } else { $rows = 1; } - - $objattr['fontfamily'] = $this->FontFamily; - $objattr['fontsize'] = $this->FontSizePt; - - $objattr['width'] = $w + ($this->form_element_spacing['select']['outer']['h']*2)+($this->form_element_spacing['select']['inner']['h']*2) + ($this->FontSize*1.4); - $objattr['height'] = ($this->FontSize*$rows) + ($this->form_element_spacing['select']['outer']['v']*2)+($this->form_element_spacing['select']['inner']['v']*2); - $e = "\xbb\xa4\xactype=select,objattr=".serialize($objattr)."\xbb\xa4\xac"; - - // Clear properties - tidy up - $properties = array(); - - // Output it to buffers - if ($this->tableLevel) { // *TABLES* - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); // *TABLES* - $this->cell[$this->row][$this->col]['s'] += $objattr['width'] ; // *TABLES* - } // *TABLES* - else { // *TABLES* - $this->textbuffer[] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } // *TABLES* - - $this->selectoption = array(); - $this->specialcontent = ''; - - if ($this->InlineProperties[$tag]) { $this->restoreInlineProperties($this->InlineProperties[$tag]); } - unset($this->InlineProperties[$tag]); - - } -/*-- END FORMS --*/ - - - // *********** BLOCKS ******************** - - if($tag=='P' || $tag=='DIV' || $tag=='H1' || $tag=='H2' || $tag=='H3' || $tag=='H4' || $tag=='H5' || $tag=='H6' || $tag=='PRE' - || $tag=='FORM' || $tag=='ADDRESS' || $tag=='BLOCKQUOTE' || $tag=='CENTER' || $tag=='DT' || $tag=='DD' || $tag=='DL' ) { - - $this->ignorefollowingspaces = true; //Eliminate exceeding left-side spaces - $this->blockjustfinished=true; - // mPDF 4.2 - $this->lastblockbottommargin = $this->blk[$this->blklvl]['margin_bottom']; - -/*-- LISTS --*/ - // mPDF 4.0 - if ($this->listlvl>0) { return; } -/*-- END LISTS --*/ - -/*-- TABLES --*/ - if($this->tableLevel) { - // mPDF 3.0 - if ($this->linebreakjustfinished) { $this->blockjustfinished=false; } - // mPDF 4.0 - if (isset($this->InlineProperties['BLOCKINTABLE'])) { - if ($this->InlineProperties['BLOCKINTABLE']) { $this->restoreInlineProperties($this->InlineProperties['BLOCKINTABLE']); } - unset($this->InlineProperties['BLOCKINTABLE']); - } - return; - } -/*-- END TABLES --*/ - $this->lastoptionaltag = ''; - $this->divbegin=false; - // mPDF 3.0 - $this->linebreakjustfinished=false; - - $this->x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin']; - -/*-- CSS-FLOAT --*/ - // If float contained in a float, need to extend bottom to allow for it - $currpos = $this->page*1000 + $this->y; - if (isset($this->blk[$this->blklvl]['float_endpos']) && $this->blk[$this->blklvl]['float_endpos'] > $currpos) { - $old_page = $this->page; - $new_page = intval($this->blk[$this->blklvl]['float_endpos'] /1000); - if ($old_page != $new_page) { - $s = $this->PrintPageBackgrounds(); - // Writes after the marker so not overwritten later by page background etc. - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', '\\1'."\n".$s."\n", $this->pages[$this->page]); - $this->pageBackgrounds = array(); - $this->page = $new_page; - $this->ResetMargins(); - $this->Reset(); - $this->pageoutput[$this->page] = array(); - } - $this->y = (($this->blk[$this->blklvl]['float_endpos'] *1000) % 1000000)/1000; // mod changes operands to integers before processing - } -/*-- END CSS-FLOAT --*/ - - //Print content - if ($this->lastblocklevelchange == 1) { $blockstate = 3; } // Top & bottom margins/padding - else if ($this->lastblocklevelchange == -1) { $blockstate = 2; } // Bottom margins/padding only - else { $blockstate = 0; } // mPDF 3.0 - // called from after e.g.
    ... Outputs block margin/border and padding - if (count($this->textbuffer) && $this->textbuffer[count($this->textbuffer)-1]) { - // mPDF 3.0 ...as long as not special content - if (substr($this->textbuffer[count($this->textbuffer)-1][0],0,3) != "\xbb\xa4\xac") { // not special content - if ($this->is_MB) { // *UNICODE-FONTS* - $this->textbuffer[count($this->textbuffer)-1][0] = preg_replace('/[ ]+$/u', '', $this->textbuffer[count($this->textbuffer)-1][0]); // *UNICODE-FONTS* - } // *UNICODE-FONTS* - else { // *UNICODE-FONTS* - $this->textbuffer[count($this->textbuffer)-1][0] = preg_replace('/[ ]+$/', '', $this->textbuffer[count($this->textbuffer)-1][0]); - } // *UNICODE-FONTS* - } - } - if (count($this->textbuffer) == 0 && $this->lastblocklevelchange != 0) { - $this->newFlowingBlock( $this->blk[$this->blklvl]['width'],$this->lineheight,'',false,false,2,true); // true = newblock - $this->finishFlowingBlock(true); // true = END of flowing block - $this->PaintDivBB('',$blockstate); - } - else { - $this->printbuffer($this->textbuffer,$blockstate); - } - - - $this->textbuffer=array(); - - if ($this->blk[$this->blklvl]['keep_block_together']) { - $this->printdivbuffer(); - } - - if ($this->kwt) { - $this->kwt_height = $this->y - $this->kwt_y0; - } - -/*-- CSS-IMAGE-FLOAT --*/ - $this->printfloatbuffer(); -/*-- END CSS-IMAGE-FLOAT --*/ - - if($tag=='PRE') { $this->ispre=false; } - -/*-- CSS-FLOAT --*/ - if ($this->blk[$this->blklvl]['float'] == 'R') { - // If width not set, here would need to adjust and output buffer - $s = $this->PrintPageBackgrounds(); - // Writes after the marker so not overwritten later by page background etc. - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', '\\1'."\n".$s."\n", $this->pages[$this->page]); - $this->pageBackgrounds = array(); - $this->Reset(); - $this->pageoutput[$this->page] = array(); - - for($i=($this->blklvl-1); $i >= 0; $i--) { - if (isset($this->blk[$i]['float_endpos'])) { $this->blk[$i]['float_endpos'] = max($this->blk[$i]['float_endpos'], ($this->page*1000 + $this->y)); } - else { $this->blk[$i]['float_endpos'] = $this->page*1000 + $this->y; } - } - - $this->floatDivs[] = array( - 'side'=>'R', - 'startpage'=>$this->blk[$this->blklvl]['startpage'] , - 'y0'=>$this->blk[$this->blklvl]['float_start_y'] , - 'startpos'=> ($this->blk[$this->blklvl]['startpage']*1000 + $this->blk[$this->blklvl]['float_start_y']), - 'endpage'=>$this->page , - 'y1'=>$this->y , - 'endpos'=> ($this->page*1000 + $this->y), - 'w'=> $this->blk[$this->blklvl]['float_width'], - 'blklvl'=>$this->blklvl, - 'blockContext' => $this->blk[$this->blklvl-1]['blockContext'] - ); - - $this->y = $this->blk[$this->blklvl]['float_start_y'] ; - $this->page = $this->blk[$this->blklvl]['startpage'] ; - $this->ResetMargins(); - $this->pageoutput[$this->page] = array(); - } - if ($this->blk[$this->blklvl]['float'] == 'L') { - // If width not set, here would need to adjust and output buffer - $s = $this->PrintPageBackgrounds(); - // Writes after the marker so not overwritten later by page background etc. - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', '\\1'."\n".$s."\n", $this->pages[$this->page]); - $this->pageBackgrounds = array(); - $this->Reset(); - $this->pageoutput[$this->page] = array(); - - for($i=($this->blklvl-1); $i >= 0; $i--) { - if (isset($this->blk[$i]['float_endpos'])) { $this->blk[$i]['float_endpos'] = max($this->blk[$i]['float_endpos'], ($this->page*1000 + $this->y)); } - else { $this->blk[$i]['float_endpos'] = $this->page*1000 + $this->y; } - } - - $this->floatDivs[] = array( - 'side'=>'L', - 'startpage'=>$this->blk[$this->blklvl]['startpage'] , - 'y0'=>$this->blk[$this->blklvl]['float_start_y'] , - 'startpos'=> ($this->blk[$this->blklvl]['startpage']*1000 + $this->blk[$this->blklvl]['float_start_y']), - 'endpage'=>$this->page , - 'y1'=>$this->y , - 'endpos'=> ($this->page*1000 + $this->y), - 'w'=> $this->blk[$this->blklvl]['float_width'], - 'blklvl'=>$this->blklvl, - 'blockContext' => $this->blk[$this->blklvl-1]['blockContext'] - ); - - $this->y = $this->blk[$this->blklvl]['float_start_y'] ; - $this->page = $this->blk[$this->blklvl]['startpage'] ; - $this->ResetMargins(); - $this->pageoutput[$this->page] = array(); - } -/*-- END CSS-FLOAT --*/ - - //Reset values - $this->Reset(); - - if ($this->blklvl > 0) { // ==0 SHOULDN'T HAPPEN - NOT XHTML - if ($this->blk[$this->blklvl]['tag'] == $tag) { - unset($this->blk[$this->blklvl]); - $this->blklvl--; - } - //else { echo $tag; exit; } // debug - forces error if incorrectly nested html tags - } - - $this->lastblocklevelchange = -1 ; - // Reset Inline-type properties - if (isset($this->blk[$this->blklvl]['InlineProperties'])) { $this->restoreInlineProperties($this->blk[$this->blklvl]['InlineProperties']); } - - $this->x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin']; - - } - - -/*-- TABLES --*/ - - if($tag=='TH') $this->SetStyle('B',false); - - if(($tag=='TH' or $tag=='TD') && $this->tableLevel) { - $this->lastoptionaltag = 'TR'; - unset($this->tablecascadeCSS[$this->tbCSSlvl]); - $this->tbCSSlvl--; - $this->tdbegin = false; - - // Added for correct calculation of cell column width - otherwise misses the last line if not end

    etc. - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - - // Remove last
    if at end of cell - if (isset($this->cell[$this->row][$this->col]['textbuffer'])) { $ntb = count($this->cell[$this->row][$this->col]['textbuffer']); } - else { $ntb = 0; } - // mPDF 3.0 ... but only the last one - if ($ntb>1 && $this->cell[$this->row][$this->col]['textbuffer'][$ntb-1][0] == "\n") { - unset($this->cell[$this->row][$this->col]['textbuffer'][$ntb-1]); - } - - if ($this->tablethead) { $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_thead'][$this->row] = true; } - // mPDF 3.0 - if ($this->usetableheader && ($this->row == 0 || $this->tablethead) && $this->tableLevel==1) { - $this->tableheadernrows = max($this->tableheadernrows, ($this->row+1)); - } - // mPDF 4.0 - if ($this->tabletfoot) { $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_tfoot'][$this->row] = true; } - if ($this->tabletfoot && $this->tableLevel==1) { - $this->tablefooternrows = max($this->tablefooternrows, ($this->row+1 - $this->tableheadernrows)); - } - $this->Reset(); - } - - if($tag=='TR' && $this->tableLevel) { - $this->lastoptionaltag = ''; - unset($this->tablecascadeCSS[$this->tbCSSlvl]); - $this->tbCSSlvl--; - $this->trow_text_rotate = ''; - $this->tabletheadjustfinished = false; - } - - if($tag=='TBODY') { - $this->lastoptionaltag = ''; - unset($this->tablecascadeCSS[$this->tbCSSlvl]); - $this->tbCSSlvl--; - } - - if($tag=='THEAD') { - $this->lastoptionaltag = ''; - unset($this->tablecascadeCSS[$this->tbCSSlvl]); - $this->tbCSSlvl--; - $this->tablethead = 0; - $this->tabletheadjustfinished = true; - $this->thead_font_weight = ''; - $this->SetStyle('B',false); - $this->thead_font_style = ''; - $this->SetStyle('I',false); - - $this->thead_valign_default = ''; - $this->thead_textalign_default = ''; - } - - if($tag=='TFOOT') { - $this->lastoptionaltag = ''; - unset($this->tablecascadeCSS[$this->tbCSSlvl]); - $this->tbCSSlvl--; - $this->tabletfoot = 0; // mPDF 4.0 - $this->tfoot_font_weight = ''; - $this->SetStyle('B',false); - $this->tfoot_font_style = ''; - $this->SetStyle('I',false); - - $this->tfoot_valign_default = ''; - $this->tfoot_textalign_default = ''; - } - - - - if($tag=='TABLE') { // TABLE-END ( -$this->tctr++; - if ($this->progressBar) { $this->UpdateProgressBar(1,'','TABLE'); } // *PROGRESS-BAR* - if ($this->progressBar) { $this->UpdateProgressBar(7,0,''); } // *PROGRESS-BAR* - $this->lastoptionaltag = ''; - unset($this->tablecascadeCSS[$this->tbCSSlvl]); - $this->tbCSSlvl--; - $this->ignorefollowingspaces = true; //Eliminate exceeding left-side spaces - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cells'] = $this->cell; - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['wc'] = array_pad(array(),$this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nc'],array('miw'=>0,'maw'=>0)); - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['hr'] = array_pad(array(),$this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['nr'],0); - - // mPDF 4.0 Move TABLE FOOTER TFOOT to end of table - if (isset($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_tfoot']) && count($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_tfoot'])) { - $tfrows = array(); - foreach($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_tfoot'] AS $r=>$val) { - if ($val) { $tfrows[] = $r; } - } - $temp = array(); - $temptf = array(); - foreach($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cells'] AS $k=>$row) { - if (in_array($k,$tfrows)) { - $temptf[] = $row; - } - else { - $temp[] = $row; - } - } - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_tfoot'] = array(); - for($i=count($temp) ; $i<(count($temp)+count($temptf)); $i++) { - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['is_tfoot'][$i] = true; - } - // Update nestedpos row references - if (count($this->table[($this->tableLevel+1)])) { - foreach($this->table[($this->tableLevel+1)] AS $nid=>$nested) { - $this->table[($this->tableLevel+1)][$nid]['nestedpos'][0] -= count($temptf); - } - } - $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cells'] = array_merge($temp, $temptf); - } - - // Fix Borders ********************************************* - $this->_fixTableBorders($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]); - - if ($this->progressBar) { $this->UpdateProgressBar(7,10,' '); } // *PROGRESS-BAR* - - if ($this->ColActive) { $this->table_rotate = 0; } // *COLUMNS* - if ($this->table_rotate <> 0) { - $this->tablebuffer = array(); - // Max width for rotated table - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5); - $this->tbrot_maxh = $this->blk[$this->blklvl]['inner_width'] ; // Max width for rotated table - $this->tbrot_align = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['a'] ; - } - $this->shrin_k = 1; - - // mPDF 4.2 - if ($this->shrink_tables_to_fit < 1) { $this->shrink_tables_to_fit = 1; } - if (!$this->shrink_this_table_to_fit) { $this->shrink_this_table_to_fit = $this->shrink_tables_to_fit; } - - if ($this->tableLevel>1) { - // deal with nested table - - $this->_tableColumnWidth($this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]],true); - - $tmiw = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['miw']; - $tmaw = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['maw']; - $tl = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['tl']; - - // Go down to lower table level - $this->tableLevel--; - - // Reset lower level table - $this->base_table_properties = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['baseProperties']; - $this->cell = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['cells']; - $this->row = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['currrow']; - $this->col = $this->table[$this->tableLevel][$this->tbctr[$this->tableLevel]]['currcol']; - - $objattr['type'] = 'nestedtable'; - $objattr['nestedcontent'] = $this->tbctr[($this->tableLevel+1)]; - $objattr['table'] = $this->tbctr[$this->tableLevel]; - $objattr['row'] = $this->row; - $objattr['col'] = $this->col; - $objattr['level'] = $this->tableLevel; - $e = "\xbb\xa4\xactype=nestedtable,objattr=".serialize($objattr)."\xbb\xa4\xac"; - $this->cell[$this->row][$this->col]['textbuffer'][] = array($e,$this->HREF,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->cell[$this->row][$this->col]['s'] += $tl ; - if (!isset($this->cell[$this->row][$this->col]['maxs'])) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - elseif($this->cell[$this->row][$this->col]['maxs'] < $this->cell[$this->row][$this->col]['s']) { - $this->cell[$this->row][$this->col]['maxs'] = $this->cell[$this->row][$this->col]['s']; - } - $this->cell[$this->row][$this->col]['s'] = 0;// reset - if ((isset($this->cell[$this->row][$this->col]['nestedmaw']) && $this->cell[$this->row][$this->col]['nestedmaw'] < $tmaw) || !isset($this->cell[$this->row][$this->col]['nestedmaw'])) { $this->cell[$this->row][$this->col]['nestedmaw'] = $tmaw ; } - if ((isset($this->cell[$this->row][$this->col]['nestedmiw']) && $this->cell[$this->row][$this->col]['nestedmiw'] < $tmiw) || !isset($this->cell[$this->row][$this->col]['nestedmiw'])) { $this->cell[$this->row][$this->col]['nestedmiw'] = $tmiw ; } - $this->cell[$this->row][$this->col]['nestedcontent'][] = $this->tbctr[($this->tableLevel+1)]; - $this->tdbegin = true; - $this->nestedtablejustfinished = true; - $this->ignorefollowingspaces = true; - return; - } - $this->cMarginL = 0; - $this->cMarginR = 0; - $this->cMarginT = 0; - $this->cMarginB = 0; - $this->cellPaddingL = 0; - $this->cellPaddingR = 0; - $this->cellPaddingT = 0; - $this->cellPaddingB = 0; - - if (!$this->kwt_saved) { $this->kwt_height = 0; } - - list($check,$tablemiw) = $this->_tableColumnWidth($this->table[1][1],true); - $save_table = $this->table; - $reset_to_minimum_width = false; - $added_page = false; - - if ($check > 1) { - if ($check > $this->shrink_this_table_to_fit && $this->table_rotate) { - $this->AddPage($this->CurOrientation); - $added_page = true; - $this->kwt_moved = true; - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5) - $this->kwt_height; - // mPDF 3.0 - //$check = $tablemiw/$this->tbrot_maxw; // undo any shrink - $check = 1; // undo any shrink - } - $reset_to_minimum_width = true; - } - - if ($reset_to_minimum_width) { - - $this->shrin_k = $check; - - $this->default_font_size /= $this->shrin_k; - $this->SetFontSize($this->default_font_size, false ); - - $this->shrinkTable($this->table[1][1],$this->shrin_k); - - $this->_tableColumnWidth($this->table[1][1],false); // repeat - - // Starting at $this->innermostTableLevel - // Shrink table values - and redo columnWidth - for($lvl=2;$lvl<=$this->innermostTableLevel;$lvl++) { - for ($nid=1; $nid<=$this->tbctr[$lvl]; $nid++) { - $this->shrinkTable($this->table[$lvl][$nid],$this->shrin_k); - $this->_tableColumnWidth($this->table[$lvl][$nid],false); - } - } - } - - - // Set table cell widths for top level table - // Use $shrin_k to resize but don't change again - $this->SetLineHeight('',$this->table_lineheight); - - // Top level table - $this->_tableWidth($this->table[1][1]); - - // Now work through any nested tables setting child table[w'] = parent cell['w'] - // Now do nested tables _tableWidth - for($lvl=2;$lvl<=$this->innermostTableLevel;$lvl++) { - for ($nid=1; $nid<=$this->tbctr[$lvl]; $nid++) { - // HERE set child table width = cell width - - list($parentrow, $parentcol, $parentnid) = $this->table[$lvl][$nid]['nestedpos']; - if (isset($this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['colspan']) && $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['colspan']> 1) { - $parentwidth = 0; - for($cs=0;$cs<$this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['colspan'] ; $cs++) { - $parentwidth += $this->table[($lvl-1)][$parentnid]['wc'][$parentcol+$cs]; - } - } - else { $parentwidth = $this->table[($lvl-1)][$parentnid]['wc'][$parentcol]; } - - - //$parentwidth -= ALLOW FOR PADDING ETC.in parent cell - // mPDF 4.3.006 - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - if ($this->packTableData) { - list($bt,$br,$bb,$bl) = $this->_getBorderWidths($this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['borderbin']); - } - else { - $br = $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['border_details']['R']['w']; - $bl = $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['border_details']['L']['w']; - } - if ($this->table[$lvl-1][$parentnid]['borders_separate']) { - $parentwidth -= $br + $bl - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R'] - + $this->table[($lvl-1)][$parentnid]['border_spacing_H']; - } - else { - $parentwidth -= $br/2 + $bl/2 - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R']; - } - } - else if ($this->simpleTables){ - if ($this->table[$lvl-1][$parentnid]['borders_separate']) { - $parentwidth -= $this->table[($lvl-1)][$parentnid]['simple']['border_details']['L']['w'] - + $this->table[($lvl-1)][$parentnid]['simple']['border_details']['R']['w'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R'] - + $this->table[($lvl-1)][$parentnid]['border_spacing_H']; - } - else { - $parentwidth -= $this->table[($lvl-1)][$parentnid]['simple']['border_details']['L']['w']/2 - + $this->table[($lvl-1)][$parentnid]['simple']['border_details']['R']['w']/2 - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R']; - } - } - if (isset($this->table[$lvl][$nid]['wpercent']) && $this->table[$lvl][$nid]['wpercent'] && $lvl>1) { - $this->table[$lvl][$nid]['w'] = $parentwidth; - } - else if ($parentwidth > $this->table[$lvl][$nid]['maw']) { - $this->table[$lvl][$nid]['w'] = $this->table[$lvl][$nid]['maw']; - } - else { - $this->table[$lvl][$nid]['w'] = $parentwidth; - } - - $this->_tableWidth($this->table[$lvl][$nid]); - } - } - - // Starting at $this->innermostTableLevel - // Cascade back up nested tables: setting heights back up the tree - for($lvl=$this->innermostTableLevel;$lvl>0;$lvl--) { - for ($nid=1; $nid<=$this->tbctr[$lvl]; $nid++) { - list($tableheight,$maxrowheight,$fullpage,$remainingpage) = $this->_tableHeight($this->table[$lvl][$nid]); - } - } - if ($this->progressBar) { $this->UpdateProgressBar(7,20,' '); } // *PROGRESS-BAR* - - $recalculate = 1; - $forcerecalc = false; // mPDF 4.2.005 - // RESIZING ALGORITHM - if ($maxrowheight > $fullpage) { - $recalculate = $this->tbsqrt($maxrowheight / $fullpage, 1); - $forcerecalc = true; // mPDF 4.2.005 - } - else if ($this->table_rotate) { // NB $remainingpage == $fullpage == the width of the page - if ($tableheight > $remainingpage) { - // If can fit on remainder of page whilst respecting autsize value.. - if (($this->shrin_k * $this->tbsqrt($tableheight / $remainingpage, 1)) <= $this->shrink_this_table_to_fit) { - $recalculate = $this->tbsqrt($tableheight / $remainingpage, 1); - } - else if (!$added_page) { - $this->AddPage($this->CurOrientation); - $added_page = true; - $this->kwt_moved = true; - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5) - $this->kwt_height; - // mPDF 3.0 added 0.001 to force it to recalculate - $recalculate = (1 / $this->shrin_k) + 0.001; // undo any shrink - } - } - } - else if ($this->table_keep_together) { - if ($tableheight > $fullpage) { - if (($this->shrin_k * $this->tbsqrt($tableheight / $fullpage, 1)) <= $this->shrink_this_table_to_fit) { - $recalculate = $this->tbsqrt($tableheight / $fullpage, 1); - } - else if ($this->tableMinSizePriority) { // mPDF 4.5.006 - $this->table_keep_together = false; - $recalculate = 1.001; - } - else { - $this->AddPage($this->CurOrientation); - $added_page = true; - $this->kwt_moved = true; - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5) - $this->kwt_height; - $recalculate = $this->tbsqrt($tableheight / $fullpage, 1); - } - } - else if ($tableheight > $remainingpage) { - // If can fit on remainder of page whilst respecting autsize value.. - if (($this->shrin_k * $this->tbsqrt($tableheight / $remainingpage, 1)) <= $this->shrink_this_table_to_fit) { - $recalculate = $this->tbsqrt($tableheight / $remainingpage, 1); - } - else { - $this->AddPage($this->CurOrientation); - $added_page = true; - $this->kwt_moved = true; - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5) - $this->kwt_height; - // mPDF 3.0 added 0.001 to force it to recalculate - $recalculate = (1 / $this->shrin_k) + 0.001; // undo any shrink - } - } - } - else { $recalculate = 1; } - - if ($recalculate > $this->shrink_this_table_to_fit && !$forcerecalc) { $recalculate = $this->shrink_this_table_to_fit; } // mPDF 4.2.005 - - $iteration = 1; // mPDF 4.5.006 - - // RECALCULATE - while($recalculate <> 1) { - $this->shrin_k1 = $recalculate ; - $this->shrin_k *= $recalculate ; - $this->default_font_size /= ($this->shrin_k1) ; - $this->SetFontSize($this->default_font_size, false ); - $this->SetLineHeight('',$this->table_lineheight); - $this->table = $save_table; - if ($this->shrin_k <> 1) { $this->shrinkTable($this->table[1][1],$this->shrin_k); } - $this->_tableColumnWidth($this->table[1][1],false); // repeat - - // Starting at $this->innermostTableLevel - // Shrink table values - and redo columnWidth - for($lvl=2;$lvl<=$this->innermostTableLevel;$lvl++) { - for ($nid=1; $nid<=$this->tbctr[$lvl]; $nid++) { - if ($this->shrin_k <> 1) { $this->shrinkTable($this->table[$lvl][$nid],$this->shrin_k); } - $this->_tableColumnWidth($this->table[$lvl][$nid],false); - } - } - // Set table cell widths for top level table - - // Top level table - $this->_tableWidth($this->table[1][1]); - - // Now work through any nested tables setting child table[w'] = parent cell['w'] - // Now do nested tables _tableWidth - for($lvl=2;$lvl<=$this->innermostTableLevel;$lvl++) { - for ($nid=1; $nid<=$this->tbctr[$lvl]; $nid++) { - // HERE set child table width = cell width - - list($parentrow, $parentcol, $parentnid) = $this->table[$lvl][$nid]['nestedpos']; - if (isset($this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['colspan']) && $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['colspan']> 1) { - $parentwidth = 0; - for($cs=0;$cs<$this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['colspan'] ; $cs++) { - $parentwidth += $this->table[($lvl-1)][$parentnid]['wc'][$parentcol+$cs]; - } - } - else { $parentwidth = $this->table[($lvl-1)][$parentnid]['wc'][$parentcol]; } - - //$parentwidth -= ALLOW FOR PADDING ETC.in parent cell - // mPDF 4.3.006 - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - if ($this->packTableData) { - list($bt,$br,$bb,$bl) = $this->_getBorderWidths($this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['borderbin']); - } - else { - $br = $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['border_details']['R']['w']; - $bl = $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['border_details']['L']['w']; - } - if ($this->table[$lvl-1][$parentnid]['borders_separate']) { - $parentwidth -= $br + $bl - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R'] - + $this->table[($lvl-1)][$parentnid]['border_spacing_H']; - } - else { - $parentwidth -= $br/2 + $bl/2 - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R']; - } - } - else if ($this->simpleTables){ - if ($this->table[$lvl-1][$parentnid]['borders_separate']) { - $parentwidth -= $this->table[($lvl-1)][$parentnid]['simple']['border_details']['L']['w'] - + $this->table[($lvl-1)][$parentnid]['simple']['border_details']['R']['w'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R'] - + $this->table[($lvl-1)][$parentnid]['border_spacing_H']; - } - else { - $parentwidth -= ($this->table[($lvl-1)][$parentnid]['simple']['border_details']['L']['w'] - + $this->table[($lvl-1)][$parentnid]['simple']['border_details']['R']['w']) /2 - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['L'] - + $this->table[($lvl-1)][$parentnid]['cells'][$parentrow][$parentcol]['padding']['R']; - } - } - - if (isset($this->table[$lvl][$nid]['wpercent']) && $this->table[$lvl][$nid]['wpercent'] && $lvl>1) { - $this->table[$lvl][$nid]['w'] = $parentwidth; - } - else if ($parentwidth > $this->table[$lvl][$nid]['maw']) { - $this->table[$lvl][$nid]['w'] = $this->table[$lvl][$nid]['maw'] ; - } - else { - $this->table[$lvl][$nid]['w'] = $parentwidth; - } - $this->_tableWidth($this->table[$lvl][$nid]); - } - } - - - // Starting at $this->innermostTableLevel - // Cascade back up nested tables: setting heights back up the tree - for($lvl=$this->innermostTableLevel;$lvl>0;$lvl--) { - for ($nid=1; $nid<=$this->tbctr[$lvl]; $nid++) { - list($tableheight,$maxrowheight,$fullpage,$remainingpage) = $this->_tableHeight($this->table[$lvl][$nid]); - } - } - - // RESIZING ALGORITHM - - if ($maxrowheight > $fullpage) { $recalculate = $this->tbsqrt($maxrowheight / $fullpage, $iteration); $iteration++; } - else if ($this->table_rotate && $tableheight > $remainingpage && !$added_page) { - // If can fit on remainder of page whilst respecting autosize value.. - if (($this->shrin_k * $this->tbsqrt($tableheight / $remainingpage, $iteration)) <= $this->shrink_this_table_to_fit) { - $recalculate = $this->tbsqrt($tableheight / $remainingpage, $iteration); $iteration++; - } - else { - if (!$added_page) { - $this->AddPage($this->CurOrientation); - $added_page = true; - $this->kwt_moved = true; - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5) - $this->kwt_height; - } - // mPDF 3.0 added 0.001 to force it to recalculate - $recalculate = (1 / $this->shrin_k) + 0.001; // undo any shrink - } - } - else if ($this->table_keep_together) { - if ($tableheight > $fullpage) { - if (($this->shrin_k * $this->tbsqrt($tableheight / $fullpage, $iteration)) <= $this->shrink_this_table_to_fit) { - $recalculate = $this->tbsqrt($tableheight / $fullpage, $iteration); $iteration++; - } - else if ($this->tableMinSizePriority) { // mPDF 4.5.006 - $this->table_keep_together = false; - $recalculate = (1 / $this->shrin_k) + 0.001; - } - else { - if (!$added_page) { - $this->AddPage($this->CurOrientation); - $added_page = true; - $this->kwt_moved = true; - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5) - $this->kwt_height; - } - $recalculate = $this->tbsqrt($tableheight / $fullpage, $iteration); $iteration++; - } - } - else if ($tableheight > $remainingpage) { - // If can fit on remainder of page whilst respecting autosize value.. - if (($this->shrin_k * $this->tbsqrt($tableheight / $remainingpage, $iteration)) <= $this->shrink_this_table_to_fit) { - $recalculate = $this->tbsqrt($tableheight / $remainingpage, $iteration); $iteration++; - } - else { - if (!$added_page) { - $this->AddPage($this->CurOrientation); - $added_page = true; - $this->kwt_moved = true; - $this->tbrot_maxw = $this->h - ($this->y + $this->bMargin + 5) - $this->kwt_height; - } - // mPDF 4.0 - //$recalculate = $this->tbsqrt($tableheight / $fullpage, $iteration); $iteration++; - $recalculate = (1 / $this->shrin_k) + 0.001; // undo any shrink - } - } - else { $recalculate = 1; } - } - else { $recalculate = 1; } - } - - // keep-with-table: if page has advanced, print out buffer now, else done in fn. _Tablewrite() - if ($this->kwt_saved && $this->kwt_moved) { - $this->printkwtbuffer(); - $this->kwt_moved = false; - $this->kwt_saved = false; - } - - if ($this->progressBar) { $this->UpdateProgressBar(7,30,' '); } // *PROGRESS-BAR* - // Recursively writes all tables starting at top level - $this->_tableWrite($this->table[1][1]); - - if ($this->table_rotate && count($this->tablebuffer)) { - $this->PageBreakTrigger=$this->h-$this->bMargin; - $save_tr = $this->table_rotate; - $save_y = $this->y; - $this->table_rotate = 0; - $this->y = $this->tbrot_y0; - $h = $this->tbrot_w; - $this->DivLn($h,$this->blklvl,true); - - $this->table_rotate = $save_tr; - $this->y = $save_y; - - $this->printtablebuffer(); - } - - $this->table_rotate = 0; // flag used for table rotation - - $this->x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin']; - - // mPDF 4.2 - $this->blockjustfinished=true; - $this->lastblockbottommargin = $this->table[1][1]['margin']['B']; - //Reset values - - // Keep-with-table - $this->kwt = false; - $this->kwt_y0 = 0; - $this->kwt_x0 = 0; - $this->kwt_height = 0; - $this->kwt_buffer = array(); - $this->kwt_Links = array(); - $this->kwt_Annots = array(); - $this->kwt_moved = false; - $this->kwt_saved = false; - // mPDF 3.0 - $this->kwt_Reference = array(); - $this->kwt_BMoutlines = array(); - $this->kwt_toc = array(); - - $this->shrin_k = 1; - $this->shrink_this_table_to_fit = 0; - - unset($this->table); - $this->table=array(); //array - $this->tableLevel=0; - $this->tbctr=array(); - $this->innermostTableLevel=0; - $this->tbCSSlvl = 0; - $this->tablecascadeCSS = array(); - - unset($this->cell); - $this->cell=array(); //array - - $this->col=-1; //int - $this->row=-1; //int - $this->Reset(); - - $this->cellPaddingL = 0; - $this->cellPaddingT = 0; - $this->cellPaddingR = 0; - $this->cellPaddingB = 0; - $this->cMarginL = 0; - $this->cMarginT = 0; - $this->cMarginR = 0; - $this->cMarginB = 0; - $this->default_font_size = $this->original_default_font_size; - $this->default_font = $this->original_default_font; - $this->SetFontSize($this->default_font_size, false); - $this->SetFont($this->default_font,'',0,false); - $this->SetLineHeight(); - if (isset($this->blk[$this->blklvl]['InlineProperties'])) { $this->restoreInlineProperties($this->blk[$this->blklvl]['InlineProperties']);} - if ($this->progressBar) { $this->UpdateProgressBar(7,100,' '); } // *PROGRESS-BAR* - - } -/*-- END TABLES --*/ - - -/*-- LISTS --*/ - // *********** LISTS ******************** - - if($tag=='LI') { - $this->lastoptionaltag = ''; - unset($this->listcascadeCSS[$this->listCSSlvl]); - $this->listCSSlvl--; - if (isset($this->listoccur[$this->listlvl]) && isset($this->InlineProperties['LIST'][$this->listlvl][$this->listoccur[$this->listlvl]])) { $this->restoreInlineProperties($this->InlineProperties['LIST'][$this->listlvl][$this->listoccur[$this->listlvl]]); } - } - - - if(($tag=='UL') or ($tag=='OL')) { - $this->ignorefollowingspaces = true; //Eliminate exceeding left-side spaces - unset($this->listcascadeCSS[$this->listCSSlvl]); - $this->listCSSlvl--; - - $this->lastoptionaltag = ''; -/*-- TABLES --*/ - // A simple list for inside a table - if($this->tableLevel) { - $this->listlist[$this->listlvl]['MAXNUM'] = $this->listnum; //save previous lvl's maxnum - unset($this->listlist[$this->listlvl]); - $this->listlvl--; - if (isset($this->listlist[$this->listlvl]['MAXNUM'])) { $this->listnum = $this->listlist[$this->listlvl]['MAXNUM']; } // restore previous levels - if ($this->listlvl == 0) { $this->listjustfinished = true; } - return; - } -/*-- END TABLES --*/ - - if ($this->listlvl > 1) { // returning one level - $this->listjustfinished=true; - if (!empty($this->textbuffer)) { - $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl],$this->listitemtype); - } - // mPDF 3.0 - else { - $this->listnum--; - } - - $this->textbuffer = array(); - $occur = $this->listoccur[$this->listlvl]; - $this->listlist[$this->listlvl][$occur]['MAXNUM'] = $this->listnum; //save previous lvl's maxnum - $this->listlvl--; - $occur = $this->listoccur[$this->listlvl]; - $this->listnum = $this->listlist[$this->listlvl][$occur]['MAXNUM']; // recover previous level's number - $this->listtype = $this->listlist[$this->listlvl][$occur]['TYPE']; // recover previous level's type - if ($this->InlineProperties['LIST'][$this->listlvl][$occur]) { $this->restoreInlineProperties($this->InlineProperties['LIST'][$this->listlvl][$occur]); } - - } - else { // We are closing the last OL/UL tag - if (!empty($this->textbuffer)) { - $this->listitem[] = array($this->listlvl,$this->listnum,$this->textbuffer,$this->listoccur[$this->listlvl],$this->listitemtype); - } - // mPDF 3.0 - else { - $this->listnum--; - } - - $occur = $this->listoccur[$this->listlvl]; - $this->listlist[$this->listlvl][$occur]['MAXNUM'] = $this->listnum; - $this->textbuffer = array(); - $this->listlvl--; - - $this->printlistbuffer(); - unset($this->InlineProperties['LIST']); - // SPACING AFTER LIST (Top level only) - $this->Ln(0); - if ($this->list_margin_bottom) { - $this->DivLn($this->list_margin_bottom,$this->blklvl,true,1); // collapsible - } - if (isset($this->blk[$this->blklvl]['InlineProperties'])) { $this->restoreInlineProperties($this->blk[$this->blklvl]['InlineProperties']);} - $this->listjustfinished = true; - $this->listCSSlvl = 0; - $this->listcascadeCSS = array(); - // mPDF 4.2 - $this->blockjustfinished=true; - $this->lastblockbottommargin = $this->list_margin_bottom; - } - } -/*-- END LISTS --*/ - - -} - - -/*-- TABLES --*/ -// This function determines the shrink factor when resizing tables -// val is the table_height / page_height_available -// returns a scaling factor used as $shrin_k to resize the table -// Overcompensating will be quicker but may unnecessarily shrink table too much -// Undercompensating means it will reiterate more times (taking more processing time) -function tbsqrt($val, $iteration=3) { - $k = 4; // Alters number of iterations until it returns $val itself - Must be > 2 - // Probably best guess and most accurate - if ($iteration==1) return sqrt($val); - // Faster than using sqrt (because it won't undercompensate), and gives reasonable results - //return 1+(($val-1)/2); - if (2-(($iteration-2)/($k-2)) == 0) { return $val+0.00001; } // mPDF 4.5.005 - return 1+(($val-1)/(2-(($iteration-2)/($k-2)))); -} -/*-- END TABLES --*/ - - -/*-- LISTS --*/ -function printlistbuffer() { - //Save x coordinate - $x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin']; - $this->cMarginL = 0; - $this->cMarginR = 0; - $currIndentLvl = -1; - $lastIndent = array(); - $bak_page = $this->page; - $indent = 0; // mPDF 3.0 - foreach($this->listitem as $item) - { - // COLS - $oldcolumn = $this->CurrCol; - - $this->bulletarray = array(); - //Get list's buffered data - $this->listlvl = $lvl = $item[0]; - $num = $item[1]; - $this->textbuffer = $item[2]; - $occur = $item[3]; - if ($item[4]) { $type = $item[4]; } // listitemtype - else { $type = $this->listlist[$lvl][$occur]['TYPE']; } - $maxnum = $this->listlist[$lvl][$occur]['MAXNUM']; - $this->restoreInlineProperties($this->InlineProperties['LIST'][$lvl][$occur]); - $this->SetFont($this->FontFamily,$this->FontStyle,$this->FontSizePt,true,true); // force to write - $clh = $this->FontSize; - - // mPDF 4.2 - $this->SetLineHeight($this->FontSizePt,$this->list_lineheight[$lvl][$occur]); - $this->listOcc = $occur; - $this->listnum = $num; - - // Set the bullet fontsize - $bullfs = $this->InlineProperties['LISTITEM'][$lvl][$occur][$num]['size']; - - $space_width = $this->GetStringWidth(' ') * 1.5; - - //Set default width & height values - $this->divwidth = $this->blk[$this->blklvl]['inner_width']; - $this->divheight = $this->lineheight; - $typefont = $this->FontFamily; - switch($type) //Format type - { - case 'none': - $type = ''; - $blt_width = 0; - break; - case 'A': - $anum = $this->dec2alpha($num,true); - $maxnum = $this->dec2alpha($maxnum,true); - if ($this->directionality == 'rtl') { $type = $this->list_number_suffix . $anum; } - else { $type = $anum . $this->list_number_suffix; } - $blt_width = $this->GetStringWidth(str_repeat('W',strlen($maxnum)).$this->list_number_suffix); - break; - case 'a': - $anum = $this->dec2alpha($num,false); - $maxnum = $this->dec2alpha($maxnum,false); - if ($this->directionality == 'rtl') { $type = $this->list_number_suffix . $anum; } - else { $type = $anum . $this->list_number_suffix; } - $blt_width = $this->GetStringWidth(str_repeat('m',strlen($maxnum)).$this->list_number_suffix); - break; - case 'I': - $anum = $this->dec2roman($num,true); - if ($this->directionality == 'rtl') { $type = $this->list_number_suffix . $anum; } - else { $type = $anum . $this->list_number_suffix; } - // mPDF 4.0 - if ($maxnum>87) { $bbit = 87; } - else if ($maxnum>86) { $bbit = 86; } - else if ($maxnum>37) { $bbit = 38; } - else if ($maxnum>36) { $bbit = 37; } - else if ($maxnum>27) { $bbit = 28; } - else if ($maxnum>26) { $bbit = 27; } - else if ($maxnum>17) { $bbit = 18; } - else if ($maxnum>16) { $bbit = 17; } - else if ($maxnum>7) { $bbit = 8; } - else if ($maxnum>6) { $bbit = 7; } - else if ($maxnum>3) { $bbit = 4; } - else { $bbit = $maxnum; } - $maxlnum = $this->dec2roman($bbit,true); - $blt_width = $this->GetStringWidth($maxlnum.$this->list_number_suffix); - break; - case 'i': - $anum = $this->dec2roman($num,false); - if ($this->directionality == 'rtl') { $type = $this->list_number_suffix . $anum; } - else { $type = $anum . $this->list_number_suffix; } - // mPDF 4.0 - if ($maxnum>87) { $bbit = 87; } - else if ($maxnum>86) { $bbit = 86; } - else if ($maxnum>37) { $bbit = 38; } - else if ($maxnum>36) { $bbit = 37; } - else if ($maxnum>27) { $bbit = 28; } - else if ($maxnum>26) { $bbit = 27; } - else if ($maxnum>17) { $bbit = 18; } - else if ($maxnum>16) { $bbit = 17; } - else if ($maxnum>7) { $bbit = 8; } - else if ($maxnum>6) { $bbit = 7; } - else if ($maxnum>3) { $bbit = 4; } - else { $bbit = $maxnum; } - $maxlnum = $this->dec2roman($bbit,false); - // mPDF 4.0 - $blt_width = $this->GetStringWidth($maxlnum.$this->list_number_suffix); - break; - case 'disc': - // mPDF 4.2.018 - if ($this->PDFA) { - if (isset($this->CurrentFont['cw'][8226])) { $type = "\xe2\x80\xa2"; } // • - else { $type = '-'; } - $blt_width = $this->GetStringWidth($type); - break; - } - $type = $this->chrs[108]; // bullet disc in Zapfdingbats 'l' - $typefont = 'zapfdingbats'; - $blt_width = (0.791 * $this->FontSize/2.5); - break; - case 'circle': - // mPDF 4.2.018 - if ($this->PDFA) { - if (isset($this->CurrentFont['cw'][9900])) { $type = "\xe2\x9a\xac"; } // ⚬ - else { $type = '-'; } - $blt_width = $this->GetStringWidth($type); - break; - } - $type = $this->chrs[109]; // circle in Zapfdingbats 'm' - $typefont = 'zapfdingbats'; - $blt_width = (0.873 * $this->FontSize/2.5); - break; - case 'square': - // mPDF 4.2.018 - if ($this->PDFA) { - if (isset($this->CurrentFont['cw'][9642])) { $type = "\xe2\x96\xaa"; } // ▪ - else { $type = '-'; } - $blt_width = $this->GetStringWidth($type); - break; - } - $type = $this->chrs[110]; //black square in Zapfdingbats font 'n' - $typefont = 'zapfdingbats'; - $blt_width = (0.761 * $this->FontSize/2.5); - break; - case '1': - default: - if ($this->directionality == 'rtl') { $type = $this->list_number_suffix . $num; } - else { $type = $num . $this->list_number_suffix; } - $blt_width = $this->GetStringWidth(str_repeat('5',strlen($maxnum)).$this->list_number_suffix); - break; - } - if ($currIndentLvl < $lvl) { - if ($lvl > 1 || $this->list_indent_first_level) { - $indent += $this->list_indent[$lvl][$occur]; - $lastIndent[$lvl] = $this->list_indent[$lvl][$occur]; - } - } - else if ($currIndentLvl > $lvl) { - while ($currIndentLvl > $lvl) { - $indent -= $lastIndent[$currIndentLvl]; - $currIndentLvl--; - } - } - $currIndentLvl = $lvl; - - // mPDF 3.0 - if (isset($this->list_align[$this->listlvl][$occur])) { $this->divalign = $this->list_align[$this->listlvl][$occur]; } - else { $this->divalign = ''; } - -/*-- RTL --*/ - - if ($this->directionality == 'rtl') { - // mPDF 4.0 - if ($this->list_align_style == 'L') { $lalign = 'R'; } - else { $lalign = 'L'; } - $this->divwidth = $this->blk[$this->blklvl]['width'] - ($indent + $blt_width + $space_width) ; - $xb = $this->blk[$this->blklvl]['inner_width'] + $this->blk[$this->blklvl]['border_left']['w'] + $this->blk[$this->blklvl]['padding_left'] - $indent - $blt_width; //Bullet position (relative) - //Output bullet - $this->bulletarray = array('w'=>$blt_width,'h'=>$clh,'txt'=>$type,'x'=>$xb,'align'=>$lalign,'font'=>$typefont,'level'=>$lvl, 'occur'=>$occur, 'num'=>$num, 'fontsize'=>$bullfs ); - $this->x = $x; - } - else { -/*-- END RTL --*/ - // mPDF 4.0 - if ($this->list_align_style == 'L') { $lalign = 'L'; } - else { $lalign = 'R'; } - $this->divwidth = $this->blk[$this->blklvl]['width'] - ($indent + $blt_width + $space_width) ; - $xb = $this->blk[$this->blklvl]['padding_left'] + $this->blk[$this->blklvl]['border_left']['w'] - $blt_width - $space_width; - //Output bullet - $this->bulletarray = array('w'=>$blt_width,'h'=>$clh,'txt'=>$type,'x'=>$xb,'align'=>$lalign,'font'=>$typefont,'level'=>$lvl, 'occur'=>$occur, 'num'=>$num, 'fontsize'=>$bullfs ); - $this->x = $x + $indent + $blt_width + $space_width; - } // *RTL* - - //Print content - $this->printbuffer($this->textbuffer,'',false,true); - $this->textbuffer=array(); - - // Added to correct for OddEven Margins - if ($this->page != $bak_page) { - if (($this->page-$bak_page) % 2 == 1) { // mPDF 4.2.022 - $x += $this->MarginCorrection; - } - $bak_page = $this->page; - } -/*-- COLUMNS --*/ - // OR COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - if ($this->directionality == 'rtl') { // *RTL* - $x -= ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); // *RTL* - } // *RTL* - else { // *RTL* - $x += ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); - } // *RTL* - $oldcolumn = $this->CurrCol; - } -/*-- END COLUMNS --*/ - - } - - //Reset all used values - $this->listoccur = array(); - $this->listitem = array(); - $this->listlist = array(); - $this->listlvl = 0; - $this->listnum = 0; - $this->listtype = ''; - $this->textbuffer = array(); - $this->divwidth = 0; - $this->divheight = 0; - $this->x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin']; -} -/*-- END LISTS --*/ - - -function printbuffer($arrayaux,$blockstate=0,$is_table=false,$is_list=false) -{ -// $blockstate = 0; // NO margins/padding -// $blockstate = 1; // Top margins/padding only -// $blockstate = 2; // Bottom margins/padding only -// $blockstate = 3; // Top & bottom margins/padding - $this->spanbgcolorarray = array(); - $this->spanbgcolor = false; - $paint_ht_corr = 0; - -/*-- CSS-FLOAT --*/ - if (count($this->floatDivs)) { - list($l_exists, $r_exists, $l_max, $r_max, $l_width, $r_width) = $this->GetFloatDivInfo($this->blklvl); - if (($this->blk[$this->blklvl]['inner_width']-$l_width-$r_width) < $this->GetStringWidth('WW')) { - // Too narrow to fit - try to move down past L or R float - if ($l_max < $r_max && ($this->blk[$this->blklvl]['inner_width']-$r_width) > $this->GetStringWidth('WW')) { - $this->ClearFloats('LEFT', $this->blklvl); - } - else if ($r_max < $l_max && ($this->blk[$this->blklvl]['inner_width']-$l_width) > $this->GetStringWidth('WW')) { - $this->ClearFloats('RIGHT', $this->blklvl); - } - else { $this->ClearFloats('BOTH', $this->blklvl); } - } - } -/*-- END CSS-FLOAT --*/ - $bak_y = $this->y; - $bak_x = $this->x; - $align = ''; - if (!$is_table && !$is_list) { - if (isset($this->blk[$this->blklvl]['align']) && $this->blk[$this->blklvl]['align']) { $align = $this->blk[$this->blklvl]['align']; } - // Block-align is set by e.g. <.. align="center"> Takes priority for this block but not inherited - if (isset($this->blk[$this->blklvl]['block-align']) && $this->blk[$this->blklvl]['block-align']) { $align = $this->blk[$this->blklvl]['block-align']; } - $this->divwidth = $this->blk[$this->blklvl]['width']; - } - else { - $align = $this->divalign; - } - $oldpage = $this->page; - - // ADDED for Out of Block now done as Flowing Block - if ($this->divwidth == 0) { - $this->divwidth = $this->pgwidth; - } - - if (!$is_table && !$is_list) { $this->SetLineHeight($this->FontSizePt,$this->blk[$this->blklvl]['line_height']); } - $this->divheight = $this->lineheight; - $old_height = $this->divheight; - - // As a failsafe - if font has been set but not output to page - $this->SetFont($this->default_font,'',$this->default_font_size,true,true); // force output to page - - $array_size = count($arrayaux); - $this->newFlowingBlock( $this->divwidth,$this->divheight,$align,$is_table,$is_list,$blockstate,true); // true = newblock - - // Added - Otherwise

    did not output top margins/padding for 1st/2nd div - if ($array_size == 0) { $this->finishFlowingBlock(true); } // true = END of flowing block - - for($i=0;$i < $array_size; $i++) - { - - // COLS - $oldcolumn = $this->CurrCol; - - $vetor = $arrayaux[$i]; - if ($i == 0 and $vetor[0] != "\n" and !$this->ispre) { - $vetor[0] = ltrim($vetor[0]); - } - - // FIXED TO ALLOW IT TO SHOW '0' - if (empty($vetor[0]) && !($vetor[0]==='0') && empty($vetor[7])) { //Ignore empty text and not carrying an internal link - //Check if it is the last element. If so then finish printing the block - if ($i == ($array_size-1)) { $this->finishFlowingBlock(true); } // true = END of flowing block - continue; - } - - - //Activating buffer properties - if(isset($vetor[11]) and $vetor[11] != '') { // Font Size - if ($is_table && $this->shrin_k) { - $this->SetFontSize($vetor[11]/$this->shrin_k,false); - } - else { - $this->SetFontSize($vetor[11],false); - } - } - if(isset($vetor[10]) and !empty($vetor[10])) //Background color - { - $this->spanbgcolorarray = $vetor[10]; - $this->spanbgcolor = true; - } - if(isset($vetor[9]) and !empty($vetor[9])) // Outline parameters - { - $cor = $vetor[9]['COLOR']; - $outlinewidth = $vetor[9]['WIDTH']; - $this->SetTextOutline($outlinewidth,$cor['R'],$cor['G'],$cor['B']); - $this->outline_on = true; - } - if(isset($vetor[8]) and $vetor[8] === true) // strike-through the text - { - $this->strike = true; - } - if(isset($vetor[7]) and $vetor[7] != '') // internal link: - { - if ($this->ColActive) { $ily = $this->y0; } else { $ily = $this->y; } // use top of columns - $this->internallink[$vetor[7]] = array("Y"=>$ily,"PAGE"=>$this->page ); - if (empty($vetor[0])) { //Ignore empty text - //Check if it is the last element. If so then finish printing the block - if ($i == ($array_size-1)) { $this->finishFlowingBlock(true); } // true = END of flowing block - continue; - } - } - if(isset($vetor[6]) and $vetor[6] === true) // Subscript - { - $this->SUB = true; - } - if(isset($vetor[5]) and $vetor[5] === true) // Superscript - { - $this->SUP = true; - } - if(isset($vetor[4]) and $vetor[4] != '') { // Font Family - $font = $this->SetFont($vetor[4],$this->FontStyle,0,false); - } - if (!empty($vetor[3])) //Font Color - { - $cor = $vetor[3]; - $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); - } - if(isset($vetor[2]) and $vetor[2] != '') //Bold,Italic,Underline styles - { - if (strpos($vetor[2],"B") !== false) $this->SetStyle('B',true); - if (strpos($vetor[2],"I") !== false) $this->SetStyle('I',true); - if (strpos($vetor[2],"U") !== false) $this->SetStyle('U',true); - } - // mPDF 4.2 - if(isset($vetor[12]) and $vetor[12] != '') { //Requested Bold,Italic,Underline - $this->ReqFontStyle = $vetor[12]; - } - if(isset($vetor[1]) and $vetor[1] != '') //LINK - { - // mPDF 3.0 - if (strpos($vetor[1],".") === false && strpos($vetor[1],"@") !== 0) //assuming every external link has a dot indicating extension (e.g: .html .txt .zip www.somewhere.com etc.) - { - //Repeated reference to same anchor? - while(array_key_exists($vetor[1],$this->internallink)) $vetor[1]="#".$vetor[1]; - $this->internallink[$vetor[1]] = $this->AddLink(); - $vetor[1] = $this->internallink[$vetor[1]]; - } - $this->HREF = $vetor[1]; // HREF link style set here ****** - } - - // SPECIAL CONTENT - IMAGES & FORM OBJECTS - //Print-out special content - // mPDF 3.0 - if (substr($vetor[0],0,3) == "\xbb\xa4\xac") { //identifier has been identified! - // mPDF 4.0 - $objattr = $this->_getObjAttr($vetor[0]); - -/*-- TABLES --*/ - if ($objattr['type'] == 'nestedtable') { - $level = $objattr['level']; - $table = &$this->table[$level][$objattr['table']]; - $cell = &$table['cells'][$objattr['row']][$objattr['col']]; - if ($objattr['nestedcontent']) { - $this->finishFlowingBlock(false,'nestedtable'); // mPDF 4.3.003 - $save_dw = $this->divwidth ; - $save_buffer = $this->cellBorderBuffer; - $this->cellBorderBuffer = array(); - $ncx = $this->x; - - //$w = $cell['w']; // parent cell width // mPDF 3.0 ? not needed - - list($dummyx,$w) = $this->_tableGetWidth($table, $objattr['row'], $objattr['col']); - $ntw = $this->table[($level+1)][$objattr['nestedcontent']]['w']; // nested table width - if (!$this->simpleTables){ // mPDF 4.2.017 - if ($table['borders_separate']) { - $innerw = $w - $cell['border_details']['L']['w'] - $cell['border_details']['R']['w'] - $cell['padding']['L'] - $cell['padding']['R'] - $table['border_spacing_H']; - } - else { - $innerw = $w - $cell['border_details']['L']['w']/2 - $cell['border_details']['R']['w']/2 - $cell['padding']['L'] - $cell['padding']['R']; - } - } - else if ($this->simpleTables){ - // mPDF 4.3.006 - if ($table['borders_separate']) { - $innerw = $w - $table['simple']['border_details']['L']['w'] - $table['simple']['border_details']['R']['w'] - $cell['padding']['L'] - $cell['padding']['R'] - $table['border_spacing_H']; - } - else { - $innerw = $w - $table['simple']['border_details']['L']['w']/2 - $table['simple']['border_details']['R']['w']/2 - $cell['padding']['L'] - $cell['padding']['R']; - } - } - if ($cell['a']=='C' || $this->table[($level+1)][$objattr['nestedcontent']]['a']=='C') { - $ncx += ($innerw-$ntw)/2; - } - elseif ($cell['a']=='R' || $this->table[($level+1)][$objattr['nestedcontent']]['a']=='R') { - $ncx += $innerw- $ntw; - } - $this->x = $ncx ; - - $this->_tableWrite($this->table[($level+1)][$objattr['nestedcontent']]); - $this->cellBorderBuffer = $save_buffer; - $this->x = $bak_x ; - $this->divwidth = $save_dw; - $this->newFlowingBlock( $this->divwidth,$this->divheight,$align,$is_table,$is_list,$blockstate,false); - } - } - else { -/*-- END TABLES --*/ - if ($is_table) { // *TABLES* - $maxWidth = $this->divwidth; // *TABLES* - } // *TABLES* - else { // *TABLES* - $maxWidth = $this->divwidth - ($this->blk[$this->blklvl]['padding_left'] + $this->blk[$this->blklvl]['border_left']['w'] + $this->blk[$this->blklvl]['padding_right'] + $this->blk[$this->blklvl]['border_right']['w']); - } // *TABLES* - -/*-- CSS-IMAGE-FLOAT --*/ - // If float (already) exists at this level - if (isset($this->floatmargins['R']) && $this->y <= $this->floatmargins['R']['y1'] && $this->y >= $this->floatmargins['R']['y0']) { $maxWidth -= $this->floatmargins['R']['w']; } - if (isset($this->floatmargins['L']) && $this->y <= $this->floatmargins['L']['y1'] && $this->y >= $this->floatmargins['L']['y0']) { $maxWidth -= $this->floatmargins['L']['w']; } -/*-- END CSS-IMAGE-FLOAT --*/ - - list($skipln) = $this->inlineObject($objattr['type'], '', $this->y, $objattr,$this->lMargin, ($this->flowingBlockAttr['contentWidth']/$this->k), $maxWidth, $this->flowingBlockAttr['height'], false, $is_table); - // 1 -> New line needed because of width - // -1 -> Will fit width on line but NEW PAGE REQUIRED because of height - // -2 -> Will not fit on line therefore needs new line but thus NEW PAGE REQUIRED - $iby = $this->y; - $oldpage = $this->page; - $oldcol = $this->CurrCol; // mPDF 4.2 - if (($skipln == 1 || $skipln == -2) && !isset($objattr['float'])) { - $this->finishFlowingBlock(false,$objattr['type']); // mPDF 4.3.003 - $this->newFlowingBlock( $this->divwidth,$this->divheight,$align,$is_table,$is_list,$blockstate,false); //false=newblock - } - $thispage = $this->page; - if ($this->CurrCol!=$oldcol) { $changedcol = true; } // mPDF 4.2 - else { $changedcol=false; } - - // mPDF 4.2 Don't if column already changed (in finishFlowingblock) - // the previous lines can already have triggered page break or column change - if (!$changedcol && $skipln <0 && $this->AcceptPageBreak() && $thispage==$oldpage) { - - $this->AddPage($this->CurOrientation); - - // Added to correct Images already set on line before page advanced - // i.e. if second inline image on line is higher than first and forces new page - if (count($this->objectbuffer)) { - $yadj = $iby - $this->y; - foreach($this->objectbuffer AS $ib=>$val) { - if ($this->objectbuffer[$ib]['OUTER-Y'] ) $this->objectbuffer[$ib]['OUTER-Y'] -= $yadj; - if ($this->objectbuffer[$ib]['BORDER-Y']) $this->objectbuffer[$ib]['BORDER-Y'] -= $yadj; - if ($this->objectbuffer[$ib]['INNER-Y']) $this->objectbuffer[$ib]['INNER-Y'] -= $yadj; - } - } - } - - - // Added to correct for OddEven Margins - if ($this->page != $oldpage) { - if (($this->page-$oldpage) % 2 == 1) { // mPDF 4.2.022 - $bak_x += $this->MarginCorrection; - } - $oldpage = $this->page; - $y = $this->tMargin - $paint_ht_corr ; - $this->oldy = $this->tMargin - $paint_ht_corr ; - $old_height = 0; - } - $this->x = $bak_x; -/*-- COLUMNS --*/ - // COLS - // OR COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - if ($this->directionality == 'rtl') { // *RTL* - $bak_x -= ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); // *RTL* - } // *RTL* - else { // *RTL* - $bak_x += ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); - } // *RTL* - $this->x = $bak_x; - $oldcolumn = $this->CurrCol; - $y = $this->y0 - $paint_ht_corr ; - $this->oldy = $this->y0 - $paint_ht_corr ; - $old_height = 0; - } -/*-- END COLUMNS --*/ - -/*-- CSS-IMAGE-FLOAT --*/ - if ($objattr['type'] == 'image' && isset($objattr['float'])) { - $fy = $this->y; - - // DIV TOP MARGIN/BORDER/PADDING - if ($this->flowingBlockAttr['newblock'] && ($this->flowingBlockAttr['blockstate']==1 || $this->flowingBlockAttr['blockstate']==3) && $this->flowingBlockAttr['lineCount']== 0) { - $fy += $this->blk[$this->blklvl]['margin_top'] + $this->blk[$this->blklvl]['padding_top'] + $this->blk[$this->blklvl]['border_top']['w']; - } - - if ($objattr['float']=='R') { - $fx = $this->w - $this->rMargin - $objattr['width'] - ($this->blk[$this->blklvl]['outer_right_margin'] + $this->blk[$this->blklvl]['border_right']['w'] + $this->blk[$this->blklvl]['padding_right']); - - - } - else if ($objattr['float']=='L') { - $fx = $this->lMargin + ($this->blk[$this->blklvl]['outer_left_margin'] + $this->blk[$this->blklvl]['border_left']['w'] + $this->blk[$this->blklvl]['padding_left']); - } - $w = $objattr['width']; - $h = abs($objattr['height']); - - $widthLeft = $maxWidth - ($this->flowingBlockAttr['contentWidth']/$this->k); - $maxHeight = $this->h - ($this->tMargin + $this->margin_header + $this->bMargin + 10) ; - // For Images - $extraWidth = ($objattr['border_left']['w'] + $objattr['border_right']['w'] + $objattr['margin_left']+ $objattr['margin_right']); - $extraHeight = ($objattr['border_top']['w'] + $objattr['border_bottom']['w'] + $objattr['margin_top']+ $objattr['margin_bottom']); - - // mPDF 4.3.013 SVG files - if ($objattr['itype'] == 'wmf' || $objattr['itype'] == 'svg') { - $file = $objattr['file']; - $info=$this->formobjects[$file]; - } - else { - $file = $objattr['file']; - $info=$this->images[$file]; - } - // Automatically resize to width remaining - ********** If > maxWidth ******* -// if ($w > $widthLeft) { -// $w = $widthLeft ; -// $h=abs($w*$info['h']/$info['w']); -// } - $img_w = $w - $extraWidth ; - $img_h = $h - $extraHeight ; - if ($objattr['border_left']['w']) { - $objattr['BORDER-WIDTH'] = $img_w + (($objattr['border_left']['w'] + $objattr['border_right']['w'])/2) ; - $objattr['BORDER-HEIGHT'] = $img_h + (($objattr['border_top']['w'] + $objattr['border_bottom']['w'])/2) ; - $objattr['BORDER-X'] = $fx + $objattr['margin_left'] + (($objattr['border_left']['w'])/2) ; - $objattr['BORDER-Y'] = $fy + $objattr['margin_top'] + (($objattr['border_top']['w'])/2) ; - } - $objattr['INNER-WIDTH'] = $img_w; - $objattr['INNER-HEIGHT'] = $img_h; - $objattr['INNER-X'] = $fx + $objattr['margin_left'] + ($objattr['border_left']['w']); - $objattr['INNER-Y'] = $fy + $objattr['margin_top'] + ($objattr['border_top']['w']) ; - $objattr['ID'] = $info['i']; - $objattr['OUTER-WIDTH'] = $w; - $objattr['OUTER-HEIGHT'] = $h; - $objattr['OUTER-X'] = $fx; - $objattr['OUTER-Y'] = $fy; - if ($objattr['float']=='R') { - // If R float already exists at this level - $this->floatmargins['R']['skipline'] = false; // mPDF 3.0 - if (isset($this->floatmargins['R']['y1']) && $this->floatmargins['R']['y1'] > 0 && $fy < $this->floatmargins['R']['y1']) { - $this->WriteFlowingBlock($vetor[0]); - } - // If L float already exists at this level - else if (isset($this->floatmargins['L']['y1']) && $this->floatmargins['L']['y1'] > 0 && $fy < $this->floatmargins['L']['y1']) { - // Final check distance between floats is not now too narrow to fit text - $mw = $this->GetStringWidth('WW'); - if (($this->blk[$this->blklvl]['inner_width'] - $w - $this->floatmargins['L']['w']) < $mw) { - $this->WriteFlowingBlock($vetor[0]); - } - else { - $this->floatmargins['R']['x'] = $fx; - $this->floatmargins['R']['w'] = $w; - $this->floatmargins['R']['y0'] = $fy; - $this->floatmargins['R']['y1'] = $fy + $h; - if ($skipln == 1) { - $this->floatmargins['R']['skipline'] = true; - $this->floatmargins['R']['id'] = count($this->floatbuffer)+0; - $objattr['skipline'] = true; - } - $this->floatbuffer[] = $objattr; - } - } - else { - $this->floatmargins['R']['x'] = $fx; - $this->floatmargins['R']['w'] = $w; - $this->floatmargins['R']['y0'] = $fy; - $this->floatmargins['R']['y1'] = $fy + $h; - if ($skipln == 1) { - $this->floatmargins['R']['skipline'] = true; - $this->floatmargins['R']['id'] = count($this->floatbuffer)+0; - $objattr['skipline'] = true; - } - $this->floatbuffer[] = $objattr; - } - } - else if ($objattr['float']=='L') { - // If L float already exists at this level - $this->floatmargins['L']['skipline'] = false; // mPDF 3.0 - if (isset($this->floatmargins['L']['y1']) && $this->floatmargins['L']['y1'] > 0 && $fy < $this->floatmargins['L']['y1']) { - $this->floatmargins['L']['skipline'] = false; // mPDF 3.0 - $this->WriteFlowingBlock($vetor[0]); - } - // If R float already exists at this level - else if (isset($this->floatmargins['R']['y1']) && $this->floatmargins['R']['y1'] > 0 && $fy < $this->floatmargins['R']['y1']) { - // Final check distance between floats is not now too narrow to fit text - $mw = $this->GetStringWidth('WW'); - if (($this->blk[$this->blklvl]['inner_width'] - $w - $this->floatmargins['R']['w']) < $mw) { - $this->WriteFlowingBlock($vetor[0]); - } - else { - $this->floatmargins['L']['x'] = $fx + $w; - $this->floatmargins['L']['w'] = $w; - $this->floatmargins['L']['y0'] = $fy; - $this->floatmargins['L']['y1'] = $fy + $h; - if ($skipln == 1) { - $this->floatmargins['L']['skipline'] = true; - $this->floatmargins['L']['id'] = count($this->floatbuffer)+0; - $objattr['skipline'] = true; - } - $this->floatbuffer[] = $objattr; - } - } - else { - $this->floatmargins['L']['x'] = $fx + $w; - $this->floatmargins['L']['w'] = $w; - $this->floatmargins['L']['y0'] = $fy; - $this->floatmargins['L']['y1'] = $fy + $h; - if ($skipln == 1) { - $this->floatmargins['L']['skipline'] = true; - $this->floatmargins['L']['id'] = count($this->floatbuffer)+0; - $objattr['skipline'] = true; - } - $this->floatbuffer[] = $objattr; - } - } - } - else { -/*-- END CSS-IMAGE-FLOAT --*/ - $this->WriteFlowingBlock($vetor[0]); -/*-- CSS-IMAGE-FLOAT --*/ - } -/*-- END CSS-IMAGE-FLOAT --*/ - } // *TABLES* - - } // END If special content - - else { //THE text - if ($this->tableLevel) { $paint_ht_corr = 0; } // To move the y up when new column/page started if div border needed - else { $paint_ht_corr = $this->blk[$this->blklvl]['border_top']['w']; } - - if ($vetor[0] == "\n") { //We are reading a
    now turned into newline ("\n") - if ($this->flowingBlockAttr['content']) { - $this->finishFlowingBlock(false,'br'); // mPDF 4.3.003 - } - else if ($is_table) { - $this->y+= $this->_computeLineheight($this->table_lineheight); - } - else if (!$is_table) { - $this->DivLn($this->lineheight); - if ($this->ColActive) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - } - // Added to correct for OddEven Margins - if ($this->page != $oldpage) { - if (($this->page-$oldpage) % 2 == 1) { // mPDF 4.2.022 - $bak_x += $this->MarginCorrection; - } - $oldpage = $this->page; - $y = $this->tMargin - $paint_ht_corr ; - $this->oldy = $this->tMargin - $paint_ht_corr ; - $old_height = 0; - } - $this->x = $bak_x; -/*-- COLUMNS --*/ - // COLS - // OR COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - if ($this->directionality == 'rtl') { // *RTL* - $bak_x -= ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); // *RTL* - } // *RTL* - else { // *RTL* - $bak_x += ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); - } // *RTL* - $this->x = $bak_x; - $oldcolumn = $this->CurrCol; - $y = $this->y0 - $paint_ht_corr ; - $this->oldy = $this->y0 - $paint_ht_corr ; - $old_height = 0; - } -/*-- END COLUMNS --*/ - $this->newFlowingBlock( $this->divwidth,$this->divheight,$align,$is_table,$is_list,$blockstate,false); // false = newblock - } - else { - $this->WriteFlowingBlock( $vetor[0]); - - // Added to correct for OddEven Margins - if ($this->page != $oldpage) { - if (($this->page-$oldpage) % 2 == 1) { // mPDF 4.2.022 - $bak_x += $this->MarginCorrection; - $this->x = $bak_x; - } - $oldpage = $this->page; - $y = $this->tMargin - $paint_ht_corr ; - $this->oldy = $this->tMargin - $paint_ht_corr ; - $old_height = 0; - } -/*-- COLUMNS --*/ - // COLS - // OR COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - if ($this->directionality == 'rtl') { // *RTL* - $bak_x -= ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); // *RTL* - } // *RTL* - else { // *RTL* - $bak_x += ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); - } // *RTL* - $this->x = $bak_x; - $oldcolumn = $this->CurrCol; - $y = $this->y0 - $paint_ht_corr ; - $this->oldy = $this->y0 - $paint_ht_corr ; - $old_height = 0; - } -/*-- END COLUMNS --*/ - } - - - } - - //Check if it is the last element. If so then finish printing the block - if ($i == ($array_size-1)) { - $this->finishFlowingBlock(true); // true = END of flowing block - // Added to correct for OddEven Margins - if ($this->page != $oldpage) { - if (($this->page-$oldpage) % 2 == 1) { // mPDF 4.2.022 - $bak_x += $this->MarginCorrection; - $this->x = $bak_x; - } - $oldpage = $this->page; - $y = $this->tMargin - $paint_ht_corr ; - $this->oldy = $this->tMargin - $paint_ht_corr ; - $old_height = 0; - } - -/*-- COLUMNS --*/ - // COLS - // OR COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - if ($this->directionality == 'rtl') { // *RTL* - $bak_x -= ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); // *RTL* - } // *RTL* - else { // *RTL* - $bak_x += ($this->CurrCol - $oldcolumn) * ($this->ColWidth+$this->ColGap); - } // *RTL* - $this->x = $bak_x; - $oldcolumn = $this->CurrCol; - $y = $this->y0 - $paint_ht_corr ; - $this->oldy = $this->y0 - $paint_ht_corr ; - $old_height = 0; - } -/*-- END COLUMNS --*/ - - } - - - // RESETTING VALUES - $this->SetTextColor(0); - $this->SetDrawColor(0); - $this->SetFillColor(255); - $this->colorarray = array(); - $this->spanbgcolorarray = array(); - $this->spanbgcolor = false; - $this->issetcolor = false; - $this->HREF = ''; - $this->outlineparam = array(); - $this->SetTextOutline(false); - $this->outline_on = false; - $this->SUP = false; - $this->SUB = false; - - $this->strike = false; - - $this->currentfontfamily = ''; - $this->currentfontsize = ''; - $this->currentfontstyle = ''; -/*-- TABLES --*/ - if ($this->tableLevel) { - $this->SetLineHeight('',$this->table_lineheight); // *TABLES* - } - else -/*-- END TABLES --*/ -/*-- LISTS --*/ - if ($is_list && $this->list_lineheight[$this->listlvl][$this->bulletarray['occur']]) { - //$this->SetLineHeight('',$this->list_lineheight[$this->listlvl][$this->bulletarray['occur']]); // sets default line height - // mPDF 4.2 - $this->SetLineHeight('',$this->list_lineheight[$this->listlvl][$this->listOcc]); // sets default line height - } - else -/*-- END LISTS --*/ - if (isset($this->blk[$this->blklvl]['line_height']) && $this->blk[$this->blklvl]['line_height']) { - $this->SetLineHeight('',$this->blk[$this->blklvl]['line_height']); // sets default line height - } - $this->SetStyle('B',false); - $this->SetStyle('I',false); - $this->SetStyle('U',false); - $this->toupper = false; - $this->tolower = false; - $this->SetDash(); //restore to no dash - $this->dash_on = false; - $this->dotted_on = false; - - }//end of for(i=0;iblk[$this->blklvl]['border']) || isset($this->blk[$this->blklvl]['bgcolor'])) && $blockstate && ($this->y != $this->oldy)) { - $bottom_y = $this->y; // Does not include Bottom Margin - // mPDF 4.2 Added blockstate - if (isset($this->blk[$this->blklvl]['startpage']) && $this->blk[$this->blklvl]['startpage'] != $this->page && $blockstate != 1) { - $this->PaintDivBB('pagetop',$blockstate); - } - // mPDF 3.0 - else if ($blockstate != 1) { - $this->PaintDivBB('',$blockstate); - } - $this->y = $bottom_y; - $this->x = $bak_x; - } - - // Reset Font - $this->SetFontSize($this->default_font_size,false); - - -} - -// mPDF 4.0 -function _setDashBorder($style, $div, $cp, $side) { - if ($style == 'dashed' && (($side=='L' || $side=='R') || ($side=='T' && $div != 'pagetop' && !$cp) || ($side=='B' && $div!='pagebottom') )) { - $dashsize = 2; // final dash will be this + 1*linewidth - $dashsizek = 1.5; // ratio of Dash/Blank - $this->SetDash($dashsize,($dashsize/$dashsizek)+($this->LineWidth*2)); - } - else if ($style == 'dotted' || ($side=='T' && ($div == 'pagetop' || $cp)) || ($side=='B' && $div == 'pagebottom')) { - //Round join and cap - $this->_out("\n".'1 J'."\n".'1 j'."\n"); - $this->SetDash(0.001,($this->LineWidth*3)); - } -} - -// mPDF 4.0 -function _setBorderLine($b, $k=1) { - $this->SetLineWidth($b['w']/$k); - $this->SetDrawColor($b['c']['R'],$b['c']['G'],$b['c']['B']); -} - -// mPDF 3.0 Borders & Background -function PaintDivBB($divider='',$blockstate=0,$blvl=0) { - // Borders & backgrounds are done elsewhere for columns - messes up the repositioning in printcolumnbuffer - if ($this->ColActive) { return ; } // *COLUMNS* - $save_y = $this->y; - if (!$blvl) { $blvl = $this->blklvl; } - - $x0 = $x1 = $y0 = $y1 = 0; - - // Added mPDF 3.0 Float DIV - if (isset($this->blk[$blvl]['bb_painted'][$this->page]) && $this->blk[$blvl]['bb_painted'][$this->page]) { return; } // *CSS-FLOAT* - - if (isset($this->blk[$blvl]['x0'])) { $x0 = $this->blk[$blvl]['x0']; } // left - if (isset($this->blk[$blvl]['y1'])) { $y1 = $this->blk[$blvl]['y1']; } // bottom - - // Added mPDF 3.0 Float DIV - ensures backgrounds/borders are drawn to bottom of page - if ($y1==0) { - if ($divider=='pagebottom') { $y1 = $this->h-$this->bMargin; } - else { $y1 = $this->y; } - } - - // mPDF 3.0 - if (isset($this->blk[$blvl]['startpage']) && $this->blk[$blvl]['startpage'] != $this->page) { $continuingpage = true; } else { $continuingpage = false; } - - if (isset($this->blk[$blvl]['y0'])) { $y0 = $this->blk[$blvl]['y0']; } - $h = $y1 - $y0; - $w = $this->blk[$blvl]['width']; - $x1 = $x0 + $w; - - // Set border-widths as used here - $border_top = $this->blk[$blvl]['border_top']['w']; - $border_bottom = $this->blk[$blvl]['border_bottom']['w']; - $border_left = $this->blk[$blvl]['border_left']['w']; - $border_right = $this->blk[$blvl]['border_right']['w']; - if (!$this->blk[$blvl]['border_top'] || $divider == 'pagetop' || $continuingpage) { - $border_top = 0; - } - if (!$this->blk[$blvl]['border_bottom'] || $blockstate == 1 || $divider == 'pagebottom') { - $border_bottom = 0; - } - - $brTL_H = 0; - $brTL_V = 0; - $brTR_H = 0; - $brTR_V = 0; - $brBL_H = 0; - $brBL_V = 0; - $brBR_H = 0; - $brBR_V = 0; - // mPDF 4.2 - $brset = false; -/*-- BORDER-RADIUS --*/ - if (isset($this->blk[$blvl]['border_radius_TL_H'])) { $brTL_H = $this->blk[$blvl]['border_radius_TL_H']; $brset = true; } - if (isset($this->blk[$blvl]['border_radius_TL_V'])) { $brTL_V = $this->blk[$blvl]['border_radius_TL_V']; $brset = true; } - if (isset($this->blk[$blvl]['border_radius_TR_H'])) { $brTR_H = $this->blk[$blvl]['border_radius_TR_H']; $brset = true; } - if (isset($this->blk[$blvl]['border_radius_TR_V'])) { $brTR_V = $this->blk[$blvl]['border_radius_TR_V']; $brset = true; } - if (isset($this->blk[$blvl]['border_radius_BR_H'])) { $brBR_H = $this->blk[$blvl]['border_radius_BR_H']; $brset = true; } - if (isset($this->blk[$blvl]['border_radius_BR_V'])) { $brBR_V = $this->blk[$blvl]['border_radius_BR_V']; $brset = true; } - if (isset($this->blk[$blvl]['border_radius_BL_H'])) { $brBL_H = $this->blk[$blvl]['border_radius_BL_H']; $brset = true; } - if (isset($this->blk[$blvl]['border_radius_BL_V'])) { $brBL_V = $this->blk[$blvl]['border_radius_BL_V']; $brset = true; } - - if (!$this->blk[$blvl]['border_top'] || $divider == 'pagetop' || $continuingpage || $this->keep_block_together) { - $brTL_H = 0; - $brTL_V = 0; - $brTR_H = 0; - $brTR_V = 0; - } - if (!$this->blk[$blvl]['border_bottom'] || $blockstate == 1 || $divider == 'pagebottom' || $this->keep_block_together) { - $brBL_H = 0; - $brBL_V = 0; - $brBR_H = 0; - $brBR_V = 0; - } - - // Disallow border-radius if it is smaller than the border width. - if ($brTL_H < min($border_left, $border_top)) { $brTL_H = $brTL_V = 0; } - if ($brTL_V < min($border_left, $border_top)) { $brTL_V = $brTL_H = 0; } - if ($brTR_H < min($border_right, $border_top)) { $brTR_H = $brTR_V = 0; } - if ($brTR_V < min($border_right, $border_top)) { $brTR_V = $brTR_H = 0; } - if ($brBL_H < min($border_left, $border_bottom)) { $brBL_H = $brBL_V = 0; } - if ($brBL_V < min($border_left, $border_bottom)) { $brBL_V = $brBL_H = 0; } - if ($brBR_H < min($border_right, $border_bottom)) { $brBR_H = $brBR_V = 0; } - if ($brBR_V < min($border_right, $border_bottom)) { $brBR_V = $brBR_H = 0; } - - // CHECK FOR radii that sum to > width or height of div ******** - $f = min($h/($brTL_V + $brBL_V + 0.001), $h/($brTR_V + $brBR_V + 0.001), $w/($brTL_H + $brTR_H + 0.001), $w/($brBL_H + $brBR_H + 0.001)); - if ($f < 1) { - $brTL_H *= $f; - $brTL_V *= $f; - $brTR_H *= $f; - $brTR_V *= $f; - $brBL_H *= $f; - $brBL_V *= $f; - $brBR_H *= $f; - $brBR_V *= $f; - } -/*-- END BORDER-RADIUS --*/ - - // BORDERS - if (isset($this->blk[$blvl]['y0']) && $this->blk[$blvl]['y0']) { $y0 = $this->blk[$blvl]['y0']; } - $h = $y1 - $y0; - $w = $this->blk[$blvl]['width']; - - //if ($this->blk[$blvl]['border_top']) { - // Reinstate line above for dotted line divider when block border crosses a page - if ($this->blk[$blvl]['border_top'] && $divider != 'pagetop' && !$continuingpage) { - $tbd = $this->blk[$blvl]['border_top']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],$divider,$continuingpage,'T'); } - else if (($brTL_V && $brTL_H) || ($brTR_V && $brTR_H)) { $this->_out("\n".'0 J'."\n".'0 j'."\n"); } // *BORDER-RADIUS* -/*-- BORDER-RADIUS --*/ - if ($brTR_H && $brTR_V) { - $this->_out($this->_EllipseArc($x0 + $w - $brTR_H, $y0 + $brTR_V, $brTR_H - $border_top/2 , $brTR_V - $border_top/2 , 1, 2, true)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f m ',($x0 + $w - ($border_top/2))*$this->k, ($this->h-($y0 + ($border_top/2)))*$this->k)); -/*-- BORDER-RADIUS --*/ - } - if ($brTL_H && $brTL_V ) { - $this->_out(sprintf('%.3f %.3f l ',($x0 + ($border_top/2) + $brTL_H )*$this->k, ($this->h-($y0 + ($border_top/2)))*$this->k)); - $this->_out($this->_EllipseArc($x0 + $brTL_H, $y0 + $brTL_V, $brTL_H - $border_top/2 , $brTL_V - $border_top/2 , 2, 1)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f l ',($x0 + ($border_top/2))*$this->k, ($this->h-($y0 + ($border_top/2)))*$this->k)); -/*-- BORDER-RADIUS --*/ - } -/*-- END BORDER-RADIUS --*/ - $this->_out('S'); - - // Reset Corners and Dash off - $this->_out("\n".'2 J'."\n".'2 j'."\n"); - $this->SetDash(); - } - } - //if ($this->blk[$blvl]['border_bottom'] && $blockstate != 1) { - // Reinstate line above for dotted line divider when block border crosses a page - if ($this->blk[$blvl]['border_bottom'] && $blockstate != 1 && $divider != 'pagebottom') { - $tbd = $this->blk[$blvl]['border_bottom']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],$divider,$continuingpage,'B'); } - else if (($brBL_V && $brBL_H) || ($brBR_V && $brBR_H)) { $this->_out("\n".'0 J'."\n".'0 j'."\n"); } // *BORDER-RADIUS* -/*-- BORDER-RADIUS --*/ - if ($brBL_H && $brBL_V) { - $this->_out($this->_EllipseArc($x0 + $brBL_H, $y0 + $h - $brBL_V, $brBL_H - $border_bottom/2 , $brBL_V - $border_bottom/2 , 3, 2, true)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f m ',($x0 + ($border_bottom/2))*$this->k, ($this->h-($y0 + $h - ($border_bottom/2)))*$this->k)); -/*-- BORDER-RADIUS --*/ - } - if ($brBR_H && $brBR_V ) { - $this->_out(sprintf('%.3f %.3f l ',($x0 + $w - ($border_bottom/2) - $brBR_H )*$this->k, ($this->h-($y0 + $h - ($border_bottom/2)))*$this->k)); - $this->_out($this->_EllipseArc($x0 + $w - $brBR_H, $y0 + $h - $brBR_V, $brBR_H - $border_bottom/2 , $brBR_V - $border_bottom/2 , 4, 1)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f l ',($x0 + $w - ($border_bottom/2) )*$this->k, ($this->h-($y0 + $h - ($border_bottom/2)))*$this->k)); -/*-- BORDER-RADIUS --*/ - } -/*-- END BORDER-RADIUS --*/ - $this->_out('S'); - - // Reset Corners and Dash off - $this->_out("\n".'2 J'."\n".'2 j'."\n"); - $this->SetDash(); - } - } - if ($this->blk[$blvl]['border_left']) { - $tbd = $this->blk[$blvl]['border_left']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],$divider,$continuingpage,'L'); } - else if (($brTL_V && $brTL_H) || ($brBL_V && $brBL_H)) { $this->_out("\n".'0 J'."\n".'0 j'."\n"); } // *BORDER-RADIUS* -/*-- BORDER-RADIUS --*/ - if ($brTL_V && $brTL_H) { - $this->_out($this->_EllipseArc($x0 + $brTL_H, $y0 + $brTL_V, $brTL_H - $border_left/2 , $brTL_V - $border_left/2, 2, 2, true)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f m ',($x0 + ($border_left/2))*$this->k, ($this->h-($y0 + ($border_left/2)))*$this->k)); -/*-- BORDER-RADIUS --*/ - } - if ($brBL_V && $brBL_H ) { - $this->_out(sprintf('%.3f %.3f l ',($x0 + ($border_left/2))*$this->k, ($this->h-($y0 + $h - ($border_left/2)- $brBL_V) )*$this->k)); - $this->_out($this->_EllipseArc($x0 + $brBL_H, $y0 + $h - $brBL_V, $brBL_H - $border_left/2 , $brBL_V - $border_left/2, 3, 1)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f l ',($x0 + ($border_left/2))*$this->k, ($this->h-($y0 + $h - ($border_left/2)) )*$this->k)); -/*-- BORDER-RADIUS --*/ - } -/*-- END BORDER-RADIUS --*/ - $this->_out('S'); - - // Reset Corners and Dash off - $this->_out("\n".'2 J'."\n".'2 j'."\n"); - $this->SetDash(); - } - } - if ($this->blk[$blvl]['border_right']) { - $tbd = $this->blk[$blvl]['border_right']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],$divider,$continuingpage,'R'); } - else if (($brTR_V && $brTR_H) || ($brBR_V && $brBR_H)) { $this->_out("\n".'0 J'."\n".'0 j'."\n"); } // *BORDER-RADIUS* -/*-- BORDER-RADIUS --*/ - if ($brBR_V && $brBR_H) { - $this->_out($this->_EllipseArc($x0 + $w - $brBR_H, $y0 + $h - $brBR_V, $brBR_H - $border_right/2 , $brBR_V - $border_right/2, 4, 2, true)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f m ',($x0 + $w - ($border_right/2))*$this->k, ($this->h-($y0 + $h - ($border_right/2)))*$this->k)); -/*-- BORDER-RADIUS --*/ - } - if ($brTR_V && $brTR_H ) { - $this->_out(sprintf('%.3f %.3f l ',($x0 + $w - ($border_right/2))*$this->k, ($this->h-($y0 + ($border_right/2) + $brTR_V) )*$this->k)); - $this->_out($this->_EllipseArc($x0 + $w - $brTR_H, $y0 + $brTR_V, $brTR_H - $border_right/2 , $brTR_V - $border_right/2, 1, 1)); - } - else { -/*-- END BORDER-RADIUS --*/ - $this->_out(sprintf('%.3f %.3f l ',($x0 + $w - ($border_right/2))*$this->k, ($this->h-($y0 + ($border_right/2)) )*$this->k)); -/*-- BORDER-RADIUS --*/ - } -/*-- END BORDER-RADIUS --*/ - $this->_out('S'); - - // Reset Corners and Dash off - $this->_out("\n".'2 J'."\n".'2 j'."\n"); - $this->SetDash(); - } - } - - // mPDF 4.2 DOUBLE Border - if (!$brset) { // not if border-radius used - $tbcol = array(255,255,255); - for($l=0; $l <= $blvl; $l++) { - if ($this->blk[$l]['bgcolor']) { - $tbcol = array($this->blk[$l]['bgcolorarray']['R'],$this->blk[$l]['bgcolorarray']['G'],$this->blk[$l]['bgcolorarray']['B']); - } - } - } - if ($this->blk[$blvl]['border_top'] && $divider != 'pagetop' && !$continuingpage) { - $tbd = $this->blk[$blvl]['border_top']; - if (isset($tbd['s']) && $tbd['s']) { - if (!$brset && $tbd['style']=='double') { - $this->SetLineWidth($tbd['w']/3); - $this->SetDrawColor($tbcol[0],$tbcol[1],$tbcol[2]); - $this->_out(sprintf('%.3f %.3f m %.3f %.3f l S', ($x0 + $w - ($border_top/2))*$this->k, ($this->h-($y0 + ($border_top/2)))*$this->k, ($x0 + ($border_top/2))*$this->k, ($this->h-($y0 + ($border_top/2)))*$this->k )); - } - } - } - if ($this->blk[$blvl]['border_bottom'] && $blockstate != 1 && $divider != 'pagebottom') { - $tbd = $this->blk[$blvl]['border_bottom']; - if (isset($tbd['s']) && $tbd['s']) { - if (!$brset && $tbd['style']=='double') { - $this->SetLineWidth($tbd['w']/3); - $this->SetDrawColor($tbcol[0],$tbcol[1],$tbcol[2]); - $this->_out(sprintf('%.3f %.3f m %.3f %.3f l S', ($x0 + ($border_bottom/2))*$this->k, ($this->h-($y0 + $h - ($border_bottom/2)))*$this->k, ($x0 + $w - ($border_bottom/2) )*$this->k, ($this->h-($y0 + $h - ($border_bottom/2)))*$this->k )); - } - } - } - if ($this->blk[$blvl]['border_left']) { - $tbd = $this->blk[$blvl]['border_left']; - if (isset($tbd['s']) && $tbd['s']) { - if (!$brset && $tbd['style']=='double') { - $this->SetLineWidth($tbd['w']/3); - $this->SetDrawColor($tbcol[0],$tbcol[1],$tbcol[2]); - $this->_out(sprintf('%.3f %.3f m %.3f %.3f l S', ($x0 + ($border_left/2))*$this->k, ($this->h-($y0 + ($border_left/2)))*$this->k, ($x0 + ($border_left/2))*$this->k, ($this->h-($y0 + $h - ($border_left/2)) )*$this->k)); - } - } - } - if ($this->blk[$blvl]['border_right']) { - $tbd = $this->blk[$blvl]['border_right']; - if (isset($tbd['s']) && $tbd['s']) { - if (!$brset && $tbd['style']=='double') { - $this->SetLineWidth($tbd['w']/3); - $this->SetDrawColor($tbcol[0],$tbcol[1],$tbcol[2]); - $this->_out(sprintf('%.3f %.3f m %.3f %.3f l S', ($x0 + $w - ($border_right/2))*$this->k, ($this->h-($y0 + $h - ($border_right/2)))*$this->k, ($x0 + $w - ($border_right/2))*$this->k, ($this->h-($y0 + ($border_right/2)) )*$this->k)); - } - } - } - - - $this->SetDash(); - $this->y = $save_y; - - - // BACKGROUNDS are disabled in columns/kbt/headers - messes up the repositioning in printcolumnbuffer - // mPDF 4.0 Added kwt - if ($this->ColActive || $this->kwt || $this->keep_block_together) { return ; } - - $bgx0 = $x0; - $bgx1 = $x1; - $bgy0 = $y0; - $bgy1 = $y1; - -/*-- BORDER-RADIUS --*/ - // Defined br values represent the radius of the outer curve - need to take border-width/2 from each radius for drawing the borders - if (isset($this->blk[$blvl]['background_clip']) && $this->blk[$blvl]['background_clip'] == 'padding-box') { - $brbgTL_H = max(0, $brTL_H - $this->blk[$blvl]['border_left']['w']); - $brbgTL_V = max(0, $brTL_V - $this->blk[$blvl]['border_top']['w']); - $brbgTR_H = max(0, $brTR_H - $this->blk[$blvl]['border_right']['w']); - $brbgTR_V = max(0, $brTR_V - $this->blk[$blvl]['border_top']['w']); - $brbgBL_H = max(0, $brBL_H - $this->blk[$blvl]['border_left']['w']); - $brbgBL_V = max(0, $brBL_V - $this->blk[$blvl]['border_bottom']['w']); - $brbgBR_H = max(0, $brBR_H - $this->blk[$blvl]['border_right']['w']); - $brbgBR_V = max(0, $brBR_V - $this->blk[$blvl]['border_bottom']['w']); - $bgx0 += $this->blk[$blvl]['border_left']['w']; - $bgx1 -= $this->blk[$blvl]['border_right']['w']; - if ($this->blk[$blvl]['border_top'] && $divider != 'pagetop' && !$continuingpage) { - $bgy0 += $this->blk[$blvl]['border_top']['w']; - } - if ($this->blk[$blvl]['border_bottom'] && $blockstate != 1 && $divider != 'pagebottom') { - $bgy1 -= $this->blk[$blvl]['border_bottom']['w']; - } - } - else { -/*-- END BORDER-RADIUS --*/ - $brbgTL_H = $brTL_H; - $brbgTL_V = $brTL_V; - $brbgTR_H = $brTR_H; - $brbgTR_V = $brTR_V; - $brbgBL_H = $brBL_H; - $brbgBL_V = $brBL_V; - $brbgBR_H = $brBR_H; - $brbgBR_V = $brBR_V; -/*-- BORDER-RADIUS --*/ - } -/*-- END BORDER-RADIUS --*/ - - // Set clipping path - $s = ' q 0 w '; // Line width=0 - $s .= sprintf('%.3f %.3f m ', ($bgx0+$brbgTL_H )*$this->k, ($this->h-$bgy0)*$this->k); // start point TL before the arc -/*-- BORDER-RADIUS --*/ - if ($brbgTL_H || $brbgTL_V) { - $s .= $this->_EllipseArc($bgx0+$brbgTL_H, $bgy0+$brbgTL_V, $brbgTL_H , $brbgTL_V , 2); // segment 2 TL - } -/*-- END BORDER-RADIUS --*/ - $s .= sprintf('%.3f %.3f l ', ($bgx0)*$this->k, ($this->h-($bgy1-$brbgBL_V ))*$this->k); // line to BL -/*-- BORDER-RADIUS --*/ - if ($brbgBL_H || $brbgBL_V) { - $s .= $this->_EllipseArc($bgx0+$brbgBL_H, $bgy1-$brbgBL_V, $brbgBL_H , $brbgBL_V , 3); // segment 3 BL - } -/*-- END BORDER-RADIUS --*/ - $s .= sprintf('%.3f %.3f l ', ($bgx1-$brbgBR_H )*$this->k, ($this->h-($bgy1))*$this->k); // line to BR -/*-- BORDER-RADIUS --*/ - if ($brbgBR_H || $brbgBR_V) { - $s .= $this->_EllipseArc($bgx1-$brbgBR_H, $bgy1-$brbgBR_V, $brbgBR_H , $brbgBR_V , 4); // segment 4 BR - } -/*-- END BORDER-RADIUS --*/ - $s .= sprintf('%.3f %.3f l ', ($bgx1)*$this->k, ($this->h-($bgy0+$brbgTR_V))*$this->k); // line to TR -/*-- BORDER-RADIUS --*/ - if ($brbgTR_H || $brbgTR_V) { - $s .= $this->_EllipseArc($bgx1-$brbgTR_H, $bgy0+$brbgTR_V, $brbgTR_H , $brbgTR_V , 1); // segment 1 TR - } -/*-- END BORDER-RADIUS --*/ - $s .= sprintf('%.3f %.3f l ', ($bgx0+$brbgTL_H )*$this->k, ($this->h-$bgy0)*$this->k); // line to TL - $s .= ' W n '; // Ends path no-op & Sets the clipping path - - if ($this->blk[$blvl]['bgcolor']) { - $this->pageBackgrounds[$blvl][] = array('x'=>$x0, 'y'=>$y0, 'w'=>$w, 'h'=>$h, 'col'=>$this->blk[$blvl]['bgcolorarray'], 'clippath'=>$s); - } -/*-- GRADIENTS --*/ - if (isset($this->blk[$blvl]['gradient'])) { - $g = $this->parseBackgroundGradient($this->blk[$blvl]['gradient']); - if ($g) { - $gx = $x0; - $gy = $y0; - $this->pageBackgrounds[$blvl][] = array('gradient'=>true, 'x'=>$gx, 'y'=>$gy, 'w'=>$w, 'h'=>$h, 'gradtype'=>$g['type'], 'col'=>$g['col'], 'col2'=>$g['col2'], 'coords'=>$g['coords'], 'extend'=>$g['extend'], 'clippath'=>$s); - } - } -/*-- END GRADIENTS --*/ - -/*-- BACKGROUND-IMAGES --*/ - if (isset($this->blk[$blvl]['background-image'])) { - $image_id = $this->blk[$blvl]['background-image']['image_id']; - $orig_w = $this->blk[$blvl]['background-image']['orig_w']; - $orig_h = $this->blk[$blvl]['background-image']['orig_h']; - $x_pos = $this->blk[$blvl]['background-image']['x_pos']; - $y_pos = $this->blk[$blvl]['background-image']['y_pos']; - $x_repeat = $this->blk[$blvl]['background-image']['x_repeat']; - $y_repeat = $this->blk[$blvl]['background-image']['y_repeat']; - $resize = $this->blk[$blvl]['background-image']['resize']; // mPDF 4.3.015 - $opacity = $this->blk[$blvl]['background-image']['opacity']; // mPDF 4.3.017 - $this->pageBackgrounds[$blvl][] = array('x'=>$x0, 'y'=>$y0, 'w'=>$w, 'h'=>$h, 'image_id'=>$image_id, 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$x_pos, 'y_pos'=>$y_pos, 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat, 'clippath'=>$s, 'resize'=>$resize, 'opacity'=>$opacity); // mPDF 4.3.015 4.3.017 - } -/*-- END BACKGROUND-IMAGES --*/ - - // Added mPDF 3.0 Float DIV - $this->blk[$blvl]['bb_painted'][$this->page] = true; - -} - -/*-- BORDER-RADIUS --*/ -// mPDF 3.0 -function _EllipseArc($x0, $y0, $rx, $ry, $seg = 1, $part=false, $start=false) { // Anticlockwise segment 1-4 TR-TL-BL-BR (part=1 or 2) - $s = ''; - if ($rx<0) { $rx = 0; } - if ($ry<0) { $ry = 0; } - $rx *= $this->k; - $ry *= $this->k; - $astart = 0; - if ($seg == 1) { // Top Right - $afinish = 90; - $nSeg = 4; - } - else if ($seg == 2) { // Top Left - $afinish = 180; - $nSeg = 8; - } - else if ($seg == 3) { // Bottom Left - $afinish = 270; - $nSeg = 12; - } - else { // Bottom Right - $afinish = 360; - $nSeg = 16; - } - $astart = deg2rad((float) $astart); - $afinish = deg2rad((float) $afinish); - $totalAngle = $afinish - $astart; - $dt = $totalAngle / $nSeg; // segment angle - $dtm = $dt/3; - $x0 *= $this->k; - $y0 = ($this->h - $y0) * $this->k; - $t1 = $astart; - $a0 = $x0 + ($rx * cos($t1)); - $b0 = $y0 + ($ry * sin($t1)); - $c0 = -$rx * sin($t1); - $d0 = $ry * cos($t1); - $op = false; - for ($i = 1; $i <= $nSeg; $i++) { - // Draw this bit of the total curve - $t1 = ($i * $dt) + $astart; - $a1 = $x0 + ($rx * cos($t1)); - $b1 = $y0 + ($ry * sin($t1)); - $c1 = -$rx * sin($t1); - $d1 = $ry * cos($t1); - if ($i>($nSeg-4) && (!$part || ($part == 1 && $i<=$nSeg-2) || ($part == 2 && $i>$nSeg-2))) { - if ($start && !$op) { - $s .= sprintf('%.3f %.3f m ', $a0, $b0); - } - $s .= sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c ', ($a0 + ($c0 * $dtm)), ($b0 + ($d0 * $dtm)), ($a1 - ($c1 * $dtm)) , ($b1 - ($d1 * $dtm)), $a1 , $b1 ); - $op = true; - } - $a0 = $a1; - $b0 = $b1; - $c0 = $c1; - $d0 = $d1; - } - return $s; -} -/*-- END BORDER-RADIUS --*/ - - - -function PaintDivLnBorder($state=0,$blvl=0,$h) { - // $state = 0 normal; 1 top; 2 bottom; 3 top and bottom - - $this->ColDetails[$this->CurrCol]['bottom_margin'] = $this->y + $h; - - $save_y = $this->y; - - $w = $this->blk[$blvl]['width']; - $x0 = $this->x; // left - $y0 = $this->y; // top - $x1 = $this->x + $w; // bottom - $y1 = $this->y + $h; // bottom - - if ($this->blk[$blvl]['border_top'] && ($state==1 || $state==3)) { - $tbd = $this->blk[$blvl]['border_top']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - $this->y = $y0 + ($tbd['w']/2); - // mPDF 4.0 - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'',$continuingpage,'T'); } - $this->Line($x0 + ($tbd['w']/2) , $this->y , $x0 + $w - ($tbd['w']/2), $this->y); - $this->y += $tbd['w']; - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - - if ($this->blk[$blvl]['border_left']) { - $tbd = $this->blk[$blvl]['border_left']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - $this->y = $y0 + ($tbd['w']/2); - // mPDF 4.0 - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'',$continuingpage,'L'); } - $this->Line($x0 + ($tbd['w']/2), $this->y, $x0 + ($tbd['w']/2), $y0 + $h -($tbd['w']/2)); - $this->y += $tbd['w']; - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - if ($this->blk[$blvl]['border_right']) { - $tbd = $this->blk[$blvl]['border_right']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - $this->y = $y0 + ($tbd['w']/2); - // mPDF 4.0 - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'',$continuingpage,'R'); } - $this->Line($x0 + $w - ($tbd['w']/2), $this->y, $x0 + $w - ($tbd['w']/2), $y0 + $h - ($tbd['w']/2)); - $this->y += $tbd['w']; - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - if ($this->blk[$blvl]['border_bottom'] && $state > 1) { - $tbd = $this->blk[$blvl]['border_bottom']; - if (isset($tbd['s']) && $tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd); - $this->y = $y0 + $h - ($tbd['w']/2); - // mPDF 4.0 - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'',$continuingpage,'B'); } - $this->Line($x0 + ($tbd['w']/2) , $this->y, $x0 + $w - ($tbd['w']/2), $this->y); - $this->y += $tbd['w']; - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - $this->SetDash(); - - - $this->y = $save_y; -} - - -function PaintImgBorder($objattr,$is_table) { - // Borders are disabled in columns - messes up the repositioning in printcolumnbuffer - if ($this->ColActive) { return ; } // *COLUMNS* - if ($is_table) { $k = $this->shrin_k; } else { $k = 1; } - $h = $objattr['BORDER-HEIGHT']; - $w = $objattr['BORDER-WIDTH']; - $x0 = $objattr['BORDER-X']; - $y0 = $objattr['BORDER-Y']; - - // BORDERS - if ($objattr['border_top']) { - $tbd = $objattr['border_top']; - if ($tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd,$k); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'','','T'); } - $this->Line($x0, $y0, $x0 + $w, $y0); - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - if ($objattr['border_left']) { - $tbd = $objattr['border_left']; - if ($tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd,$k); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'','','L'); } - $this->Line($x0, $y0, $x0, $y0 + $h); - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - if ($objattr['border_right']) { - $tbd = $objattr['border_right']; - if ($tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd,$k); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'','','R'); } - $this->Line($x0 + $w, $y0, $x0 + $w, $y0 + $h); - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - if ($objattr['border_bottom']) { - $tbd = $objattr['border_bottom']; - if ($tbd['s']) { - // mPDF 4.0 - $this->_setBorderLine($tbd,$k); - if ($tbd['style']=='dotted' || $tbd['style']=='dashed') { $this->_setDashBorder($tbd['style'],'','','B'); } - $this->Line($x0, $y0 + $h, $x0 + $w, $y0 + $h); - // Reset Corners and Dash off - $this->_out('2 J 2 j'); - $this->SetDash(); - - } - } - $this->SetDash(); - -} - - - - - -function Reset() -{ - $this->SetTextColor(0); - $this->colorarray = array(); - $this->issetcolor = false; - - $this->SetDrawColor(0); - - $this->SetFillColor(255); - $this->spanbgcolorarray = array(); - $this->spanbgcolor = false; - - $this->SetStyle('B',false); - $this->SetStyle('I',false); - $this->SetStyle('U',false); - - $this->HREF = ''; - $this->outlineparam = array(); - $this->outline_on = false; - $this->SetTextOutline(false); - - $this->SUP = false; - $this->SUB = false; - $this->strike = false; - - $this->SetFont($this->default_font,'',0,false); - $this->SetFontSize($this->default_font_size,false); - - $this->currentfontfamily = ''; - $this->currentfontsize = ''; - -/*-- TABLES --*/ - if ($this->tableLevel) { - $this->SetLineHeight('',$this->table_lineheight); // *TABLES* - } - else -/*-- END TABLES --*/ -/*-- LISTS --*/ - // mPDF 4.2 - if ($this->listlvl && $this->list_lineheight[$this->listlvl][$this->bulletarray['occur']]) { - $this->SetLineHeight('',$this->list_lineheight[$this->listlvl][$this->bulletarray['occur']]); // sets default line height - } - else -/*-- END LISTS --*/ - if (isset($this->blk[$this->blklvl]['line_height']) && $this->blk[$this->blklvl]['line_height']) { - $this->SetLineHeight('',$this->blk[$this->blklvl]['line_height']); // sets default line height - } - - $this->toupper = false; - $this->tolower = false; - $this->SetDash(); //restore to no dash - $this->dash_on = false; - $this->dotted_on = false; - $this->divwidth = 0; - $this->divheight = 0; - $this->divalign = $this->defaultAlign; - $this->divrevert = false; - $this->oldy = -1; - - $bodystyle = array(); - if (isset($this->CSS['BODY']['FONT-STYLE'])) { $bodystyle['FONT-STYLE'] = $this->CSS['BODY']['FONT-STYLE']; } - if (isset($this->CSS['BODY']['FONT-WEIGHT'])) { $bodystyle['FONT-WEIGHT'] = $this->CSS['BODY']['FONT-WEIGHT']; } - if (isset($this->CSS['BODY']['COLOR'])) { $bodystyle['COLOR'] = $this->CSS['BODY']['COLOR']; } - if (isset($bodystyle)) { $this->setCSS($bodystyle,'BLOCK','BODY'); } - -} - -function ReadMetaTags($html) -{ - // changes anykey=anyvalue to anykey="anyvalue" (only do this when this happens inside tags) - $regexp = '/ (\\w+?)=([^\\s>"]+)/si'; - $html = preg_replace($regexp," \$1=\"\$2\"",$html); - - if (preg_match('/(.*?)<\/title>/si',$html,$m)) { - $this->SetTitle($m[1]); - } - - preg_match_all('/<meta [^>]*?(name|content)="([^>]*?)" [^>]*?(name|content)="([^>]*?)".*?>/si',$html,$aux); - $firstattr = $aux[1]; - $secondattr = $aux[3]; - for( $i = 0 ; $i < count($aux[0]) ; $i++) - { - - $name = ( strtoupper($firstattr[$i]) == "NAME" )? strtoupper($aux[2][$i]) : strtoupper($aux[4][$i]); - $content = ( strtoupper($firstattr[$i]) == "CONTENT" )? $aux[2][$i] : $aux[4][$i]; - switch($name) - { - case "KEYWORDS": $this->SetKeywords($content); break; - case "AUTHOR": $this->SetAuthor($content); break; - case "DESCRIPTION": $this->SetSubject($content); break; - } - } -} - - -function ReadCharset($html) -{ - // Charset conversion - if ($this->allow_charset_conversion) { - if (preg_match('/<head.*charset=([^\'\"\s]*).*<\/head>/si',$html,$m)) { - if (strtoupper($m[1]) != 'UTF-8') { - $this->charset_in = strtoupper($m[1]); - } - } - } - -} - -////////////////// -/// CSS parser /// -////////////////// -////////////////// -/// CSS parser /// -////////////////// -////////////////// -/// CSS parser /// -////////////////// - -function ReadDefaultCSS($CSSstr) { - $CSS = array(); - $CSSstr = preg_replace('|/\*.*?\*/|s',' ',$CSSstr); - $CSSstr = preg_replace('/[\s\n\r\t\f]/s',' ',$CSSstr); - - $CSSstr = preg_replace('/(<\!\-\-|\-\->)/s',' ',$CSSstr); - if ($CSSstr ) { - preg_match_all('/(.*?)\{(.*?)\}/',$CSSstr,$styles); - for($i=0; $i < count($styles[1]) ; $i++) { - $stylestr= trim($styles[2][$i]); - $stylearr = explode(';',$stylestr); - foreach($stylearr AS $sta) { - if (trim($sta)) { - // mPDF 3.0 - // Changed to allow style="background: url('http://www.bpm1.com/bg.jpg')" - list($property,$value) = explode(':',$sta,2); - $property = trim($property); - $value = preg_replace('/\s*!important/i','',$value); - $value = trim($value); - if ($property && ($value || $value==='0')) { - $classproperties[strtoupper($property)] = $value; - } - } - } - $classproperties = $this->fixCSS($classproperties); - $tagstr = strtoupper(trim($styles[1][$i])); - $tagarr = explode(',',$tagstr); - foreach($tagarr AS $tg) { - $tags = preg_split('/\s+/',trim($tg)); - $level = count($tags); - if ($level == 1) { // e.g. p or .class or #id or p.class or p#id - $t = trim($tags[0]); - if ($t) { - $tag = ''; - if (preg_match('/^('.$this->allowedCSStags.')$/',$t)) { $tag= $t; } - if ($this->CSS[$tag] && $tag) { $CSS[$tag] = $this->array_merge_recursive_unique($CSS[$tag], $classproperties); } - else if ($tag) { $CSS[$tag] = $classproperties; } - } - } - } - $properties = array(); - $values = array(); - $classproperties = array(); - } - - } // end of if - return $CSS; -} - - - - -function ReadCSS($html) { -// -// This supports: .class {...} / #id { .... } -// p {...} h1[-h6] {...} a {...} table {...} thead {...} th {...} td {...} hr {...} -// body {...} sets default font and fontsize -// It supports some cascaded CSS e.g. div.topic table.type1 td -// Does not support non-block level e.g. a#hover { ... } - - // mPDF 4.3.001 - preg_match_all('/<style[^>]*media=["\']([^"\'>]*)["\'].*?<\/style>/is',$html,$m); - for($i=0; $i<count($m[0]); $i++) { - if ($this->CSSselectMedia && !preg_match('/('.trim($this->CSSselectMedia).'|all)/i',$m[1][$i])) { - $html = preg_replace('/'.preg_quote($m[0][$i],'/').'/','',$html); - } - } - preg_match_all('/<link[^>]*media=["\']([^"\'>]*)["\'].*?>/is',$html,$m); - for($i=0; $i<count($m[0]); $i++) { - if ($this->CSSselectMedia && !preg_match('/('.trim($this->CSSselectMedia).'|all)/i',$m[1][$i])) { - $html = preg_replace('/'.preg_quote($m[0][$i],'/').'/','',$html); - } - } - - // mPDF 4.0 - // Remove Comment tags <!-- --> inside CSS as <style> in HTML document - preg_match_all('/<style.*?>(.*?)<\/style>/si',$html,$m); - if (count($m[1])) { - for($i=0;$i<count($m[1]);$i++) { - // Remove comment tags - $sub = preg_replace('/(<\!\-\-|\-\->)/s',' ',$m[1][$i]); - $html = preg_replace('/'.preg_quote($m[1][$i], '/').'/si', $sub, $html); - } - } - // mPDF 4.0 - $html = preg_replace('/<!--mpdf/i','',$html); // mPDF 3.0 changed from ereg_ - $html = preg_replace('/mpdf-->/i','',$html); // mPDF 3.0 changed from ereg_ - $html = preg_replace('/<\!\-\-.*?\-\->/s',' ',$html); - - $match = 0; // no match for instance - $regexp = ''; // This helps debugging: showing what is the REAL string being processed - $CSSext = array(); - - //CSS inside external files - // mPDF 3.0 Allow single or double quotes - // mPDF 4.0 Allow >1 space or extra text after link - $regexp = '/<link[^>]*rel=["\']stylesheet["\'][^>]*href=["\']([^>"\']*)["\'].*?>/si'; // EDIT mPDF 4.0 - $x = preg_match_all($regexp,$html,$cxt); - if ($x) { - $match += $x; - $CSSext = $cxt[1]; - } - - // mPDF 3.0 Allow single or double quotes - $regexp = '/<link[^>]*href=["\']([^>"\']*)["\'][^>]*?rel=["\']stylesheet["\'].*?>/si'; // EDIT mPDF 4.0 - $x = preg_match_all($regexp,$html,$cxt); - if ($x) { - $match += $x; - $CSSext = array_merge($CSSext,$cxt[1]); - } - - // look for @import stylesheets - $regexp = '/@import url\([\'\"]{0,1}([^\)]*?\.css)[\'\"]{0,1}\)/si'; // EDIT mPDF 4.0 - $x = preg_match_all($regexp,$html,$cxt); - if ($x) { - $match += $x; - $CSSext = array_merge($CSSext,$cxt[1]); - } - // mPDF 4.0 - // look for @import without the url() - $regexp = '/@import [\'\"]{0,1}([^;]*?\.css)[\'\"]{0,1}/si'; - $x = preg_match_all($regexp,$html,$cxt); - if ($x) { - $match += $x; - $CSSext = array_merge($CSSext,$cxt[1]); - } - - $ind = 0; - $CSSstr = ''; - - // Edited mPDF v1.4 - if (!is_array($this->cascadeCSS)) $this->cascadeCSS = array(); - - while($match){ - $path = $CSSext[$ind]; - $this->GetFullPath($path); // mPDF 4.0 - $CSSextblock = $this->_get_file($path); - if ($CSSextblock) { - // mPDF 4.0 - // look for embedded @import stylesheets in other stylesheets - // and fix url paths (including background-images) relative to stylesheet - $regexpem = '/@import url\([\'\"]{0,1}(.*?\.css)[\'\"]{0,1}\)/si'; - $xem = preg_match_all($regexpem,$CSSextblock,$cxtem); - $cssBasePath = preg_replace('/\/[^\/]*$/','',$path) . '/'; - if ($xem) { - foreach($cxtem[1] AS $cxtembedded) { - // path is relative to original stlyesheet!! - $this->GetFullPath($cxtembedded, $cssBasePath ); - $match++; - $CSSext[] = $cxtembedded; - } - } - $regexpem = '/(background[^;]*url\s*\(\s*[\'\"]{0,1})([^\)\'\"]*)([\'\"]{0,1}\s*\))/si'; - $xem = preg_match_all($regexpem,$CSSextblock,$cxtem); - if ($xem) { - for ($i=0;$i<count($cxtem[0]);$i++) { - // path is relative to original stlyesheet!! - $embedded = $cxtem[2][$i]; - $this->GetFullPath($embedded, $cssBasePath ); - $CSSextblock = preg_replace('/'.preg_quote($cxtem[0][$i],'/').'/', ($cxtem[1][$i].$embedded.$cxtem[3][$i]), $CSSextblock); - } - } - $CSSstr .= ' '.$CSSextblock; - } - - $match--; - $ind++; - } //end of match - $match = 0; // reset value, if needed - // CSS as <style> in HTML document - $regexp = '/<style.*?>(.*?)<\/style>/si'; - $match = preg_match_all($regexp,$html,$CSSblock); - if ($match) { - // mPDF 4.0 - $tmpCSSstr = implode(' ',$CSSblock[1]); - $regexpem = '/(background[^;]*url\s*\(\s*[\'\"]{0,1})([^\)\'\"]*)([\'\"]{0,1}\s*\))/si'; - $xem = preg_match_all($regexpem,$tmpCSSstr ,$cxtem); - if ($xem) { - for ($i=0;$i<count($cxtem[0]);$i++) { - $embedded = $cxtem[2][$i]; - $this->GetFullPath($embedded); - $tmpCSSstr = preg_replace('/'.preg_quote($cxtem[0][$i],'/').'/', ($cxtem[1][$i].$embedded.$cxtem[3][$i]), $tmpCSSstr ); - } - } - $CSSstr .= ' '.$tmpCSSstr; - } - // Remove comments - $CSSstr = preg_replace('|/\*.*?\*/|s',' ',$CSSstr); - $CSSstr = preg_replace('/[\s\n\r\t\f]/s',' ',$CSSstr); - - // mPDF 4.3.001 - if (preg_match('/@media/',$CSSstr)) { - preg_match_all('/@media(.*?)\{(([^\{\}]*\{[^\{\}]*\})+)\s*\}/is',$CSSstr,$m); - for($i=0; $i<count($m[0]); $i++) { - if ($this->CSSselectMedia && !preg_match('/('.trim($this->CSSselectMedia).'|all)/i',$m[1][$i])) { - $CSSstr = preg_replace('/'.preg_quote($m[0][$i],'/').'/','',$CSSstr); - } - else { - $CSSstr = preg_replace('/'.preg_quote($m[0][$i],'/').'/',' '.$m[2][$i].' ',$CSSstr); - } - } - } - - $CSSstr = preg_replace('/(<\!\-\-|\-\->)/s',' ',$CSSstr); - if ($CSSstr ) { - preg_match_all('/(.*?)\{(.*?)\}/',$CSSstr,$styles); - for($i=0; $i < count($styles[1]) ; $i++) { - // SET array e.g. $classproperties['COLOR'] = '#ffffff'; - $stylestr= trim($styles[2][$i]); - $stylearr = explode(';',$stylestr); - foreach($stylearr AS $sta) { - if (trim($sta)) { - // mPDF 3.0 - // Changed to allow style="background: url('http://www.bpm1.com/bg.jpg')" - list($property,$value) = explode(':',$sta,2); - $property = trim($property); - $value = preg_replace('/\s*!important/i','',$value); - $value = trim($value); - if ($property && ($value || $value==='0')) { - $classproperties[strtoupper($property)] = $value; - } - } - } - $classproperties = $this->fixCSS($classproperties); - $tagstr = strtoupper(trim($styles[1][$i])); - $tagarr = explode(',',$tagstr); - $pageselectors = false; // used to turn on $this->mirrorMargins - foreach($tagarr AS $tg) { - $tags = preg_split('/\s+/',trim($tg)); - $level = count($tags); - $t = ''; - $t2 = ''; - $t3 = ''; - if (trim($tags[0])=='@PAGE') { - if (isset($tags[0])) { $t = trim($tags[0]); } - if (isset($tags[1])) { $t2 = trim($tags[1]); } - if (isset($tags[2])) { $t3 = trim($tags[2]); } - $tag = ''; - if ($level==1) { $tag = $t; } - else if ($level==2 && preg_match('/^[:](.*)$/',$t2,$m)) { - $tag = $t.'>>PSEUDO>>'.$m[1]; - if ($m[1]=='LEFT' || $m[1]=='RIGHT') { $pageselectors = true; } // used to turn on $this->mirrorMargins - } - else if ($level==2) { $tag = $t.'>>NAMED>>'.$t2; } - else if ($level==3 && preg_match('/^[:](.*)$/',$t3,$m)) { - $tag = $t.'>>NAMED>>'.$t2.'>>PSEUDO>>'.$m[1]; - if ($m[1]=='LEFT' || $m[1]=='RIGHT') { $pageselectors = true; } // used to turn on $this->mirrorMargins - } - if (isset($this->CSS[$tag]) && $tag) { $this->CSS[$tag] = $this->array_merge_recursive_unique($this->CSS[$tag], $classproperties); } - else if ($tag) { $this->CSS[$tag] = $classproperties; } - } - - else if ($level == 1) { // e.g. p or .class or #id or p.class or p#id - if (isset($tags[0])) { $t = trim($tags[0]); } - if ($t) { - $tag = ''; - if (preg_match('/^[.](.*)$/',$t,$m)) { $tag = 'CLASS>>'.$m[1]; } - else if (preg_match('/^[#](.*)$/',$t,$m)) { $tag = 'ID>>'.$m[1]; } - else if (preg_match('/^('.$this->allowedCSStags.')[.](.*)$/',$t,$m)) { $tag = $m[1].'>>CLASS>>'.$m[2]; } - else if (preg_match('/^('.$this->allowedCSStags.')[#](.*)$/',$t,$m)) { $tag = $m[1].'>>ID>>'.$m[2]; } - else if (preg_match('/^('.$this->allowedCSStags.')$/',$t)) { $tag= $t; } - - if (isset($this->CSS[$tag]) && $tag) { $this->CSS[$tag] = $this->array_merge_recursive_unique($this->CSS[$tag], $classproperties); } - else if ($tag) { $this->CSS[$tag] = $classproperties; } - } - } - else { - $tmp = array(); - for($n=0;$n<$level;$n++) { - if (isset($tags[$n])) { $t = trim($tags[$n]); } - else { $t = ''; } // mPDF 4.0 - if ($t) { - $tag = ''; - if (preg_match('/^[.](.*)$/',$t,$m)) { $tag = 'CLASS>>'.$m[1]; } - else if (preg_match('/^[#](.*)$/',$t,$m)) { $tag = 'ID>>'.$m[1]; } - else if (preg_match('/^('.$this->allowedCSStags.')[.](.*)$/',$t,$m)) { $tag = $m[1].'>>CLASS>>'.$m[2]; } - else if (preg_match('/^('.$this->allowedCSStags.')[#](.*)$/',$t,$m)) { $tag = $m[1].'>>ID>>'.$m[2]; } - else if (preg_match('/^('.$this->allowedCSStags.')$/',$t)) { $tag= $t; } - - if ($tag) $tmp[] = $tag; - // mPDF 4.0 - else { break; } - } - } - // mPDF 4.0 - if ($tag) { - $x = &$this->cascadeCSS; - foreach($tmp AS $tp) { $x = &$x[$tp]; } - $x = $this->array_merge_recursive_unique($x, $classproperties); - $x['depth'] = $level; - } - } - } - if ($pageselectors) { $this->mirrorMargins = true; } - $properties = array(); - $values = array(); - $classproperties = array(); - } - - } // end of if - //Remove CSS (tags and content), if any - $regexp = '/<style.*?>(.*?)<\/style>/si'; // it can be <style> or <style type="txt/css"> - $html = preg_replace($regexp,'',$html); -//print_r($this->CSS); exit; -//print_r($this->cascadeCSS); exit; - return $html; -} - -function readInlineCSS($html) -{ - //Fix incomplete CSS code - $size = strlen($html)-1; - if (substr($html,$size,1) != ';') $html .= ';'; - //Make CSS[Name-of-the-class] = array(key => value) - $regexp = '|\\s*?(\\S+?):(.+?);|i'; - preg_match_all( $regexp, $html, $styleinfo); - $properties = $styleinfo[1]; - $values = $styleinfo[2]; - //Array-properties and Array-values must have the SAME SIZE! - $classproperties = array(); - for($i = 0; $i < count($properties) ; $i++) $classproperties[strtoupper($properties[$i])] = trim($values[$i]); - return $this->fixCSS($classproperties); -} - - - -function setCSS($arrayaux,$type='',$tag='') // type= INLINE | BLOCK // tag= BODY -{ - if (!is_array($arrayaux)) return; //Removes PHP Warning - // Set font size first so that e.g. MARGIN 0.83em works on font size for this element - if (isset($arrayaux['FONT-SIZE'])) { - $v = $arrayaux['FONT-SIZE']; - if(is_numeric($v{0})) { - $mmsize = $this->ConvertSize($v,$this->FontSize); - $this->SetFontSize( $mmsize*($this->k),false ); //Get size in points (pt) - } - else{ - $v = strtoupper($v); - // mPDF 4.0 - if (isset($this->fontsizes[$v])) { - $this->SetFontSize( $this->fontsizes[$v]* $this->default_font_size,false); - } - } - if ($tag == 'BODY') { $this->SetDefaultFontSize($this->FontSizePt); } - } - -/*-- UNICODE-FONTS --*/ - if (isset($arrayaux['LANG']) && $this->useLang && $arrayaux['LANG'] && $this->is_MB && $arrayaux['LANG'] != $this->default_lang && ((strlen($arrayaux['LANG']) == 5 && $arrayaux['LANG'] != 'UTF-8') || strlen($arrayaux['LANG']) == 2)) { - list ($codepage,$mpdf_pdf_unifonts,$mpdf_directionality,$mpdf_jSpacing) = GetCodepage($arrayaux['LANG']); -/*-- CJK --*/ - if ($codepage == 'SHIFT_JIS') { $this->SetFont('sjis',$this->currentfontstyle,0,false); } - else if ($codepage == 'UHC') { $this->SetFont('uhc',$this->currentfontstyle,0,false); } - else if ($codepage == 'BIG5') { $this->SetFont('big5',$this->currentfontstyle,0,false); } - else if ($codepage == 'GBK') { $this->SetFont('gb',$this->currentfontstyle,0,false); } - else -/*-- END CJK --*/ - if ($mpdf_pdf_unifonts) { $this->RestrictUnicodeFonts($mpdf_pdf_unifonts); } - else { $this->RestrictUnicodeFonts($this->default_available_fonts ); } - if ($mpdf_directionality == 'rtl') { $this->biDirectional = true; } - if ($tag == 'BODY') { - $this->jSpacing = $mpdf_jSpacing; - $this->SetDirectionality($mpdf_directionality); - $this->currentLang = $codepage; - $this->default_lang = $codepage; - $this->default_jSpacing = $mpdf_jSpacing; - if ($mpdf_pdf_unifonts) { $this->default_available_fonts = $mpdf_pdf_unifonts; } - $this->default_dir = $mpdf_directionality; - } - else if ($type == 'BLOCK') { - $this->jSpacing = $mpdf_jSpacing; - } - else { // INLINE - if ($this->disableMultilingualJustify && $mpdf_jSpacing != $this->jSpacing && $this->blk[$this->blklvl]['align']=="J") { - $this->blk[$this->blklvl]['align']=""; - } - } - } - else if ($this->useLang && $this->is_MB ) { - $this->RestrictUnicodeFonts($this->default_available_fonts ); - $this->jSpacing = $this->default_jSpacing; - } -/*-- END UNICODE-FONTS --*/ - - - // FOR INLINE and BLOCK OR 'BODY' - if (isset($arrayaux['FONT-FAMILY'])) { - $v = $arrayaux['FONT-FAMILY']; - //If it is a font list, get all font types - $aux_fontlist = explode(",",$v); - $fonttype = $aux_fontlist[0]; - $fonttype = strtolower(trim($fonttype)); - if(($fonttype == 'helvetica') || ($fonttype == 'arial')) { $fonttype = 'sans-serif'; } - else if($fonttype == 'helvetica-embedded') { $fonttype = 'helvetica'; } - // mPDF 4.0 - else if($fonttype == 'courier-embedded') { $fonttype = 'courier'; } - else if($fonttype == 'times-embedded') { $fonttype = 'times'; } - else if($fonttype == 'times') { $fonttype = 'serif'; } - else if($fonttype == 'courier') { $fonttype = 'monospace'; } - if ($tag == 'BODY') { - $this->SetDefaultFont($fonttype); - } - $this->SetFont($fonttype,$this->currentfontstyle,0,false); - } - else { - $this->SetFont($this->currentfontfamily,$this->currentfontstyle,0,false); - } - - foreach($arrayaux as $k => $v) { - if ($type != 'INLINE' && $tag != 'BODY') { - switch($k){ - // BORDERS - case 'BORDER-TOP': - $this->blk[$this->blklvl]['border_top'] = $this->border_details($v); - if ($this->blk[$this->blklvl]['border_top']['s']) { $this->blk[$this->blklvl]['border'] = 1; } - break; - case 'BORDER-BOTTOM': - $this->blk[$this->blklvl]['border_bottom'] = $this->border_details($v); - if ($this->blk[$this->blklvl]['border_bottom']['s']) { $this->blk[$this->blklvl]['border'] = 1; } - break; - case 'BORDER-LEFT': - $this->blk[$this->blklvl]['border_left'] = $this->border_details($v); - if ($this->blk[$this->blklvl]['border_left']['s']) { $this->blk[$this->blklvl]['border'] = 1; } - break; - case 'BORDER-RIGHT': - $this->blk[$this->blklvl]['border_right'] = $this->border_details($v); - if ($this->blk[$this->blklvl]['border_right']['s']) { $this->blk[$this->blklvl]['border'] = 1; } - break; - - // PADDING - case 'PADDING-TOP': - $this->blk[$this->blklvl]['padding_top'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'PADDING-BOTTOM': - $this->blk[$this->blklvl]['padding_bottom'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'PADDING-LEFT': - $this->blk[$this->blklvl]['padding_left'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'PADDING-RIGHT': - $this->blk[$this->blklvl]['padding_right'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - - // MARGINS - case 'MARGIN-TOP': - // mPDF 4.2 Collaspe vertical block margins - $tmp = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - if (isset($this->blk[$this->blklvl]['lastbottommargin'])) { - if ($tmp > $this->blk[$this->blklvl]['lastbottommargin']) { - $tmp -= $this->blk[$this->blklvl]['lastbottommargin']; - } - else { - $tmp = 0; - } - } - $this->blk[$this->blklvl]['margin_top'] = $tmp; - break; - case 'MARGIN-BOTTOM': - $this->blk[$this->blklvl]['margin_bottom'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'MARGIN-LEFT': - $this->blk[$this->blklvl]['margin_left'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'MARGIN-RIGHT': - $this->blk[$this->blklvl]['margin_right'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - -/*-- BORDER-RADIUS --*/ - case 'BORDER-TOP-LEFT-RADIUS-H': - $this->blk[$this->blklvl]['border_radius_TL_H'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'BORDER-TOP-LEFT-RADIUS-V': - $this->blk[$this->blklvl]['border_radius_TL_V'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'BORDER-TOP-RIGHT-RADIUS-H': - $this->blk[$this->blklvl]['border_radius_TR_H'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'BORDER-TOP-RIGHT-RADIUS-V': - $this->blk[$this->blklvl]['border_radius_TR_V'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'BORDER-BOTTOM-LEFT-RADIUS-H': - $this->blk[$this->blklvl]['border_radius_BL_H'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'BORDER-BOTTOM-LEFT-RADIUS-V': - $this->blk[$this->blklvl]['border_radius_BL_V'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'BORDER-BOTTOM-RIGHT-RADIUS-H': - $this->blk[$this->blklvl]['border_radius_BR_H'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; - case 'BORDER-BOTTOM-RIGHT-RADIUS-V': - $this->blk[$this->blklvl]['border_radius_BR_V'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - break; -/*-- END BORDER-RADIUS --*/ - - case 'BACKGROUND-CLIP': - if (strtoupper($v) == 'PADDING-BOX') { $this->blk[$this->blklvl]['background_clip'] = 'padding-box'; } - break; - - case 'PAGE-BREAK-AFTER': - if (strtoupper($v) == 'AVOID') { $this->blk[$this->blklvl]['page_break_after_avoid'] = true; } - break; - - case 'WIDTH': - // mPDF 4.0 Allow em support and avoid 'auto' - if (strtoupper($v) != 'AUTO') { - $this->blk[$this->blklvl]['css_set_width'] = $this->ConvertSize($v,$this->blk[$this->blklvl-1]['inner_width'],$this->FontSize,false); - } - break; - - case 'TEXT-INDENT': - // mPDF 4.0 Left as raw value (may include 1% or 2em) - $this->blk[$this->blklvl]['text_indent'] = $v; - break; - - }//end of switch($k) - } - - - if ($type != 'INLINE') { // includes BODY tag - switch($k){ - - case 'MARGIN-COLLAPSE': // Custom tag to collapse margins at top and bottom of page - if (strtoupper($v) == 'COLLAPSE') { $this->blk[$this->blklvl]['margin_collapse'] = true; } - break; - - case 'LINE-HEIGHT': - // mPDF 4.2 - $this->blk[$this->blklvl]['line_height'] = $this->fixLineheight($v); - if (!$this->blk[$this->blklvl]['line_height'] ) { $this->blk[$this->blklvl]['line_height'] = $this->normalLineheight; } - break; - - case 'TEXT-ALIGN': //left right center justify - switch (strtoupper($v)) { - case 'LEFT': - $this->blk[$this->blklvl]['align']="L"; - break; - case 'CENTER': - $this->blk[$this->blklvl]['align']="C"; - break; - case 'RIGHT': - $this->blk[$this->blklvl]['align']="R"; - break; - case 'JUSTIFY': - $this->blk[$this->blklvl]['align']="J"; - break; - } - break; - - }//end of switch($k) - } - - - // FOR INLINE and BLOCK - switch($k){ - case 'TEXT-ALIGN': //left right center justify - if (strtoupper($v) == 'NOJUSTIFY' && $this->blk[$this->blklvl]['align']=="J") { - $this->blk[$this->blklvl]['align']=""; - } - break; - // bgcolor only - to stay consistent with original html2fpdf - case 'BACKGROUND': - case 'BACKGROUND-COLOR': - $cor = $this->ConvertColor($v); - if ($cor) { - // mPDF 3.0 - if ($tag == 'BODY') { - $this->bodyBackgroundColor = $cor; - } - else if ($type == 'INLINE') { - $this->spanbgcolorarray = $cor; - $this->spanbgcolor = true; - } - else { - $this->blk[$this->blklvl]['bgcolorarray'] = $cor; - $this->blk[$this->blklvl]['bgcolor'] = true; - } - } - else if ($type != 'INLINE') { - // mPDF 3.0 - if ($this->ColActive || $this->keep_block_together) { - $this->blk[$this->blklvl]['bgcolorarray'] = $this->blk[$this->blklvl-1]['bgcolorarray'] ; - $this->blk[$this->blklvl]['bgcolor'] = $this->blk[$this->blklvl-1]['bgcolor'] ; - } - } - break; - -/*-- GRADIENTS --*/ - case 'BACKGROUND-GRADIENT': - if ($type == 'BLOCK') { - $this->blk[$this->blklvl]['gradient'] = $v; - } - break; -/*-- END GRADIENTS --*/ - - - case 'FONT-STYLE': // italic normal oblique - switch (strtoupper($v)) { - case 'ITALIC': - case 'OBLIQUE': - $this->SetStyle('I',true); - break; - case 'NORMAL': - $this->SetStyle('I',false); - break; - } - break; - - case 'FONT-WEIGHT': // normal bold //Does not support: bolder, lighter, 100..900(step value=100) - switch (strtoupper($v)) { - case 'BOLD': - $this->SetStyle('B',true); - break; - case 'NORMAL': - $this->SetStyle('B',false); - break; - } - break; - - case 'VERTICAL-ALIGN': //super and sub only dealt with here e.g. <SUB> and <SUP> - switch (strtoupper($v)) { - case 'SUPER': - $this->SUP=true; - break; - case 'SUB': - $this->SUB=true; - break; - } - break; - - case 'TEXT-DECORATION': // none underline line-through (strikeout) //Does not support: overline, blink - if (stristr($v,'LINE-THROUGH')) { - $this->strike = true; - } - if (stristr($v,'UNDERLINE')) { - $this->SetStyle('U',true); - } - break; - - case 'TEXT-TRANSFORM': // none uppercase lowercase //Does not support: capitalize - switch (strtoupper($v)) { //Not working 100% - case 'UPPERCASE': - $this->toupper=true; - break; - case 'LOWERCASE': - $this->tolower=true; - break; - case 'NONE': break; - } - break; - - case 'OUTLINE-WIDTH': - switch(strtoupper($v)) { - case 'THIN': $v = '0.03em'; break; - case 'MEDIUM': $v = '0.05em'; break; - case 'THICK': $v = '0.07em'; break; - } - $this->outlineparam['WIDTH'] = $this->ConvertSize($v,$this->blk[$this->blklvl]['inner_width'],$this->FontSize); - break; - - case 'OUTLINE-COLOR': - if (strtoupper($v) == 'INVERT') { - if ($this->colorarray) { - $cor = $this->colorarray; - $this->outlineparam['COLOR'] = array('R'=> (255-$cor['R']), 'G'=> (255-$cor['G']), 'B'=> (255-$cor['B'])); - } - else { - $this->outlineparam['COLOR'] = array('R'=> 255, 'G'=> 255, 'B'=> 255); - } - } - else { - $cor = $this->ConvertColor($v); - if ($cor) { $this->outlineparam['COLOR'] = $cor ; } - } - break; - - case 'COLOR': // font color - $cor = $this->ConvertColor($v); - if ($cor) { - $this->colorarray = $cor; - $this->SetTextColor($cor['R'],$cor['G'],$cor['B']); - $this->issetcolor = true; - } - break; - - case 'DIR': - $this->biDirectional = true; - break; - - }//end of switch($k) - - - }//end of foreach -} - -function SetStyle($tag,$enable) -{ - //Modify style and select corresponding font - $this->$tag+=($enable ? 1 : -1); - $style=''; - //Fix some SetStyle misuse - if ($this->$tag < 0) $this->$tag = 0; - if ($this->$tag > 1) $this->$tag = 1; - foreach(array('B','I','U') as $s) { - if($this->$s>0) { - $style.=$s; - } - } - $this->currentfontstyle=$style; - $this->SetFont('',$style,0,false); -} - -function GetStyle() -{ - $style=''; - foreach(array('B','I','U') as $s) { - if($this->$s>0) { - $style.=$s; - } - } - return($style); -} - - -function DisableTags($str='') -{ - if ($str == '') //enable all tags - { - //Insert new supported tags in the long string below. - /////////////////////////////////////////////////////// - // Added custom tags <indexentry> - $this->enabledtags = "<span><s><strike><del><bdo><big><small><ins><cite><acronym><font><sup><sub><b><u><i><a><strong><em><code><samp><tt><kbd><var><q><table><thead><tfoot><tbody><tr><th><td><ol><ul><li><dl><dt><dd><form><input><select><textarea><option><div><p><h1><h2><h3><h4><h5><h6><pre><center><blockquote><address><hr><img><br><indexentry><indexinsert><bookmark><watermarktext><watermarkimage><tts><ttz><tta><column_break><columnbreak><newcolumn><newpage><page_break><pagebreak><formfeed><columns><toc><tocentry><tocpagebreak><pageheader><pagefooter><setpageheader><setpagefooter><sethtmlpageheader><sethtmlpagefooter><annotation><template><jpgraph><barcode><dottab>"; - } - else - { - $str = explode(",",$str); - foreach($str as $v) $this->enabledtags = str_replace(trim($v),'',$this->enabledtags); - } -} - - -/*-- TABLES --*/ - -// mPDF 4.2.015 -function finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight) { - $af = 0; // Above font - $bf = 0; // Below font - $mta = 0; // Maximum top-aligned - $mba = 0; // Maximum bottom-aligned - if ($lhxt['BS']) { - $af = max($af, ($lhxt['BS'] - ($maxfontsize * (0.5 + $this->baselineC)))); - } - if ($lhxt['M']) { - $af = max($af, ($lhxt['M'] - $maxfontsize)/2); - $bf = max($bf, ($lhxt['M'] - $maxfontsize)/2); - } - if ($lhxt['TT']) { - $bf = max($bf, ($lhxt['TT'] - $maxfontsize)); - } - if ($lhxt['TB']) { - $af = max($af, ($lhxt['TB'] - $maxfontsize)); - } - if ($lhxt['T']) { - $mta = max($mta, $lhxt['T']); - } - if ($lhxt['B']) { - $mba = max($mba, $lhxt['B']); - } - if ((!$lhfixed || !$forceExactLineheight) && ($af > (($maxlineHeight - $maxfontsize)/2) || $bf > (($maxlineHeight - $maxfontsize)/2))) { - $maxlineHeight = $maxfontsize + $af + $bf; - } - else if (!$lhfixed) { $af = $bf = ($maxlineHeight - $maxfontsize)/2; } - if ($mta > $maxlineHeight) { - $bf += ($mta - $maxlineHeight); - $maxlineHeight = $mta; - } - if ($mba > $maxlineHeight) { - $af += ($mba - $maxlineHeight); - $maxlineHeight = $mba; - } - return $maxlineHeight; -} - -// mPDF 4.2.015 -function TableWordWrap($maxwidth, $forcewrap = 0, $textbuffer = '', $def_fontsize, $returnarray=false) { // NB ** returnarray used in flowchart - $biggestword=0; - $toonarrow=false; - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$curlyquote = mb_convert_encoding("\xe2\x80\x9e",$this->mb_enc,'UTF-8'); - //$curlylowquote = mb_convert_encoding("\xe2\x80\x9d",$this->mb_enc,'UTF-8'); - $curlyquote = api_convert_encoding("\xe2\x80\x9e",$this->mb_enc,'UTF-8'); - $curlylowquote = api_convert_encoding("\xe2\x80\x9d",$this->mb_enc,'UTF-8'); - // - - // mPDF 3.0 Don't use ltrim as this gets rid of \n - new line from <br> - //$textbuffer[0][0] = ltrim($textbuffer[0][0]); - $textbuffer[0][0] = preg_replace('/^[ ]*/','',$textbuffer[0][0]); - - if ((count($textbuffer) == 0) or ((count($textbuffer) == 1) && ($textbuffer[0][0] == ''))) { return 0; } - - $text = ''; - $lhfixed = false; - if (preg_match('/([0-9.,]+)mm/',$this->table_lineheight)) { $lhfixed = true; } - if ($lhfixed) { $def_lineheight = $this->_computeLineheight($this->table_lineheight, $def_fontsize);} - else { $def_lineheight = 0; } - // START OF NEW LINE - // Initialise lineheight variables - $maxfontsize = 0; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $def_lineheight ; - - $ch = 0; - $width = 0; - $ln = 1; // Counts line number - $mxw = $this->GetStringWidth('W'); // Keep tabs on Maxwidth of actual text - foreach ($textbuffer as $cctr=>$chunk) { - $line = $chunk[0]; - - //IMAGE - if (substr($line,0,3) == "\xbb\xa4\xac") { //identifier has been identified! - // mPDF 4.0 - $objattr = $this->_getObjAttr($line); - if ($objattr['type'] == 'nestedtable') { - // END OF LINE - // Finalise & add lineheight - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - $level = $objattr['level']; - $ih = $this->table[($level+1)][$objattr['nestedcontent']]['h']; // nested table width - $ch += $ih; - // START OF NEW LINE - // Initialise lineheight variables - $ln++; - $maxfontsize = 0; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $def_lineheight ; - $width = 0; - $text = ""; - continue; - } - - list($skipln,$iw,$ih) = $this->inlineObject($specialcontent['type'],0,0, $objattr, $this->lMargin,$width,$maxwidth,$maxlineHeight,false,true); - if ($objattr['type'] == 'hr') { - // END OF LINE - // Finalise & add lineheight - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - // Add HR height - $ch += $ih; - // START OF NEW LINE - // Initialise lineheight variables - $ln++; - $maxfontsize = 0; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $def_lineheight ; - $width = 0; - $text = ""; - continue; - } - - if ($skipln==1 || $skipln==-2) { - // Finish last line - // END OF LINE - // Finalise & add lineheight - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - // START OF NEW LINE - // Initialise lineheight variables - $maxfontsize = 0; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $def_lineheight ; - $ln++; - $width = 0; - $text = ""; - } - $va = $objattr['vertical-align']; - if ($va) { - $lhxt[$va] = max($lhxt[$va], $ih); - } - if ($lhfixed && $ih > $def_fontsize) { $forceExactLineheight = false; } - $maxlineHeight = max($maxlineHeight ,$ih); - $width += $iw; - continue; - } - - // SET FONT SIZE/STYLE from $chunk[n] - // FONTSIZE - if(isset($chunk[11]) and $chunk[11] != '') { - if ($this->shrin_k) { - $this->SetFontSize($chunk[11]/$this->shrin_k,false); - } - else { - $this->SetFontSize($chunk[11],false); - } - } - - // mPDF 3.0 Moved to after set FontSize - if ($line == "\n") { - // END OF LINE - $maxfontsize = max($maxfontsize,$this->FontSize); - $fh = $this->_computeLineheight($this->table_lineheight); - if ($lhfixed && $this->FontSize > $def_fontsize) { - $fh = $this->FontSize; - $forceExactLineheight = false; - } - $maxlineHeight = max($maxlineHeight,$fh); - - // Finalise & add lineheight - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - // START OF NEW LINE - // Initialise lineheight variables - $maxfontsize = 0; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $this->_computeLineheight($this->table_lineheight); - $ln++; - $text = ""; - $width = 0; - // mPDF 3.0 Reset FontSize - if(isset($chunk[11]) and $chunk[11] != '') { - $this->SetFontSize($this->default_font_size,false); - } - continue; - } - - // FONTFAMILY - if(isset($chunk[4]) and $chunk[4] != '') { $font = $this->SetFont($chunk[4],$this->FontStyle,0,false); } - - // FONT STYLE B I U - if(isset($chunk[2]) and $chunk[2] != '') { - if (strpos($chunk[2],"B") !== false) $this->SetStyle('B',true); - if (strpos($chunk[2],"I") !== false) $this->SetStyle('I',true); - } - - $space = $this->GetStringWidth(' '); - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (mb_substr($line,0,1,$this->mb_enc ) == ' ') { // line (chunk) starts with a space - if (api_substr($line,0,1,$this->mb_enc ) == ' ') { // line (chunk) starts with a space - // - $width += $space; - $text .= ' '; - } - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (mb_substr($line,(mb_strlen($line,$this->mb_enc )-1),1,$this->mb_enc ) == ' ') { $lsend = true; } // line (chunk) ends with a space - if (api_substr($line,(api_strlen($line,$this->mb_enc )-1),1,$this->mb_enc ) == ' ') { $lsend = true; } // line (chunk) ends with a space - // - else { $lsend = false; } - $line= trim($line); // mPDF 4.4.012 - if ($line == '') { continue; } - - $words = explode(' ', $line); // mPDF 4.4.012 - - foreach ($words as $word) { - $word = trim($word); // mPDF 4.4.012 - $wordwidth = $this->GetStringWidth($word); - - - //maxwidth is insufficient for one word - if ($wordwidth > $maxwidth + 0.0001) { - $firstchunk=true; - while($wordwidth > $maxwidth + 0.0001) { - $chw = 0; // check width - // Modified by Ivan Tcholakov, 28-JAN-2010. - //for ( $i = 0; $i < mb_strlen($word, $this->mb_enc ); $i++ ) { - // $chw = $this->GetStringWidth(mb_substr($word,0,$i+1,$this->mb_enc )); - for ( $i = 0; $i < api_strlen($word, $this->mb_enc ); $i++ ) { - $chw = $this->GetStringWidth(api_substr($word,0,$i+1,$this->mb_enc )); - // - if ($chw > $maxwidth) { - if ($text && $firstchunk) { - // END OF LINE - // Finalise & add lineheight - $maxfontsize = max($maxfontsize,$this->FontSize); - $fh = $this->_computeLineheight($this->table_lineheight); - if ($lhfixed && $this->FontSize > $def_fontsize) { - $fh = $this->FontSize; - $forceExactLineheight = false; - } - $maxlineHeight = max($maxlineHeight,$fh); - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - // START OF NEW LINE - // Initialise lineheight variables - $maxfontsize = $this->FontSize; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $this->_computeLineheight($this->table_lineheight); - $ln++; - } - // END OF LINE - // Finalise & add lineheight - $maxfontsize = max($maxfontsize,$this->FontSize); - $fh = $this->_computeLineheight($this->table_lineheight); - if ($lhfixed && $this->FontSize > $def_fontsize) { - $fh = $this->FontSize; - $forceExactLineheight = false; - } - $maxlineHeight = max($maxlineHeight,$fh); - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - // START OF NEW LINE - // Initialise lineheight variables - $maxfontsize = $this->FontSize; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $this->_computeLineheight($this->table_lineheight); - $ln++; - $mxw = $maxwidth; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$text = mb_substr($word,0,$i,$this->mb_enc ); - //$word = mb_substr($word,$i,mb_strlen($word, $this->mb_enc )-$i,$this->mb_enc ); - $text = api_substr($word,0,$i,$this->mb_enc ); - $word = api_substr($word,$i,api_strlen($word, $this->mb_enc )-$i,$this->mb_enc ); - // - $wordwidth = $this->GetStringWidth($word); - $width = 0; - $firstchunk=false; - break; - } - } - // mPDF 4.2.015 to catch errors - added $i==0 - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (mb_strlen($word, $this->mb_enc )<2 || $i==0) { - if (api_strlen($word, $this->mb_enc )<2 || $i==0) { - // - $wordwidth = $maxwidth - 0.0001; - if ($this->debug) { $this->Error("Table cell width calculated less than that needed for single character!"); } - } - $firstchunk=false; - } - } - // Word fits on line... - if ($width + $wordwidth < $maxwidth + 0.0001) { - $mxw = max($mxw, ($width+$wordwidth)); - $width += $wordwidth + $space; - $text .= $word.' '; - } - // Word does not fit on line... - else { - $alloworphans = false; - // In case of orphan punctuation or SUB/SUP - // Strip end punctuation - // mPDF 4.2 Only allow 1 orphan character {1} - $tmp = preg_replace('/[\.),;:!?"'.$curlyquote . $curlylowquote ."\xef\xbc\x8c\xe3\x80\x82".']{1}$/','',$word); - // mPDF 4.5.012 ONLY ONE! - if ($tmp !== $word && !preg_match('/[\.),;:!?"'.$curlyquote . $curlylowquote ."\xef\xbc\x8c\xe3\x80\x82".']$/',$tmp)) { - $tmpwidth = $this->GetStringWidth($tmp); - if ($width + $tmpwidth < $maxwidth + 0.0001) { $alloworphans = true; } - } - // If line = SUB/SUP to max of orphansallowed ( $this->SUP || $this->SUB ) // mPDF 3.0 - if(( (isset($chunk[5]) and $chunk[5]) || (isset($chunk[6]) and $chunk[6])) && strlen($word) <= $this->orphansAllowed) { - $alloworphans = true; - } - - - // if [stripped] word fits - if ($alloworphans) { - $mxw = $maxwidth; - $width += $wordwidth + $space; - $text .= $word.' '; - } - else { -/*-- HYPHENATION --*/ - // mPDF 3.0 Soft Hyphens chr(173) - if (($this->is_MB && preg_match("/\xc2\xad/",$word)) || (!$this->is_MB && preg_match("/".chr(173)."/",$word) && ($this->FontFamily!='symbol' && $this->FontFamily!='zapfdingbats')) ) { - list($success,$pre,$post,$prelength) = $this->softHyphenate($word, ($maxwidth - $width)); - if ($success) { - $text .= $pre.'-'; - $word = $post; - $wordwidth = $this->GetStringWidth($word); - } - } - else if ($this->hyphenate || ($this->hyphenateTables)) { - list($success,$pre,$post,$prelength) = $this->hyphenateWord($word, ($maxwidth - $width)); - if ($success) { - $text .= $pre.'-'; - $word = $post; - $wordwidth = $this->GetStringWidth($word); - } - } -/*-- END HYPHENATION --*/ - // END OF LINE - // Finalise & add lineheight - $maxfontsize = max($maxfontsize,$this->FontSize); - $fh = $this->_computeLineheight($this->table_lineheight); - if ($lhfixed && $this->FontSize > $def_fontsize) { - $fh = $this->FontSize; - $forceExactLineheight = false; - } - $maxlineHeight = max($maxlineHeight,$fh); - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - $mxw = $maxwidth; - // START OF NEW LINE - // Initialise lineheight variables - $maxfontsize = $this->FontSize; - $forceExactLineheight = true; - $lhxt = array('BS'=>0, 'M'=>0, 'TT'=>0, 'TB'=>0, 'T'=>0, 'B'=>0); - $maxlineHeight = $this->_computeLineheight($this->table_lineheight); - $ln++; - $width = $wordwidth + $space; - $text = $word.' '; - } - } - $maxfontsize = max($maxfontsize,$this->FontSize); - $fh = $this->_computeLineheight($this->table_lineheight); - if ($lhfixed && $this->FontSize > $def_fontsize) { - $fh = $this->FontSize; - $forceExactLineheight = false; - } - $maxlineHeight = max($maxlineHeight,$fh); - } - - // End of textbuffer chunk - if (!$lsend) { - $width -= $space; - $text = rtrim($text); // mPDF 4.4.012 - } - - // RESET FONT SIZE/STYLE - // RESETTING VALUES - //Now we must deactivate what we have used - if(isset($chunk[2]) and $chunk[2] != '') { - $this->SetStyle('B',false); - $this->SetStyle('I',false); - } - if(isset($chunk[4]) and $chunk[4] != '') { - $this->SetFont($this->default_font,$this->FontStyle,0,false); - } - if(isset($chunk[11]) and $chunk[11] != '') { - $this->SetFontSize($this->default_font_size,false); - } - } - // Finalise lineheight if something output on line and add - if ($width) { - $ch += $this->finaliseCellLineHeight($lhxt, $maxfontsize, $maxlineHeight, $lhfixed, $forceExactLineheight); - } - if ($returnarray) { return array($ch,$ln,$mxw); } - else { return $ch; } - -} - - -function TableCheckMinWidth(&$text, $maxwidth, $forcewrap = 0, $textbuffer = '') -{ - $biggestword=0; - $toonarrow=false; - if ((count($textbuffer) == 0) or ((count($textbuffer) == 1) && ($textbuffer[0][0] == ''))) { return 0; } - - foreach ($textbuffer as $chunk) { - - $line = $chunk[0]; - - // IMAGES & FORM ELEMENTS - if (substr($line,0,3) == "\xbb\xa4\xac") { //inline object - FORM element or IMAGE! - // mPDF 4.0 - $objattr = $this->_getObjAttr($line); - if ($objattr['type']!='hr' && isset($objattr['width']) && ($objattr['width']/$this->shrin_k) > ($maxwidth + 0.0001) ) { - if (($objattr['width']/$this->shrin_k) > $biggestword) { $biggestword = ($objattr['width']/$this->shrin_k); } - $toonarrow=true; - } - continue; - } - - if ($line == "\n") { - continue; - } - $line = trim($line ); // mPDF 4.4.012 - // SET FONT SIZE/STYLE from $chunk[n] - - // FONTSIZE - if(isset($chunk[11]) and $chunk[11] != '') { - if ($this->shrin_k) { - $this->SetFontSize($chunk[11]/$this->shrin_k,false); - } - else { - $this->SetFontSize($chunk[11],false); - } - } - // FONTFAMILY - if(isset($chunk[4]) and $chunk[4] != '') { $font = $this->SetFont($chunk[4],$this->FontStyle,0,false); } - // B I U - if(isset($chunk[2]) and $chunk[2] != '') { - if (strpos($chunk[2],"B") !== false) $this->SetStyle('B',true); - if (strpos($chunk[2],"I") !== false) $this->SetStyle('I',true); - } - - $words = explode(' ', $line); // mPDF 4.4.012 - foreach ($words as $word) { - $word = trim($word); // mPDF 4.4.012 - $wordwidth = $this->GetStringWidth($word); - - //EDITEI - //Warn user that maxwidth is insufficient - if ($wordwidth > $maxwidth + 0.0001) { - if ($wordwidth > $biggestword) { $biggestword = $wordwidth; } - $toonarrow=true; - } - - } - - // RESET FONT SIZE/STYLE - // RESETTING VALUES - //Now we must deactivate what we have used - if(isset($chunk[2]) and $chunk[2] != '') { - $this->SetStyle('B',false); - $this->SetStyle('I',false); - } - if(isset($chunk[4]) and $chunk[4] != '') { - $this->SetFont($this->default_font,$this->FontStyle,0,false); - } - if(isset($chunk[11]) and $chunk[11] != '') { - $this->SetFontSize($this->default_font_size,false); - } - } - - //Return -(wordsize) if word is bigger than maxwidth - // ADDED - if (($toonarrow) && ($this->table_error_report)) { - $this->Error("Word is too long to fit in table - ".$this->table_error_report_param); - } - if ($toonarrow) return -$biggestword; - else return 1; -} - -function shrinkTable(&$table,$k) { - $table['border_spacing_H'] /= $k; - $table['border_spacing_V'] /= $k; - - $table['padding']['T'] /= $k; - $table['padding']['R'] /= $k; - $table['padding']['B'] /= $k; - $table['padding']['L'] /= $k; - - $table['margin']['T'] /= $k; - $table['margin']['R'] /= $k; - $table['margin']['B'] /= $k; - $table['margin']['L'] /= $k; - - $table['border_details']['T']['w'] /= $k; - $table['border_details']['R']['w'] /= $k; - $table['border_details']['B']['w'] /= $k; - $table['border_details']['L']['w'] /= $k; - - if (isset($table['max_cell_border_width']['T'])) $table['max_cell_border_width']['T'] /= $k; - if (isset($table['max_cell_border_width']['R'])) $table['max_cell_border_width']['R'] /= $k; - if (isset($table['max_cell_border_width']['B'])) $table['max_cell_border_width']['B'] /= $k; - if (isset($table['max_cell_border_width']['L'])) $table['max_cell_border_width']['L'] /= $k; - - if ($this->simpleTables){ // mPDF 4.2.017 - $table['simple']['border_details']['T']['w'] /= $k; - $table['simple']['border_details']['R']['w'] /= $k; - $table['simple']['border_details']['B']['w'] /= $k; - $table['simple']['border_details']['L']['w'] /= $k; - // mPDF 4.3.006 removed padding - } - - $table['miw'] /= $k; - $table['maw'] /= $k; - - // unset($table['miw']); - // unset($table['maw']); - // $table['wc'] = array_pad(array(),$table['nc'],array('miw'=>0,'maw'=>0)); - - for($j = 0 ; $j < $table['nc'] ; $j++ ) { //columns - - $table['wc'][$j]['miw'] /= $k; - $table['wc'][$j]['maw'] /= $k; - - if (isset($table['wc'][$j]['absmiw']) && $table['wc'][$j]['absmiw'] ) $table['wc'][$j]['absmiw'] /= $k; - - for($i = 0 ; $i < $table['nr']; $i++ ) { //rows - $c = &$table['cells'][$i][$j]; - if (isset($c) && $c) { - if (!$this->simpleTables){ // mPDF 4.2.017 - if ($this->packTableData) { - // mPDF 4.3.009 Binary packed data - $cell = $this->_unpackCellBorder($c['borderbin'] ); - $cell['border_details']['T']['w'] /= $k; - $cell['border_details']['R']['w'] /= $k; - $cell['border_details']['B']['w'] /= $k; - $cell['border_details']['L']['w'] /= $k; - $cell['border_details']['mbw']['TL'] /= $k; - $cell['border_details']['mbw']['TR'] /= $k; - $cell['border_details']['mbw']['BL'] /= $k; - $cell['border_details']['mbw']['BR'] /= $k; - $cell['border_details']['mbw']['LT'] /= $k; - $cell['border_details']['mbw']['LB'] /= $k; - $cell['border_details']['mbw']['RT'] /= $k; - $cell['border_details']['mbw']['RB'] /= $k; - // mPDF 4.3.009 Binary packed data - $c['borderbin'] = $this->_packCellBorder($cell); - } - else { - $c['border_details']['T']['w'] /= $k; - $c['border_details']['R']['w'] /= $k; - $c['border_details']['B']['w'] /= $k; - $c['border_details']['L']['w'] /= $k; - $c['border_details']['mbw']['TL'] /= $k; - $c['border_details']['mbw']['TR'] /= $k; - $c['border_details']['mbw']['BL'] /= $k; - $c['border_details']['mbw']['BR'] /= $k; - $c['border_details']['mbw']['LT'] /= $k; - $c['border_details']['mbw']['LB'] /= $k; - $c['border_details']['mbw']['RT'] /= $k; - $c['border_details']['mbw']['RB'] /= $k; - } - } - $c['padding']['T'] /= $k; - $c['padding']['R'] /= $k; - $c['padding']['B'] /= $k; - $c['padding']['L'] /= $k; - $c['maxs'] /= $k; - if (isset($c['w'])) { $c['w'] /= $k; } - $c['s'] /= $k; - $c['maw'] /= $k; - $c['miw'] /= $k; - if (isset($c['absmiw'])) $c['absmiw'] /= $k; - if (isset($c['nestedmaw'])) $c['nestedmaw'] /= $k; - if (isset($c['nestedmiw'])) $c['nestedmiw'] /= $k; - } - }//rows - }//columns - unset($c); -} - -// mPDF 4.3.009 Binary packed data -function _packCellBorder($cell) { - if (!is_array($cell) || !isset($cell)) { return ''; } - - if (!$this->packTableData) { return $cell; } - - $bindata = pack("nndnnnA10nndnnnA10nndnnnA10nndnnnA10nd9", - $cell['border'], - $cell['border_details']['R']['s'], - $cell['border_details']['R']['w'], - $cell['border_details']['R']['c']['R'], - $cell['border_details']['R']['c']['G'], - $cell['border_details']['R']['c']['B'], - $cell['border_details']['R']['style'], - $cell['border_details']['R']['dom'], - - $cell['border_details']['L']['s'], - $cell['border_details']['L']['w'], - $cell['border_details']['L']['c']['R'], - $cell['border_details']['L']['c']['G'], - $cell['border_details']['L']['c']['B'], - $cell['border_details']['L']['style'], - $cell['border_details']['L']['dom'], - - $cell['border_details']['T']['s'], - $cell['border_details']['T']['w'], - $cell['border_details']['T']['c']['R'], - $cell['border_details']['T']['c']['G'], - $cell['border_details']['T']['c']['B'], - $cell['border_details']['T']['style'], - $cell['border_details']['T']['dom'], - - $cell['border_details']['B']['s'], - $cell['border_details']['B']['w'], - $cell['border_details']['B']['c']['R'], - $cell['border_details']['B']['c']['G'], - $cell['border_details']['B']['c']['B'], - $cell['border_details']['B']['style'], - $cell['border_details']['B']['dom'], - - $cell['border_details']['mbw']['BL'], - $cell['border_details']['mbw']['BR'], - $cell['border_details']['mbw']['RT'], - $cell['border_details']['mbw']['RB'], - $cell['border_details']['mbw']['TL'], - $cell['border_details']['mbw']['TR'], - $cell['border_details']['mbw']['LT'], - $cell['border_details']['mbw']['LB'], - - $cell['border_details']['cellposdom'] - ); - return $bindata; -} - - - -// mPDF 4.3.009 Binary packed data -function _getBorderWidths($bindata) { - if (!$bindata) { return array(0,0,0,0); } - - if (!$this->packTableData) { return array($bindata['border_details']['T']['w'], $bindata['border_details']['R']['w'], $bindata['border_details']['B']['w'], $bindata['border_details']['L']['w']); } - - $bd = unpack("nbord/nrs/drw/nrcr/nrcg/nrcb/A10rst/nrd/nls/dlw/nlcr/nlcg/nlcb/A10lst/nld/nts/dtw/ntcr/ntcg/ntcb/A10tst/ntd/nbs/dbw/nbcr/nbcg/nbcb/A10bst/nbd/dmbl/dmbr/dmrt/dmrb/dmtl/dmtr/dmlt/dmlb/dcpd", $bindata); - $cell['border_details']['R']['w'] = $bd['rw']; - $cell['border_details']['L']['w'] = $bd['lw']; - $cell['border_details']['T']['w'] = $bd['tw']; - $cell['border_details']['B']['w'] = $bd['bw']; - return array($bd['tw'], $bd['rw'], $bd['bw'], $bd['lw']); -} - - -// mPDF 4.3.009 Binary packed data -function _unpackCellBorder($bindata) { - if (!$bindata) { return array(); } - - if (!$this->packTableData) { return $bindata; } - - $bd = unpack("nbord/nrs/drw/nrcr/nrcg/nrcb/A10rst/nrd/nls/dlw/nlcr/nlcg/nlcb/A10lst/nld/nts/dtw/ntcr/ntcg/ntcb/A10tst/ntd/nbs/dbw/nbcr/nbcg/nbcb/A10bst/nbd/dmbl/dmbr/dmrt/dmrb/dmtl/dmtr/dmlt/dmlb/dcpd/", $bindata); - $cell['border'] = $bd['bord']; - $cell['border_details']['R']['s'] = $bd['rs']; - $cell['border_details']['R']['w'] = $bd['rw']; - $cell['border_details']['R']['c']['R'] = $bd['rcr']; - $cell['border_details']['R']['c']['G'] = $bd['rcg']; - $cell['border_details']['R']['c']['B'] = $bd['rcb']; - $cell['border_details']['R']['style'] = trim($bd['rst']); - $cell['border_details']['R']['dom'] = $bd['rd']; - - $cell['border_details']['L']['s'] = $bd['ls']; - $cell['border_details']['L']['w'] = $bd['lw']; - $cell['border_details']['L']['c']['R'] = $bd['lcr']; - $cell['border_details']['L']['c']['G'] = $bd['lcg']; - $cell['border_details']['L']['c']['B'] = $bd['lcb']; - $cell['border_details']['L']['style'] = trim($bd['lst']); - $cell['border_details']['L']['dom'] = $bd['ld']; - - $cell['border_details']['T']['s'] = $bd['ts']; - $cell['border_details']['T']['w'] = $bd['tw']; - $cell['border_details']['T']['c']['R'] = $bd['tcr']; - $cell['border_details']['T']['c']['G'] = $bd['tcg']; - $cell['border_details']['T']['c']['B'] = $bd['tcb']; - $cell['border_details']['T']['style'] = trim($bd['tst']); - $cell['border_details']['T']['dom'] = $bd['td']; - - $cell['border_details']['B']['s'] = $bd['bs']; - $cell['border_details']['B']['w'] = $bd['bw']; - $cell['border_details']['B']['c']['R'] = $bd['bcr']; - $cell['border_details']['B']['c']['G'] = $bd['bcg']; - $cell['border_details']['B']['c']['B'] = $bd['bcb']; - $cell['border_details']['B']['style'] = trim($bd['bst']); - $cell['border_details']['B']['dom'] = $bd['bd']; - - $cell['border_details']['mbw']['BL'] = $bd['mbl']; - $cell['border_details']['mbw']['BR'] = $bd['mbr']; - $cell['border_details']['mbw']['RT'] = $bd['mrt']; - $cell['border_details']['mbw']['RB'] = $bd['mrb']; - $cell['border_details']['mbw']['TL'] = $bd['mtl']; - $cell['border_details']['mbw']['TR'] = $bd['mtr']; - $cell['border_details']['mbw']['LT'] = $bd['mlt']; - $cell['border_details']['mbw']['LB'] = $bd['mlb']; - $cell['border_details']['cellposdom'] = $bd['cpd']; - - return($cell); -} - - -////////////////////////TABLE CODE (from PDFTable)///////////////////////////////////// -////////////////////////TABLE CODE (from PDFTable)///////////////////////////////////// -////////////////////////TABLE CODE (from PDFTable)///////////////////////////////////// -//table Array of (w, h, bc, nr, wc, hr, cells) -//w Width of table -//h Height of table -//nc Number column -//nr Number row -//hr List of height of each row -//wc List of width of each column -//cells List of cells of each rows, cells[i][j] is a cell in the table -function _tableColumnWidth(&$table,$firstpass=false){ - $cs = &$table['cells']; - - $nc = $table['nc']; - $nr = $table['nr']; - $listspan = array(); - - if ($table['borders_separate']) { - $tblbw = $table['border_details']['L']['w'] + $table['border_details']['R']['w'] + $table['margin']['L'] + $table['margin']['R'] + $table['padding']['L'] + $table['padding']['R'] + $table['border_spacing_H']; - } - else { $tblbw = $table['max_cell_border_width']['L']/2 + $table['max_cell_border_width']['R']/2 + $table['margin']['L'] + $table['margin']['R']; } - - // mPDF 4.2 - $longCJK = false; - - // ADDED table['l'][colno] - // = total length of text approx (using $c['s']) in that column - used to approximately distribute col widths in _tableWidth - // - for($j = 0 ; $j < $nc ; $j++ ) { //columns - $wc = &$table['wc'][$j]; - for($i = 0 ; $i < $nr ; $i++ ) { //rows - if (isset($cs[$i][$j]) && $cs[$i][$j]) { - $c = &$cs[$i][$j]; - - // mPDF 4.3.006 - if ($this->simpleTables){ - if ($table['borders_separate']) { // NB twice border width - $extrcw = $table['simple']['border_details']['L']['w'] + $table['simple']['border_details']['R']['w'] + $c['padding']['L'] + $c['padding']['R'] + $table['border_spacing_H']; - } - else { - $extrcw = $table['simple']['border_details']['L']['w']/2 + $table['simple']['border_details']['R']['w']/2 + $c['padding']['L'] + $c['padding']['R']; - } - } - else { - // mPDF 4.3.009 - if ($this->packTableData) { - list($bt,$br,$bb,$bl) = $this->_getBorderWidths($c['borderbin']); - } - else { - $br = $c['border_details']['R']['w']; - $bl = $c['border_details']['L']['w']; - } - if ($table['borders_separate']) { // NB twice border width - $extrcw = $bl + $br + $c['padding']['L'] + $c['padding']['R'] + $table['border_spacing_H']; - } - else { - $extrcw = $bl/2 + $br/2 + $c['padding']['L'] + $c['padding']['R']; - } - } - - // mPDF 3.0 - //$mw = $this->GetStringWidth('W') + $extrcw ; - $mw = 0; - - $c['absmiw'] = $mw; - - if (isset($c['R']) && $c['R']) { - $c['maw'] = $c['miw'] = $this->FontSize + $extrcw ; - if (isset($c['w'])) { // If cell width is specified - if ($c['miw'] <$c['w']) { $c['miw'] = $c['w']; } - } - if (!isset($c['colspan'])) { - if ($wc['miw'] < $c['miw']) { $wc['miw'] = $c['miw']; } - if ($wc['maw'] < $c['maw']) { $wc['maw'] = $c['maw']; } - - if ($firstpass) { - if (isset($table['l'][$j]) ) { - $table['l'][$j] += $c['miw'] ; - } - else { - $table['l'][$j] = $c['miw'] ; - } - } - } - if ($c['miw'] > $wc['miw']) { $wc['miw'] = $c['miw']; } - if ($wc['miw'] > $wc['maw']) { $wc['maw'] = $wc['miw']; } - continue; - } - - if ($firstpass) { - if (isset($c['s'])) { $c['s'] += $extrcw; } - if (isset($c['maxs'])) { $c['maxs'] += $extrcw; } - if (isset($c['nestedmiw'])) { $c['nestedmiw'] += $extrcw; } - if (isset($c['nestedmaw'])) { $c['nestedmaw'] += $extrcw; } - } - - - // If minimum width has already been set by a nested table or inline object (image/form), use it - if (isset($c['nestedmiw'])) { $miw = $c['nestedmiw']; } - else { $miw = $mw; } - - if (isset($c['maxs']) && $c['maxs'] != '') { $c['s'] = $c['maxs']; } - - // If maximum width has already been set by a nested table, use it - if (isset($c['nestedmaw'])) { $c['maw'] = $c['nestedmaw']; } - else $c['maw'] = $c['s']; - - if (isset($c['nowrap']) && $c['nowrap']) { $miw = $c['maw']; } - - if (isset($c['wpercent']) && $firstpass) { - if (isset($c['colspan'])) { // Not perfect - but % set on colspan is shared equally on cols. - for($k=0;$k<$c['colspan'];$k++) { - $table['wc'][($j+$k)]['wpercent'] = $c['wpercent'] / $c['colspan']; - } - } - else { - if (isset($table['w']) && $table['w']) { $c['w'] = $c['wpercent']/100 * ($table['w'] - $tblbw ); } - $wc['wpercent'] = $c['wpercent']; - } - } - - - if (isset($c['w'])) { // If cell width is specified - if ($miw<$c['w']) { $c['miw'] = $c['w']; } // Cell min width = that specified - if ($miw>$c['w']) { $c['miw'] = $c['w'] = $miw; } // If width specified is less than minimum allowed (W) increase it - if (!isset($wc['w'])) { $wc['w'] = 1; } // If the Col width is not specified = set it to 1 - - } - else { $c['miw'] = $miw; } // If cell width not specified -> set Cell min width it to minimum allowed (W) - - if ($c['maw'] < $c['miw']) { $c['maw'] = $c['miw']; } // If Cell max width < Minwidth - increase it to = - if (!isset($c['colspan'])) { - if ($wc['miw'] < $c['miw']) { $wc['miw'] = $c['miw']; } // Update Col Minimum and maximum widths - if ($wc['maw'] < $c['maw']) { $wc['maw'] = $c['maw']; } - if ((isset($wc['absmiw']) && $wc['absmiw'] < $c['absmiw']) || !isset($wc['absmiw'])) { $wc['absmiw'] = $c['absmiw']; } // Update Col Minimum and maximum widths - - if (isset($table['l'][$j]) ) { - $table['l'][$j] += $c['s']; - - } - else { - $table['l'][$j] = $c['s']; - } - - } - else { - $listspan[] = array($i,$j); - } - - //Check if minimum width of the whole column is big enough for largest word to fit - $auxtext = implode("",$c['text']); - if (isset($c['textbuffer'])) { - $minwidth = $this->TableCheckMinWidth($auxtext,$wc['miw']- $extrcw ,0,$c['textbuffer']); - } - else { $minwidth = 0; } - if ($minwidth < 0) { - // mPDF 4.2 - if(preg_match("/[".$this->pregCJKchars."]{10,}/u",$auxtext)) { $longCJK = true; } - //increase minimum width - if (!isset($c['colspan'])) { - $wc['miw'] = max($wc['miw'],((-$minwidth) + $extrcw) ); - } - } - if (!isset($c['colspan'])) { - if ($wc['miw'] > $wc['maw']) { $wc['maw'] = $wc['miw']; } //update maximum width, if needed - } - } - unset($c); - }//rows - }//columns - - - // COLUMN SPANS - $wc = &$table['wc']; - foreach ($listspan as $span) { - list($i,$j) = $span; - $c = &$cs[$i][$j]; - $lc = $j + $c['colspan']; - if ($lc > $nc) { $lc = $nc; } - - $wis = $wisa = 0; - $was = $wasa = 0; - $list = array(); - for($k=$j;$k<$lc;$k++) { - if (isset($table['l'][$k]) ) { - if ($c['R']) { $table['l'][$k] += $c['miw']/$c['colspan'] ; } - else { $table['l'][$k] += $c['s']/$c['colspan']; } - } - else { - if ($c['R']) { $table['l'][$k] = $c['miw']/$c['colspan'] ; } - else { $table['l'][$k] = $c['s']/$c['colspan']; } - } - $wis += $wc[$k]['miw']; - $was += $wc[$k]['maw']; - if (!isset($c['w'])) { - $list[] = $k; - $wisa += $wc[$k]['miw']; - $wasa += $wc[$k]['maw']; - } - } - if ($c['miw'] > $wis) { - if (!$wis) { - for($k=$j;$k<$lc;$k++) { $wc[$k]['miw'] = $c['miw']/$c['colspan']; } - } - else if (!count($list)) { - $wi = $c['miw'] - $wis; - for($k=$j;$k<$lc;$k++) { $wc[$k]['miw'] += ($wc[$k]['miw']/$wis)*$wi; } - } - else { - $wi = $c['miw'] - $wis; - foreach ($list as $k) { $wc[$k]['miw'] += ($wc[$k]['miw']/$wisa)*$wi; } - } - } - if ($c['maw'] > $was) { - if (!$wis) { - for($k=$j;$k<$lc;$k++) { $wc[$k]['maw'] = $c['maw']/$c['colspan']; } - } - else if (!count($list)) { - $wi = $c['maw'] - $was; - for($k=$j;$k<$lc;$k++) { $wc[$k]['maw'] += ($wc[$k]['maw']/$was)*$wi; } - } - else { - $wi = $c['maw'] - $was; - foreach ($list as $k) { $wc[$k]['maw'] += ($wc[$k]['maw']/$wasa)*$wi; } - } - } - unset($c); - } - - - $checkminwidth = 0; - $checkmaxwidth = 0; - $totallength = 0; - - for( $i = 0 ; $i < $nc ; $i++ ) { - $checkminwidth += $table['wc'][$i]['miw']; - $checkmaxwidth += $table['wc'][$i]['maw']; - $totallength += $table['l'][$i]; - } - - if (!isset($table['w']) && $firstpass) { - $sumpc = 0; - // mPDF 3.2 - $notset = 0; - for( $i = 0 ; $i < $nc ; $i++ ) { - if (isset($table['wc'][$i]['wpercent']) && $table['wc'][$i]['wpercent']) { - $sumpc += $table['wc'][$i]['wpercent']; - } - // mPDF 3.2 - else { $notset++; } - } - - // mPDF 3.2 If sum of widths as % >= 100% and not all columns are set - // Set a nominal width of 1% for unset columns - if ($sumpc >= 100 && $notset) { - for( $i = 0 ; $i < $nc ; $i++ ) { - if ((!isset($table['wc'][$i]['wpercent']) || !$table['wc'][$i]['wpercent']) && - (!isset($table['wc'][$i]['w']) || !$table['wc'][$i]['w'])) { - $table['wc'][$i]['wpercent'] = 1; - } - } - } - - - if ($sumpc) { // if any percents are set - // mPDF 4.0 - $sumnonpc = (100 - $sumpc); - $sumpc = max($sumpc,100); - $miwleft = 0; - $miwleftcount = 0; - $miwsurplusnonpc = 0; - $maxcalcmiw = 0; - $mawleft = 0; - $mawleftcount = 0; - $mawsurplusnonpc = 0; - $maxcalcmaw = 0; - for( $i = 0 ; $i < $nc ; $i++ ) { - if (isset($table['wc'][$i]['wpercent'])) { - $maxcalcmiw = max($maxcalcmiw, ($table['wc'][$i]['miw'] * $sumpc /$table['wc'][$i]['wpercent']) ); - $maxcalcmaw = max($maxcalcmaw, ($table['wc'][$i]['maw'] * $sumpc /$table['wc'][$i]['wpercent']) ); - } - else { - $miwleft += $table['wc'][$i]['miw']; - $mawleft += $table['wc'][$i]['maw']; - if (!isset($table['wc'][$i]['w'])) { $miwleftcount++; $mawleftcount++; } - } - } - if ($miwleft && $sumnonpc > 0) { $miwnon = $miwleft * 100 / $sumnonpc; } - if ($mawleft && $sumnonpc > 0) { $mawnon = $mawleft * 100 / $sumnonpc; } - if (($miwnon > $checkminwidth || $maxcalcmiw > $checkminwidth) && $this->keep_table_proportions) { - if ($miwnon > $maxcalcmiw) { - $miwsurplusnonpc = round((($miwnon * $sumnonpc / 100) - $miwleft),3); - $checkminwidth = $miwnon; - } - else { $checkminwidth = $maxcalcmiw; } - for( $i = 0 ; $i < $nc ; $i++ ) { - if (isset($table['wc'][$i]['wpercent'])) { - $newmiw = $checkminwidth * $table['wc'][$i]['wpercent']/100; - if ($table['wc'][$i]['miw'] < $newmiw) { - $table['wc'][$i]['miw'] = $newmiw; - } - $table['wc'][$i]['w'] = 1; - } - else if ($miwsurplusnonpc && !$table['wc'][$i]['w']) { - $table['wc'][$i]['miw'] += $miwsurplusnonpc / $miwleftcount; - } - } - } - if (($mawnon > $checkmaxwidth || $maxcalcmaw > $checkmaxwidth )) { - if ($mawnon > $maxcalcmaw) { - $mawsurplusnonpc = round((($mawnon * $sumnonpc / 100) - $mawleft),3); - $checkmaxwidth = $mawnon; - } - else { $checkmaxwidth = $maxcalcmaw; } - for( $i = 0 ; $i < $nc ; $i++ ) { - if (isset($table['wc'][$i]['wpercent'])) { - $newmaw = $checkmaxwidth * $table['wc'][$i]['wpercent']/100; - if ($table['wc'][$i]['maw'] < $newmaw) { - $table['wc'][$i]['maw'] = $newmaw; - } - $table['wc'][$i]['w'] = 1; - } - else if ($mawsurplusnonpc && !$table['wc'][$i]['w']) { - $table['wc'][$i]['maw'] += $mawsurplusnonpc / $mawleftcount; - } - if ($table['wc'][$i]['maw'] < $table['wc'][$i]['miw']) { $table['wc'][$i]['maw'] = $table['wc'][$i]['miw']; } - } - } - if ($checkminwidth > $checkmaxwidth) { $checkmaxwidth = $checkminwidth; } - } - } - - if (isset($table['wpercent']) && $table['wpercent']) { - $checkminwidth *= (100 / $table['wpercent']); - $checkmaxwidth *= (100 / $table['wpercent']); - } - - - $checkminwidth += $tblbw ; - $checkmaxwidth += $tblbw ; - - // Table['miw'] set by percent in first pass may be larger than sum of column miw - if ((isset($table['miw']) && $checkminwidth > $table['miw']) || !isset($table['miw'])) { $table['miw'] = $checkminwidth; } - if ((isset($table['maw']) && $checkmaxwidth > $table['maw']) || !isset($table['maw'])) { $table['maw'] = $checkmaxwidth; } - $table['tl'] = $totallength ; - - // mPDF 4.2 - if (!$this->isCJK && !$longCJK) { - if ($this->table_rotate) { - $mxw = $this->tbrot_maxw; - } - else { - $mxw = $this->blk[$this->blklvl]['inner_width']; - } - - if (($table['overflow']=='visible' || $table['overflow']=='hidden') && !$this->table_rotate && !$this->ColActive && $checkminwidth > $mxw) { - $table['w'] = $table['miw']; - return array(0,0); - } - else if ($table['overflow']=='wrap') { return array(0,0); } - - if (isset($table['w']) && $table['w'] ) { - if ($table['w'] >= $checkminwidth && $table['w'] <= $mxw) { $table['maw'] = $mxw = $table['w']; } // mPDF 4.0 - else if ($table['w'] >= $checkminwidth && $table['w'] > $mxw && $this->keep_table_proportions) { $checkminwidth = $table['w']; } - else { - unset($table['w']); - } - } - $ratio = $checkminwidth/$mxw; - if ($checkminwidth > $mxw) { return array(($ratio +0.001),$checkminwidth); } // 0.001 to allow for rounded numbers when resizing - } - return array(0,0); -} - - - -function _tableWidth(&$table){ - $widthcols = &$table['wc']; - $numcols = $table['nc']; - $tablewidth = 0; - // Added mPDF1.4 - table border width if separate - if ($table['borders_separate']) { - $tblbw = $table['border_details']['L']['w'] + $table['border_details']['R']['w'] + $table['margin']['L'] + $table['margin']['R'] + $table['padding']['L'] + $table['padding']['R'] + $table['border_spacing_H']; - } - else { $tblbw = $table['max_cell_border_width']['L']/2 + $table['max_cell_border_width']['R']/2 + $table['margin']['L'] + $table['margin']['R']; } - - - if ($table['level']>1 && isset($table['w'])) { - if (isset($table['wpercent']) && $table['wpercent']) { - $table['w'] = $temppgwidth = (($table['w']-$tblbw) * $table['wpercent'] / 100) + $tblbw ; - } - else { - $temppgwidth = $table['w'] ; - } - } - else if ($this->table_rotate) { - $temppgwidth = $this->tbrot_maxw; - // If it is less than 1/20th of the remaining page height to finish the DIV (i.e. DIV padding + table bottom margin) - // then allow for this - $enddiv = $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w']; - if ($enddiv/$temppgwidth <0.05) { $temppgwidth -= $enddiv; } - } - else { - if (isset($table['w']) && $table['w']< $this->blk[$this->blklvl]['inner_width']) { - $notfullwidth = 1; - $temppgwidth = $table['w'] ; - } - else if (($table['overflow']=='visible' || $table['overflow']=='hidden') && !$this->ColActive && isset($table['w']) && $table['w'] > $this->blk[$this->blklvl]['inner_width'] && $table['w']==$table['miw']) { - $temppgwidth = $table['w'] ; - } - else { $temppgwidth = $this->blk[$this->blklvl]['inner_width']; } - } - - - $totaltextlength = 0; // Added - to sum $table['l'][colno] - $totalatextlength = 0; // Added - to sum $table['l'][colno] for those columns where width not set - $percentages_set = 0; - for ( $i = 0 ; $i < $numcols ; $i++ ) { - if (isset($widthcols[$i]['wpercent'])) { $tablewidth += $widthcols[$i]['maw']; $percentages_set = 1; } - else if (isset($widthcols[$i]['w'])) { $tablewidth += $widthcols[$i]['miw']; } - else { $tablewidth += $widthcols[$i]['maw']; } - $totaltextlength += $table['l'][$i]; - } - if (!$totaltextlength) { $totaltextlength =1; } - $tablewidth += $tblbw; // Outer half of table borders - - if ($tablewidth > $temppgwidth) { - $table['w'] = $temppgwidth; - } - // if any widths set as percentages and max width fits < page width - else if ($tablewidth < $temppgwidth && !isset($table['w']) && $percentages_set) { - $table['w'] = $table['maw']; - } - // if table width is set and is > allowed width - if (isset($table['w']) && $table['w'] > $temppgwidth) { $table['w'] = $temppgwidth; } - // IF the table width is now set - Need to distribute columns widths - if (isset($table['w'])) { - $wis = $wisa = 0; - $list = array(); - $notsetlist = array(); - for( $i = 0 ; $i < $numcols ; $i++ ) { - $wis += $widthcols[$i]['miw']; - if (!isset($widthcols[$i]['w']) || ($widthcols[$i]['w'] && $table['w'] > $temppgwidth && !$this->keep_table_proportions && !$notfullwidth )){ - $list[] = $i; - $wisa += $widthcols[$i]['miw']; - $totalatextlength += $table['l'][$i]; - } - } - if (!$totalatextlength) { $totalatextlength =1; } - - // Allocate spare (more than col's minimum width) across the cols according to their approx total text length - // Do it by setting minimum width here - if ($table['w'] > $wis + $tblbw) { - // First set any cell widths set as percentages - if ($table['w'] < $temppgwidth || $this->keep_table_proportions) { - for($k=0;$k<$numcols;$k++) { - if (isset($widthcols[$k]['wpercent'])) { - $curr = $widthcols[$k]['miw']; - $widthcols[$k]['miw'] = ($table['w']-$tblbw) * $widthcols[$k]['wpercent']/100; - $wis += $widthcols[$k]['miw'] - $curr; - $wisa += $widthcols[$k]['miw'] - $curr; - } - } - } - // Now allocate surplus up to maximum width of each column - $surplus = 0; $ttl = 0; // number of surplus columns - if (!count($list)) { - $wi = ($table['w']-($wis + $tblbw)); // i.e. extra space to distribute - for($k=0;$k<$numcols;$k++) { - $spareratio = ($table['l'][$k] / $totaltextlength); // gives ratio to divide up free space - // Don't allocate more than Maximum required width - save rest in surplus - if ($widthcols[$k]['miw'] + ($wi * $spareratio) > $widthcols[$k]['maw']) { - $surplus += ($wi * $spareratio) - ($widthcols[$k]['maw']-$widthcols[$k]['miw']); - $widthcols[$k]['miw'] = $widthcols[$k]['maw']; - } - else { - $notsetlist[] = $k; - $ttl += $table['l'][$k]; - $widthcols[$k]['miw'] += ($wi * $spareratio); - } - - } - } - else { - $wi = ($table['w'] - ($wis + $tblbw)); // i.e. extra space to distribute - foreach ($list as $k) { - $spareratio = ($table['l'][$k] / $totalatextlength); // gives ratio to divide up free space - // Don't allocate more than Maximum required width - save rest in surplus - if ($widthcols[$k]['miw'] + ($wi * $spareratio) > $widthcols[$k]['maw']) { - $surplus += ($wi * $spareratio) - ($widthcols[$k]['maw']-$widthcols[$k]['miw']); - $widthcols[$k]['miw'] = $widthcols[$k]['maw']; - } - else { - $notsetlist[] = $k; - $ttl += $table['l'][$k]; - $widthcols[$k]['miw'] += ($wi * $spareratio); - } - } - } - // If surplus still left over apportion it across columns - if ($surplus) { - // if some are set only add to remaining - otherwise add to all of them - if (count($notsetlist) && count($notsetlist) < $numcols) { - foreach ($notsetlist AS $i) { - if ($ttl) $widthcols[$i]['miw'] += $surplus * $table['l'][$i] / $ttl ; - } - } - // If some widths are defined, and others have been added up to their maxmum - else if (count($list) && count($list) < $numcols) { - foreach ($list AS $i) { - $widthcols[$i]['miw'] += $surplus / count($list) ; - } - } - else if ($numcols) { // If all columns - $ttl = array_sum($table['l']); - for ($i=0;$i<$numcols;$i++) { - $widthcols[$i]['miw'] += $surplus * $table['l'][$i] / $ttl; - } - } - } - - } - - // This sets the columns all to minimum width (which has been increased above if appropriate) - for ($i=0;$i<$numcols;$i++) { - $widthcols[$i] = $widthcols[$i]['miw']; - } - - // TABLE NOT WIDE ENOUGH EVEN FOR MINIMUM CONTENT WIDTH - // If sum of column widths set are too wide for table - $checktablewidth = 0; - for ( $i = 0 ; $i < $numcols ; $i++ ) { - $checktablewidth += $widthcols[$i]; - } - if ($checktablewidth > ($temppgwidth + 0.001 - $tblbw)) { - $usedup = 0; $numleft = 0; - for ($i=0;$i<$numcols;$i++) { - if ((isset($widthcols[$i]) && $widthcols[$i] > (($temppgwidth - $tblbw) / $numcols)) && (!isset($widthcols[$i]['w']))) { - $numleft++; - unset($widthcols[$i]); - } - else { $usedup += $widthcols[$i]; } - } - for ($i=0;$i<$numcols;$i++) { - if (!isset($widthcols[$i]) || !$widthcols[$i]) { - $widthcols[$i] = ((($temppgwidth - $tblbw) - $usedup)/ ($numleft)); - } - } - } - - } - else { //table has no width defined - $table['w'] = $tablewidth; - for ( $i = 0 ; $i < $numcols ; $i++) { - if (isset($widthcols[$i]['wpercent']) && $this->keep_table_proportions) { $colwidth = $widthcols[$i]['maw']; } - else if (isset($widthcols[$i]['w'])) { $colwidth = $widthcols[$i]['miw']; } - else { $colwidth = $widthcols[$i]['maw']; } - unset($widthcols[$i]); - $widthcols[$i] = $colwidth; - } - } -} - -function _tableHeight(&$table){ - $level = $table['level']; - $levelid = $table['levelid']; - $cells = &$table['cells']; - $numcols = $table['nc']; - $numrows = $table['nr']; - $listspan = array(); - $checkmaxheight = 0; - $headerrowheight = 0; - $checkmaxheightplus = 0; - $headerrowheightplus = 0; - // mPDF 4.0 - $footerrowheight = 0; - $footerrowheightplus = 0; - if ($this->table_rotate) { - $temppgheight = $this->tbrot_maxh; - $remainingpage = $this->tbrot_maxh; - } - else { - $temppgheight = ($this->h - $this->bMargin - $this->tMargin) - $this->kwt_height; - $remainingpage = ($this->h - $this->bMargin - $this->y) - $this->kwt_height; - - // If it is less than 1/20th of the remaining page height to finish the DIV (i.e. DIV padding + table bottom margin) - // then allow for this - $enddiv = $this->blk[$this->blklvl]['padding_bottom'] + $this->blk[$this->blklvl]['border_bottom']['w'] + $table['margin']['B']; - // mPDF 4.0 bug fix: if remaining page == 0 get error - if ($remainingpage > $enddiv && $enddiv/$remainingpage <0.05) { $remainingpage -= $enddiv; } - else if ($remainingpage == 0) { $remainingpage = 0.001; } - if ($temppgheight > $enddiv && $enddiv/$temppgheight <0.05) { $temppgheight -= $enddiv; } - else if ($temppgheight == 0) { $temppgheight = 0.001; } - } - - - for( $i = 0 ; $i < $numrows ; $i++ ) { //rows - $heightrow = &$table['hr'][$i]; - for( $j = 0 ; $j < $numcols ; $j++ ) { //columns - if (isset($cells[$i][$j]) && $cells[$i][$j]) { - $c = &$cells[$i][$j]; - - // mPDF 4.3.006 - if ($this->simpleTables){ // mPDF 4.2.017 - if ($table['borders_separate']) { // NB twice border width - $extraWLR = ($table['simple']['border_details']['L']['w']+$table['simple']['border_details']['R']['w']) + ($c['padding']['L']+$c['padding']['R'])+$table['border_spacing_H']; - $extrh = ($table['simple']['border_details']['T']['w']+$table['simple']['border_details']['B']['w']) + ($c['padding']['T']+$c['padding']['B'])+$table['border_spacing_V']; - } - else { - $extraWLR = ($table['simple']['border_details']['L']['w']+$table['simple']['border_details']['R']['w'])/2 + ($c['padding']['L']+$c['padding']['R']); - $extrh = ($table['simple']['border_details']['T']['w']+$table['simple']['border_details']['B']['w'])/2 + ($c['padding']['T']+$c['padding']['B']); - } - } - else { - // mPDF 4.3.009 - if ($this->packTableData) { - list($bt,$br,$bb,$bl) = $this->_getBorderWidths($c['borderbin']); - } - else { - // mPDF 4.3.012E - $bt = $c['border_details']['T']['w']; - $bb = $c['border_details']['B']['w']; - $br = $c['border_details']['R']['w']; - $bl = $c['border_details']['L']['w']; - } - if ($table['borders_separate']) { // NB twice border width - $extraWLR = $bl + $br + $c['padding']['L'] + $c['padding']['R'] + $table['border_spacing_H']; - $extrh = $bt + $bb + $c['padding']['T'] + $c['padding']['B'] + $table['border_spacing_V']; - } - else { - $extraWLR = $bl/2 + $br/2 + $c['padding']['L'] + $c['padding']['R']; - $extrh = $bt/2 + $bb/2 + $c['padding']['T']+$c['padding']['B']; - } - } - - list($x,$cw) = $this->_tableGetWidth($table, $i,$j); - //Check whether width is enough for this cells' text - $auxtext = implode("",$c['text']); - $auxtext2 = $auxtext; //in case we have text with styles - - $aux3 = $auxtext; //in case we have text with styles - - // Get CELL HEIGHT - // ++ extra parameter forces wrap to break word - if ($c['R']) { - $aux4 = implode(" ",$c['text']); - $s_fs = $this->FontSizePt; - $s_f = $this->FontFamily; // mPDF 3.0 - $s_st = $this->FontStyle; // mPDF 3.0 - $this->SetFont($c['textbuffer'][0][4],$c['textbuffer'][0][2],$c['textbuffer'][0][11] / $this->shrin_k,true,true); - $aux4 = ltrim($aux4); - $aux4= rtrim($aux4); // mPDF 4.4.012 - $tempch = $this->GetStringWidth($aux4); - if ($c['R'] >= 45 && $c['R'] < 90) { - $tempch = ((sin(deg2rad($c['R']))) * $tempch ) + ((sin(deg2rad($c['R']))) * (($c['textbuffer'][0][11]/$this->k) / $this->shrin_k)); - } - $this->SetFont($s_f,$s_st,$s_fs,true,true); - $ch = ($tempch ) + $extrh ; - } - else { - if (isset($c['textbuffer'])) { - $tempch = $this->TableWordWrap(($cw-$extraWLR),1,$c['textbuffer'], $c['dfs']); // mPDF 4.2 - } - else { $tempch = 0; } - - // Added cellpadding top and bottom. (Lineheight already adjusted to table_lineheight) - $ch = $tempch + $extrh ; - } - - //If height is defined and it is bigger than calculated $ch then update values - if (isset($c['h']) && $c['h'] > $ch) { - $c['mih'] = $ch; //in order to keep valign working - $ch = $c['h']; - } - else $c['mih'] = $ch; - if (isset($c['rowspan'])) $listspan[] = array($i,$j); - elseif ($heightrow < $ch) $heightrow = $ch; - - // this is the extra used in _tableWrite to determine whether to trigger a page change - if ($table['borders_separate']) { - // mPDF 3.0 - bug fix - //if ($i == ($numrows-1) || ($i+$cell['rowspan']) == ($numrows) ) { - if ($i == ($numrows-1) || (isset($c['rowspan']) && ($i+$c['rowspan']) == ($numrows)) ) { - $extra = $table['margin']['B'] + $table['padding']['B'] + $table['border_details']['B']['w'] + $table['border_spacing_V']/2; - } - else { - $extra = $table['border_spacing_V']/2; - } - } - else { - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - $extra = $bb/2; - } - else if ($this->simpleTables){ - $extra = $table['simple']['border_details']['B']['w'] /2; - } - } - - // mPDF 3.0 - if ($i <$this->tableheadernrows && $this->usetableheader) { - $headerrowheight = max($headerrowheight,$ch); - $headerrowheightplus = max($headerrowheightplus,$ch+$extra); - } - // mPDF 4.0 - else if ($table['is_tfoot'][$i]) { - $footerrowheight = max($footerrowheight,$ch); - $footerrowheightplus = max($footerrowheightplus,$ch+$extra); - } - else { - $checkmaxheight = max($checkmaxheight,$ch); - $checkmaxheightplus = max($checkmaxheightplus,$ch+$extra); - } - - - unset($c); - } - }//end of columns - }//end of rows - $heightrow = &$table['hr']; - foreach ($listspan as $span) { - list($i,$j) = $span; - $c = &$cells[$i][$j]; - $lr = $i + $c['rowspan']; - if ($lr > $numrows) $lr = $numrows; - $hs = $hsa = 0; - $list = array(); - for($k=$i;$k<$lr;$k++) { - $hs += $heightrow[$k]; - if (!isset($c['h'])) { - $list[] = $k; - $hsa += $heightrow[$k]; - } - } - // mPDF 3.0 - if ($table['borders_separate']) { - if ($i == ($numrows-1) || ($i+$c['rowspan']) == ($numrows) ) { - $extra = $table['margin']['B'] + $table['padding']['B'] + $table['border_details']['B']['w'] + $table['border_spacing_V']/2; - } - else { - $extra = $table['border_spacing_V']/2; - } - } - else { - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - if ($this->packTableData) { - list($bt,$br,$bb,$bl) = $this->_getBorderWidths($c['borderbin']); - } - else { - // mPDF 4.3.012E - $bb = $c['border_details']['B']['w']; - } - $extra = $bb/2; - } - else if ($this->simpleTables){ - $extra = $table['simple']['border_details']['B']['w'] /2; - } - } - if ($i <$this->tableheadernrows && $this->usetableheader) { - $headerrowheight = max($headerrowheight,$hs); - $headerrowheightplus = max($headerrowheightplus,$hs+$extra); - } - // mPDF 4.0 - else if ($table['is_tfoot'][$i]) { - $footerrowheight = max($footerrowheight,$hs); - $footerrowheightplus = max($footerrowheightplus,$hs+$extra); - } - else { - $checkmaxheight = max($checkmaxheight,$hs); - $checkmaxheightplus = max($checkmaxheightplus,$hs+$extra); - } - - if ($c['mih'] > $hs) { - if (!$hs) { - for($k=$i;$k<$lr;$k++) $heightrow[$k] = $c['mih']/$c['rowspan']; - } - elseif (!count($list)) { - $hi = $c['mih'] - $hs; - for($k=$i;$k<$lr;$k++) $heightrow[$k] += ($heightrow[$k]/$hs)*$hi; - } - else { - $hi = $c['mih'] - $hsa; - foreach ($list as $k) $heightrow[$k] += ($heightrow[$k]/$hsa)*$hi; - } - } - unset($c); - } - - $table['h'] = array_sum($table['hr']); - - if ($table['borders_separate']) { - $table['h'] += $table['margin']['T'] + $table['margin']['B'] + $table['border_details']['T']['w'] + $table['border_details']['B']['w'] + $table['border_spacing_V'] + $table['padding']['T'] + $table['padding']['B']; - } - else { - $table['h'] += $table['margin']['T'] + $table['margin']['B'] + $table['max_cell_border_width']['T']/2 + $table['max_cell_border_width']['B']/2; - } - - // mPDF 4.0 - $maxrowheight = $checkmaxheightplus + $headerrowheightplus + $footerrowheightplus; - return array($table['h'],$maxrowheight,$temppgheight,$remainingpage); -} - -function _tableGetWidth(&$table, $i,$j){ - $cell = &$table['cells'][$i][$j]; - if ($cell) { - if (isset($cell['x0'])) return array($cell['x0'], $cell['w0']); - $x = 0; - $widthcols = &$table['wc']; - for( $k = 0 ; $k < $j ; $k++ ) $x += $widthcols[$k]; - $w = $widthcols[$j]; - if (isset($cell['colspan'])) { - for ( $k = $j+$cell['colspan']-1 ; $k > $j ; $k-- ) $w += $widthcols[$k]; - } - $cell['x0'] = $x; - $cell['w0'] = $w; - return array($x, $w); - } - return array(0,0); -} - -function _tableGetHeight(&$table, $i,$j){ - $cell = &$table['cells'][$i][$j]; - if ($cell){ - if (isset($cell['y0'])) return array($cell['y0'], $cell['h0']); - $y = 0; - $heightrow = &$table['hr']; - for ($k=0;$k<$i;$k++) $y += $heightrow[$k]; - $h = $heightrow[$i]; - if (isset($cell['rowspan'])){ - for ($k=$i+$cell['rowspan']-1;$k>$i;$k--) - $h += $heightrow[$k]; - } - $cell['y0'] = $y; - $cell['h0'] = $h; - return array($y, $h); - } - return array(0,0); -} - - -// CHANGED TO ALLOW TABLE BORDER TO BE SPECIFIED CORRECTLY - added border_details -// mPDF 3.0 Table borders need additional parameters - either corner (TLBR) and/or border-spacing-H or -V ($bsh/$bsv) -function _tableRect($x, $y, $w, $h, $bord=-1, $details=array(), $buffer=false, $bSeparate=false, $cort='cell', $tablecorner='', $bsv=0, $bsh=0) { - // mPDF 3.0 Disabled again - buffer is printed at end of each table row - in fn. _tablewrite() -// if ($this->ColActive) { $buffer = false; } - - // mPDF 3.0 - $cellBorderOverlay = array(); - - if ($bord==-1) { $this->Rect($x, $y, $w, $h); } - else if ($this->simpleTables && ($cort=='cell')) { // mPDF 4.2.017 - $this->SetLineWidth($details['L']['w']); - if ($details['L']['c']) { - $this->SetDrawColor($details['L']['c']['R'],$details['L']['c']['G'],$details['L']['c']['B']); - } - else { $this->SetDrawColor(0); } - $this->_out('0 j'); - $this->Rect($x, $y, $w, $h); - } - else if ($bord){ - if (!$bSeparate && $buffer) { - $priority = 'LRTB'; - for($p=0;$p<strlen($priority);$p++) { - $side = $priority[$p]; // mPDF 4.4.012 - $details['p'] = $side ; - - $dom = 0; - if (isset($details[$side]['w'])) { $dom += ($details[$side]['w'] * 100000); } - if (isset($details[$side]['style'])) { $dom += (array_search($details[$side]['style'],$this->borderstyles)*100) ; } - if (isset($details[$side]['dom'])) { $dom += ($details[$side]['dom']*10); } - - // mPDF 3.0 Precedence to darker colours at joins - $coldom = 0; - if (isset($details[$side]['c']) && is_array($details[$side]['c'])) { - $coldom = 10-((($details[$side]['c']['R']*1.00)+($details[$side]['c']['G']*1.00)+($details[$side]['c']['B']*1.00))/76.5); - } // 10 black - 0 white - if ($coldom) { $dom += $coldom; } - - // mPDF 3.0 Lastly precedence to RIGHT and BOTTOM cells at joins - if (isset($details['cellposdom'])) { $dom += $details['cellposdom']; } - - $save = false; - // mPDF 3.0 - if ($side == 'T' && $this->issetBorder($bord, _BORDER_TOP)) { $cbord = _BORDER_TOP; $save = true; } - else if ($side == 'L' && $this->issetBorder($bord, _BORDER_LEFT)) { $cbord = _BORDER_LEFT; $save = true; } - else if ($side == 'R' && $this->issetBorder($bord, _BORDER_RIGHT)) { $cbord = _BORDER_RIGHT; $save = true; } - else if ($side == 'B' && $this->issetBorder($bord, _BORDER_BOTTOM)) { $cbord = _BORDER_BOTTOM; $save = true; } - - if ($save) { - // mPDF 4.3.008 4.3.014 - $this->cellBorderBuffer[] = pack("A16nCndnnnA10d14", - str_pad(sprintf("%08.7f", $dom),16,"0",STR_PAD_LEFT), - $cbord, - ord($side), - $details[$side]['s'], - $details[$side]['w'], - $details[$side]['c']['R'], - $details[$side]['c']['G'], - $details[$side]['c']['B'], - $details[$side]['style'], - $x, $y, $w, $h, - $details['mbw']['BL'], - $details['mbw']['BR'], - $details['mbw']['RT'], - $details['mbw']['RB'], - $details['mbw']['TL'], - $details['mbw']['TR'], - $details['mbw']['LT'], - $details['mbw']['LB'], - $details['cellposdom'], - 0 - ); - if ($details[$side]['style'] == 'ridge' || $details[$side]['style'] == 'groove' || $details[$side]['style'] == 'inset' || $details[$side]['style'] == 'outset' || $details[$side]['style'] == 'double' ) { - $details[$side]['overlay'] = true; - // mPDF 4.3.008 4.3.014 - $this->cellBorderBuffer[] = pack("A16nCndnnnA10d14", - str_pad(sprintf("%08.7f", ($dom+4)),16,"0",STR_PAD_LEFT), /* mPDF 4.3.019 */ - $cbord, - ord($side), - $details[$side]['s'], - $details[$side]['w'], - $details[$side]['c']['R'], - $details[$side]['c']['G'], - $details[$side]['c']['B'], - $details[$side]['style'], - $x, $y, $w, $h, - $details['mbw']['BL'], - $details['mbw']['BR'], - $details['mbw']['RT'], - $details['mbw']['RB'], - $details['mbw']['TL'], - $details['mbw']['TR'], - $details['mbw']['LT'], - $details['mbw']['LB'], - $details['cellposdom'], - 1 - ); - } - } - } - return; - } - - if (isset($details['p']) && strlen($details['p'])>1) { $priority = $details['p']; } - else { $priority='LTRB'; } - $Tw = 0; - $Rw = 0; - $Bw = 0; - $Lw = 0; - if (isset($details['T']['w'])) { $Tw = $details['T']['w']; } - if (isset($details['R']['w'])) { $Rw = $details['R']['w']; } - if (isset($details['B']['w'])) { $Bw = $details['B']['w']; } - if (isset($details['L']['w'])) { $Lw = $details['L']['w']; } - - $x2 = $x + $w; $y2 = $y + $h; - $oldlinewidth = $this->LineWidth; - - for($p=0;$p<strlen($priority);$p++) { - $side = $priority[$p]; // mPDF 4.4.012 - $xadj = 0; - $xadj2 = 0; - $yadj = 0; - $yadj2 = 0; - $print = false; - if ($Tw && $side=='T' && $this->issetBorder($bord, _BORDER_TOP)) { // TOP - $ly1 = $y; - $ly2 = $y; - $lx1 = $x; - $lx2 = $x2; - $this->SetLineWidth($Tw); - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'L')!==false) { - if ($Tw > $Lw) $xadj = ($Tw - $Lw)/2; - if ($Tw < $Lw) $xadj = ($Tw + $Lw)/2; - } - else { $xadj = $Tw/2 - $bsh/2; } - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'R')!==false) { - if ($Tw > $Rw) $xadj2 = ($Tw - $Rw)/2; - if ($Tw < $Rw) $xadj2 = ($Tw + $Rw)/2; - } - else { $xadj2 = $Tw/2 - $bsh/2; } - if (!$bSeparate && $details['mbw']['TL']) { - $xadj = ($Tw - $details['mbw']['TL'])/2 ; - } - if (!$bSeparate && $details['mbw']['TR']) { - $xadj2 = ($Tw - $details['mbw']['TR'])/2; - } - $print = true; - } - if ($Lw && $side=='L' && $this->issetBorder($bord, _BORDER_LEFT)) { // LEFT - $ly1 = $y; - $ly2 = $y2; - $lx1 = $x; - $lx2 = $x; - $this->SetLineWidth($Lw); - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'T')!==false) { - if ($Lw > $Tw) $yadj = ($Lw - $Tw)/2; - if ($Lw < $Tw) $yadj = ($Lw + $Tw)/2; - } - else { $yadj = $Lw/2 - $bsv/2; } - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'B')!==false) { - if ($Lw > $Bw) $yadj2 = ($Lw - $Bw)/2; - if ($Lw < $Bw) $yadj2 = ($Lw + $Bw)/2; - } - else { $yadj2 = $Lw/2 - $bsv/2; } - if (!$bSeparate && $details['mbw']['LT']) { - $yadj = ($Lw - $details['mbw']['LT'])/2; - } - if (!$bSeparate && $details['mbw']['LB']) { - $yadj2 = ($Lw - $details['mbw']['LB'])/2; - } - $print = true; - } - if ($Rw && $side=='R' && $this->issetBorder($bord, _BORDER_RIGHT)) { // RIGHT - $ly1 = $y; - $ly2 = $y2; - $lx1 = $x2; - $lx2 = $x2; - $this->SetLineWidth($Rw); - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'T')!==false) { - if ($Rw < $Tw) $yadj = ($Rw + $Tw)/2; - if ($Rw > $Tw) $yadj = ($Rw - $Tw)/2; - } - else { $yadj = $Rw/2 - $bsv/2; } - - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'B')!==false) { - if ($Rw > $Bw) $yadj2 = ($Rw - $Bw)/2; - if ($Rw < $Bw) $yadj2 = ($Rw + $Bw)/2; - } - else { $yadj2 = $Rw/2 - $bsv/2; } - - if (!$bSeparate && $details['mbw']['RT']) { - $yadj = ($Rw - $details['mbw']['RT'])/2; - } - if (!$bSeparate && $details['mbw']['RB']) { - $yadj2 = ($Rw - $details['mbw']['RB'])/2; - } - $print = true; - } - if ($Bw && $side=='B' && $this->issetBorder($bord, _BORDER_BOTTOM)) { // BOTTOM - $ly1 = $y2; - $ly2 = $y2; - $lx1 = $x; - $lx2 = $x2; - $this->SetLineWidth($Bw); - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'L')!==false) { - if ($Bw > $Lw) $xadj = ($Bw - $Lw)/2; - if ($Bw < $Lw) $xadj = ($Bw + $Lw)/2; - } - else { $xadj = $Bw/2 - $bsh/2; } - // mPDF 3.0 - if ($cort == 'cell' || strpos($tablecorner,'R')!==false) { - if ($Bw > $Rw) $xadj2 = ($Bw - $Rw)/2; - if ($Bw < $Rw) $xadj2 = ($Bw + $Rw)/2; - } - else { $xadj2 = $Bw/2 - $bsh/2; } - if (!$bSeparate && $details['mbw']['BL']) { - $xadj = ($Bw - $details['mbw']['BL'])/2; - } - if (!$bSeparate && $details['mbw']['BR']) { - $xadj2 = ($Bw - $details['mbw']['BR'])/2; - } - $print = true; - } - - // Now draw line - if ($print) { -/*-- TABLES-ADVANCED-BORDERS --*/ - if ($details[$side]['style'] == 'double') { - if (!isset($details[$side]['overlay']) || !$details[$side]['overlay'] || $bSeparate) { - if ($details[$side]['c']) { - $this->SetDrawColor($details[$side]['c']['R'],$details[$side]['c']['G'],$details[$side]['c']['B']); - } - else { $this->SetDrawColor(0); } - $this->Line($lx1 + $xadj, $ly1 + $yadj, $lx2 - $xadj2, $ly2 - $yadj2); - } - if ((isset($details[$side]['overlay']) && $details[$side]['overlay']) || $bSeparate) { - if ($bSeparate && $cort=='table') { - if ($side=='T') { - $xadj -= $this->LineWidth/2; - $xadj2 -= $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_LEFT)) { - $xadj += $this->LineWidth/2; - } - if ($this->issetBorder($bord, _BORDER_RIGHT)) { - $xadj2 += $this->LineWidth; - } - } - if ($side=='L') { - $yadj -= $this->LineWidth/2; - $yadj2 -= $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_TOP)) { - $yadj += $this->LineWidth/2; - } - if ($this->issetBorder($bord, _BORDER_BOTTOM)) { - $yadj2 += $this->LineWidth; - } - } - if ($side=='B') { - $xadj -= $this->LineWidth/2; - $xadj2 -= $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_LEFT)) { - $xadj += $this->LineWidth/2; - } - if ($this->issetBorder($bord, _BORDER_RIGHT)) { - $xadj2 += $this->LineWidth; - } - } - if ($side=='R') { - $yadj -= $this->LineWidth/2; - $yadj2 -= $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_TOP)) { - $yadj += $this->LineWidth/2; - } - if ($this->issetBorder($bord, _BORDER_BOTTOM)) { - $yadj2 += $this->LineWidth; - } - } - } - - $this->SetLineWidth($this->LineWidth/3); - - // mPDF 4.2 - $tbcol = array(255,255,255); - for($l=0; $l <= $this->blklvl; $l++) { - if ($this->blk[$l]['bgcolor']) { - $tbcol = array($this->blk[$l]['bgcolorarray']['R'],$this->blk[$l]['bgcolorarray']['G'],$this->blk[$l]['bgcolorarray']['B']); - } - } - - if ($bSeparate) { - $cellBorderOverlay[] = array( - 'x' => $lx1 + $xadj, - 'y' => $ly1 + $yadj, - 'x2' => $lx2 - $xadj2, - 'y2' => $ly2 - $yadj2, - 'col' => $tbcol, /* mPDF 4.2 */ - 'lw' => $this->LineWidth, - ); - } - else { - $this->SetDrawColor($tbcol[0],$tbcol[1],$tbcol[2]); // mPDF 4.2 - $this->Line($lx1 + $xadj, $ly1 + $yadj, $lx2 - $xadj2, $ly2 - $yadj2); - } - } - } - - - else if (isset($details[$side]['style']) && ($details[$side]['style'] == 'ridge' || $details[$side]['style'] == 'groove' || $details[$side]['style'] == 'inset' || $details[$side]['style'] == 'outset')) { - if (!isset($details[$side]['overlay']) || !$details[$side]['overlay'] || $bSeparate) { - if ($details[$side]['c']) { - $this->SetDrawColor($details[$side]['c']['R'],$details[$side]['c']['G'],$details[$side]['c']['B']); - } - else { $this->SetDrawColor(0); } - if ($details[$side]['style'] == 'outset' || $details[$side]['style'] == 'groove') { - $nc = $this->_darkenColor($details[$side]['c']); - $this->SetDrawColor($nc[0],$nc[1],$nc[2]); - } - else if ($details[$side]['style'] == 'ridge' || $details[$side]['style'] == 'inset') { - $nc = $this->_lightenColor($details[$side]['c']); - $this->SetDrawColor($nc[0],$nc[1],$nc[2]); - } - $this->Line($lx1 + $xadj, $ly1 + $yadj, $lx2 - $xadj2, $ly2 - $yadj2); - } - if ((isset($details[$side]['overlay']) && $details[$side]['overlay']) || $bSeparate) { - if ($details[$side]['c']) { - $this->SetDrawColor($details[$side]['c']['R'],$details[$side]['c']['G'],$details[$side]['c']['B']); - } - else { $this->SetDrawColor(0); } - $doubleadj = ($this->LineWidth)/3; - $this->SetLineWidth($this->LineWidth/2); - $xadj3 = $yadj3 = $wadj3 = $hadj3 = 0; - - if ($details[$side]['style'] == 'ridge' || $details[$side]['style'] == 'inset') { - $nc = $this->_darkenColor($details[$side]['c']); - - if ($bSeparate && $cort=='table') { - if ($side=='T') { - $yadj3 = $this->LineWidth/2; - $xadj3 = -$this->LineWidth/2; - $wadj3 = $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_LEFT)) { - $xadj3 += $this->LineWidth; $wadj3 -= $this->LineWidth; - } - if ($this->issetBorder($bord, _BORDER_RIGHT)) { - $wadj3 -= $this->LineWidth*2; - } - } - if ($side=='L') { - $xadj3 = $this->LineWidth/2; - $yadj3 = -$this->LineWidth/2; - $hadj3 = $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_TOP)) { - $yadj3 += $this->LineWidth; $hadj3 -= $this->LineWidth; - } - if ($this->issetBorder($bord, _BORDER_BOTTOM)) { - $hadj3 -= $this->LineWidth*2; - } - } - if ($side=='B') { - $yadj3 = $this->LineWidth/2; - $xadj3 = -$this->LineWidth/2; - $wadj3 = $this->LineWidth; - } - if ($side=='R') { - $xadj3 = $this->LineWidth/2; - $yadj3 = -$this->LineWidth/2; - $hadj3 = $this->LineWidth; - } - } - - else if ($side=='T') { $yadj3 = $this->LineWidth/2; $xadj3 = $this->LineWidth/2; $wadj3 = -$this->LineWidth*2; } - else if ($side=='L') { $xadj3 = $this->LineWidth/2; $yadj3 = $this->LineWidth/2; $hadj3 = -$this->LineWidth*2; } - - else if ($side=='B' && $bSeparate) { $yadj3 = $this->LineWidth/2; $wadj3 = $this->LineWidth/2; } - else if ($side=='R' && $bSeparate) { $xadj3 = $this->LineWidth/2; $hadj3 = $this->LineWidth/2; } - - else if ($side=='B') { $yadj3 = $this->LineWidth/2; $xadj3 = $this->LineWidth/2; } - else if ($side=='R') { $xadj3 = $this->LineWidth/2; $yadj3 = $this->LineWidth/2; } - } - else { - $nc = $this->_lightenColor($details[$side]['c']); - - if ($bSeparate && $cort=='table') { - if ($side=='T') { - $yadj3 = $this->LineWidth/2; - $xadj3 = -$this->LineWidth/2; - $wadj3 = $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_LEFT)) { - $xadj3 += $this->LineWidth; $wadj3 -= $this->LineWidth; - } - } - if ($side=='L') { - $xadj3 = $this->LineWidth/2; - $yadj3 = -$this->LineWidth/2; - $hadj3 = $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_TOP)) { - $yadj3 += $this->LineWidth; $hadj3 -= $this->LineWidth; - } - } - if ($side=='B') { - $yadj3 = $this->LineWidth/2; - $xadj3 = -$this->LineWidth/2; - $wadj3 = $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_LEFT)) { - $xadj3 += $this->LineWidth; $wadj3 -= $this->LineWidth; - } - } - if ($side=='R') { - $xadj3 = $this->LineWidth/2; - $yadj3 = -$this->LineWidth/2; - $hadj3 = $this->LineWidth; - if ($this->issetBorder($bord, _BORDER_TOP)) { - $yadj3 += $this->LineWidth; $hadj3 -= $this->LineWidth; - } - } - } - - else if ($side=='T') { $yadj3 = $this->LineWidth/2; $xadj3 = $this->LineWidth/2; } - else if ($side=='L') { $xadj3 = $this->LineWidth/2; $yadj3 = $this->LineWidth/2; } - - else if ($side=='B' && $bSeparate) { $yadj3 = $this->LineWidth/2; $xadj3 = $this->LineWidth/2; } - else if ($side=='R' && $bSeparate) { $xadj3 = $this->LineWidth/2; $yadj3 = $this->LineWidth/2; } - - else if ($side=='B') { $yadj3 = $this->LineWidth/2; $xadj3 = -$this->LineWidth/2; $wadj3 = $this->LineWidth; } - else if ($side=='R') { $xadj3 = $this->LineWidth/2; $yadj3 = -$this->LineWidth/2; $hadj3 = $this->LineWidth; } - - } - - if ($bSeparate) { - $cellBorderOverlay[] = array( - 'x' => $lx1 + $xadj + $xadj3, - 'y' => $ly1 + $yadj + $yadj3, - 'x2' => $lx2 - $xadj2 + $xadj3 + $wadj3, - 'y2' => $ly2 - $yadj2 + $yadj3 + $hadj3, - 'col' => array($nc[0],$nc[1],$nc[2]), - 'lw' => $this->LineWidth, - ); - } - else { - $this->SetDrawColor($nc[0],$nc[1],$nc[2]); - $this->Line($lx1 + $xadj + $xadj3, $ly1 + $yadj + $yadj3, $lx2 - $xadj2 + $xadj3 + $wadj3, $ly2 - $yadj2 + $yadj3 + $hadj3); - } - } - } - - - else { -/*-- END TABLES-ADVANCED-BORDERS --*/ - if ($details[$side]['style'] == 'dashed') { - $dashsize = 2; // final dash will be this + 1*linewidth - $dashsizek = 1.5; // ratio of Dash/Blank - $this->SetDash($dashsize,($dashsize/$dashsizek)+($this->LineWidth*2)); - } - else if ($details[$side]['style'] == 'dotted') { - $this->_out("\n".'1 J'."\n".'1 j'."\n"); - $this->SetDash(0.001,($this->LineWidth*2)); - } - if ($details[$side]['c']) { - $this->SetDrawColor($details[$side]['c']['R'],$details[$side]['c']['G'],$details[$side]['c']['B']); - } - else { $this->SetDrawColor(0); } - $this->Line($lx1 + $xadj, $ly1 + $yadj, $lx2 - $xadj2, $ly2 - $yadj2); -/*-- TABLES-ADVANCED-BORDERS --*/ - } -/*-- END TABLES-ADVANCED-BORDERS --*/ - - // Reset Corners - $this->SetDash(); - //BUTT style line cap - $this->_out('2 J'); - } - } - - if ($bSeparate && count($cellBorderOverlay)) { - foreach($cellBorderOverlay AS $cbo) { - $this->SetLineWidth($cbo['lw']); - $this->SetDrawColor($cbo['col'][0],$cbo['col'][1],$cbo['col'][2]); - $this->Line($cbo['x'], $cbo['y'], $cbo['x2'], $cbo['y2']); - } - } - - $this->SetLineWidth($oldlinewidth); - $this->SetDrawColor(0); - } -} - - -/*-- TABLES --*/ -/*-- TABLES-ADVANCED-BORDERS --*/ -function _lightenColor($c) { - $r = $c['R']; $g = $c['G']; $b = $c['B']; - $var_r = $r / 255; - $var_g = $g / 255; - $var_b = $b / 255; - list($h,$s,$l) = $this->rgb2hsl($var_r,$var_g,$var_b); - - $l += ((1 - $l)*0.8); - - list($r,$g,$b) = $this->hsl2rgb($h,$s,$l); - return array($r,$g,$b); -} - - -function _darkenColor($c) { - $r = $c['R']; $g = $c['G']; $b = $c['B']; - $var_r = $r / 255; - $var_g = $g / 255; - $var_b = $b / 255; - list($h,$s,$l) = $this->rgb2hsl($var_r,$var_g,$var_b); - - $s *= 0.25; - $l *= 0.75; - - list($r,$g,$b) = $this->hsl2rgb($h,$s,$l); - return array($r,$g,$b); -} - -// mPDF 4.0 Originally in htmltoolkit.php -function rgb2hsl($var_r, $var_g, $var_b) { - $var_min = min($var_r,$var_g,$var_b); - $var_max = max($var_r,$var_g,$var_b); - $del_max = $var_max - $var_min; - - $l = ($var_max + $var_min) / 2; - - if ($del_max == 0) { - $h = 0; - $s = 0; - } - else { - if ($l < 0.5) { $s = $del_max / ($var_max + $var_min); } - else { $s = $del_max / (2 - $var_max - $var_min); } - - $del_r = ((($var_max - $var_r) / 6) + ($del_max / 2)) / $del_max; - $del_g = ((($var_max - $var_g) / 6) + ($del_max / 2)) / $del_max; - $del_b = ((($var_max - $var_b) / 6) + ($del_max / 2)) / $del_max; - - if ($var_r == $var_max) { $h = $del_b - $del_g; } - elseif ($var_g == $var_max) { $h = (1 / 3) + $del_r - $del_b; } - elseif ($var_b == $var_max) { $h = (2 / 3) + $del_g - $del_r; }; - - if ($h < 0) { $h += 1; } - if ($h > 1) { $h -= 1; } - } - return array($h,$s,$l); -} - -// mPDF 4.0 Originally in htmltoolkit.php -function hsl2rgb($h2,$s2,$l2) { - // Input is HSL value of complementary colour, held in $h2, $s, $l as fractions of 1 - // Output is RGB in normal 255 255 255 format, held in $r, $g, $b - // Hue is converted using function hue_2_rgb, shown at the end of this code - - if ($s2 == 0) - { - $r = $l2 * 255; - $g = $l2 * 255; - $b = $l2 * 255; - } - else - { - if ($l2 < 0.5) - { - $var_2 = $l2 * (1 + $s2); - } - else - { - $var_2 = ($l2 + $s2) - ($s2 * $l2); - }; - - $var_1 = 2 * $l2 - $var_2; - $r = round(255 * $this->hue_2_rgb($var_1,$var_2,$h2 + (1 / 3))); - $g = round(255 * $this->hue_2_rgb($var_1,$var_2,$h2)); - $b = round(255 * $this->hue_2_rgb($var_1,$var_2,$h2 - (1 / 3))); - }; - return array($r,$g,$b); -} - -// mPDF 4.0 Originally in htmltoolkit.php -function hue_2_rgb($v1,$v2,$vh) { - // Function to convert hue to RGB, called from above - if ($vh < 0) { $vh += 1; }; - if ($vh > 1) { $vh -= 1; }; - if ((6 * $vh) < 1) { return ($v1 + ($v2 - $v1) * 6 * $vh); }; - if ((2 * $vh) < 1) { return ($v2); }; - if ((3 * $vh) < 2) { return ($v1 + ($v2 - $v1) * ((2 / 3 - $vh) * 6)); }; - return ($v1); -} -/*-- END TABLES-ADVANCED-BORDERS --*/ -/*-- END TABLES --*/ - - - -function setBorder(&$var, $flag, $set = true) { - $flag = intval($flag); - if ($set) { $set = true; } - $var = intval($var); - $var = $set ? ($var | $flag) : ($var & ~$flag); -} -function issetBorder($var, $flag) { - $flag = intval($flag); - $var = intval($var); - return (($var & $flag) == $flag); -} - -// mPDF 4.0 -function _table2cellBorder(&$tableb, &$cbdb, &$cellb, $bval) { - if ($tableb && $tableb['w'] > $cbdb['w']) { - $cbdb = $tableb; - $this->setBorder($cellb, $bval); - } - else if ($tableb && $tableb['w'] == $cbdb['w'] - && array_search($tableb['style'],$this->borderstyles) > array_search($cbdb['style'],$this->borderstyles)) { - $cbdb = $tableb; - $this->setBorder($cellb, $bval); - } -} - -// FIX BORDERS ******************************************** -function _fixTableBorders(&$table){ - - if (!$table['borders_separate'] && $table['border_details']['L']['w']) { - $table['max_cell_border_width']['L'] = $table['border_details']['L']['w']; - } - if (!$table['borders_separate'] && $table['border_details']['R']['w']) { - $table['max_cell_border_width']['R'] = $table['border_details']['R']['w']; - } - if (!$table['borders_separate'] && $table['border_details']['T']['w']) { - $table['max_cell_border_width']['T'] = $table['border_details']['T']['w']; - } - if (!$table['borders_separate'] && $table['border_details']['B']['w']) { - $table['max_cell_border_width']['B'] = $table['border_details']['B']['w']; - } - if ($this->simpleTables) { return; } // mPDF 4.2.017 - $cells = &$table['cells']; - $numcols = $table['nc']; - $numrows = $table['nr']; - - for( $i = 0 ; $i < $numrows ; $i++ ) { //Rows - for( $j = 0 ; $j < $numcols ; $j++ ) { //Columns - if (isset($cells[$i][$j]) && $cells[$i][$j]) { - $cell = &$cells[$i][$j]; - // mPDF 4.3.009 Binary packed data - if ($this->packTableData) { - $cbord = $this->_unpackCellBorder($cell['borderbin']); - } - else { - $cbord = &$cells[$i][$j]; - } - - // mPDF 4.3.009 Binary packed data - if (!$cbord['border'] && isset($table['border']) && $table['border'] && $this->table_border_attr_set) { - $cbord['border'] = $table['border']; - $cbord['border_details'] = $table['border_details']; - } - - if (isset($cell['colspan']) && $cell['colspan']>1) { $ccolsp = $cell['colspan']; } - else { $ccolsp = 1; } - if (isset($cell['rowspan']) && $cell['rowspan']>1) { $crowsp = $cell['rowspan']; } - else { $crowsp = 1; } - - // mPDF 3.0 - $cbord['border_details']['cellposdom'] = ((($i+1)/$numrows) / 10000 ) + ((($j+1)/$numcols) / 10 ); - // Inherit Cell border from Table border - if ($this->table_border_css_set && !$table['borders_separate']) { - if ($i == 0) { - $this->_table2cellBorder($table['border_details']['T'], $cbord['border_details']['T'], $cbord['border'], _BORDER_TOP); // mPDF 4.3.009 - } - if ($i == ($numrows-1) || ($i+$crowsp) == ($numrows) ) { - $this->_table2cellBorder($table['border_details']['B'], $cbord['border_details']['B'], $cbord['border'], _BORDER_BOTTOM); // mPDF 4.3.009 - } - if ($j == 0) { - $this->_table2cellBorder($table['border_details']['L'], $cbord['border_details']['L'], $cbord['border'], _BORDER_LEFT); // mPDF 4.3.009 - } - if ($j == ($numcols-1) || ($j+$ccolsp) == ($numcols) ) { - $this->_table2cellBorder($table['border_details']['R'], $cbord['border_details']['R'], $cbord['border'], _BORDER_RIGHT); // mPDF 4.3.009 - } - } - -/*-- TABLES-ADVANCED-BORDERS --*/ - if (isset($table['topntail']) && $table['topntail']) { - if ($i == 0) { - $cbord['border_details']['T'] = $this->border_details($table['topntail']); - $this->setBorder($cbord['border'], _BORDER_TOP); - if ($table['borders_separate']) { - $cbord['border_details']['B'] = $this->border_details($table['topntail']); - $this->setBorder($cbord['border'], _BORDER_BOTTOM); - } - } - else if (($i == $this->tableheadernrows) && $this->usetableheader) { - if (!$table['borders_separate']) { - $cbord['border_details']['T'] = $this->border_details($table['topntail']); - $this->setBorder($cbord['border'], _BORDER_TOP); - } - } - // Added v1.4 for TFOOT - else if (($i == ($numrows-1) ) && $this->tabletfoot) { - $cbord['border_details']['T'] = $this->border_details($table['topntail']); - $this->setBorder($cbord['border'], _BORDER_TOP); - } - else if ($this->tabletheadjustfinished) { // $this->tabletheadjustfinished called from tableheader - if (!$table['borders_separate']) { - $cbord['border_details']['T'] = $this->border_details($table['topntail']); - $this->setBorder($cbord['border'], _BORDER_TOP); - } - } - if ($i == ($numrows-1) || ($i+$crowsp) == ($numrows) ) { - $cbord['border_details']['B'] = $this->border_details($table['topntail']); - $this->setBorder($cbord['border'], _BORDER_BOTTOM); - } - } - - if (isset($table['thead-underline']) && $table['thead-underline']) { - if ($table['borders_separate']) { - if ($i == 0) { - $cbord['border_details']['B'] = $this->border_details($table['thead-underline']); - $this->setBorder($cbord['border'], _BORDER_BOTTOM); - } - } - else { - if (($i == $this->tableheadernrows) && $this->usetableheader) { - $cbord['border_details']['T'] = $this->border_details($table['thead-underline']); - $this->setBorder($cbord['border'], _BORDER_TOP); - } - else if ($this->tabletheadjustfinished) { // $this->tabletheadjustfinished called from tableheader - $cbord['border_details']['T'] = $this->border_details($table['thead-underline']); - $this->setBorder($cbord['border'], _BORDER_TOP); - } - } - } - - // Collapse Border - Algorithm for conflicting borders - // Hidden >> Width >> double>solid>dashed>dotted... >> style set on cell>table >> top/left>bottom/right - // mPDF 3.0 - // Do not turn off border which is overridden - // Needed for page break for TOP/BOTTOM both to be defined in Collapsed borders - // Means it is painted twice. (Left/Right can still disable overridden border) - if (!$table['borders_separate'] && (!$this->usetableheader || $i>($this->tableheadernrows-1)) ) { - if ($i < ($numrows-1) || ($i+$crowsp) < $numrows ) { // Bottom - for ($cspi = 0; $cspi<$ccolsp; $cspi++) { - // already defined Top for adjacent cell below - if (isset($cells[($i+$crowsp)][$j+$cspi])) { - if ($this->packTableData) { - $celladj = $this->_unpackCellBorder($cells[($i+$crowsp)][$j+$cspi]['borderbin']); // mPDF 4.3.009 Binary packed data - } - else { $celladj =& $cells[($i+$crowsp)][$j+$cspi]; } - } - else { $celladj = false; } - if ($celladj && $celladj['border_details']['T']['s'] == 1) { - $csadj = $celladj['border_details']['T']['w']; - $csthis = $cbord['border_details']['B']['w']; - // Hidden - if ($cbord['border_details']['B']['style']=='hidden') { - $celladj['border_details']['T'] = $cbord['border_details']['B']; - $this->setBorder($celladj['border'] , _BORDER_TOP, false); - $this->setBorder($cbord['border'] , _BORDER_BOTTOM , false); - } - else if ($celladj['border_details']['T']['style']=='hidden') { - $cbord['border_details']['B'] = $celladj['border_details']['T']; - $this->setBorder($cbord['border'] , _BORDER_BOTTOM , false); - $this->setBorder($celladj['border'] , _BORDER_TOP, false); - } - // Width - else if ($csthis > $csadj) { - if (!isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) || (isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) && $cells[($i+$crowsp)][$j+$cspi]['colspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['T'] = $cbord['border_details']['B']; - $this->setBorder($cbord['border'] , _BORDER_BOTTOM); - } - } - else if ($csadj > $csthis) { - if ($ccolsp < 2) { // don't overwrite this cell if it spans - $cbord['border_details']['B'] = $celladj['border_details']['T']; - $this->setBorder($celladj['border'] , _BORDER_TOP); - } - } - - // double>solid>dashed>dotted... - else if (array_search($cbord['border_details']['B']['style'],$this->borderstyles) > array_search($celladj['border_details']['T']['style'],$this->borderstyles)) { - if (!isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) || (isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) && $cells[($i+$crowsp)][$j+$cspi]['colspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['T'] = $cbord['border_details']['B']; - $this->setBorder($cbord['border'] , _BORDER_BOTTOM ); - } - } - else if (array_search($celladj['border_details']['T']['style'],$this->borderstyles) > array_search($cbord['border_details']['B']['style'],$this->borderstyles)) { - if ($ccolsp < 2) { // don't overwrite this cell if it spans - $cbord['border_details']['B'] = $celladj['border_details']['T']; - $this->setBorder($celladj['border'] , _BORDER_TOP); - } - } - - - - // Style set on cell vs. table - else if ($celladj['border_details']['T']['dom'] > $cbord['border_details']['B']['dom']) { - if ($ccolsp < 2) { // don't overwrite this cell if it spans - $cbord['border_details']['B'] = $celladj['border_details']['T']; - $this->setBorder($celladj['border'] , _BORDER_TOP); - } - } - // Style set on cell vs. table - OR - LEFT/TOP (cell) in preference to BOTTOM/RIGHT - else { - if (!isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) || (isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) && $cells[($i+$crowsp)][$j+$cspi]['colspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['T'] = $cbord['border_details']['B']; - $this->setBorder($cbord['border'] , _BORDER_BOTTOM ); - } - } - } - else if ($celladj) { - if (!isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) || (isset($cells[($i+$crowsp)][$j+$cspi]['colspan']) && $cells[($i+$crowsp)][$j+$cspi]['colspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['T'] = $cbord['border_details']['B']; - } - } - // mPDF 4.3.009 - if ($celladj && $this->packTableData) { $cells[($i+$crowsp)][$j+$cspi]['borderbin'] = $this->_packCellBorder($celladj); } - unset($celladj); - } - } - - if ($j < ($numcols-1) || ($j+$ccolsp) < $numcols ) { // Right - for ($cspi = 0; $cspi<$crowsp; $cspi++) { - // already defined Left for adjacent cell to R - if (isset($cells[$i+$cspi][$j+$ccolsp])) { - if ($this->packTableData) { - $celladj = $this->_unpackCellBorder($cells[$i+$cspi][$j+$ccolsp]['borderbin']); // mPDF 4.3.009 Binary packed data - } - else { $celladj =& $cells[$i+$cspi][$j+$ccolsp]; } - } - else { $celladj = false; } - if ($celladj && $celladj['border_details']['L']['s'] == 1) { - $csadj = $celladj['border_details']['L']['w']; - $csthis = $cbord['border_details']['R']['w']; - // Hidden - if ($cbord['border_details']['R']['style']=='hidden') { - $celladj['border_details']['L'] = $cbord['border_details']['R']; - $this->setBorder($celladj['border'] , _BORDER_LEFT, false); - $this->setBorder($cbord['border'] , _BORDER_RIGHT , false); - } - else if ($celladj['border_details']['L']['style']=='hidden') { - $cbord['border_details']['R'] = $celladj['border_details']['L']; - $this->setBorder($cbord['border'] , _BORDER_RIGHT , false); - $this->setBorder($celladj['border'] , _BORDER_LEFT, false); - } - // Width - else if ($csthis > $csadj) { - if (!isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) || (isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) && $cells[($i+$cspi)][$j+$ccolsp]['rowspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['L'] = $cbord['border_details']['R']; - $this->setBorder($cbord['border'] , _BORDER_RIGHT); - $this->setBorder($celladj['border'] , _BORDER_LEFT, false); - } - } - else if ($csadj > $csthis) { - if ($crowsp < 2) { // don't overwrite this cell if it spans - $cbord['border_details']['R'] = $celladj['border_details']['L']; - $this->setBorder($cbord['border'] , _BORDER_RIGHT, false); - $this->setBorder($celladj['border'] , _BORDER_LEFT); - } - } - - // double>solid>dashed>dotted... - else if (array_search($cbord['border_details']['R']['style'],$this->borderstyles) > array_search($celladj['border_details']['L']['style'],$this->borderstyles)) { - if (!isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) || (isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) && $cells[($i+$cspi)][$j+$ccolsp]['rowspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['L'] = $cbord['border_details']['R']; - $this->setBorder($celladj['border'] , _BORDER_LEFT, false); - $this->setBorder($cbord['border'] , _BORDER_RIGHT); - } - } - else if (array_search($celladj['border_details']['L']['style'],$this->borderstyles) > array_search($cbord['border_details']['R']['style'],$this->borderstyles)) { - if ($crowsp < 2) { // don't overwrite this cell if it spans - $cbord['border_details']['R'] = $celladj['border_details']['L']; - $this->setBorder($cbord['border'] , _BORDER_RIGHT , false); - $this->setBorder($celladj['border'] , _BORDER_LEFT); - } - } - - - // Style set on cell vs. table - else if ($celladj['border_details']['L']['dom'] > $cbord['border_details']['R']['dom']) { - if ($crowsp < 2) { // don't overwrite this cell if it spans - $cbord['border_details']['R'] = $celladj['border_details']['L']; - // mPDF 3.0 $this->setBorder($cbord['border'] , _BORDER_RIGHT , false); - $this->setBorder($celladj['border'] , _BORDER_LEFT); - } - } - // Style set on cell vs. table - OR - LEFT/TOP (cell) in preference to BOTTOM/RIGHT - else { - if (!isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) || (isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) && $cells[($i+$cspi)][$j+$ccolsp]['rowspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['L'] = $cbord['border_details']['R']; - // mPDF 3.0 $this->setBorder($celladj['border'] , _BORDER_LEFT , false); - $this->setBorder($cbord['border'] , _BORDER_RIGHT); - } - } - } - else if ($celladj) { - // if right-cell border is not set - if (!isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) || (isset($cells[($i+$cspi)][$j+$ccolsp]['rowspan']) && $cells[($i+$cspi)][$j+$ccolsp]['rowspan']<2)) { // don't overwrite bordering cells that span - $celladj['border_details']['L'] = $cbord['border_details']['R']; - // mPDF 3.0 $this->setBorder($celladj['border'] , _BORDER_LEFT , false); - } - } - // mPDF 4.3.009 - if ($celladj && $this->packTableData) { $cells[$i+$cspi][$j+$ccolsp]['borderbin'] = $this->_packCellBorder($celladj); } - unset($celladj); - } - } - } - - - // Set maximum cell border width meeting at LRTB edges of cell - used for extended cell border - // ['border_details']['mbw']['LT'] = meeting border width - Left border - Top end - if (!$table['borders_separate']) { - $cbord['border_details']['mbw']['BL'] = max($cbord['border_details']['mbw']['BL'], $cbord['border_details']['L']['w']); - $cbord['border_details']['mbw']['BR'] = max($cbord['border_details']['mbw']['BR'], $cbord['border_details']['R']['w']); - $cbord['border_details']['mbw']['RT'] = max($cbord['border_details']['mbw']['RT'], $cbord['border_details']['T']['w']); - $cbord['border_details']['mbw']['RB'] = max($cbord['border_details']['mbw']['RB'], $cbord['border_details']['B']['w']); - $cbord['border_details']['mbw']['TL'] = max($cbord['border_details']['mbw']['TL'], $cbord['border_details']['L']['w']); - $cbord['border_details']['mbw']['TR'] = max($cbord['border_details']['mbw']['TR'], $cbord['border_details']['R']['w']); - $cbord['border_details']['mbw']['LT'] = max($cbord['border_details']['mbw']['LT'], $cbord['border_details']['T']['w']); - $cbord['border_details']['mbw']['LB'] = max($cbord['border_details']['mbw']['LB'], $cbord['border_details']['B']['w']); - - if (($i+$crowsp) < $numrows && isset($cells[$i+$crowsp][$j])) { // Has Bottom adjoining cell - if ($this->packTableData) { - $celladj = $this->_unpackCellBorder($cells[$i+$crowsp][$j]['borderbin']); // mPDF 4.3.009 Binary packed data - } - else { $celladj =& $cells[$i+$crowsp][$j]; } - $cbord['border_details']['mbw']['BL'] = max($cbord['border_details']['mbw']['BL'], $celladj['border_details']['L']['w'], $celladj['border_details']['mbw']['TL']); - $cbord['border_details']['mbw']['BR'] = max($cbord['border_details']['mbw']['BR'], $celladj['border_details']['R']['w'], $celladj['border_details']['mbw']['TR']); - $cbord['border_details']['mbw']['LB'] = max($cbord['border_details']['mbw']['LB'], $celladj['border_details']['mbw']['LT']); - $cbord['border_details']['mbw']['RB'] = max($cbord['border_details']['mbw']['RB'], $celladj['border_details']['mbw']['RT']); - unset($celladj); - } - - if (($j+$ccolsp) < $numcols && isset($cells[$i][$j+$ccolsp])) { // Has Right adjoining cell - if ($this->packTableData) { - $celladj = $this->_unpackCellBorder($cells[$i][$j+$ccolsp]['borderbin']); // mPDF 4.3.009 Binary packed data - } - else { $celladj =& $cells[$i][$j+$ccolsp]; } - $cbord['border_details']['mbw']['RT'] = max($cbord['border_details']['mbw']['RT'], $celladj['border_details']['T']['w'], $celladj['border_details']['mbw']['LT']); - $cbord['border_details']['mbw']['RB'] = max($cbord['border_details']['mbw']['RB'], $celladj['border_details']['B']['w'], $celladj['border_details']['mbw']['LB']); - $cbord['border_details']['mbw']['TR'] = max($cbord['border_details']['mbw']['TR'], $celladj['border_details']['mbw']['TL']); - $cbord['border_details']['mbw']['BR'] = max($cbord['border_details']['mbw']['BR'], $celladj['border_details']['mbw']['BL']); - unset($celladj); - } - - if ($i > 0 && isset($cells[$i-1][$j]) && (($this->packTableData && $cells[$i-1][$j]['borderbin']) || $cells[$i-1][$j]['border'])) { // Has Top adjoining cell - if ($this->packTableData) { - $celladj = $this->_unpackCellBorder($cells[$i-1][$j]['borderbin']); // mPDF 4.3.009 Binary packed data - } - else { $celladj =& $cells[$i-1][$j]; } - $cbord['border_details']['mbw']['TL'] = max($cbord['border_details']['mbw']['TL'], $celladj['border_details']['L']['w'], $celladj['border_details']['mbw']['BL']); - $cbord['border_details']['mbw']['TR'] = max($cbord['border_details']['mbw']['TR'], $celladj['border_details']['R']['w'], $celladj['border_details']['mbw']['BR']); - $cbord['border_details']['mbw']['LT'] = max($cbord['border_details']['mbw']['LT'], $celladj['border_details']['mbw']['LB']); - $cbord['border_details']['mbw']['RT'] = max($cbord['border_details']['mbw']['RT'], $celladj['border_details']['mbw']['RB']); - - if ($celladj['border_details']['mbw']['BL']) { - $celladj['border_details']['mbw']['BL'] = max($cbord['border_details']['mbw']['TL'], $celladj['border_details']['mbw']['BL']); - } - if ($celladj['border_details']['mbw']['BR'] ) { - $celladj['border_details']['mbw']['BR'] = max($celladj['border_details']['mbw']['BR'], $cbord['border_details']['mbw']['TR']); - } - if ($this->packTableData) { $cells[$i-1][$j]['borderbin'] = $this->_packCellBorder($celladj); } - unset($celladj); - } - - if ($j > 0 && isset($cells[$i][$j-1]) && (($this->packTableData && $cells[$i][$j-1]['borderbin']) || $cells[$i][$j-1]['border'])) { // Has Left adjoining cell - if ($this->packTableData) { - $celladj = $this->_unpackCellBorder($cells[$i][$j-1]['borderbin']); // mPDF 4.3.009 Binary packed data - } - else { $celladj =& $cells[$i][$j-1]; } - $cbord['border_details']['mbw']['LT'] = max($cbord['border_details']['mbw']['LT'], $celladj['border_details']['T']['w'], $celladj['border_details']['mbw']['RT']); - $cbord['border_details']['mbw']['LB'] = max($cbord['border_details']['mbw']['LB'], $celladj['border_details']['B']['w'], $celladj['border_details']['mbw']['RB']); - $cbord['border_details']['mbw']['BL'] = max($cbord['border_details']['mbw']['BL'], $celladj['border_details']['mbw']['BR']); - $cbord['border_details']['mbw']['TL'] = max($cbord['border_details']['mbw']['TL'], $celladj['border_details']['mbw']['TR']); - - if ($celladj['border_details']['mbw']['RT']) { - $celladj['border_details']['mbw']['RT'] = max($celladj['border_details']['mbw']['RT'], $cbord['border_details']['mbw']['LT']); - } - if ($celladj['border_details']['mbw']['RB']) { - $celladj['border_details']['mbw']['RB'] = max($celladj['border_details']['mbw']['RB'], $cbord['border_details']['mbw']['LB']); - } - if ($this->packTableData) { $cells[$i][$j-1]['borderbin'] = $this->_packCellBorder($celladj); } - unset($celladj); - } - - - // Update maximum cell border width at LRTB edges of table - used for overall table width - if ($j == 0 && $cbord['border_details']['L']['w']) { - $table['max_cell_border_width']['L'] = max($table['max_cell_border_width']['L'],$cbord['border_details']['L']['w']); - } - if (($j == ($numcols-1) || ($j+$ccolsp) == $numcols ) && $cbord['border_details']['R']['w']) { - $table['max_cell_border_width']['R'] = max($table['max_cell_border_width']['R'],$cbord['border_details']['R']['w']); - } - if ($i == 0 && $cbord['border_details']['T']['w']) { - $table['max_cell_border_width']['T'] = max($table['max_cell_border_width']['T'],$cbord['border_details']['T']['w']); - } - if (($i == ($numrows-1) || ($i+$crowsp) == $numrows ) && $cbord['border_details']['B']['w']) { - $table['max_cell_border_width']['B'] = max($table['max_cell_border_width']['B'],$cbord['border_details']['B']['w']); - } - } -/*-- END TABLES-ADVANCED-BORDERS --*/ - - // mPDF 4.3.009 Binary packed data - if ($this->packTableData) { $cell['borderbin'] = $this->_packCellBorder($cbord); } - unset($cbord ); - unset($cell ); - } - } - } - unset($cell ); -} -// END FIX BORDERS ************************************************************************************ - -function _tableWrite(&$table){ - $level = $table['level']; - $levelid = $table['levelid']; - - $cells = &$table['cells']; - $numcols = $table['nc']; - $numrows = $table['nr']; - - if ($this->ColActive && $level==1) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - - // TABLE TOP MARGIN - if ($table['margin']['T']) { - if (!$this->table_rotate && $level==1) { - $this->DivLn($table['margin']['T'],$this->blklvl,true,1); // collapsible - } - else { - $this->y += ($table['margin']['T']); - } - } - - // Advance down page by half width of top border - if ($table['borders_separate']) { - $adv = $table['padding']['T'] + $table['border_details']['T']['w'] + $table['border_spacing_V']/2; - } - else { - $adv = $table['max_cell_border_width']['T']/2; - } - if (!$this->table_rotate && $level==1) { $this->DivLn($adv); } - else { $this->y += $adv; } - - - if ($level==1) { - $this->x = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin'] + $this->blk[$this->blklvl]['padding_left'] + $this->blk[$this->blklvl]['border_left']['w']; - $x0 = $this->x; - $y0 = $this->y; - $right = $x0 + $this->blk[$this->blklvl]['inner_width']; - $outerfilled = $this->y; // Keep track of how far down the outer DIV bgcolor is painted (NB rowspans) - $this->outerfilled = $this->y; - } - else { - $x0 = $this->x; - $y0 = $this->y; - $right = $x0 + $table['w']; // ???? - // $outerfilled = $this->y; // Keep track of how far down the outer DIV bgcolor is painted (NB rowspans) - } - - if ($this->table_rotate) { - $temppgwidth = $this->tbrot_maxw; - $this->PageBreakTrigger = $pagetrigger = $y0 + ($this->blk[$this->blklvl]['inner_width']); - if ($level==1) { - $this->tbrot_y0 = $this->y - $adv - $table['margin']['T'] ; - $this->tbrot_x0 = $this->x; - $this->tbrot_w = $table['w']; - if ($table['borders_separate']) { $this->tbrot_h = $table['margin']['T'] + $table['padding']['T'] + $table['border_details']['T']['w'] + $table['border_spacing_V']/2; } - else { $this->tbrot_h = $table['margin']['T'] + $table['padding']['T'] + $table['max_cell_border_width']['T']; } - } - } - else { - $this->PageBreakTrigger = $pagetrigger = ($this->h - $this->bMargin); - if ($level==1) { - $temppgwidth = $this->blk[$this->blklvl]['inner_width']; - if (isset($table['a']) and ($table['w'] < $this->blk[$this->blklvl]['inner_width'])) { - if ($table['a']=='C') { $x0 += ((($right-$x0) - $table['w'])/2); } - else if ($table['a']=='R') { $x0 = $right - $table['w']; } - } - } - else { - $temppgwidth = $table['w']; - } - } - - // mPDF 4.2 Clipping Output - if ($table['overflow']=='hidden' && $level==1 && !$this->table_rotate && !$this->ColActive) { - //Bounding rectangle to clip - $this->tableClipPath = sprintf('q %.3f %.3f %.3f %.3f re W n',$x0*$this->k,$this->h*$this->k,$this->blk[$this->blklvl]['inner_width']*$this->k,-$this->h*$this->k); - $this->_out($this->tableClipPath); - } - else { $this->tableClipPath = ''; } - - - if ($table['borders_separate']) { $indent = $table['margin']['L'] + $table['border_details']['L']['w'] + $table['padding']['L'] + $table['border_spacing_H']/2; } - else { $indent = $table['margin']['L'] + $table['max_cell_border_width']['L']/2; } - $x0 += $indent; - - $returny = 0; - $tableheader = array(); - $tablefooter = array(); // mPDF 4.0 - $tablefooterrowheight = 0; - $footery = 0; - - // mPD 3.0 Set the Page & Column where table starts - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $tablestartpage = 'EVEN'; - } - else if (($this->mirrorMargins) && (($this->page)%2==1)) { // ODD - $tablestartpage = 'ODD'; - } - else { $tablestartpage = ''; } - if ($this->ColActive) { $tablestartcolumn = $this->CurrCol; } - else { $tablestartcolumn = ''; } - - // mPDF 4.0 Initialise variable - $y = $h = 0; - - // mPDF 4.0 Table Footer - for( $i = 0 ; $i < $numrows ; $i++ ) { //Rows - if ($this->progressBar) { $this->UpdateProgressBar(7,intval(30 + ($i*40/$numrows)),' '); } // *PROGRESS-BAR* - if (isset($table['is_tfoot'][$i]) && $table['is_tfoot'][$i] && $level==1) { - $tablefooterrowheight += $table['hr'][$i]; - for( $j = 0 ; $j < $numcols ; $j++ ) { //Columns - if (isset($cells[$i][$j]) && $cells[$i][$j]) { - $cell = &$cells[$i][$j]; - list($x,$w) = $this->_tableGetWidth($table, $i, $j); - list($y,$h) = $this->_tableGetHeight($table, $i, $j); - $x += $x0; - $y += $y0; - - //Get info of tfoot ==>> table footer - $tablefooter[$i][$j]['x'] = $x; - $tablefooter[$i][$j]['y'] = $y; - $tablefooter[$i][$j]['h'] = $h; - $tablefooter[$i][$j]['w'] = $w; - $tablefooter[$i][$j]['text'] = $cell['text']; - if (isset($cell['textbuffer'])) { $tablefooter[$i][$j]['textbuffer'] = $cell['textbuffer']; } - else { $tablefooter[$i][$j]['textbuffer'] = ''; } - $tablefooter[$i][$j]['a'] = $cell['a']; - $tablefooter[$i][$j]['R'] = $cell['R']; - $tablefooter[$i][$j]['va'] = $cell['va']; - $tablefooter[$i][$j]['mih'] = $cell['mih']; - $tablefooter[$i][$j]['gradient'] = $cell['gradient']; // *GRADIENTS* - $tablefooter[$i][$j]['background-image'] = $cell['background-image']; // *BACKGROUND-IMAGES* - //CELL FILL BGCOLOR - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - if ($this->packTableData) { - $c = $this->_unpackCellBorder($cell['borderbin']); - $tablefooter[$i][$j]['border'] = $c['border']; - $tablefooter[$i][$j]['border_details'] = $c['border_details']; - } - else { - $tablefooter[$i][$j]['border'] = $cell['border']; - $tablefooter[$i][$j]['border_details'] = $cell['border_details']; - } - } - else if ($this->simpleTables){ - $tablefooter[$i][$j]['border'] = $table['simple']['border']; - $tablefooter[$i][$j]['border_details'] = $table['simple']['border_details']; - } - // mPDF 4.3.006 - $fill = isset($cell['bgcolor']) ? $cell['bgcolor'] : 0; - $tablefooter[$i][$j]['bgcolor'] = $fill; - $tablefooter[$i][$j]['padding'] = $cell['padding']; - $tablefooter[$i][$j]['rowspan'] = $cell['rowspan']; - $tablefooter[$i][$j]['colspan'] = $cell['colspan']; - } - } - } - } - - //Draw Table Contents and Borders - for( $i = 0 ; $i < $numrows ; $i++ ) { //Rows - - // Get Maximum row/cell height in row - including rowspan>1 + 1 overlapping - $maxrowheight = 0; - for( $j = 0 ; $j < $numcols ; $j++ ) { //Columns - list($y,$h) = $this->_tableGetHeight($table, $i, $j); - $maxrowheight = max($maxrowheight,$h); - } - - $skippage = false; - $newpagestarted = false; - for( $j = 0 ; $j < $numcols ; $j++ ) { //Columns - if (isset($cells[$i][$j]) && $cells[$i][$j]) { - $cell = &$cells[$i][$j]; - - list($x,$w) = $this->_tableGetWidth($table, $i, $j); - list($y,$h) = $this->_tableGetHeight($table, $i, $j); - $x += $x0; - $y += $y0; - $y -= $returny; - if ($table['borders_separate']) { - // mPDF 3.0 - if (!empty($tablefooter) || $i == ($numrows-1) || (isset($cell['rowspan']) && ($i+$cell['rowspan']) == $numrows) || (!isset($cell['rowspan']) && ($i+1) == $numrows) ) { - $extra = $table['padding']['B'] + $table['border_details']['B']['w'] + $table['border_spacing_V']/2; - //$extra = $table['margin']['B'] + $table['padding']['B'] + $table['border_details']['B']['w'] + $table['border_spacing_V']/2; - } - else { - $extra = $table['border_spacing_V']/2; - } - } - else { $extra = $table['max_cell_border_width']['B']/2; } - - // mPDF 4.5.004 - if ($j==0 && ((($y + $maxrowheight + $extra ) > ($pagetrigger+0.001)) || (($this->keepColumns || !$this->ColActive) && !empty($tablefooter) && ($y + $maxrowheight + $tablefooterrowheight + $extra) > $pagetrigger) && ($i < ($numrows - $this->tableheadernrows))) && ($y0 >0 || $x0 > 0) && !$this->InFooter) { - if (!$skippage) { - // mPDF 4.0 - //if (!$this->ColActive && !empty($tablefooter) && $i > 0 ) { - // mPDF 4.4.015 - if (($this->keepColumns || !$this->ColActive) && !empty($tablefooter) && $i > 0 ) { - $this->y = $y; - $ya = $this->y; - $this->TableHeaderFooter($tablefooter,$tablestartpage,$tablestartcolumn,'F'); - if ($this->table_rotate) { - $this->tbrot_h += $this->y - $ya ; - } - } - $y -= $y0; - $returny += $y; - - $oldcolumn = $this->CurrCol; - if ($this->AcceptPageBreak()) { - $newpagestarted = true; - $this->y = $y + $y0; - - // mPDF 3.0 - Move down to account for border-spacing or - // extra half border width in case page breaks in middle - if($i>0 && !$this->table_rotate && $level==1 && !$this->ColActive) { - if ($table['borders_separate']) { $adv = $table['border_spacing_V']/2; } - else { - $maxbwbottom = 0; - for( $ctj = 0 ; $ctj < $numcols ; $ctj++ ) { - if (isset($cells[$i][$ctj]) && $cells[$i][$ctj]) { - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - if ($this->packTableData) { - list($bt,$br,$bb,$bl) = $this->_getBorderWidths($cells[$i][$ctj]['borderbin']); - } - else { - $bt = $cells[$i][$ctj]['border_details']['T']['w']; - } - $maxbwbottom = max($maxbwbottom , $bt); - } - else if ($this->simpleTables){ - $maxbwbottom = max($maxbwbottom , $table['simple']['border_details']['T']['w']); - } - } - } - $adv = $maxbwbottom /2; - } - $this->y += $adv; - } - - // mPDF 3.0 Rotated table split over pages - needs this->y for borders/backgrounds - if($i>0 && $this->table_rotate && $level==1) { - $this->y = $y0 + $this->tbrot_w; - } - - // mPDF 4.2 - if ($this->tableClipPath ) { $this->_out("Q"); } - - $this->AddPage($this->CurOrientation); - - // mPDF 4.2 - if ($this->tableClipPath ) { $this->_out($this->tableClipPath); } - - // Added to correct for OddEven Margins - $x=$x +$this->MarginCorrection; - $x0=$x0 +$this->MarginCorrection; - - - // mPDF 3.0 - Move down to account for half of top border-spacing or - // extra half border width in case page was broken in middle - if($i>0 && !$this->table_rotate && $level==1 && !$this->usetableheader) { - if ($table['borders_separate']) { $adv = $table['border_spacing_V']/2; } - else { - $maxbwtop = 0; - for( $ctj = 0 ; $ctj < $numcols ; $ctj++ ) { - if (isset($cells[$i][$ctj]) && $cells[$i][$ctj]) { - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - if ($this->packTableData) { - list($bt,$br,$bb,$bl) = $this->_getBorderWidths($cells[$i][$ctj]['borderbin']); - } - else { - $bt = $cells[$i][$ctj]['border_details']['T']['w']; - } - $maxbwtop = max($maxbwtop, $bt); - } - else if ($this->simpleTables){ - $maxbwtop = max($maxbwtop, $table['simple']['border_details']['T']['w']); - } - } - } - $adv = $maxbwtop /2; - } - $this->y += $adv; - } - - - if ($this->table_rotate) { - // mPDF 3.0 Rotated table - //$this->tbrot_x0 = $x0; - $this->tbrot_x0 = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin'] + $this->blk[$this->blklvl]['padding_left'] + $this->blk[$this->blklvl]['border_left']['w']; - if ($table['borders_separate']) { $this->tbrot_h = $table['margin']['T'] + $table['padding']['T'] + $table['border_details']['T']['w'] + $table['border_spacing_V']/2; } - else { $this->tbrot_h = $table['margin']['T'] + $table['max_cell_border_width']['T'] ; } - $this->tbrot_y0 = $this->y; - $pagetrigger = $y0 + ($this->blk[$this->blklvl]['inner_width']); - } - else { - $pagetrigger = $this->PageBreakTrigger; - } - - if ($this->kwt_saved && $level==1) { - $this->kwt_moved = true; - } - - // Disable Table header repeat if Keep Block together - if ($this->usetableheader && !$this->keep_block_together && !empty($tableheader)) { - $ya = $this->y; - $this->TableHeaderFooter($tableheader,$tablestartpage,$tablestartcolumn,'H'); // mPDF 4.0 - if ($this->table_rotate) { - $this->tbrot_h = $this->y - $ya ; - } - } - - // mPDF 3.0 - else if ($i==0 && !$this->keep_block_together && !$this->table_rotate && $level==1 && !$this->ColActive) { - // Advance down page - if ($table['borders_separate']) { $adv = $table['border_spacing_V']/2 + $table['border_details']['T']['w'] + $table['padding']['T']; } - else { $adv = $table['max_cell_border_width']['T'] /2 ; } - if ($adv) { - if ($this->table_rotate) { - $this->y += ($adv); - } - else { - $this->DivLn($adv,$this->blklvl,true); - } - } - } - - $outerfilled = 0; - $y0 = $this->y; - $y = $y0; - } - -/*-- COLUMNS --*/ - // COLS - // COLUMN CHANGE - if ($this->CurrCol != $oldcolumn) { - // Added to correct for Columns - $x += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - $x0 += $this->ChangeColumn * ($this->ColWidth+$this->ColGap); - if ($this->CurrCol == 0) { // just added a page - possibly with tableheader - $y0 = $this->y; // this->y0 is global used by Columns - $y0 is internal to tablewrite - } - else { - $y0 = $this->y0; // this->y0 is global used by Columns - $y0 is internal to tablewrite - } - $y = $y0; - $outerfilled = 0; - // mPDF 4.4.015 - if ($this->CurrCol != 0 && ($this->keepColumns && $this->ColActive) && !empty($tableheader) && $i > 0 ) { - $this->x = $x; - $this->y = $y; - $this->TableHeaderFooter($tableheader,$tablestartpage,$tablestartcolumn,'H'); - $y0 = $y=$this->y; - } - } -/*-- END COLUMNS --*/ - } - $skippage = true; - } - - $this->x = $x; - $this->y = $y; - - if ($this->kwt_saved && $level==1) { - $this->printkwtbuffer(); - $x0 = $x = $this->x; - $y0 = $y = $this->y; - $this->kwt_moved = false; - $this->kwt_saved = false; - } - - - // Set the Page & Column where table starts - if ($i==0 && $j==0 && $level==1) { - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $tablestartpage = 'EVEN'; - } - else if (($this->mirrorMargins) && (($this->page)%2==1)) { // ODD - $tablestartpage = 'ODD'; - } - else { $tablestartpage = ''; } - if ($this->ColActive) { $tablestartcolumn = $this->CurrCol; } // *COLUMNS* - } - - - //ALIGN - $align = $cell['a']; - - -/*-- COLUMNS --*/ - // mPDF 3.0 - If outside columns, this is done in PaintDivBB - if ($this->ColActive) { - //OUTER FILL BGCOLOR of DIVS - if ($this->blklvl > 0 && ($j==0) && !$this->table_rotate && $level==1) { - $firstblockfill = $this->GetFirstBlockFill(); - if ($firstblockfill && $this->blklvl >= $firstblockfill) { - $divh = $maxrowheight; - // Last row - if (isset($cell['rowspan']) && (($i == $numrows-1 && $cell['rowspan']<2) || ($cell['rowspan']>1 && ($i + $cell['rowspan']-1) == $numrows-1))) { - if ($table['borders_separate']) { - $adv = $table['margin']['B'] + $table['padding']['B'] + $table['border_details']['B']['w'] + $table['border_spacing_V']/2; - } - else { - $adv = $table['margin']['B'] + $table['max_cell_border_width']['B']/2; - } - $divh += $adv; //last row: fill bottom half of bottom border (y advanced at end) - } - - if (($this->y + $divh) > $outerfilled ) { // if not already painted by previous rowspan - $bak_x = $this->x; - $bak_y = $this->y; - if ($outerfilled > $this->y) { - $divh = ($this->y + $divh) - $outerfilled; - $this->y = $outerfilled; - } - - $this->DivLn($divh,-3,false); - $outerfilled = $this->y + $divh; - // Reset current block fill - $bcor = $this->blk[$this->blklvl]['bgcolorarray']; - if ($bcor ) $this->SetFillColor($bcor['R'],$bcor['G'],$bcor['B']); - $this->x = $bak_x; - $this->y = $bak_y; - } - } - } - } -/*-- END COLUMNS --*/ - - - //TABLE BACKGROUND FILL BGCOLOR - for cellSpacing - if ($table['borders_separate']) { - $fill = isset($table['bgcolor'][-1]) ? $table['bgcolor'][-1] : 0; // mPDF 4.3.005 - if ($fill) { - $color = $this->ConvertColor($fill); - if ($color) $this->SetFillColor($color['R'],$color['G'],$color['B']); - $xadj = ($table['border_spacing_H']/2); - $yadj = ($table['border_spacing_V']/2); - $wadj = $table['border_spacing_H']; - $hadj = $table['border_spacing_V']; - if ($i == 0) { // Top - $yadj += $table['padding']['T']; - $hadj += $table['padding']['T']; - } - if ($j == 0) { // Left - $xadj += $table['padding']['L']; - $wadj += $table['padding']['L']; - } - if ($i == ($numrows-1) || (isset($cell['rowspan']) && ($i+$cell['rowspan']) == $numrows) || (!isset($cell['rowspan']) && ($i+1) == $numrows)) { // Bottom - $hadj += $table['padding']['B']; - } - if ($j == ($numcols-1) || (isset($cell['colspan']) && ($j+$cell['colspan']) == $numcols) || (!isset($cell['colspan']) && ($j+1) == $numcols)) { // Right - $wadj += $table['padding']['R']; - } - $this->Rect($x - $xadj, $y - $yadj, $w + $wadj, $h + $hadj, 'F'); - } - } - - // TABLE BORDER - if separate - if ($table['borders_separate'] && $table['border']) { - $halfspaceL = $table['padding']['L'] + ($table['border_spacing_H']/2); - $halfspaceR = $table['padding']['R'] + ($table['border_spacing_H']/2); - $halfspaceT = $table['padding']['T'] + ($table['border_spacing_V']/2); - $halfspaceB = $table['padding']['B'] + ($table['border_spacing_V']/2); - $tbx = $x; - $tby = $y; - $tbw = $w; - $tbh = $h; - $tab_bord = 0; - // mPDF 3.0 - $corner = ''; - if ($i == 0) { // Top - $tby -= $halfspaceT + ($table['border_details']['T']['w']/2); - $tbh += $halfspaceT + ($table['border_details']['T']['w']/2); - $this->setBorder($tab_bord , _BORDER_TOP); - $corner .= 'T'; - } - if ($i == ($numrows-1) || (isset($cell['rowspan']) && ($i+$cell['rowspan']) == $numrows) || (!isset($cell['rowspan']) && ($i+1) == $numrows) ) { // Bottom - $tbh += $halfspaceB + ($table['border_details']['B']['w']/2); - $this->setBorder($tab_bord , _BORDER_BOTTOM); - $corner .= 'B'; - } - if ($j == 0) { // Left - $tbx -= $halfspaceL + ($table['border_details']['L']['w']/2); - $tbw += $halfspaceL + ($table['border_details']['L']['w']/2); - $this->setBorder($tab_bord , _BORDER_LEFT); - $corner .= 'L'; - } - if ($j == ($numcols-1) || (isset($cell['colspan']) && ($j+$cell['colspan']) == $numcols) || (!isset($cell['colspan']) && ($j+1) == $numcols)) { // Right - $tbw += $halfspaceR + ($table['border_details']['R']['w']/2); - $this->setBorder($tab_bord , _BORDER_RIGHT); - $corner .= 'R'; - } - $this->_tableRect($tbx, $tby, $tbw, $tbh, $tab_bord , $table['border_details'], false, $table['borders_separate'], 'table', $corner, $table['border_spacing_V'], $table['border_spacing_H'] ); - } - - if ($table['empty_cells']!='hide' || !empty($cell['textbuffer']) || (isset($cell['nestedcontent']) && $cell['nestedcontent']) || !$table['borders_separate'] ) { $paintcell = true; } - else { $paintcell = false; } - - //Set Borders - $bord = 0; - $bord_det = array(); - - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - if ($this->packTableData) { - if ($cell['borderbin']) { - $c = $this->_unpackCellBorder($cell['borderbin']); - $bord = $c['border']; - $bord_det = $c['border_details']; - } - } - else if ($cell['border']) { - $bord = $cell['border']; - $bord_det = $cell['border_details']; - } - } - else if ($this->simpleTables){ - if ($table['simple']['border']) { - $bord = $table['simple']['border']; - $bord_det = $table['simple']['border_details']; - } - } - - // mPDF 4.3.006 - //CELL FILL BGCOLOR - $fill = isset($cell['bgcolor']) ? $cell['bgcolor'] : 0; - - if ($fill && $paintcell) { - $color = $this->ConvertColor($fill); - if ($color) $this->SetFillColor($color['R'],$color['G'],$color['B']); - if ($table['borders_separate']) { - $this->Rect($x+ ($table['border_spacing_H']/2), $y+ ($table['border_spacing_V']/2), $w- $table['border_spacing_H'], $h- $table['border_spacing_V'], 'F'); - } - else { - $this->Rect($x, $y, $w, $h, 'F'); - } - } - -/*-- GRADIENTS --*/ - if (isset($cell['gradient']) && $cell['gradient'] && $paintcell){ // mPDF 4.3.006 - $g = $this->parseBackgroundGradient($cell['gradient']); - if ($g) { - if ($table['borders_separate']) { - $px = $x+ ($table['border_spacing_H']/2); - $py = $y+ ($table['border_spacing_V']/2); - $pw = $w- $table['border_spacing_H']; - $ph = $h- $table['border_spacing_V']; - } - else { - $px = $x; - $py = $y; - $pw = $w; - $ph = $h; - } - $this->Gradient($px, $py, $pw, $ph, $g['type'], $g['col'], $g['col2'], $g['coords'], $g['extend']); - } - } -/*-- END GRADIENTS --*/ - -/*-- BACKGROUND-IMAGES --*/ - if (isset($cell['background-image']) && $paintcell) { // mPDF 4.3.006 - if ($cell['background-image']['image_id']) { // Background pattern - $n = count($this->patterns)+1; - if ($table['borders_separate']) { - $px = $x+ ($table['border_spacing_H']/2); - $py = $y+ ($table['border_spacing_V']/2); - $pw = $w- $table['border_spacing_H']; - $ph = $h- $table['border_spacing_V']; - } - else { - $px = $x; - $py = $y; - $pw = $w; - $ph = $h; - } - // mPDF 4.3.015 - list($orig_w, $orig_h, $x_repeat, $y_repeat) = $this->_resizeBackgroundImage($cell['background-image']['orig_w'], $cell['background-image']['orig_h'], $pw, $ph, $cell['background-image']['resize'], $cell['background-image']['x_repeat'], $cell['background-image']['y_repeat']); - $this->patterns[$n] = array('x'=>$px, 'y'=>$py, 'w'=>$pw, 'h'=>$ph, 'pgh'=>$this->h, 'image_id'=>$cell['background-image']['image_id'], 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$cell['background-image']['x_pos'] , 'y_pos'=>$cell['background-image']['y_pos'] , 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat); // mPDF 4.3.015 - // mPDF 4.3.017 - if ($cell['background-image']['opacity']>0 && $cell['background-image']['opacity']<1) { $opac = $this->SetAlpha($cell['background-image']['opacity'],'Normal',true); } - else { $opac = ''; } - $this->_out(sprintf('q /Pattern cs /P%d scn %s %.3f %.3f %.3f %.3f re f Q', $n, $opac, $px*$this->k, ($this->h-$py)*$this->k, $pw*$this->k, -$ph*$this->k)); - } - } -/*-- END BACKGROUND-IMAGES --*/ - - if (isset($cell['colspan']) && $cell['colspan']>1) { $ccolsp = $cell['colspan']; } - else { $ccolsp = 1; } - if (isset($cell['rowspan']) && $cell['rowspan']>1) { $crowsp = $cell['rowspan']; } - else { $crowsp = 1; } - - - // but still need to do this for repeated headers... - if (!$table['borders_separate'] && $this->tabletheadjustfinished && !$this->simpleTables){ // mPDF 4.2.017 - if (isset($table['topntail']) && $table['topntail']) { - $bord_det['T'] = $this->border_details($table['topntail']); - $bord_det['T']['w'] /= $this->shrin_k; - $this->setBorder($bord, _BORDER_TOP); - } - if (isset($table['thead-underline']) && $table['thead-underline']) { - $bord_det['T'] = $this->border_details($table['thead-underline']); - $bord_det['T']['w'] /= $this->shrin_k; - $this->setBorder($bord, _BORDER_TOP); - } - } - - - - //Get info of first row ==>> table header - //Use > 1 row if THEAD - if ($this->usetableheader && ($i == 0 || (isset($table['is_thead'][$i]) && $table['is_thead'][$i])) && $level==1) { - $tableheader[$i][$j]['x'] = $x; - $tableheader[$i][$j]['y'] = $y; - $tableheader[$i][$j]['h'] = $h; - $tableheader[$i][$j]['w'] = $w; - $tableheader[$i][$j]['text'] = $cell['text']; - if (isset($cell['textbuffer'])) { $tableheader[$i][$j]['textbuffer'] = $cell['textbuffer']; } - else { $tableheader[$i][$j]['textbuffer'] = ''; } - $tableheader[$i][$j]['a'] = $cell['a']; - $tableheader[$i][$j]['R'] = $cell['R']; - - $tableheader[$i][$j]['va'] = $cell['va']; - $tableheader[$i][$j]['mih'] = $cell['mih']; - // mPDF 3.1 - $tableheader[$i][$j]['gradient'] = $cell['gradient']; // *GRADIENTS* - $tableheader[$i][$j]['background-image'] = $cell['background-image']; // *BACKGROUND-IMAGES* - // mPDF 4.0 - $tableheader[$i][$j]['rowspan'] = $cell['rowspan']; - $tableheader[$i][$j]['colspan'] = $cell['colspan']; - $tableheader[$i][$j]['bgcolor'] = $fill; - - if (!$this->simpleTables){ // mPDF 4.2.017 - // mPDF 4.3.009 - $tableheader[$i][$j]['border'] = $bord; - $tableheader[$i][$j]['border_details'] = $bord_det; - } - else if ($this->simpleTables){ - $tableheader[$i][$j]['border'] = $table['simple']['border']; - $tableheader[$i][$j]['border_details'] = $table['simple']['border_details']; - } - // mPDF 4.3.006 - $tableheader[$i][$j]['padding'] = $cell['padding']; - // mPDF 3.0 moved as needed earlier - //$this->tableheadernrows = max($this->tableheadernrows, ($i+1)); - } - - // CELL BORDER - if ($bord || $bord_det) { - if ($table['borders_separate'] && $paintcell) { - $this->_tableRect($x + ($table['border_spacing_H']/2)+($bord_det['L']['w'] /2), $y+ ($table['border_spacing_V']/2)+($bord_det['T']['w'] /2), $w-$table['border_spacing_H']-($bord_det['L']['w'] /2)-($bord_det['R']['w'] /2), $h- $table['border_spacing_V']-($bord_det['T']['w'] /2)-($bord_det['B']['w']/2), $bord, $bord_det, false, $table['borders_separate']); - } - else if (!$table['borders_separate']) { - $this->_tableRect($x, $y, $w, $h, $bord, $bord_det, true, $table['borders_separate']); // true causes buffer - } - - } - - //VERTICAL ALIGN - if ($cell['R'] && INTVAL($cell['R']) > 0 && INTVAL($cell['R']) < 90 && isset($cell['va']) && $cell['va']!='B') { $cell['va']='B';} - if (!isset($cell['va']) || $cell['va']=='M') $this->y += ($h-$cell['mih'])/2; - elseif (isset($cell['va']) && $cell['va']=='B') $this->y += $h-$cell['mih']; - - // NESTED CONTENT - - // TEXT (and nested tables) - $this->divalign=$align; - - $this->divwidth=$w; - if (!empty($cell['textbuffer'])) { - $opy = $this->y; - if ($cell['R']) { - $cellPtSize = $cell['textbuffer'][0][11] / $this->shrin_k; - if (!$cellPtSize) { $cellPtSize = $this->default_font_size; } - $cellFontHeight = ($cellPtSize/$this->k); - $opx = $this->x; - $angle = INTVAL($cell['R']); - // Only allow 45 to 89 degrees (when bottom-aligned) or exactly 90 or -90 - if ($angle > 90) { $angle = 90; } - else if ($angle > 0 && $angle <45) { $angle = 45; } - else if ($angle < 0) { $angle = -90; } - $offset = ((sin(deg2rad($angle))) * 0.37 * $cellFontHeight); - if (isset($cell['a']) && $cell['a']=='R') { - $this->x += ($w) + ($offset) - ($cellFontHeight/3) - ($cell['padding']['R'] + ($table['border_spacing_H']/2)); - } - else if (!isset($cell['a']) || $cell['a']=='C') { - $this->x += ($w/2) + ($offset); - } - else { - $this->x += ($offset) + ($cellFontHeight/3)+($cell['padding']['L'] +($table['border_spacing_H']/2)); - } - $str = trim(implode(' ',$cell['text'])); // mPDF 4.4.012 - if (!isset($cell['va']) || $cell['va']=='M') { - $this->y -= ($h-$cell['mih'])/2; //Undo what was added earlier VERTICAL ALIGN - if ($angle > 0) { $this->y += (($h-$cell['mih'])/2) + $cell['padding']['T'] + ($cell['mih']-($cell['padding']['T'] + $cell['padding']['B'])); } - else if ($angle < 0) { $this->y += (($h-$cell['mih'])/2)+ ($cell['padding']['T'] + ($table['border_spacing_V']/2)); } - } - elseif (isset($cell['va']) && $cell['va']=='B') { - $this->y -= $h-$cell['mih']; //Undo what was added earlier VERTICAL ALIGN - if ($angle > 0) { $this->y += $h-($cell['padding']['B'] + ($table['border_spacing_V']/2)); } - else if ($angle < 0) { $this->y += $h-$cell['mih'] + ($cell['padding']['T'] + ($table['border_spacing_V']/2)); } - } - elseif (isset($cell['va']) && $cell['va']=='T') { - if ($angle > 0) { $this->y += $cell['mih']-($cell['padding']['B'] + ($table['border_spacing_V']/2)); } - else if ($angle < 0) { $this->y += ($cell['padding']['T'] + ($table['border_spacing_V']/2)); } - } - $this->Rotate($angle,$this->x,$this->y); - $s_fs = $this->FontSizePt; - $s_f = $this->FontFamily; // mPDF 3.0 - $s_st = $this->FontStyle; // mPDF 3.0 - $this->SetFont($cell['textbuffer'][0][4],$cell['textbuffer'][0][2],$cellPtSize,true,true); - $this->Text($this->x,$this->y,$str); - $this->Rotate(0); - $this->SetFont($s_f,$s_st,$s_fs,true,true); - $this->x = $opx; - } - else { - - if (!$this->simpleTables){ // mPDF 4.2.017 - if ($table['borders_separate']) { // NB twice border width - // mPDF 4.3.009 - $xadj = $bord_det['L']['w'] + $cell['padding']['L'] +($table['border_spacing_H']/2); - $wadj = $bord_det['L']['w'] + $bord_det['R']['w'] + $cell['padding']['L'] +$cell['padding']['R'] + $table['border_spacing_H']; - $yadj = $bord_det['T']['w'] + $cell['padding']['T'] + ($table['border_spacing_H']/2); - } - else { - $xadj = $bord_det['L']['w']/2 + $cell['padding']['L']; - $wadj = ($bord_det['L']['w'] + $bord_det['R']['w'])/2 + $cell['padding']['L'] + $cell['padding']['R']; - $yadj = $bord_det['T']['w']/2 + $cell['padding']['T']; - } - } - else if ($this->simpleTables){ - // mPDF 4.3.006 - if ($table['borders_separate']) { // NB twice border width - $xadj = $table['simple']['border_details']['L']['w'] + $cell['padding']['L'] +($table['border_spacing_H']/2); - $wadj = $table['simple']['border_details']['L']['w'] + $table['simple']['border_details']['R']['w'] + $cell['padding']['L'] +$cell['padding']['R'] + $table['border_spacing_H']; - $yadj = $table['simple']['border_details']['T']['w'] + $cell['padding']['T'] + ($table['border_spacing_H']/2); - } - else { - $xadj = $table['simple']['border_details']['L']['w']/2 + $cell['padding']['L']; - $wadj = ($table['simple']['border_details']['L']['w'] + $table['simple']['border_details']['R']['w'])/2 + $cell['padding']['L'] + $cell['padding']['R']; - $yadj = $table['simple']['border_details']['T']['w']/2 + $cell['padding']['T']; - } - } - - $this->divwidth=$w-$wadj; - if ($this->divwidth == 0) { $this->divwidth = 0.0001; } - $this->x += $xadj; - $this->y += $yadj; - $this->printbuffer($cell['textbuffer'],'',true); - } - $this->y = $opy; - } - unset($cell ); - //Reset values - $this->Reset(); - }//end of (if isset(cells)...) - }// end of columns - - $newpagestarted = false; - $this->tabletheadjustfinished = false; - - if ($this->ColActive && $i < $numrows-1 && $level==1) { $this->breakpoints[$this->CurrCol][] = $y + $h; } // *COLUMNS* - -/*-- COLUMNS --*/ - // mPDF 3.0 - If columns, print out cell borders (in buffer) at end of each row) - if ($this->ColActive) { - if (count($this->cellBorderBuffer)) { $this->printcellbuffer(); } - } -/*-- END COLUMNS --*/ - - - if ($i == $numrows-1) { $this->y = $y + $h; } //last row jump (update this->y position) - if ($this->table_rotate && $level==1) { - $this->tbrot_h += $h; - } - - }// end of rows - - if ($this->progressBar) { $this->UpdateProgressBar(7,70,' '); } // *PROGRESS-BAR* - - if (count($this->cellBorderBuffer)) { $this->printcellbuffer(); } - - // mPDF 4.2 - if ($this->tableClipPath ) { $this->_out("Q"); } - $this->tableClipPath = ''; - - // Advance down page by half width of bottom border - if ($table['borders_separate']) { $this->y += $table['padding']['B'] + $table['border_details']['B']['w'] + $table['border_spacing_V']/2; } - else { $this->y += $table['max_cell_border_width']['B']/2; } - - if ($table['borders_separate'] && $level==1) { $this->tbrot_h += $table['margin']['B'] + $table['padding']['B'] + $table['border_details']['B']['w'] + $table['border_spacing_V']/2; } - else if ($level==1) { $this->tbrot_h += $table['margin']['B'] + $table['max_cell_border_width']['B']/2; } - - - // TABLE BOTTOM MARGIN - if ($table['margin']['B']) { - if (!$this->table_rotate && $level==1) { - $this->DivLn($table['margin']['B'],$this->blklvl,true); // collapsible - } - else { - $this->y += ($table['margin']['B']); - } - } - - if ($this->ColActive && $level==1) { $this->breakpoints[$this->CurrCol][] = $this->y; } // *COLUMNS* - -}//END OF FUNCTION _tableWrite() - - -/////////////////////////END OF TABLE CODE////////////////////////////////// -/*-- END TABLES --*/ - - -function _putextgstates() { - for ($i = 1; $i <= count($this->extgstates); $i++) { - $this->_newobj(); - $this->extgstates[$i]['n'] = $this->n; - $this->_out('<</Type /ExtGState'); - foreach ($this->extgstates[$i]['parms'] as $k=>$v) - $this->_out('/'.$k.' '.$v); - $this->_out('>>'); - $this->_out('endobj'); - } -} - - - - - -/*-- ENCRYPTION --*/ -function SetProtection($permissions=array(),$user_pass='',$owner_pass=null) { - $this->encrypted=false; - // mPDF 4.0 - if (is_string($permissions) && strlen($permissions)>0) { $permissions = array($permissions); } - else if (!is_array($permissions)) { return 0; } - -// if (count($permissions)<1 && !$user_pass && !$owner_pass) { return 0; } - - $this->last_rc4_key=''; - $this->padding="\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08". - "\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A"; - $options = array('print' => 4, 'modify' => 8, 'copy' => 16, 'annot-forms' => 32 ); - $protection = 192; - foreach($permissions as $permission){ - if (!isset($options[$permission])) - $this->Error('Incorrect permission: '.$permission); - $protection += $options[$permission]; - } - if ($owner_pass === null) - $owner_pass = uniqid(rand()); - $this->encrypted = true; - $this->_generateencryptionkey($user_pass, $owner_pass, $protection); - } - -// Compute key depending on object number where the encrypted data is stored -function _objectkey($n) { - return substr($this->_md5_16($this->encryption_key.pack('VXxx',$n)),0,10); -} -/*-- END ENCRYPTION --*/ - - -/*-- IMPORTS --*/ - // mPDF 4.2.006 - // from mPDFI - function _putimportedobjects() { - if (is_array($this->parsers) && count($this->parsers) > 0) { - foreach($this->parsers AS $filename => $p) { - $this->current_parser =& $this->parsers[$filename]; - if (is_array($this->_obj_stack[$filename])) { - while($n = key($this->_obj_stack[$filename])) { - $nObj = $this->current_parser->pdf_resolve_object($this->current_parser->c,$this->_obj_stack[$filename][$n][1]); - $this->_newobj($this->_obj_stack[$filename][$n][0]); - if ($nObj[0] == PDF_TYPE_STREAM) { - $this->pdf_write_value($nObj); - } - else { - $this->pdf_write_value($nObj[1]); - } - $this->_out('endobj'); - $this->_obj_stack[$filename][$n] = null; // free memory - unset($this->_obj_stack[$filename][$n]); - reset($this->_obj_stack[$filename]); - } - } - } - } - } - - - - function _putformxobjects() { - $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; - reset($this->tpls); - foreach($this->tpls AS $tplidx => $tpl) { - $p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; - $this->_newobj(); - $this->tpls[$tplidx]['n'] = $this->n; - $this->_out('<<'.$filter.'/Type /XObject'); - $this->_out('/Subtype /Form'); - $this->_out('/FormType 1'); - - // Left/Bottom/Right/Top - $this->_out(sprintf('/BBox [%.2f %.2f %.2f %.2f]', - $tpl['box']['x']*$this->k, - $tpl['box']['y']*$this->k, - ($tpl['box']['x'] + $tpl['box']['w'])*$this->k, - ($tpl['box']['y'] + $tpl['box']['h'])*$this->k ) - ); - - - if (isset($tpl['box'])) - $this->_out(sprintf('/Matrix [1 0 0 1 %.5f %.5f]',-$tpl['box']['x']*$this->k, -$tpl['box']['y']*$this->k)); - - $this->_out('/Resources '); - - if (isset($tpl['resources'])) { - $this->current_parser =& $tpl['parser']; - $this->pdf_write_value($tpl['resources']); - } else { - $this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); - if (isset($this->_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { - $this->_out('/Font <<'); - foreach($this->_res['tpl'][$tplidx]['fonts'] as $font) - $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); - $this->_out('>>'); - } - if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || - isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) - { - $this->_out('/XObject <<'); - if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { - foreach($this->_res['tpl'][$tplidx]['images'] as $image) - $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); - } - if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { - foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $itpl) // mPDF 4.4.001 - $this->_out($this->tplprefix.$i.' '.$itpl['n'].' 0 R'); - } - $this->_out('>>'); - } - $this->_out('>>'); - } - - $this->_out('/Length '.strlen($p).' >>'); - $this->_putstream($p); - $this->_out('endobj'); - } - } - -/*-- END IMPORTS --*/ - - -/*-- BACKGROUND-IMAGES --*/ -function _putpatterns() { - for ($i = 1; $i <= count($this->patterns); $i++) { - $x = $this->patterns[$i]['x']; - $y = $this->patterns[$i]['y']; - $w = $this->patterns[$i]['w']; - $h = $this->patterns[$i]['h']; - // mPDF 4.0 Uses saved page height - $pgh = $this->patterns[$i]['pgh']; - $orig_w = $this->patterns[$i]['orig_w']; - $orig_h = $this->patterns[$i]['orig_h']; - $image_id = $this->patterns[$i]['image_id']; - if ($this->patterns[$i]['x_repeat']) { $x_repeat = true; } - else { $x_repeat = false; } - if ($this->patterns[$i]['y_repeat']) { $y_repeat = true; } - else { $y_repeat = false; } - $x_pos = $this->patterns[$i]['x_pos']; - if (stristr($x_pos ,'%') ) { - $x_pos += 0; - $x_pos /= 100; - $x_pos = ($w * $x_pos) - ($orig_w/$this->k * $x_pos); - } - $y_pos = $this->patterns[$i]['y_pos']; - if (stristr($y_pos ,'%') ) { - $y_pos += 0; - $y_pos /= 100; - $y_pos = ($h * $y_pos) - ($orig_h/$this->k * $y_pos); - } - $adj_x = ($x_pos + $x) *$this->k; - // mPDF 4.0 Uses saved page height - $adj_y = (($pgh - $y_pos - $y)*$this->k) - $orig_h ; - $img_obj = false; - foreach($this->images AS $img) { - if ($img['i'] == $image_id) { $img_obj = $img['n']; break; } - } - if (!$img_obj ) { echo "Problem: Image object not found for background pattern ".$img['i']; exit; } - - $this->_newobj(); - $this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); - $this->_out('/XObject <</I'.$image_id.' '.$img_obj.' 0 R >>'); - $this->_out('>>'); - $this->_out('endobj'); - - $this->_newobj(); - $this->patterns[$i]['n'] = $this->n; - $this->_out('<< /Type /Pattern /PatternType 1 /PaintType 1 /TilingType 2'); - $this->_out('/Resources '. ($this->n-1) .' 0 R'); - - // mPDF 4.3.015 %.2f to %.3F precision, and increase step 99999 to disable - $this->_out(sprintf('/BBox [0 0 %.3f %.3f]',$orig_w,$orig_h)); - if ($x_repeat) { $this->_out(sprintf('/XStep %.3f',$orig_w)); } - else { $this->_out(sprintf('/XStep %d',99999)); } - if ($y_repeat) { $this->_out(sprintf('/YStep %.3f',$orig_h)); } - else { $this->_out(sprintf('/YStep %d',99999)); } - - $this->_out(sprintf('/Matrix [1 0 0 1 %.3f %.3f]',$adj_x,$adj_y)); - - $s = sprintf("q %.3f 0 0 %.3f 0 0 cm /I%d Do Q",$orig_w,$orig_h,$image_id); - - if ($this->compress) { - $this->_out('/Filter /FlateDecode'); - $s = gzcompress($s); - } - $this->_out('/Length '.strlen($s).'>>'); - $this->_putstream($s); - $this->_out('endobj'); - } -} -/*-- END BACKGROUND-IMAGES --*/ - // *BACKGROUND-IMAGES* - -/*-- GRADIENTS --*/ -function _putshaders() { - foreach ($this->gradients as $id => $grad) { - if (($grad['type'] == 2) OR ($grad['type'] == 3)) { - $this->_newobj(); - $this->_out('<<'); - $this->_out('/FunctionType 2'); - $this->_out('/Domain [0.0 1.0]'); - $this->_out('/C0 ['.$grad['col1'].']'); - $this->_out('/C1 ['.$grad['col2'].']'); - $this->_out('/N 1'); - $this->_out('>>'); - $this->_out('endobj'); - $f1 = $this->n; - } - $this->_newobj(); - $this->_out('<<'); - $this->_out('/ShadingType '.$grad['type']); - $this->_out('/ColorSpace /DeviceRGB'); - if ($grad['type'] == 2) { - $this->_out(sprintf('/Coords [%.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $grad['coords'][2], $grad['coords'][3])); - $this->_out('/Function '.$f1.' 0 R'); - $this->_out('/Extend ['.$grad['extend'][0].' '.$grad['extend'][1].'] '); - $this->_out('>>'); - } - else if ($grad['type'] == 3) { - //x0, y0, r0, x1, y1, r1 - //at this this time radius of inner circle is 0 - // mPDF 4.4.007 - $ir = 0; - if (isset($grad['coords'][5]) && $grad['coords'][5]) { $ir = $grad['coords'][5]; } - $this->_out(sprintf('/Coords [%.3F %.3F %.3F %.3F %.3F %.3F]', $grad['coords'][0], $grad['coords'][1], $ir, $grad['coords'][2], $grad['coords'][3], $grad['coords'][4])); - $this->_out('/Function '.$f1.' 0 R'); - $this->_out('/Extend ['.$grad['extend'][0].' '.$grad['extend'][1].'] '); - $this->_out('>>'); - } - $this->_out('endobj'); - $this->gradients[$id]['id'] = $this->n; - } -} -/*-- END GRADIENTS --*/ - - -function _putresources() { - $this->_putextgstates(); - if ($this->progressBar) { $this->UpdateProgressBar(2,'+10','Compiling Fonts'); } // *PROGRESS-BAR* - $this->_putfonts(); - if ($this->progressBar) { $this->UpdateProgressBar(2,'+10','Compiling Images'); } // *PROGRESS-BAR* - $this->_putimages(); - $this->_putformobjects(); // *IMAGES-CORE* - -/*-- IMPORTS --*/ - // mPDF 4.2.006 - if ($this->enableImports) { - $this->_putformxobjects(); - $this->_putimportedobjects(); - } -/*-- END IMPORTS --*/ - - $this->_putpatterns(); // *BACKGROUND-IMAGES* - $this->_putshaders(); // *GRADIENTS* - //Resource dictionary - $this->offsets[2]=strlen($this->buffer); - $this->_out('2 0 obj'); - $this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); - $this->_out('/Font <<'); - // mPDF 4.0 - foreach($this->fonts as $font) { - // mPDF 4.5.014 - if (!$font['used'] && ($font['type']=='TrueTypeUnicode' || $font['type']=='Type1subset')) { continue; } - if ($font['type']=='Type1subset') { - foreach($font['n'] AS $k => $fid) { - $this->_out('/F'.$font['subsetfontids'][$k].' '.$font['n'][$k].' 0 R'); - } - } - else { - $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); - } - } - $this->_out('>>'); - if (count($this->extgstates)) { - $this->_out('/ExtGState <<'); - foreach($this->extgstates as $k=>$extgstate) - $this->_out('/GS'.$k.' '.$extgstate['n'].' 0 R'); - $this->_out('>>'); - } - -/*-- GRADIENTS --*/ - if (isset($this->gradients) AND (count($this->gradients) > 0)) { - $this->_out('/Shading <<'); - foreach ($this->gradients as $id => $grad) { - $this->_out('/Sh'.$id.' '.$grad['id'].' 0 R'); - } - $this->_out('>>'); - } -/*-- END GRADIENTS --*/ - - if(count($this->images) || count($this->formobjects) || ($this->enableImports && count($this->tpls))) { // mPDF 4.2.006 - $this->_out('/XObject <<'); - foreach($this->images as $image) - $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); - foreach($this->formobjects as $formobject) - $this->_out('/FO'.$formobject['i'].' '.$formobject['n'].' 0 R'); -/*-- IMPORTS --*/ - // mPDF 4.2.006 - if ($this->enableImports && count($this->tpls)) { - foreach($this->tpls as $tplidx => $tpl) { - $this->_out($this->tplprefix.$tplidx.' '.$tpl['n'].' 0 R'); - } - } -/*-- END IMPORTS --*/ - $this->_out('>>'); - } - -/*-- BACKGROUND-IMAGES --*/ - // mPDF 3.0 - Tiling Patterns - if (count($this->patterns)) { - $this->_out('/Pattern <<'); - foreach($this->patterns as $k=>$patterns) - $this->_out('/P'.$k.' '.$patterns['n'].' 0 R'); - $this->_out('>>'); - } -/*-- END BACKGROUND-IMAGES --*/ - - $this->_out('>>'); - $this->_out('endobj'); // end resource dictionary - - $this->_putbookmarks(); // *BOOKMARKS* - -/*-- ENCRYPTION --*/ - if ($this->encrypted) { - $this->_newobj(); - $this->enc_obj_id = $this->n; - $this->_out('<<'); - $this->_putencryption(); - $this->_out('>>'); - $this->_out('endobj'); - } -/*-- END ENCRYPTION --*/ -} - -/*-- ENCRYPTION --*/ - function _putencryption() - { - $this->_out('/Filter /Standard'); - $this->_out('/V 1'); - $this->_out('/R 2'); - $this->_out('/O ('.$this->_escape($this->Ovalue).')'); - $this->_out('/U ('.$this->_escape($this->Uvalue).')'); - $this->_out('/P '.$this->Pvalue); - } -/*-- END ENCRYPTION --*/ - - function _puttrailer() - { - $this->_out('/Size '.($this->n+1)); - $this->_out('/Root '.$this->n.' 0 R'); - $this->_out('/Info '.$this->InfoRoot.' 0 R'); // mPDF 4.2.018 -/*-- ENCRYPTION --*/ - if ($this->encrypted) { - $this->_out('/Encrypt '.$this->enc_obj_id.' 0 R'); - $this->_out('/ID [()()]'); - } - // mPDF 4.2.010 - else { -/*-- END ENCRYPTION --*/ - $uniqid = md5(time() . $this->buffer); - $this->_out('/ID [<'.$uniqid.'> <'.$uniqid.'>]'); -/*-- ENCRYPTION --*/ - } -/*-- END ENCRYPTION --*/ - } - -/*-- ENCRYPTION --*/ - // RC4 is the standard encryption algorithm used in PDF format - function _RC4($key, $text) - { - if ($this->last_rc4_key != $key) { - $k = str_repeat($key, 256/strlen($key)+1); - $rc4 = range(0,255); - $j = 0; - for ($i=0; $i<256; $i++){ - $t = $rc4[$i]; - $j = ($j + $t + ord($k[$i])) % 256; // mPDF 4.4.012 - $rc4[$i] = $rc4[$j]; - $rc4[$j] = $t; - } - $this->last_rc4_key = $key; - $this->last_rc4_key_c = $rc4; - } else { - $rc4 = $this->last_rc4_key_c; - } - - $len = strlen($text); - $a = 0; - $b = 0; - $out = ''; - for ($i=0; $i<$len; $i++){ - $a = ($a+1)%256; - $t= $rc4[$a]; - $b = ($b+$t)%256; - $rc4[$a] = $rc4[$b]; - $rc4[$b] = $t; - $k = $rc4[($rc4[$a]+$rc4[$b])%256]; - $out.= $this->chrs[ord($text[$i]) ^ $k]; // mPDF 4.4.012 - } - - return $out; - } - - // Get MD5 as binary string - function _md5_16($string) - { - return pack('H*',md5($string)); - } - - // Compute O value - function _Ovalue($user_pass, $owner_pass) - { - $tmp = $this->_md5_16($owner_pass); - $owner_RC4_key = substr($tmp,0,5); - return $this->_RC4($owner_RC4_key, $user_pass); - } - - // Compute U value - function _Uvalue() - { - return $this->_RC4($this->encryption_key, $this->padding); - } - - // Compute encryption key - function _generateencryptionkey($user_pass, $owner_pass, $protection) - { - // Pad passwords - $user_pass = substr($user_pass.$this->padding,0,32); - $owner_pass = substr($owner_pass.$this->padding,0,32); - // Compute O value - $this->Ovalue = $this->_Ovalue($user_pass,$owner_pass); - // Compute encyption key - $tmp = $this->_md5_16($user_pass.$this->Ovalue.$this->chrs[$protection]."\xFF\xFF\xFF"); - $this->encryption_key = substr($tmp,0,5); - // Compute U value - $this->Uvalue = $this->_Uvalue(); - // Compute P value - $this->Pvalue = -(($protection^255)+1); - } -/*-- END ENCRYPTION --*/ - -//========================================= -/*-- BOOKMARKS --*/ -// FROM class PDF_Bookmark - -function Bookmark($txt,$level=0,$y=0) -{ - $txt = $this->purify_utf8_text($txt); - if ($this->text_input_as_HTML) { - $txt = $this->all_entities_to_utf8($txt); - } - if($y==-1) { - if (!$this->ColActive){ $y=$this->y; } - else { $y = $this->y0; } // If columns are on - mark top of columns - } - // else y is used as set, or =0 i.e. top of page - // DIRECTIONALITY RTL - // mPDF 3.0 -// $this->magic_reverse_dir($txt); // *RTL* - if ($this->keep_block_together) { - $this->ktBMoutlines[]=array('t'=>$txt,'l'=>$level,'y'=>$y,'p'=>$this->page); - } -/*-- TABLES --*/ - else if ($this->table_rotate) { - $this->tbrot_BMoutlines[]=array('t'=>$txt,'l'=>$level,'y'=>$y,'p'=>$this->page); - } - else if ($this->kwt) { - $this->kwt_BMoutlines[]=array('t'=>$txt,'l'=>$level,'y'=>$y,'p'=>$this->page); - } -/*-- END TABLES --*/ - else if ($this->ColActive) { // *COLUMNS* - $this->col_BMoutlines[]=array('t'=>$txt,'l'=>$level,'y'=>$y,'p'=>$this->page); // *COLUMNS* - } // *COLUMNS* - else { - $this->BMoutlines[]=array('t'=>$txt,'l'=>$level,'y'=>$y,'p'=>$this->page); - } -} - - -function _putbookmarks() -{ - $nb=count($this->BMoutlines); - if($nb==0) - return; - $lru=array(); - $level=0; - foreach($this->BMoutlines as $i=>$o) - { - if($o['l']>0) - { - $parent=$lru[$o['l']-1]; - //Set parent and last pointers - $this->BMoutlines[$i]['parent']=$parent; - $this->BMoutlines[$parent]['last']=$i; - if($o['l']>$level) - { - //Level increasing: set first pointer - $this->BMoutlines[$parent]['first']=$i; - } - } - else - $this->BMoutlines[$i]['parent']=$nb; - if($o['l']<=$level and $i>0) - { - //Set prev and next pointers - $prev=$lru[$o['l']]; - $this->BMoutlines[$prev]['next']=$i; - $this->BMoutlines[$i]['prev']=$prev; - } - $lru[$o['l']]=$i; - $level=$o['l']; - } - //Outline items - $n=$this->n+1; - foreach($this->BMoutlines as $i=>$o) - { - $this->_newobj(); - $this->_out('<_UTF16BEtextstring($o['t'])); - $this->_out('/Parent '.($n+$o['parent']).' 0 R'); - if(isset($o['prev'])) - $this->_out('/Prev '.($n+$o['prev']).' 0 R'); - if(isset($o['next'])) - $this->_out('/Next '.($n+$o['next']).' 0 R'); - if(isset($o['first'])) - $this->_out('/First '.($n+$o['first']).' 0 R'); - if(isset($o['last'])) - $this->_out('/Last '.($n+$o['last']).' 0 R'); - - - // mPDF 3.0 Page orientation - if (isset($this->pageDim[$o['p']]['h'])) { $h=$this->pageDim[$o['p']]['h']; } - else { $h = 0; } - - $this->_out(sprintf('/Dest [%d 0 R /XYZ 0 %.3f null]',1+2*($o['p']),($h-$o['y'])*$this->k)); - - $this->_out('/Count 0>>'); - $this->_out('endobj'); - } - //Outline root - $this->_newobj(); - $this->OutlineRoot=$this->n; - $this->_out('<_out('/Last '.($n+$lru[0]).' 0 R>>'); - $this->_out('endobj'); -} -/*-- END BOOKMARKS --*/ - // *BOOKMARKS* - - - -//====================================================== - - -// DEPRACATED but included for backwards compatability -function startPageNums() { -} - -//====================================================== -/*-- TOC --*/ -// ToC TABLE OF CONTENTS - -// Initiate, and Mark a place for the Table of Contents to be inserted -function TOC($tocfont='', $tocfontsize=8, $tocindent=5, $resetpagenum='', $pagenumstyle='', $suppress='', $toc_orientation='', $TOCusePaging=true, $TOCuseLinking=false, $toc_id=0) { - if (strtoupper($toc_id)=='ALL') { $toc_id = '_mpdf_all'; } - else if (!$toc_id) { $toc_id = 0; } - else { $toc_id = strtolower($toc_id); } - // To use odd and even pages - // Cannot start table of contents on an even page - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN -/*-- COLUMNS --*/ - if ($this->ColActive) { - if (count($this->columnbuffer)) { $this->printcolumnbuffer(); } - } -/*-- END COLUMNS --*/ - $this->AddPage($this->CurOrientation,'',$resetpagenum, $pagenumstyle, $suppress); - } - else { - $this->PageNumSubstitutions[] = array('from'=>$this->page, 'reset'=> $resetpagenum, 'type'=>$pagenumstyle, 'suppress'=>$suppress); - } - if (!$tocfont) { $tocfont = $this->default_font; } - if (!$tocfontsize) { $tocfontsize = $this->default_font_size; } - if ($toc_id) { - $this->m_TOC[$toc_id]['TOCmark'] = $this->page; - $this->m_TOC[$toc_id]['TOCfont'] = $tocfont; - $this->m_TOC[$toc_id]['TOCfontsize'] = $tocfontsize; - $this->m_TOC[$toc_id]['TOCindent'] = $tocindent; - $this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation; - $this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking; - $this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging; - } - else { - $this->TOCmark = $this->page; - $this->TOCfont = $tocfont; - $this->TOCfontsize = $tocfontsize; - $this->TOCindent = $tocindent; - $this->TOCorientation = $toc_orientation; - $this->TOCuseLinking = $TOCuseLinking; - $this->TOCusePaging = $TOCusePaging; - } -} - -// mPDF 4.2 Added $pagesel -// mPDF 4.2.024 -function TOCpagebreak($tocfont='', $tocfontsize='', $tocindent='', $TOCusePaging=true, $TOCuseLinking='', $toc_orientation='', $toc_mgl='',$toc_mgr='',$toc_mgt='',$toc_mgb='',$toc_mgh='',$toc_mgf='',$toc_ohname='',$toc_ehname='',$toc_ofname='',$toc_efname='',$toc_ohvalue=0,$toc_ehvalue=0,$toc_ofvalue=0,$toc_efvalue=0, $toc_preHTML='', $toc_postHTML='', $toc_bookmarkText='', $resetpagenum='', $pagenumstyle='', $suppress='', $orientation='', $mgl='',$mgr='',$mgt='',$mgb='',$mgh='',$mgf='',$ohname='',$ehname='',$ofname='',$efname='',$ohvalue=0,$ehvalue=0,$ofvalue=0,$efvalue=0, $toc_id=0, $pagesel='', $toc_pagesel='', $sheetsize='', $toc_sheetsize='') { - if (strtoupper($toc_id)=='ALL') { $toc_id = '_mpdf_all'; } - else if (!$toc_id) { $toc_id = 0; } - else { $toc_id = strtolower($toc_id); } - - // mPDF 3.0 - //Start a new page - if($this->state==0) $this->AddPage(); - if ($this->y == $this->tMargin && (!$this->mirrorMargins ||($this->mirrorMargins && $this->page % 2==1))) { - // Don't add a page - if ($this->page==1 && count($this->PageNumSubstitutions)==0) { - if (!$suppress) { $suppress = 'off'; } - if (!$resetpagenum) { $resetpagenum= 1; } - $this->PageNumSubstitutions[] = array('from'=>1, 'reset'=> $resetpagenum, 'type'=>$pagenumstyle, 'suppress'=> $suppress); - } - } - else { - $this->AddPage($orientation,'NEXT-ODD', $resetpagenum, $pagenumstyle, $suppress,$mgl,$mgr,$mgt,$mgb,$mgh,$mgf,$ohname,$ehname,$ofname,$efname,$ohvalue,$ehvalue,$ofvalue,$efvalue,$pagesel,$sheetsize); // mPDF 4.2.024 - } - - if (!$tocfont) { $tocfont = $this->default_font; } - if (!$tocfontsize) { $tocfontsize = $this->default_font_size; } - if (!$tocindent && $tocindent !== 0) { $tocindent = 5; } - // mPDF 3.0 - if ($TOCusePaging === false || strtolower($TOCusePaging) == "off" || $TOCusePaging === 0 || $TOCusePaging === "0" || $TOCusePaging === "") { $TOCusePaging = false; } - else { $TOCusePaging = true; } - if (!$TOCuseLinking) { $TOCuseLinking = false; } - if ($toc_id) { - $this->m_TOC[$toc_id]['TOCmark'] = $this->page; - $this->m_TOC[$toc_id]['TOCfont'] = $tocfont; - $this->m_TOC[$toc_id]['TOCfontsize'] = $tocfontsize; - $this->m_TOC[$toc_id]['TOCindent'] = $tocindent; - $this->m_TOC[$toc_id]['TOCorientation'] = $toc_orientation; - $this->m_TOC[$toc_id]['TOCuseLinking'] = $TOCuseLinking; - $this->m_TOC[$toc_id]['TOCusePaging'] = $TOCusePaging; - - if ($toc_preHTML) { $this->m_TOC[$toc_id]['TOCpreHTML'] = $toc_preHTML; } - if ($toc_postHTML) { $this->m_TOC[$toc_id]['TOCpostHTML'] = $toc_postHTML; } - if ($toc_bookmarkText) { $this->m_TOC[$toc_id]['TOCbookmarkText'] = $toc_bookmarkText; } // *BOOKMARKS* - - $this->m_TOC[$toc_id]['TOC_margin_left'] = $toc_mgl; - $this->m_TOC[$toc_id]['TOC_margin_right'] = $toc_mgr; - $this->m_TOC[$toc_id]['TOC_margin_top'] = $toc_mgt; - $this->m_TOC[$toc_id]['TOC_margin_bottom'] = $toc_mgb; - $this->m_TOC[$toc_id]['TOC_margin_header'] = $toc_mgh; - $this->m_TOC[$toc_id]['TOC_margin_footer'] = $toc_mgf; - $this->m_TOC[$toc_id]['TOC_odd_header_name'] = $toc_ohname; - $this->m_TOC[$toc_id]['TOC_even_header_name'] = $toc_ehname; - $this->m_TOC[$toc_id]['TOC_odd_footer_name'] = $toc_ofname; - $this->m_TOC[$toc_id]['TOC_even_footer_name'] = $toc_efname; - $this->m_TOC[$toc_id]['TOC_odd_header_value'] = $toc_ohvalue; - $this->m_TOC[$toc_id]['TOC_even_header_value'] = $toc_ehvalue; - $this->m_TOC[$toc_id]['TOC_odd_footer_value'] = $toc_ofvalue; - $this->m_TOC[$toc_id]['TOC_even_footer_value'] = $toc_efvalue; - // mPDF 4.2.024 - $this->m_TOC[$toc_id]['TOC_page_selector'] = $toc_pagesel; - $this->m_TOC[$toc_id]['TOCsheetsize'] = $toc_sheetsize; - } - else { - $this->TOCmark = $this->page; - $this->TOCfont = $tocfont; - $this->TOCfontsize = $tocfontsize; - $this->TOCindent = $tocindent; - $this->TOCorientation = $toc_orientation; - $this->TOCuseLinking = $TOCuseLinking; - $this->TOCusePaging = $TOCusePaging; - - if ($toc_preHTML) { $this->TOCpreHTML = $toc_preHTML; } - if ($toc_postHTML) { $this->TOCpostHTML = $toc_postHTML; } - if ($toc_bookmarkText) { $this->TOCbookmarkText = $toc_bookmarkText; } // *BOOKMARKS* - - $this->TOC_margin_left = $toc_mgl; - $this->TOC_margin_right = $toc_mgr; - $this->TOC_margin_top = $toc_mgt; - $this->TOC_margin_bottom = $toc_mgb; - $this->TOC_margin_header = $toc_mgh; - $this->TOC_margin_footer = $toc_mgf; - $this->TOC_odd_header_name = $toc_ohname; - $this->TOC_even_header_name = $toc_ehname; - $this->TOC_odd_footer_name = $toc_ofname; - $this->TOC_even_footer_name = $toc_efname; - $this->TOC_odd_header_value = $toc_ohvalue; - $this->TOC_even_header_value = $toc_ehvalue; - $this->TOC_odd_footer_value = $toc_ofvalue; - $this->TOC_even_footer_value = $toc_efvalue; - // mPDF 4.2.024 - $this->TOC_page_selector = $toc_pagesel; - $this->TOCsheetsize = $toc_sheetsize; - } -} - -function TOC_Entry($txt, $level=0, $toc_id=0) { - $txt = $this->purify_utf8_text($txt); - if ($this->text_input_as_HTML) { - $txt = $this->all_entities_to_utf8($txt); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $txt = mb_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $txt = api_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - // - if ($this->ColActive) { $ily = $this->y0; } else { $ily = $this->y; } // use top of columns - $linkn = $this->AddLink(); - $this->SetLink($linkn,$ily,$this->page); -/*-- RTL --*/ - if (($this->directionality == 'rtl') || (($this->directionality == 'ltr') && ($this->biDirectional))) { - // mPDF 4.0 Remove rtlAsArabicFarsi - $txt = preg_replace("/([".$this->pregRTLchars."]+)/ue", '$this->ArabJoin(stripslashes(\'\\1\'))', $txt ); - } -/*-- END RTL --*/ - if (strtoupper($toc_id)=='ALL') { $toc_id = '_mpdf_all'; } - else if (!$toc_id) { $toc_id = 0; } - else { $toc_id = strtolower($toc_id); } - if ($this->keep_block_together) { - $this->_kttoc[]=array('t'=>$txt,'l'=>$level,'p'=>$this->page, 'link'=>$linkn, 'toc_id'=>$toc_id); - } -/*-- TABLES --*/ - else if ($this->table_rotate) { - $this->tbrot_toc[]=array('t'=>$txt,'l'=>$level,'p'=>$this->page, 'link'=>$linkn, 'toc_id'=>$toc_id); - } - else if ($this->kwt) { - $this->kwt_toc[]=array('t'=>$txt,'l'=>$level,'p'=>$this->page, 'link'=>$linkn, 'toc_id'=>$toc_id); - } -/*-- END TABLES --*/ - else if ($this->ColActive) { // *COLUMNS* - $this->col_toc[]=array('t'=>$txt,'l'=>$level,'p'=>$this->page, 'link'=>$linkn, 'toc_id'=>$toc_id); // *COLUMNS* - } // *COLUMNS* - else { - $this->_toc[]=array('t'=>$txt,'l'=>$level,'p'=>$this->page, 'link'=>$linkn, 'toc_id'=>$toc_id); - } -} - -function insertTOC() { - $notocs = 0; - if ($this->TOCmark) { $notocs = 1; } - $notocs += count($this->m_TOC); - - if ($notocs==0) { return; } - - if (count($this->m_TOC)) { reset($this->m_TOC); } - $added_toc_pages = 0; - - if ($this->ColActive) { $this->SetColumns(0); } // *COLUMNS* - if (($this->mirrorMargins) && (($this->page)%2==1)) { // ODD - $this->AddPage($this->CurOrientation); - $extrapage = true; - } - else { $extrapage = false; } - - for ($toci = 0; $toci<$notocs; $toci++) { - if ($toci==0 && $this->TOCmark) { - $toc_id = 0; - $toc_page = $this->TOCmark; - $tocfont = $this->TOCfont; - $tocfontsize = $this->TOCfontsize; - $tocindent = $this->TOCindent; - $toc_orientation = $this->TOCorientation; - $TOCuseLinking = $this->TOCuseLinking; - $TOCusePaging = $this->TOCusePaging; - $toc_preHTML = $this->TOCpreHTML; - $toc_postHTML = $this->TOCpostHTML; - $toc_bookmarkText = $this->TOCbookmarkText; // *BOOKMARKS* - $toc_mgl = $this->TOC_margin_left; - $toc_mgr = $this->TOC_margin_right; - $toc_mgt = $this->TOC_margin_top; - $toc_mgb = $this->TOC_margin_bottom; - $toc_mgh = $this->TOC_margin_header; - $toc_mgf = $this->TOC_margin_footer; - $toc_ohname = $this->TOC_odd_header_name; - $toc_ehname = $this->TOC_even_header_name; - $toc_ofname = $this->TOC_odd_footer_name; - $toc_efname = $this->TOC_even_footer_name; - $toc_ohvalue = $this->TOC_odd_header_value; - $toc_ehvalue = $this->TOC_even_header_value; - $toc_ofvalue = $this->TOC_odd_footer_value; - $toc_efvalue = $this->TOC_even_footer_value; - // mPDF 4.2 - $toc_page_selector = $this->TOC_page_selector; - $toc_sheet_size = $this->TOCsheetsize; // mPDF 4.2.024 - } - else { - $arr = current($this->m_TOC); - - $toc_id = key($this->m_TOC); - $toc_page = $this->m_TOC[$toc_id]['TOCmark']; - $tocfont = $this->m_TOC[$toc_id]['TOCfont']; - $tocfontsize = $this->m_TOC[$toc_id]['TOCfontsize']; - $tocindent = $this->m_TOC[$toc_id]['TOCindent']; - $toc_orientation = $this->m_TOC[$toc_id]['TOCorientation']; - $TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking']; - $TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging']; - if (isset($this->m_TOC[$toc_id]['TOCpreHTML'])) { $toc_preHTML = $this->m_TOC[$toc_id]['TOCpreHTML']; } - else { $toc_preHTML = ''; } - if (isset($this->m_TOC[$toc_id]['TOCpostHTML'])) { $toc_postHTML = $this->m_TOC[$toc_id]['TOCpostHTML']; } - else { $toc_postHTML = ''; } - if (isset($this->m_TOC[$toc_id]['TOCbookmarkText'])) { $toc_bookmarkText = $this->m_TOC[$toc_id]['TOCbookmarkText']; } // *BOOKMARKS* - else { $toc_bookmarkText = ''; } // *BOOKMARKS* - $toc_mgl = $this->m_TOC[$toc_id]['TOC_margin_left']; - $toc_mgr = $this->m_TOC[$toc_id]['TOC_margin_right']; - $toc_mgt = $this->m_TOC[$toc_id]['TOC_margin_top']; - $toc_mgb = $this->m_TOC[$toc_id]['TOC_margin_bottom']; - $toc_mgh = $this->m_TOC[$toc_id]['TOC_margin_header']; - $toc_mgf = $this->m_TOC[$toc_id]['TOC_margin_footer']; - $toc_ohname = $this->m_TOC[$toc_id]['TOC_odd_header_name']; - $toc_ehname = $this->m_TOC[$toc_id]['TOC_even_header_name']; - $toc_ofname = $this->m_TOC[$toc_id]['TOC_odd_footer_name']; - $toc_efname = $this->m_TOC[$toc_id]['TOC_even_footer_name']; - $toc_ohvalue = $this->m_TOC[$toc_id]['TOC_odd_header_value']; - $toc_ehvalue = $this->m_TOC[$toc_id]['TOC_even_header_value']; - $toc_ofvalue = $this->m_TOC[$toc_id]['TOC_odd_footer_value']; - $toc_efvalue = $this->m_TOC[$toc_id]['TOC_even_footer_value']; - // mPDF 4.2 - $toc_page_selector = $this->m_TOC[$toc_id]['TOC_page_selector']; - $toc_sheet_size = $this->m_TOC[$toc_id]['TOCsheetsize']; // mPDF 4.2.024 - next($this->m_TOC); - } - if ($this->TOCheader) { $this->SetHeader($this->TOCheader); } - else if ($this->TOCheader !== false) { $this->SetHeader(); } - - // mPDF 3.0 - if (!$tocindent && $tocindent !== 0) { $tocindent = 5; } - if (!$toc_orientation) { $toc_orientation= $this->DefOrientation; } - // mPDF 3.0 - // mPDF 4.2 - $this->AddPage($toc_orientation, '', '', '', "on", $toc_mgl, $toc_mgr, $toc_mgt, $toc_mgb, $toc_mgh, $toc_mgf, $toc_ohname, $toc_ehname, $toc_ofname, $toc_efname, $toc_ohvalue, $toc_ehvalue, $toc_ofvalue, $toc_efvalue, $toc_page_selector, $toc_sheet_size ); // mPDF 4.2.024 - - if ($this->TOCfooter) { $this->SetFooter($this->TOCfooter); } - else if ($this->TOCfooter !== false) { $this->SetFooter(); } - - $tocstart=count($this->pages); - if ($toc_preHTML) { $this->WriteHTML($toc_preHTML); } - - foreach($this->_toc as $t) { - if ($t['toc_id']==='_mpdf_all' || $t['toc_id']===$toc_id ) { - // mPDF 3.0 - $tpgno = $this->docPageNum($t['p']); - $lineheightcorr = 2-$t['l']; - //Offset - $level=$t['l']; - - if ($TOCuseLinking) { $tlink = $t['link']; } - else { $tlink = ''; } - -/*-- RTL --*/ - if ($this->directionality == 'rtl') { - $weight=''; - if($level==0) - $weight='B'; - $str=$t['t']; - // mPDF 4.0 - $fullstr = $str; - $this->SetFont($tocfont,$weight,$tocfontsize,true,true); - $PageCellSize=$this->GetStringWidth($tpgno )+2; - $strsize=$this->GetStringWidth($str); - - // mPDF 3.0 Cut to only one line - $cw = count(explode(' ',$str)); - while (($strsize + $this->GetStringWidth(str_repeat('.',5))+4 + $PageCellSize) > $this->pgwidth && $cw>1) { - $str = implode(' ',explode(' ',$str,-1)); - $strsize=$this->GetStringWidth($str); - $cw = count(explode(' ',$str)); - } - $sl = strlen($str); - // mPDF 4.0 - $rem = substr($fullstr, ($sl+1)); - - // mPDF 3.0 - $this->magic_reverse_dir($str); // *RTL* - - if ($TOCusePaging) { - //Page number - $this->SetFont($tocfont,'',$tocfontsize); - $this->Cell($PageCellSize,$this->FontSize+$lineheightcorr,$tpgno ,0,0,'L',0,$tlink); - - //Filling dots - $w=$this->w-$this->lMargin-$this->rMargin-$PageCellSize-($level*$tocindent)-($strsize+2); - $nb=intval($w/$this->GetStringWidth('.')); - if ($nb>0) { - $dots=str_repeat('.',$nb); - $this->Cell($w+2,$this->FontSize+$lineheightcorr,$dots,0,0,'L'); - } - // Text - $this->SetFont($tocfont,$weight,$tocfontsize); - $this->Cell($strsize-($level*$tocindent),$this->FontSize+$lineheightcorr,$str,0,1,'R',0,$tlink); - } - else { - // Text - $this->SetFont($tocfont,$weight,$tocfontsize); - $this->Cell($this->pgwidth -($level*$tocindent),$this->FontSize+$lineheightcorr,$str,0,1,'R',0,$tlink); - } - - if ($rem) { - $this->x += 10; - // mPDF 4.0 Added true last parameter - $this->MultiCell($this->pgwidth -($level*$tocindent)-15,$this->FontSize+$lineheightcorr,$rem,0,R,0,$tlink,'rtl',true); - } - } - // LTR - else { -/*-- END RTL --*/ - - // Text - $weight=''; - if($level==0) - $weight='B'; - $str=$t['t']; - // mPDF 4.0 - $fullstr = $str; - $this->SetFont($tocfont,$weight,$tocfontsize,true,true); - if($level>0 && $tocindent) { $this->Cell($level*$tocindent,$this->FontSize+$lineheightcorr); } - - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($str); // *INDIC* - - $PageCellSize=$this->GetStringWidth($tpgno )+2; - $strsize=$this->GetStringWidth($str); - - // mPDF 3.0 Cut to only one line - $cw = count(explode(' ',$str)); - while (($strsize + $this->GetStringWidth(str_repeat('.',5))+4+ $PageCellSize + ($level*$tocindent)) > $this->pgwidth && $cw>1) { - $str = implode(' ',explode(' ',$str,-1)); - $strsize=$this->GetStringWidth($str); - $cw = count(explode(' ',$str)); - } - $sl = strlen($str); - // mPDF 4.0 - $rem = substr($fullstr, ($sl+1)); - - if ($TOCusePaging) { - // Text - $this->Cell($strsize+2,$this->FontSize+$lineheightcorr,$str,0,0,'',0,$tlink); - - //Filling dots - $this->SetFont($tocfont,'',$tocfontsize); - $w=$this->w-$this->lMargin-$this->rMargin-$PageCellSize-($level*$tocindent)-($strsize+2); - $nb=intval($w/$this->GetStringWidth('.')); - if ($nb>0) { $dots=str_repeat('.',$nb); } - else { $this->y += $this->lineheight; $dots=str_repeat('.',5); } // ..... 5 dots? - $this->Cell($w,$this->FontSize+$lineheightcorr,$dots,0,0,'R'); - - //Page number - $this->Cell($PageCellSize,$this->FontSize+$lineheightcorr,$tpgno ,0,1,'R',0,$tlink); - } - else { - // Text only - $this->Cell($strsize+2,$this->FontSize+$lineheightcorr,$str,0,1,'',0,$tlink); // forces new line - } - // mPDF 3.0 - if ($rem) { - $this->x += 5 + $PageCellSize + ($level*$tocindent); - // mPDF 4.0 Added true last parameter - $this->MultiCell($strsize+2,$this->FontSize+$lineheightcorr,$rem,0,L,0,$tlink,'ltr',true); - } - } // *RTL* - } - } - - if ($toc_postHTML) { $this->WriteHTML($toc_postHTML); } - $this->AddPage($toc_orientation,'E'); - - $n_toc = $this->page - $tocstart + 1; - - if ($toci==0 && $this->TOCmark) { - $this->TOC_start = $tocstart ; - $this->TOC_end = $this->page; - $this->TOC_npages = $n_toc; - } - else { - $this->m_TOC[$toc_id]['start'] = $tocstart ; - $this->m_TOC[$toc_id]['end'] = $this->page; - $this->m_TOC[$toc_id]['npages'] = $n_toc; - } - } - - // mPDF 4.2.023 - $s = ''; - $bby = $this->h; - $bbw = $this->w; - $bbh = $this->h; - if ($this->bodyBackgroundColor) { - $s .= sprintf('%.3f %.3f %.3f rg',$this->bodyBackgroundColor['R']/255,$this->bodyBackgroundColor['G']/255,$this->bodyBackgroundColor['B']/255)."\n"; - $s .= sprintf('%.3f %.3f %.3f %.3f re f',0,$bby*$this->k,$bbw*$this->k,-$bbh*$this->k)."\n"; - } -/*-- GRADIENTS --*/ - if ($this->bodyBackgroundGradient) { - $g = $this->parseBackgroundGradient($this->bodyBackgroundGradient); - if ($g) { - $s .= $this->Gradient(0, 0, $this->w, $this->h, $g['gradtype'], $g['col'], $g['col2'], $g['coords'], $g['extend'], true); - } - } -/*-- END GRADIENTS --*/ -/*-- BACKGROUND-IMAGES --*/ - if ($this->bodyBackgroundImage) { - if ($this->bodyBackgroundImage['image_id']) { // Background pattern - $n = count($this->patterns)+1; - // mPDF 4.3.015 - list($orig_w, $orig_h, $x_repeat, $y_repeat) = $this->_resizeBackgroundImage($this->bodyBackgroundImage['orig_w'], $this->bodyBackgroundImage['orig_h'], $bbw, $bbh, $this->bodyBackgroundImage['resize'],$this->bodyBackgroundImage['x_repeat'],$this->bodyBackgroundImage['y_repeat']); - // mPDF 3.1 $bbx = 0, 'y'=>0 - $this->patterns[$n] = array('x'=>0, 'y'=>0, 'w'=>$bbw, 'h'=>$bbh, 'pgh'=>$this->h, 'image_id'=>$this->bodyBackgroundImage['image_id'], 'orig_w'=>$orig_w, 'orig_h'=>$orig_h, 'x_pos'=>$this->bodyBackgroundImage['x_pos'], 'y_pos'=>$this->bodyBackgroundImage['y_pos'], 'x_repeat'=>$x_repeat, 'y_repeat'=>$y_repeat); // mPDF 4.3.015 - // mPDF 4.3.017 - if ($this->bodyBackgroundImage['opacity']>0 && $this->bodyBackgroundImage['opacity']<1) { $opac = $this->SetAlpha($this->bodyBackgroundImage['opacity'],'Normal',true); } - else { $opac = ''; } - $s .= sprintf('q /Pattern cs /P%d scn %s %.3f %.3f %.3f %.3f re f Q', $n, $opac, 0,$bby*$this->k,$bbw*$this->k,-$bbh*$this->k) ."\n"; - } - } -/*-- END BACKGROUND-IMAGES --*/ - - $s .= $this->PrintPageBackgrounds(); - $this->pages[$this->page] = preg_replace('/(___BACKGROUND___PATTERNS'.date('jY').')/', "\n".$s."\n".'\\1', $this->pages[$this->page]); - $this->pageBackgrounds = array(); - - //Page footer - $this->InFooter=true; - $this->Footer(); - $this->InFooter=false; - - // 2nd time through to move pages etc. - $added_toc_pages = 0; - if (count($this->m_TOC)) { reset($this->m_TOC); } - - for ($toci = 0; $toci<$notocs; $toci++) { - if ($toci==0 && $this->TOCmark) { - $toc_id = 0; - $toc_page = $this->TOCmark + $added_toc_pages; - $toc_orientation = $this->TOCorientation; - $TOCuseLinking = $this->TOCuseLinking; - $TOCusePaging = $this->TOCusePaging; - $toc_bookmarkText = $this->TOCbookmarkText; // *BOOKMARKS* - - $tocstart = $this->TOC_start ; - $tocend = $n = $this->TOC_end; - $n_toc = $this->TOC_npages; - } - else { - $arr = current($this->m_TOC); - - $toc_id = key($this->m_TOC); - $toc_page = $this->m_TOC[$toc_id]['TOCmark'] + $added_toc_pages; - $toc_orientation = $this->m_TOC[$toc_id]['TOCorientation']; - $TOCuseLinking = $this->m_TOC[$toc_id]['TOCuseLinking']; - $TOCusePaging = $this->m_TOC[$toc_id]['TOCusePaging']; - $toc_bookmarkText = $this->m_TOC[$toc_id]['TOCbookmarkText']; // *BOOKMARKS* - - $tocstart = $this->m_TOC[$toc_id]['start'] ; - $tocend = $n = $this->m_TOC[$toc_id]['end'] ; - $n_toc = $this->m_TOC[$toc_id]['npages'] ; - - next($this->m_TOC); - } - - // Now pages moved - $added_toc_pages += $n_toc; - - $this->MovePages($toc_page, $tocstart, $tocend) ; - // mPDF 4.2.020 - $this->pgsIns[$toc_page] = $tocend - $tocstart + 1; - -/*-- BOOKMARKS --*/ - // Insert new Bookmark for Bookmark - if ($toc_bookmarkText) { - $insert = -1; - foreach($this->BMoutlines as $i=>$o) { - if($o['p']<$toc_page) { // i.e. before point of insertion - $insert = $i; - } - } - $txt = $this->purify_utf8_text($toc_bookmarkText); - if ($this->text_input_as_HTML) { - $txt = $this->all_entities_to_utf8($txt); - } - $newBookmark[0] = array('t'=>$txt,'l'=>0,'y'=>0,'p'=>$toc_page ); - array_splice($this->BMoutlines,($insert+1),0,$newBookmark); - } -/*-- END BOOKMARKS --*/ - - } - - // Delete empty page that was inserted earlier - if ($extrapage) { - unset($this->pages[count($this->pages)]); - $this->page--; // Reset page pointer - } - -} - -//====================================================== -function MovePages($target_page, $start_page, $end_page=-1) { - // move a page/pages EARLIER in the document - if ($end_page<1) { $end_page = $start_page; } - $n_toc = $end_page - $start_page + 1; - - // Set/Update PageNumSubstitutions changes before moving anything - if (count($this->PageNumSubstitutions)) { - $tp_present = false; - $sp_present = false; - $ep_present = false; - foreach($this->PageNumSubstitutions AS $k=>$v) { - if ($this->PageNumSubstitutions[$k]['from']==$target_page) { - $tp_present = true; - if ($this->PageNumSubstitutions[$k]['suppress']!='on' && $this->PageNumSubstitutions[$k]['suppress']!=1) { - $this->PageNumSubstitutions[$k]['suppress']='off'; - } - } - if ($this->PageNumSubstitutions[$k]['from']==$start_page) { - $sp_present = true; - if ($this->PageNumSubstitutions[$k]['suppress']!='on' && $this->PageNumSubstitutions[$k]['suppress']!=1) { - $this->PageNumSubstitutions[$k]['suppress']='off'; - } - } - if ($this->PageNumSubstitutions[$k]['from']==($end_page+1)) { - $ep_present = true; - if ($this->PageNumSubstitutions[$k]['suppress']!='on' && $this->PageNumSubstitutions[$k]['suppress']!=1) { - $this->PageNumSubstitutions[$k]['suppress']='off'; - } - } - } - - if (!$tp_present) { - list($tp_type, $tp_suppress, $tp_reset) = $this->docPageSettings($target_page); - } - if (!$sp_present) { - list($sp_type, $sp_suppress, $sp_reset) = $this->docPageSettings($start_page); - } - if (!$ep_present) { - list($ep_type, $ep_suppress, $ep_reset) = $this->docPageSettings($start_page-1); - } - - } - - $last = array(); - //store pages - for($i = $start_page;$i <= $end_page ;$i++) - $last[]=$this->pages[$i]; - //move pages - for($i=$start_page - 1;$i>=($target_page);$i--) { // mPDF 3.0 - $this->pages[$i+$n_toc]=$this->pages[$i]; - } - //Put toc pages at insert point - for($i = 0;$i < $n_toc;$i++) { - $this->pages[$target_page + $i]=$last[$i]; - } - -/*-- BOOKMARKS --*/ - // Update Bookmarks - foreach($this->BMoutlines as $i=>$o) { - if($o['p']>=$target_page) { - $this->BMoutlines[$i]['p'] += $n_toc; - } - } -/*-- END BOOKMARKS --*/ - - // Update Page Links - if (count($this->PageLinks)) { - $newarr = array(); - foreach($this->PageLinks as $i=>$o) { - // mPDF 3.0 - Change links to page numbers (@) used by Index - foreach($this->PageLinks[$i] as $key => $pl) { - if (strpos($pl[4],'@')===0) { - $p=substr($pl[4],1); - if($p>=$start_page && $p<=$end_page) { - $this->PageLinks[$i][$key][4] = '@'.($p + ($target_page - $start_page)); - } - else if($p>=$target_page && $p<$start_page) { - $this->PageLinks[$i][$key][4] = '@'.($p+$n_toc); - } - } - } - if($i>=$start_page && $i<=$end_page) { - $newarr[($i + ($target_page - $start_page))] = $this->PageLinks[$i]; - } - else if($i>=$target_page && $i<$start_page) { - $newarr[($i + $n_toc)] = $this->PageLinks[$i]; - } - else { - $newarr[$i] = $this->PageLinks[$i]; - } - } - $this->PageLinks = $newarr; - } - - // OrientationChanges - if (count($this->OrientationChanges)) { - $newarr = array(); - foreach($this->OrientationChanges AS $p=>$v) { - if($p>=$start_page && $p<=$end_page) { $newarr[($p + ($target_page - $start_page))] = $this->OrientationChanges[$p]; } - else if($p>=$target_page && $p<$start_page) { $newarr[$p+$n_toc] = $this->OrientationChanges[$p]; } - else { $newarr[$p] = $this->OrientationChanges[$p]; } - } - ksort($newarr); - $this->OrientationChanges = $newarr; - } - - // Page Dimensions - if (count($this->pageDim)) { - $newarr = array(); - foreach($this->pageDim AS $p=>$v) { - if($p>=$start_page && $p<=$end_page) { $newarr[($p + ($target_page - $start_page))] = $this->pageDim[$p]; } - else if($p>=$target_page && $p<$start_page) { $newarr[$p+$n_toc] = $this->pageDim[$p]; } - else { $newarr[$p] = $this->pageDim[$p]; } - } - ksort($newarr); - $this->pageDim = $newarr; - } - - // mPDF 4.0 - // HTML Headers & Footers - if (count($this->saveHTMLHeader)) { - $newarr = array(); - foreach($this->saveHTMLHeader AS $p=>$v) { - if($p>=$start_page && $p<=$end_page) { $newarr[($p + ($target_page - $start_page))] = $this->saveHTMLHeader[$p]; } - else if($p>=$target_page && $p<$start_page) { $newarr[$p+$n_toc] = $this->saveHTMLHeader[$p]; } - else { $newarr[$p] = $this->saveHTMLHeader[$p]; } - } - ksort($newarr); - $this->saveHTMLHeader = $newarr; - } - if (count($this->saveHTMLFooter)) { - $newarr = array(); - foreach($this->saveHTMLFooter AS $p=>$v) { - if($p>=$start_page && $p<=$end_page) { $newarr[($p + ($target_page - $start_page))] = $this->saveHTMLFooter[$p]; } - else if($p>=$target_page && $p<$start_page) { $newarr[$p+$n_toc] = $this->saveHTMLFooter[$p]; } - else { $newarr[$p] = $this->saveHTMLFooter[$p]; } - } - ksort($newarr); - $this->saveHTMLFooter = $newarr; - } - - // Update Internal Links - if (count($this->internallink)) { - foreach($this->internallink as $key=>$o) { - if($o['PAGE']>=$start_page && $o['PAGE']<=$end_page) { - $this->internallink[$key]['PAGE'] += ($target_page - $start_page); - } - else if($o['PAGE']>=$target_page && $o['PAGE']<$start_page) { - $this->internallink[$key]['PAGE'] += $n_toc; - } - } - } - - // Update Links - if (count($this->links)) { - foreach($this->links as $key=>$o) { - if($o[0]>=$start_page && $o[0]<=$end_page) { - $this->links[$key][0] += ($target_page - $start_page); - } - if($o[0]>=$target_page && $o[0]<$start_page) { - $this->links[$key][0] += $n_toc; - } - } - } - -/*-- ANNOTATIONS --*/ - // Update Annotations - if (count($this->PageAnnots)) { - $newarr = array(); - foreach($this->PageAnnots as $p=>$anno) { - if($p>=$start_page && $p<=$end_page) { - $np = $p + ($target_page - $start_page); - foreach($anno as $o) { - $newarr[$np][] = $o; - } - } - else if($p>=$target_page && $p<$start_page) { - $np = $p + $n_toc; - foreach($anno as $o) { - $newarr[$np][] = $o; - } - } - else { - $newarr[$p] = $this->PageAnnots[$p]; - } - } - $this->PageAnnots = $newarr; - unset($newarr); - } -/*-- END ANNOTATIONS --*/ - - // Update PageNumSubstitutions - if (count($this->PageNumSubstitutions)) { - $newarr = array(); - foreach($this->PageNumSubstitutions AS $k=>$v) { - if($this->PageNumSubstitutions[$k]['from']>=$start_page && $this->PageNumSubstitutions[$k]['from']<=$end_page) { - $this->PageNumSubstitutions[$k]['from'] += ($target_page - $start_page); - $newarr[$this->PageNumSubstitutions[$k]['from']] = $this->PageNumSubstitutions[$k]; - } - else if($this->PageNumSubstitutions[$k]['from']>=$target_page && $this->PageNumSubstitutions[$k]['from']<$start_page) { - $this->PageNumSubstitutions[$k]['from'] += $n_toc; - $newarr[$this->PageNumSubstitutions[$k]['from']] = $this->PageNumSubstitutions[$k]; - } - else { - $newarr[$this->PageNumSubstitutions[$k]['from']] = $this->PageNumSubstitutions[$k]; - } - } - - if (!$sp_present) { - $newarr[$target_page] = array('from'=>$target_page, 'suppress'=>$sp_suppress, 'reset'=>$sp_reset, 'type'=>$sp_type); - } - if (!$tp_present) { - $newarr[($target_page + $n_toc)] = array('from'=>($target_page+$n_toc), 'suppress'=>$tp_suppress, 'reset'=>$tp_reset, 'type'=>$tp_type); - } - if (!$ep_present && $end_page>count($this->pages)) { - $newarr[($end_page+1)] = array('from'=>($end_page+1), 'suppress'=>$ep_suppress, 'reset'=>$ep_reset, 'type'=>$ep_type); - } - ksort($newarr); - $this->PageNumSubstitutions = array(); - foreach($newarr as $v) { - $this->PageNumSubstitutions[] = $v; - } - } -} - -/*-- END TOC --*/ - - - -//====================================================== -/*-- INDEX --*/ -// FROM class PDF_Ref == INDEX - -function Reference($txt) { - $this->IndexEntry($txt); -} - -// mPDF 3.0 -function IndexEntry($txt, $xref='') { - if ($xref) { - $this->IndexEntrySee($txt,$xref); - return; - } - $txt = strip_tags($txt); - $txt = $this->purify_utf8_text($txt); - if ($this->text_input_as_HTML) { - $txt = $this->all_entities_to_utf8($txt); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $txt = mb_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $txt = api_convert_encoding($txt,$this->mb_enc,'UTF-8'); } - // - - $Present=0; - $size=sizeof($this->Reference); - - if ($this->directionality == 'rtl') { // *RTL* - $txt = str_replace(':',' - ',$txt); // *RTL* - } // *RTL* - else { // *RTL* - $txt = str_replace(':',', ',$txt); - } // *RTL* - - - //Search the reference (AND Ref/PageNo) in the array - for ($i=0;$i<$size;$i++){ - if ($this->keep_block_together) { - if (isset($this->ktReference[$i]['t']) && $this->ktReference[$i]['t']==$txt){ - $Present=1; - if (!in_array($this->page,$this->ktReference[$i]['p'])) { - $this->ktReference[$i]['op'] = $this->page; - } - } - } -/*-- TABLES --*/ - else if ($this->table_rotate) { - if (isset($this->tbrot_Reference[$i]['t']) && $this->tbrot_Reference[$i]['t']==$txt){ - $Present=1; - if (!in_array($this->page,$this->tbrot_Reference[$i]['p'])) { - $this->tbrot_Reference[$i]['op'] = $this->page; - } - } - } - // mPDF 3.0 - else if ($this->kwt) { - if (isset($this->kwt_Reference[$i]['t']) && $this->kwt_Reference[$i]['t']==$txt){ - $Present=1; - if (!in_array($this->page,$this->kwt_Reference[$i]['p'])) { - $this->kwt_Reference[$i]['op'] = $this->page; - } - } - } -/*-- END TABLES --*/ -/*-- COLUMNS --*/ - // mPDF 3.0 - else if ($this->ColActive) { - if (isset($this->col_Reference[$i]['t']) && $this->col_Reference[$i]['t']==$txt){ - $Present=1; - if (!in_array($this->page,$this->col_Reference[$i]['p'])) { - $this->col_Reference[$i]['op'] = $this->page; - } - } - } -/*-- END COLUMNS --*/ - else { - if (isset($this->Reference[$i]['t']) && $this->Reference[$i]['t']==$txt){ - $Present=1; - if (!in_array($this->page,$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $this->page; - } - } - } - } - //If not found, add it - if ($Present==0) { - if ($this->keep_block_together) { - $this->ktReference[]=array('t'=>$txt, 'op'=>$this->page); - } -/*-- TABLES --*/ - else if ($this->table_rotate) { - $this->tbrot_Reference[]=array('t'=>$txt, 'op'=>$this->page); - } - else if ($this->kwt) { - $this->kwt_Reference[]=array('t'=>$txt, 'op'=>$this->page); - } -/*-- END TABLES --*/ -/*-- COLUMNS --*/ - else if ($this->ColActive) { - $this->col_Reference[]=array('t'=>$txt, 'op'=>$this->page); - } -/*-- END COLUMNS --*/ - else { - $this->Reference[]=array('t'=>$txt,'p'=>array($this->page)); - } - } -} - -// Added function to add a reference "Elephants. See Chickens" -function ReferenceSee($txta,$txtb) { - $this->IndexEntrySee($txta,$txtb); -} - -function IndexEntrySee($txta,$txtb) { - $txta = strip_tags($txta); - $txtb = strip_tags($txtb); - $txta = $this->purify_utf8_text($txta); - $txtb = $this->purify_utf8_text($txtb); - if ($this->text_input_as_HTML) { - $txta = $this->all_entities_to_utf8($txta); - $txtb = $this->all_entities_to_utf8($txtb); - } - if (!$this->is_MB) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$txta = mb_convert_encoding($txta,$this->mb_enc,'UTF-8'); - //$txtb = mb_convert_encoding($txtb,$this->mb_enc,'UTF-8'); - $txta = api_convert_encoding($txta,$this->mb_enc,'UTF-8'); - $txtb = api_convert_encoding($txtb,$this->mb_enc,'UTF-8'); - // - } - if ($this->directionality == 'rtl') { // *RTL* - $txta = str_replace(':',' - ',$txta); // *RTL* - $txtb = str_replace(':',' - ',$txtb); // *RTL* - } // *RTL* - else { // *RTL* - $txta = str_replace(':',', ',$txta); - $txtb = str_replace(':',', ',$txtb); - } // *RTL* - $this->Reference[]=array('t'=>$txta.' - see '.$txtb,'p'=>array()); // mPDF 3.0 -} - -function CreateReference($NbCol=1, $reffontsize='', $linespacing='', $offset=3, $usedivletters=1, $divlettfontsize='', $gap=5, $reffont='',$divlettfont='', $useLinking=false) { - $this->CreateIndex($NbCol, $reffontsize, $linespacing, $offset, $usedivletters, $divlettfontsize, $gap, $reffont, $divlettfont, $useLinking); -} - -function CreateIndex($NbCol=1, $reffontsize='', $linespacing='', $offset=3, $usedivletters=1, $divlettfontsize='', $gap=5, $reffont='',$divlettfont='', $useLinking=false) { - if (!$reffontsize) { $reffontsize = $this->default_font_size; } - if (!$divlettfontsize) { $divlettfontsize = ($this->default_font_size * 1.8); } - if (!$reffont) { $reffont = $this->default_font; } - if (!$divlettfont) { $divlettfont = $reffont; } - if (!$linespacing) { $linespacing= $this->default_lineheight_correction; } // mPDF 3.0 - if ($this->ColActive) { $this->SetColumns(0); } // *COLUMNS* - $size=sizeof($this->Reference); - if ($size == 0) { return false; } - - - if ($NbCol<2) { - $NbCol = 1; - $colWidth = $this->pgwidth; - } - else { - $this->SetColumns($NbCol,'',$gap); - $colWidth = $this->ColWidth; - } - if ($this->directionality == 'rtl') { $align = 'R'; } - else { $align = 'L'; } - $lett = ''; - function cmp ($a, $b) { - return strnatcmp(strtolower($a['t']), strtolower($b['t'])); - } - //Alphabetic sort of the references - usort($this->Reference, 'cmp'); - $size=sizeof($this->Reference); - $this->breakpoints[$this->CurrCol][] = $this->y; // *COLUMNS* - - // mPDF 3.0 - Prevent break after Dividing letter - $divlettjuststarted = false; - - // mPDF 3.0 - $this->OpenTag('DIV',array('STYLE'=>'line-height: '.$linespacing.'; font-family: '.$reffont.'; font-size: '.$reffontsize.'pt; ')); - - // mPDF 3.0 - $last_lett = ''; - for ($i=0;$i<$size;$i++){ - if ($this->Reference[$i]['t']) { - if ($usedivletters) { - // mPDF 4.0 - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$lett = mb_strtoupper(mb_substr($this->Reference[$i]['t'],0,1,$this->mb_enc ),$this->mb_enc ); - $lett = api_strtoupper(api_substr($this->Reference[$i]['t'],0,1,$this->mb_enc ),$this->mb_enc ); - // - if ($lett != $last_lett) { - - // mPDF 3.0 - Prevent break after Dividing letter - $save_bp = $this->breakpoints[$this->CurrCol]; // *COLUMNS* - $divlettjuststarted = true; - - if ($i>0) { - $this->OpenTag('DIV',array('STYLE'=>'line-height: '.$linespacing.'; font-family: '.$divlettfont.'; font-size: '.$divlettfontsize.'pt; font-weight: bold; page-break-after: avoid; margin-top: 0.5em; margin-collapse: collapse; ')); - } - else { - $this->OpenTag('DIV',array('STYLE'=>'line-height: '.$linespacing.'; font-family: '.$divlettfont.'; font-size: '.$divlettfontsize.'pt; font-weight: bold; page-break-after: avoid; ')); - } - $this->textbuffer[] = array($lett,'',$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $this->CloseTag('DIV'); - } - } - - $this->OpenTag('DIV',array('STYLE'=>'text-indent: -'.$offset.'mm; line-height: '.$linespacing.'; font-family: '.$reffont.'; font-size: '.$reffontsize.'pt; ')); - -/*-- RTL --*/ - // mPDF 3.0 // Change Arabic + Persian. to Presentation Forms - if (($this->directionality == 'rtl') || (($this->directionality == 'ltr') && ($this->biDirectional))) { - // mPDF 4.0 Remove rtlAsArabicFarsi - $this->Reference[$i]['t'] = preg_replace("/([".$this->pregRTLchars."]+)/ue", '$this->ArabJoin(stripslashes(\'\\1\'))', $this->Reference[$i]['t'] ); - } -/*-- END RTL --*/ - - // mPDF 4.0 Font-specific ligature substitution for Indic fonts - $this->ConvertIndic($this->Reference[$i]['t']); // *INDIC* - - $this->textbuffer[] = array($this->Reference[$i]['t'], '',$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - $ppp = $this->Reference[$i]['p']; // = array of page numbers to point to - if (count($ppp)) { - sort($ppp); - $newarr = array(); - $range_start = $ppp[0]; - $range_end = 0; - - if ($this->is_MB) { $spacer = "\xc2\xa0 "; } - else { $spacer = chr(160).' '; } - $this->textbuffer[] = array($spacer, '',$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - if ($this->directionality == 'rtl') { $sep = '.'; $joiner = '-'; } - else { $sep = ', '; $joiner = '-'; } - for ($zi=1;$zidirectionality == 'rtl') || (($this->directionality == 'ltr') && ($this->biDirectional))) { -/*-- RTL --*/ - if ($zidocPageNum($ppp[$zi]); - if ($useLinking) { $href = '@'.$ppp[$zi]; } - else { $href = ''; } - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } -/*-- END RTL --*/ - } - - else if ($ppp[$zi] == ($ppp[($zi-1)]+1)) { - $range_end = $ppp[$zi]; - } - else { - if ($range_end) { - if ($range_end == $range_start+1) { - if ($useLinking) { $href = '@'.$range_start; } - else { $href = ''; } - $txt = $this->docPageNum($range_start) . $sep; - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - if ($useLinking) { $href = '@'.$ppp[$zi-1]; } - else { $href = ''; } - $txt = $this->docPageNum($ppp[$zi-1]) . $sep; - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - else { - if ($useLinking) { $href = '@'.$range_start; } - else { $href = ''; } - } - } - else { - if ($useLinking) { $href = '@'.$ppp[$zi-1]; } - else { $href = ''; } - $txt = $this->docPageNum($ppp[$zi-1]) . $sep; - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - $range_start = $ppp[$zi]; - $range_end = 0; - } - } - - if ($range_end) { - if ($range_end == $range_start+1) { - if ($useLinking) { $href = '@'.$range_start; } - else { $href = ''; } - $txt = $this->docPageNum($range_start) . $sep; - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - if ($useLinking) { $href = '@'.$range_end; } - else { $href = ''; } - $txt = $this->docPageNum($range_end); - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - else { - if ($useLinking) { $href = '@'.$range_start; } - else { $href = ''; } - $txt = $this->docPageNum($range_start) . $joiner; - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - if ($useLinking) { $href = '@'.$range_end; } - else { $href = ''; } - $txt = $this->docPageNum($range_end); - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - } - else { - if ($useLinking) { $href = '@'.$ppp[(count($ppp)-1)]; } - else { $href = ''; } - $txt = $this->docPageNum($ppp[(count($ppp)-1)]); - $this->textbuffer[] = array($txt, $href,$this->currentfontstyle,$this->colorarray,$this->currentfontfamily,$this->SUP,$this->SUB,'',$this->strike,$this->outlineparam,$this->spanbgcolorarray,$this->currentfontsize,$this->ReqFontStyle); - } - } - } - $this->CloseTag('DIV'); - - if ($divlettjuststarted) { $this->breakpoints[$this->CurrCol] = $save_bp; } // *COLUMNS* - $divlettjuststarted = false; - - $this->breakpoints[$this->CurrCol][] = $this->y; // *COLUMNS* - $last_lett = $lett; - } - $this->CloseTag('DIV'); - $this->breakpoints[$this->CurrCol][] = $this->y; // *COLUMNS* - if ($this->ColActive) { $this->SetColumns(0); } // *COLUMNS* -} -/*-- END INDEX --*/ - - -function AcceptPageBreak() { - if (count($this->cellBorderBuffer)) { $this->printcellbuffer(); } // *TABLES* -/*-- COLUMNS --*/ - if ($this->ColActive==1) { - if($this->CurrCol<$this->NbCol-1) { - //Go to the next column - $this->CurrCol++; - $this->SetCol($this->CurrCol); - $this->y=$this->y0; - $this->ChangeColumn=1; // Number (and direction) of columns changed +1, +2, -2 etc. - // DIRECTIONALITY RTL - if ($this->directionality == 'rtl') { $this->ChangeColumn = -($this->ChangeColumn); } // *RTL* - - //Stay on the page - return false; - } - else { - //Go back to the first column - NEW PAGE - if (count($this->columnbuffer)) { $this->printcolumnbuffer(); } - $this->SetCol(0); - $this->ChangePage=1; - $this->y0 = $this->tMargin; - $this->ChangeColumn= -($this->NbCol-1); - // DIRECTIONALITY RTL - if ($this->directionality == 'rtl') { $this->ChangeColumn = -($this->ChangeColumn); } // *RTL* - //Page break - return true; - } - } -/*-- END COLUMNS --*/ -/*-- TABLES --*/ - else if ($this->table_rotate) { - if (count($this->tablebuffer)) { $this->printtablebuffer(); } - return true; - } -/*-- END TABLES --*/ - else { // *COLUMNS* - $this->ChangeColumn=0; - return $this->autoPageBreak; // mPDF 3.0 - } // *COLUMNS* - return $this->autoPageBreak; // mPDF 3.0 -} - - -//----------- COLUMNS --------------------- -/*-- COLUMNS --*/ - -function SetColumns($NbCol,$vAlign='',$gap=5) { -// NbCol = number of columns -// CurrCol = Number of the current column starting at 0 -// Called externally to set columns on/off and number -// Integer 2 upwards sets columns on to that number -// Anything less than 2 turns columns off - if ($NbCol<2) { // SET COLUMNS OFF - if ($this->ColActive) { - $this->ColActive=0; - if (count($this->columnbuffer)) { $this->printcolumnbuffer(); } - $this->NbCol=1; - $this->ResetMargins(); - $this->pgwidth = $this->w - $this->lMargin - $this->rMargin; - $this->divwidth = 0; - $this->Ln(); - } - $this->ColActive=0; - $this->columnbuffer = array(); - $this->ColDetails = array(); - $this->columnLinks = array(); - $this->columnAnnots = array(); - // mPDF 3.0 - $this->col_Reference = array(); - $this->col_BMoutlines = array(); - $this->col_toc = array(); - $this->breakpoints = array(); - } - else { // SET COLUMNS ON - if ($this->ColActive) { - $this->ColActive=0; - if (count($this->columnbuffer)) { $this->printcolumnbuffer(); } - $this->ResetMargins(); - } - // mPDF 4.0 - if (isset($this->y) && $this->y>$this->tMargin) $this->Ln(); - $this->NbCol=$NbCol; - $this->ColGap = $gap; - $this->divwidth = 0; - $this->ColActive=1; - $this->ColumnAdjust = true; // enables column height adjustment for the page - $this->columnbuffer = array(); - $this->ColDetails = array(); - $this->columnLinks = array(); - $this->columnAnnots = array(); - // mPDF 3.0 - $this->col_Reference = array(); - $this->col_BMoutlines = array(); - $this->col_toc = array(); - $this->breakpoints = array(); - if ((strtoupper($vAlign) == 'J') || (strtoupper($vAlign) == 'JUSTIFY')) { $vAlign = 'J'; } - else { $vAlign = ''; } - $this->colvAlign = $vAlign; - //Save the ordinate - $absL = $this->DeflMargin-($gap/2); - $absR = $this->DefrMargin-($gap/2); - $PageWidth = $this->w-$absL-$absR; // virtual pagewidth for calculation only - $ColWidth = (($PageWidth - ($gap * ($NbCol)))/$NbCol); - $this->ColWidth = $ColWidth; -/*-- RTL --*/ - - if ($this->directionality == 'rtl') { - for ($i=0;$i<$this->NbCol;$i++) { - $this->ColL[$i] = $absL + ($gap/2) + (($NbCol - ($i+1))*($PageWidth/$NbCol)) ; - $this->ColR[$i] = $this->ColL[$i] + $ColWidth; // NB This is not R margin -> R pos - } - } - else { -/*-- END RTL --*/ - for ($i=0;$i<$this->NbCol;$i++) { - $this->ColL[$i] = $absL + ($gap/2) + ($i* ($PageWidth/$NbCol) ); - $this->ColR[$i] = $this->ColL[$i] + $ColWidth; // NB This is not R margin -> R pos - } - } // *RTL* - $this->pgwidth = $ColWidth; - $this->SetCol(0); - $this->y0=$this->GetY(); - } - $this->x = $this->lMargin; -} - -function SetCol($CurrCol) { -// Used internally to set column by number 0 is 1st column - //Set position on a column - $this->CurrCol=$CurrCol; - $x = $this->ColL[$CurrCol]; - $xR = $this->ColR[$CurrCol]; // NB This is not R margin -> R pos - if (($this->mirrorMargins) && (($this->page)%2==0)) { // EVEN - $x += $this->MarginCorrection ; - $xR += $this->MarginCorrection ; - } - $this->SetMargins($x,($this->w - $xR),$this->tMargin); -} - -function AddColumn() { - $this->NewColumn(); - $this->ColumnAdjust = false; // disables all column height adjustment for the page. -} -function NewColumn() { - if ($this->ColActive==1) { - if($this->CurrCol<$this->NbCol-1) { - //Go to the next column - $this->CurrCol++; - $this->SetCol($this->CurrCol); - $this->y = $this->y0; - $this->ChangeColumn=1; - // DIRECTIONALITY RTL - if ($this->directionality == 'rtl') { $this->ChangeColumn = -($this->ChangeColumn); } // *RTL* - //Stay on the page - } - else { - //Go back to the first column - //Page break - if (count($this->columnbuffer)) { $this->printcolumnbuffer(); } - $this->AddPage($this->CurOrientation); - $this->SetCol(0); - $this->ChangePage=1; - $this->y0 = $this->tMargin; - $this->ChangeColumn= -($this->NbCol-1); - // DIRECTIONALITY RTL - if ($this->directionality == 'rtl') { $this->ChangeColumn = -($this->ChangeColumn); } // *RTL* - } - $this->x = $this->lMargin; - } - else { - $this->AddPage($this->CurOrientation); - } -} - -// mPDF 3.0 - Rewritten -function printcolumnbuffer() { - $k = $this->k; - // Columns ended (but page not ended) -> try to match all columns - unless disabled by using a custom column-break - if (!$this->ColActive && $this->ColumnAdjust && !$this->keepColumns) { - // Calculate adjustment to add to each column to calculate rel_y value - $this->ColDetails[0]['add_y'] = 0; - $last_col = 0; - // Recursively add previous column's height - for($i=1;$i<$this->NbCol;$i++) { - if (isset($this->ColDetails[$i]['bottom_margin']) && $this->ColDetails[$i]['bottom_margin']) { // If any entries in the column - $this->ColDetails[$i]['add_y'] = ($this->ColDetails[$i-1]['bottom_margin'] - $this->y0) + $this->ColDetails[$i-1]['add_y']; - $last_col = $i; // Last column actually printed - } - } - - // Calculate value for each position sensitive entry as though for one column - foreach($this->columnbuffer AS $key=>$s) { - $t = $s['s']; - if (preg_match('/BT \d+\.\d\d+ (\d+\.\d\d+) Td/',$t)) { - $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0; - } - else if (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) \d+\.\d\d+ [\-]{0,1}\d+\.\d\d+ re/',$t)) { - $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0; - } - else if (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) m/',$t)) { - $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0; - } - else if (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) l/',$t)) { - $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0; - } - else if (preg_match('/q \d+\.\d\d+ 0 0 \d+\.\d\d+ \d+\.\d\d+ (\d+\.\d\d+) cm \/(I|FO)\d+ Do Q/',$t)) { // mPDF 4.5.007 - $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0; - } - else if (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) \d+\.\d\d+ \d+\.\d\d+ \d+\.\d\d+ \d+\.\d\d+ c/',$t)) { - $this->columnbuffer[$key]['rel_y'] = $s['y'] + $this->ColDetails[$s['col']]['add_y'] - $this->y0; - } - } - - $breaks = array(); - foreach($this->breakpoints AS $c => $bpa) { - foreach($bpa AS $rely) { - $breaks[] = $rely + $this->ColDetails[$c]['add_y'] - $this->y0; - } - } - - if (isset($this->ColDetails[$last_col]['bottom_margin'])) { $lcbm = $this->ColDetails[$last_col]['bottom_margin']; } - else { $lcbm = 0; } - $sum_h = $this->ColDetails[$last_col]['add_y'] + $lcbm - $this->y0; - //$sum_h = max($this->ColDetails[$last_col]['add_y'] + $this->ColDetails[$last_col]['bottom_margin'] - $this->y0, end($breaks)); - $target_h = ($sum_h / $this->NbCol); - - $cbr = array(); - for($i=1;$i<$this->NbCol;$i++) { - $th = ($sum_h * $i / $this->NbCol); - foreach($breaks AS $bk=>$val) { - if ($val > $th) { - if (($val-$th) < ($th-$breaks[$bk-1])) { $cbr[$i-1] = $val; } - else { $cbr[$i-1] = $breaks[$bk-1]; } - break; - } - } - } - $cbr[($this->NbCol-1)] = $sum_h; - - // Now update the columns - divide into columns of approximately equal value - $last_new_col = 0; - $yadj = 0; // mm - $xadj = 0; - $last_col_bottom = 0; - $lowest_bottom_y = 0; - $block_bottom = 0; - $newcolumn = 0; - foreach($this->columnbuffer AS $key=>$s) { - if (isset($s['rel_y'])) { // only process position sensitive data - if ($s['rel_y'] >= $cbr[$newcolumn]) { - $newcolumn++; - } - else { - $newcolumn = $last_new_col ; - } - - - $block_bottom = max($block_bottom,($s['rel_y']+$s['h'])); - - if ($this->directionality == 'rtl') { // *RTL* - $xadj = -(($newcolumn - $s['col']) * ($this->ColWidth + $this->ColGap)); // *RTL* - } // *RTL* - else { // *RTL* - $xadj = ($newcolumn - $s['col']) * ($this->ColWidth + $this->ColGap); - } // *RTL* - - if ($last_new_col != $newcolumn) { // Added new column - $last_col_bottom = $this->columnbuffer[$key]['rel_y']; - $block_bottom = 0; - } - $yadj = ($s['rel_y'] - $s['y']) - ($last_col_bottom)+$this->y0; - // callback function in htmltoolkit - $t = $s['s']; - $t = preg_replace('/BT (\d+\.\d\d+) (\d+\.\d\d+) Td/e',"\$this->columnAdjustAdd('Td',$k,$xadj,$yadj,'\\1','\\2')",$t); - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) ([\-]{0,1}\d+\.\d\d+) re/e',"\$this->columnAdjustAdd('re',$k,$xadj,$yadj,'\\1','\\2','\\3','\\4')",$t); - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) l/e',"\$this->columnAdjustAdd('l',$k,$xadj,$yadj,'\\1','\\2')",$t); - $t = preg_replace('/q (\d+\.\d\d+) 0 0 (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) cm \/(I|FO)/e',"\$this->columnAdjustAdd('img',$k,$xadj,$yadj,'\\1','\\2','\\3','\\4','\\5')",$t); // mPDF 4.5.007 - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) m/e',"\$this->columnAdjustAdd('draw',$k,$xadj,$yadj,'\\1','\\2')",$t); - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) c/e',"\$this->columnAdjustAdd('bezier',$k,$xadj,$yadj,'\\1','\\2','\\3','\\4','\\5','\\6')",$t); - - $this->columnbuffer[$key]['s'] = $t; - $this->columnbuffer[$key]['newcol'] = $newcolumn; - $this->columnbuffer[$key]['newy'] = $s['y'] + $yadj; - $last_new_col = $newcolumn; - $clb = $s['y'] + $yadj + $s['h'] ; // bottom_margin of current - if ((isset($this->ColDetails[$newcolumn]['max_bottom']) && $clb > $this->ColDetails[$newcolumn]['max_bottom']) || (!isset($this->ColDetails[$newcolumn]['max_bottom']) && $clb)) { $this->ColDetails[$newcolumn]['max_bottom'] = $clb; } - if ($clb > $lowest_bottom_y) { $lowest_bottom_y = $clb; } - // Adjust LINKS - if (isset($this->columnLinks[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])])) { - $ref = $this->columnLinks[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])]; - $this->PageLinks[$this->page][$ref][0] += ($xadj*$k); - $this->PageLinks[$this->page][$ref][1] -= ($yadj*$k); - } -/*-- ANNOTATIONS --*/ - if (isset($this->columnAnnots[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])])) { - $ref = $this->columnAnnots[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])]; - if ($this->PageAnnots[$this->page][$ref]['x'] < 0) { - $this->PageAnnots[$this->page][$ref]['x'] -= ($xadj); - } - else { - $this->PageAnnots[$this->page][$ref]['x'] += ($xadj); - } - $this->PageAnnots[$this->page][$ref]['y'] += ($yadj); // unlike PageLinks, Page annots has y values from top in mm - } -/*-- END ANNOTATIONS --*/ - } - } - -/*-- BOOKMARKS --*/ - // mPDF 3.0 - // Adjust Bookmarks - foreach($this->col_BMoutlines AS $v) { - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$this->y0,'p'=>$v['p']); - } -/*-- END BOOKMARKS --*/ - -/*-- INDEX --*/ - // mPDF 3.0 - // Adjust Reference (index) - foreach($this->col_Reference AS $v) { - $Present=0; - //Search the reference (AND Ref/PageNo) in the array - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($v['op'],$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $v['op']; - } - } - } - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($v['op'])); - } - } -/*-- END INDEX --*/ - -/*-- TOC --*/ - // mPDF 3.0 - // Adjust ToC - foreach($this->col_toc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$v['p'],'link'=>$v['link'],'toc_id'=>$v['toc_id']); - $this->links[$v['link']][1] = $this->y0; - } -/*-- END TOC --*/ - - // Adjust column length to be equal - if ($this->colvAlign == 'J') { - foreach($this->columnbuffer AS $key=>$s) { - if (isset($s['rel_y'])) { // only process position sensitive data - // Set ratio to expand y values or heights - if ($this->ColDetails[$s['newcol']]['max_bottom']) { - $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['newcol']]['max_bottom'] - ($this->y0)); - } - else { $ratio = 1; } - if (($ratio > 1) && ($ratio <= $this->max_colH_correction)) { - $yadj = ($s['newy'] - $this->y0) * ($ratio - 1); - - // Adjust LINKS - if (isset($this->columnLinks[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])])) { - $ref = $this->columnLinks[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])]; - $this->PageLinks[$this->page][$ref][1] -= ($yadj*$k); // y value - $this->PageLinks[$this->page][$ref][3] *= $ratio; // height - } -/*-- ANNOTATIONS --*/ - if (isset($this->columnAnnots[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])])) { - $ref = $this->columnAnnots[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])]; - $this->PageAnnots[$this->page][$ref]['y'] += ($yadj); - } -/*-- END ANNOTATIONS --*/ - } - } - } - - $last_col = -1; - $trans_on = false; - foreach($this->columnbuffer AS $key=>$s) { - if (isset($s['rel_y'])) { // only process position sensitive data - // Set ratio to expand y values or heights - if (isset($this->ColDetails[$s['newcol']]['max_bottom']) && $this->ColDetails[$s['newcol']]['max_bottom']) { - $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['newcol']]['max_bottom'] - ($this->y0)); - } - else { $ratio = 1; } - if (($ratio > 1) && ($ratio <= $this->max_colH_correction)) { - //Start Transformation - $this->pages[$this->page] .= $this->StartTransform(true)."\n"; - $this->pages[$this->page] .= $this->transformScale(100, $ratio*100, $x='', $this->y0, true)."\n"; - $trans_on = true; - } - } - // Now output the adjusted values - $this->pages[$this->page] .= $s['s']."\n"; - if (isset($s['rel_y']) && ($ratio > 1) && ($ratio <= $this->max_colH_correction)) { // only process position sensitive data - //Stop Transformation - $this->pages[$this->page] .= $this->StopTransform(true)."\n"; - } - } - } - else { // if NOT $this->colvAlign == 'J' - // Now output the adjusted values - foreach($this->columnbuffer AS $s) { $this->pages[$this->page] .= $s['s']."\n"; } - } - if ($lowest_bottom_y > 0) { $this->y = $lowest_bottom_y ; } - } - - // Columns not ended but new page -> align columns (can leave the columns alone - just tidy up the height) - else if ($this->colvAlign == 'J' && $this->ColumnAdjust && !$this->keepColumns) { - - $k = $this->k; - // calculate the lowest bottom margin - $lowest_bottom_y = 0; - foreach($this->columnbuffer AS $key=>$s) { - // Only process output data - $t = $s['s']; - if ((preg_match('/BT \d+\.\d\d+ (\d+\.\d\d+) Td/',$t)) || (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) \d+\.\d\d+ [\-]{0,1}\d+\.\d\d+ re/',$t)) || - (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) l/',$t)) || - (preg_match('/q \d+\.\d\d+ 0 0 \d+\.\d\d+ \d+\.\d\d+ (\d+\.\d\d+) cm \/(I|FO)\d+ Do Q/',$t)) || - (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) m/',$t)) || - (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) \d+\.\d\d+ \d+\.\d\d+ \d+\.\d\d+ \d+\.\d\d+ c/',$t)) ) { // mPDF 4.5.007 - - $clb = $s['y'] + $s['h']; - if ((isset($this->ColDetails[$s['col']]['max_bottom']) && $clb > $this->ColDetails[$s['col']]['max_bottom']) || !isset($this->ColDetails[$s['col']]['max_bottom'])) { $this->ColDetails[$s['col']]['max_bottom'] = $clb; } - if ($clb > $lowest_bottom_y) { $lowest_bottom_y = $clb; } - $this->columnbuffer[$key]['rel_y'] = $s['y']; // Marks position sensitive data to process later - } - } - // Adjust column length equal - foreach($this->columnbuffer AS $key=>$s) { - // Set ratio to expand y values or heights - if (isset($this->ColDetails[$s['col']]['max_bottom']) && $this->ColDetails[$s['col']]['max_bottom']) { - $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['col']]['max_bottom'] - ($this->y0)); - } - else { $ratio = 1; } - if (($ratio > 1) && ($ratio <= $this->max_colH_correction)) { - $yadj = ($s['y'] - $this->y0) * ($ratio - 1); - - // Adjust LINKS - if (isset($s['rel_y'])) { // only process position sensitive data - // otherwise triggers for all entries in column buffer (.e.g. formatting) and makes below adjustments more than once - if (isset($this->columnLinks[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])])) { - $ref = $this->columnLinks[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])]; - $this->PageLinks[$this->page][$ref][1] -= ($yadj*$k); // y value - $this->PageLinks[$this->page][$ref][3] *= $ratio; // height - } -/*-- ANNOTATIONS --*/ - if (isset($this->columnAnnots[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])])) { - $ref = $this->columnAnnots[$s['col']][INTVAL($s['x'])][INTVAL($s['y'])]; - $this->PageAnnots[$this->page][$ref]['y'] += ($yadj); - } -/*-- END ANNOTATIONS --*/ - } - } - } - -/*-- BOOKMARKS --*/ - // mPDF 3.0 - // Adjust Bookmarks - foreach($this->col_BMoutlines AS $v) { - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$this->y0,'p'=>$v['p']); - } -/*-- END BOOKMARKS --*/ - -/*-- INDEX --*/ - // mPDF 3.0 - // Adjust Reference (index) - foreach($this->col_Reference AS $v) { - $Present=0; - //Search the reference (AND Ref/PageNo) in the array - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($v['op'],$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $v['op']; - } - } - } - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($v['op'])); - } - } -/*-- END INDEX --*/ - -/*-- TOC --*/ - // mPDF 3.0 - // Adjust ToC - foreach($this->col_toc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$v['p'],'link'=>$v['link'],'toc_id'=>$v['toc_id']); - $this->links[$v['link']][1] = $this->y0; - } -/*-- END TOC --*/ - foreach($this->columnbuffer AS $key=>$s) { - if (isset($s['rel_y'])) { // only process position sensitive data - // Set ratio to expand y values or heights - if ($this->ColDetails[$s['col']]['max_bottom']) { - $ratio = ($lowest_bottom_y - ($this->y0)) / ($this->ColDetails[$s['col']]['max_bottom'] - ($this->y0)); - } - else { $ratio = 1; } - if (($ratio > 1) && ($ratio <= $this->max_colH_correction)) { - //Start Transformation - $this->pages[$this->page] .= $this->StartTransform(true)."\n"; - $this->pages[$this->page] .= $this->transformScale(100, $ratio*100, $x='', $this->y0, true)."\n"; - } - } - // Now output the adjusted values - $this->pages[$this->page] .= $s['s']."\n"; - if (isset($s['rel_y']) && ($ratio > 1) && ($ratio <= $this->max_colH_correction)) { - //Stop Transformation - $this->pages[$this->page] .= $this->StopTransform(true)."\n"; - } - } - - if ($lowest_bottom_y > 0) { $this->y = $lowest_bottom_y ; } - } - - - // Just reproduce the page as it was - else { - // If page has not ended but height adjustment was disabled by custom column-break - adjust y - $k = $this->k; - $lowest_bottom_y = 0; -// if ((!$this->ColumnAdjust && !$this->ColActive) || $this->keepColumns) { - if (!$this->ColActive && (!$this->ColumnAdjust || $this->keepColumns)) { - // calculate the lowest bottom margin - foreach($this->columnbuffer AS $key=>$s) { - // Only process output data - $t = $s['s']; - if ((preg_match('/BT \d+\.\d\d+ (\d+\.\d\d+) Td/',$t)) || (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) \d+\.\d\d+ [\-]{0,1}\d+\.\d\d+ re/',$t)) || - (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) l/',$t)) || - (preg_match('/q \d+\.\d\d+ 0 0 \d+\.\d\d+ \d+\.\d\d+ (\d+\.\d\d+) cm \/(I|FO)\d+ Do Q/',$t)) || - (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) m/',$t)) || - (preg_match('/\d+\.\d\d+ (\d+\.\d\d+) \d+\.\d\d+ \d+\.\d\d+ \d+\.\d\d+ \d+\.\d\d+ c/',$t)) ) { // mPDF 4.5.007 - - $clb = $s['y'] + $s['h']; - if ($clb > $this->ColDetails[$s['col']]['max_bottom']) { $this->ColDetails[$s['col']]['max_bottom'] = $clb; } - if ($clb > $lowest_bottom_y) { $lowest_bottom_y = $clb; } - } - } - } - foreach($this->columnbuffer AS $s) { $this->pages[$this->page] .= $s['s']."\n"; } - if ($lowest_bottom_y > 0) { $this->y = $lowest_bottom_y ; } - -/*-- INDEX --*/ - // mPDF 3.0 - // Output Reference (index) - foreach($this->col_Reference AS $v) { - $Present=0; - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($v['op'],$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $v['op']; - } - } - } - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($v['op'])); - } - } -/*-- END INDEX --*/ -/*-- BOOKMARKS --*/ - // Output Bookmarks - foreach($this->col_BMoutlines AS $v) { - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$v['y'],'p'=>$v['p']); - } -/*-- END BOOKMARKS --*/ -/*-- TOC --*/ - // Output ToC - foreach($this->col_toc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$v['p'],'link'=>$v['link'],'toc_id'=>$v['toc_id']); - } -/*-- END TOC --*/ - } - $this->columnbuffer = array(); - $this->ColDetails = array(); - $this->columnLinks = array(); - $this->columnAnnots = array(); - // mPDF 3.0 - $this->col_Reference = array(); - $this->col_BMoutlines = array(); - $this->col_toc = array(); - $this->breakpoints = array(); -} - -/*-- END COLUMNS --*/ - - -//================================================================== -/*-- TABLES --*/ -function printcellbuffer() { - if (count($this->cellBorderBuffer )) { - // usort( $this->cellBorderBuffer , array($this, "_cmpdom")); - // mPDF 4.3.008 4.3.014 - sort($this->cellBorderBuffer); - foreach($this->cellBorderBuffer AS $cbb) { - $cba = unpack("A16dom/nbord/A1side/ns/dbw/ncr/ncg/ncb/A10style/dx/dy/dw/dh/dmbl/dmbr/dmrt/dmrb/dmtl/dmtr/dmlt/dmlb/dcpd/dover/", $cbb); - $side = $cba['side']; - $details = array(); - $details[$side]['dom'] = (float) $cba['dom']; - $details[$side]['s'] = $cba['s']; - $details[$side]['w'] = $cba['bw']; - $details[$side]['c']['R'] = $cba['cr']; - $details[$side]['c']['G'] = $cba['cg']; - $details[$side]['c']['B'] = $cba['cb']; - $details[$side]['style'] = trim($cba['style']); - $details['mbw']['BL'] = $cba['mbl']; - $details['mbw']['BR'] = $cba['mbr']; - $details['mbw']['RT'] = $cba['mrt']; - $details['mbw']['RB'] = $cba['mrb']; - $details['mbw']['TL'] = $cba['mtl']; - $details['mbw']['TR'] = $cba['mtr']; - $details['mbw']['LT'] = $cba['mlt']; - $details['mbw']['LB'] = $cba['mlb']; - $details['cellposdom'] = $cba['cpd']; - $details['p'] = $side; - if ($cba['over']==1) { $details[$side]['overlay'] = true; } - else { $details[$side]['overlay'] = false; } - $this->_tableRect($cba['x'],$cba['y'],$cba['w'],$cba['h'],$cba['bord'],$details, false, false); - - } - $this->cellBorderBuffer = array(); - } -} -//================================================================== -function printtablebuffer() { - - if (!$this->table_rotate) { - foreach($this->tablebuffer AS $s) { $this->pages[$this->page] .= $s['s']."\n"; } - foreach($this->tbrot_Links AS $p => $l) { - foreach($l AS $v) { - $this->PageLinks[$p][] = $v; - } - } - $this->tbrot_Links = array(); -/*-- ANNOTATIONS --*/ - foreach($this->tbrot_Annots AS $p => $l) { - foreach($l AS $v) { - $this->PageAnnots[$p][] = $v; - } - } - $this->tbrot_Annots = array(); -/*-- END ANNOTATIONS --*/ - -/*-- INDEX --*/ - // mPDF 3.0 - // Output Reference (index) - foreach($this->tbrot_Reference AS $v) { - $Present=0; - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($v['op'],$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $v['op']; - } - } - } - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($v['op'])); - } - } - $this->tbrot_Reference = array(); -/*-- END INDEX --*/ - -/*-- BOOKMARKS --*/ - // Output Bookmarks - foreach($this->tbrot_BMoutlines AS $v) { - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$v['y'],'p'=>$v['p']); - } - $this->tbrot_BMoutlines = array(); -/*-- END BOOKMARKS --*/ - -/*-- TOC --*/ - // Output ToC - foreach($this->tbrot_toc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$v['p'],'link'=>$v['link'],'toc_id'=>$v['toc_id']); - } - $this->tbrot_toc = array(); -/*-- END TOC --*/ - - return; - } - - // else if rotated - $lm = $this->lMargin + $this->blk[$this->blklvl]['outer_left_margin'] + $this->blk[$this->blklvl]['border_left']['w'] + $this->blk[$this->blklvl]['padding_left']; - $pw = $this->blk[$this->blklvl]['inner_width']; - //Start Transformation - $this->pages[$this->page] .= $this->StartTransform(true)."\n"; - - if ($this->table_rotate > 1) { // clockwise - if ($this->tbrot_align == 'L') { - $xadj = $this->tbrot_h ; // align L (as is) - } - else if ($this->tbrot_align == 'R') { - $xadj = $lm-$this->tbrot_x0+($pw) ; // align R - } - else { - $xadj = $lm-$this->tbrot_x0+(($pw + $this->tbrot_h)/2) ; // align C - } - $yadj = 0; - } - else { // anti-clockwise - if ($this->tbrot_align == 'L') { - $xadj = 0 ; // align L (as is) - } - else if ($this->tbrot_align == 'R') { - $xadj = $lm-$this->tbrot_x0+($pw - $this->tbrot_h) ; // align R - } - else { - $xadj = $lm-$this->tbrot_x0+(($pw - $this->tbrot_h)/2) ; // align C - } - $yadj = $this->tbrot_w; - } - - - $this->pages[$this->page] .= $this->transformTranslate($xadj, $yadj , true)."\n"; - $this->pages[$this->page] .= $this->transformRotate($this->table_rotate, $this->tbrot_x0 , $this->tbrot_y0 , true)."\n"; - - // Now output the adjusted values - foreach($this->tablebuffer AS $s) { $this->pages[$this->page] .= $s['s']."\n"; } - - - foreach($this->tbrot_Links AS $p => $l) { - foreach($l AS $v) { - $w = $v[2]/$this->k; - $h = $v[3]/$this->k; - $ax = ($v[0]/$this->k) - $this->tbrot_x0; - $ay = (($this->hPt-$v[1])/$this->k) - $this->tbrot_y0; - if ($this->table_rotate > 1) { // clockwise - $bx = $this->tbrot_x0+$xadj-$ay-$h; - $by = $this->tbrot_y0+$yadj+$ax; - } - else { - $bx = $this->tbrot_x0+$xadj+$ay; - $by = $this->tbrot_y0+$yadj-$ax-$w; - } - $v[0] = $bx*$this->k; - $v[1] = ($this->h-$by)*$this->k; - $v[2] = $h*$this->k; // swap width and height - $v[3] = $w*$this->k; - $this->PageLinks[$p][] = $v; - } - } - $this->tbrot_Links = array(); -/*-- ANNOTATIONS --*/ - foreach($this->tbrot_Annots AS $p => $l) { - foreach($l AS $v) { - $w = $this->annotSize; - $h = $this->annotSize; - $ax = abs($v['x']) - $this->tbrot_x0; // abs because -ve values are internally set and held for reference if annotMargin set - $ay = $v['y'] - $this->tbrot_y0; - if ($this->table_rotate > 1) { // clockwise - $bx = $this->tbrot_x0+$xadj-$ay-$h; - $by = $this->tbrot_y0+$yadj+$ax; - } - else { - $bx = $this->tbrot_x0+$xadj+$ay; - $by = $this->tbrot_y0+$yadj-$ax-$w; - } - if ($v['x'] < 0) { - $v['x'] = -$bx; - } - else { - $v['x'] = $bx; - } - $v['y'] = ($by); - $this->PageAnnots[$p][] = $v; - } - } - $this->tbrot_Annots = array(); -/*-- END ANNOTATIONS --*/ - - -/*-- BOOKMARKS --*/ - // mPDF 3.0 - // Adjust Bookmarks - foreach($this->tbrot_BMoutlines AS $v) { - $v['y'] = $this->tbrot_y0; - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$v['y'],'p'=>$this->page); - } -/*-- END BOOKMARKS --*/ - -/*-- INDEX --*/ - // mPDF 3.0 - // Adjust Reference (index) - foreach($this->tbrot_Reference AS $v) { - $Present=0; - //Search the reference (AND Ref/PageNo) in the array - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($this->page,$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $this->page; - } - } - } - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($this->page)); - } - } -/*-- END INDEX --*/ - -/*-- TOC --*/ - // mPDF 3.0 - // Adjust ToC - uses document page number - foreach($this->tbrot_toc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$this->page,'link'=>$v['link'],'toc_id'=>$v['toc_id']); - $this->links[$v['link']][1] = $this->tbrot_y0; - } -/*-- END TOC --*/ - - - // mPDF 3.0 - $this->tbrot_Reference = array(); - $this->tbrot_BMoutlines = array(); - $this->tbrot_toc = array(); - - //Stop Transformation - $this->pages[$this->page] .= $this->StopTransform(true)."\n"; - - - $this->y = $this->tbrot_y0 + $this->tbrot_w; - $this->x = $this->lMargin; - - $this->tablebuffer = array(); -} - -//================================================================== -// Keep-with-table This buffers contents of h1-6 to keep on page with table -function printkwtbuffer() { - if (!$this->kwt_moved) { - foreach($this->kwt_buffer AS $s) { $this->pages[$this->page] .= $s['s']."\n"; } - foreach($this->kwt_Links AS $p => $l) { - foreach($l AS $v) { - $this->PageLinks[$p][] = $v; - } - } - $this->kwt_Links = array(); -/*-- ANNOTATIONS --*/ - foreach($this->kwt_Annots AS $p => $l) { - foreach($l AS $v) { - $this->PageAnnots[$p][] = $v; - } - } - $this->kwt_Annots = array(); -/*-- END ANNOTATIONS --*/ - -/*-- INDEX --*/ - // mPDF 3.0 - // Output Reference (index) - foreach($this->kwt_Reference AS $v) { - $Present=0; - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($v['op'],$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $v['op']; - } - } - } - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($v['op'])); - } - } - $this->kwt_Reference = array(); -/*-- END INDEX --*/ - -/*-- BOOKMARKS --*/ - // Output Bookmarks - foreach($this->kwt_BMoutlines AS $v) { - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$v['y'],'p'=>$v['p']); - } - $this->kwt_BMoutlines = array(); -/*-- END BOOKMARKS --*/ - -/*-- TOC --*/ - // Output ToC - foreach($this->kwt_toc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$v['p'],'link'=>$v['link'],'toc_id'=>$v['toc_id']); - } - $this->kwt_toc = array(); -/*-- END TOC --*/ - - return; - } - - //Start Transformation - $this->pages[$this->page] .= $this->StartTransform(true)."\n"; - $xadj = $this->lMargin - $this->kwt_x0 ; - //$yadj = $this->y - $this->kwt_y0 ; - $yadj = $this->tMargin - $this->kwt_y0 ; - - $this->pages[$this->page] .= $this->transformTranslate($xadj, $yadj , true)."\n"; - - // Now output the adjusted values - foreach($this->kwt_buffer AS $s) { $this->pages[$this->page] .= $s['s']."\n"; } - - // Adjust hyperLinks - foreach($this->kwt_Links AS $p => $l) { - foreach($l AS $v) { - $bx = $this->kwt_x0+$xadj; - $by = $this->kwt_y0+$yadj; - $v[0] = $bx*$this->k; - $v[1] = ($this->h-$by)*$this->k; - $this->PageLinks[$p][] = $v; - } - } -/*-- ANNOTATIONS --*/ - foreach($this->kwt_Annots AS $p => $l) { - foreach($l AS $v) { - $w = $this->annotSize; - $h = $this->annotSize; - $bx = $this->kwt_x0+$xadj; - $by = $this->kwt_y0+$yadj; - if ($v['x'] < 0) { - $v['x'] = -$bx; - } - else { - $v['x'] = $bx; - } - $v['y'] = $by; - $this->PageAnnots[$p][] = $v; - } - } -/*-- END ANNOTATIONS --*/ - -/*-- BOOKMARKS --*/ - // mPDF 3.0 - // Adjust Bookmarks - foreach($this->kwt_BMoutlines AS $v) { - if ($v['y'] != 0) { $v['y'] += $yadj; } - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$v['y'],'p'=>$this->page); - } -/*-- END BOOKMARKS --*/ - -/*-- INDEX --*/ - // mPDF 3.0 - // Adjust Reference (index) - foreach($this->kwt_Reference AS $v) { - $Present=0; - //Search the reference (AND Ref/PageNo) in the array - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($this->page,$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $this->page; - } - } - } - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($this->page)); - } - } -/*-- END INDEX --*/ - -/*-- TOC --*/ - // mPDF 3.0 - // Adjust ToC - foreach($this->kwt_toc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$this->page,'link'=>$v['link'],'toc_id'=>$v['toc_id']); - $this->links[$v['link']][0] = $this->page; - $this->links[$v['link']][1] += $yadj; - } -/*-- END TOC --*/ - - - $this->kwt_Links = array(); - $this->kwt_Annots = array(); - // mPDF 3.0 - $this->kwt_Reference = array(); - $this->kwt_BMoutlines = array(); - $this->kwt_toc = array(); - //Stop Transformation - $this->pages[$this->page] .= $this->StopTransform(true)."\n"; - - $this->kwt_buffer = array(); - - $this->y += $this->kwt_height; -} - -/*-- END TABLES --*/ - - -//================================================================== -// mPDF 4.0 -function printfloatbuffer() { - if (count($this->floatbuffer)) { - $this->objectbuffer = $this->floatbuffer; - $this->printobjectbuffer(false); - $this->objectbuffer = array(); - $this->floatbuffer = array(); - $this->floatmargins = array(); - } -} -//================================================================== - -function printdivbuffer() { - $k = $this->k; - $p1 = $this->blk[$this->blklvl]['startpage']; - $p2 = $this->page; - $bottom[$p1] = $this->ktBlock[$p1]['bottom_margin']; - $bottom[$p2] = $this->y; // $this->ktBlock[$p2]['bottom_margin']; - $top[$p1] = $this->blk[$this->blklvl]['y00']; - $top2 = $this->h; - foreach($this->divbuffer AS $key=>$s) { - if ($s['page'] == $p2) { - $top2 = MIN($s['y'], $top2); - } - } - $top[$p2] = $top2; - $height[$p1] = ($bottom[$p1] - $top[$p1]); - $height[$p2] = ($bottom[$p2] - $top[$p2]); - $xadj[$p1] = $this->MarginCorrection; - $yadj[$p1] = -($top[$p1] - $top[$p2]); - $xadj[$p2] = 0; - $yadj[$p2] = $height[$p1]; - - if ($this->ColActive || !$this->keep_block_together || $this->blk[$this->blklvl]['startpage'] == $this->page || ($this->page - $this->blk[$this->blklvl]['startpage']) > 1 || ($height[$p1]+$height[$p2]) > $this->h) { - foreach($this->divbuffer AS $s) { $this->pages[$s['page']] .= $s['s']."\n"; } - foreach($this->ktLinks AS $p => $l) { - foreach($l AS $v) { - $this->PageLinks[$p][] = $v; - } - } -/*-- ANNOTATIONS --*/ - foreach($this->ktAnnots AS $p => $l) { - foreach($l AS $v) { - $this->PageAnnots[$p][] = $v; - } - } -/*-- END ANNOTATIONS --*/ -/*-- INDEX --*/ - // Adjust Reference (index) - foreach($this->ktReference AS $v) { - // mPDF 3.0 - $Present=0; - //Search the reference (AND Ref/PageNo) in the array - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($p2,$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $p2; - } - } - } - //If not found, add it - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($p2)); - } - } -/*-- END INDEX --*/ - -/*-- BOOKMARKS --*/ - // Adjust Bookmarks - foreach($this->ktBMoutlines AS $v) { - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$v['y'],'p'=>$v['p']); - } -/*-- END BOOKMARKS --*/ - -/*-- TOC --*/ - // Adjust ToC - foreach($this->_kttoc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$v['p'],'link'=>$v['link'],'toc_id'=>$v['toc_id']); - } -/*-- END TOC --*/ - - $this->divbuffer = array(); - $this->ktLinks = array(); - $this->ktAnnots = array(); - $this->ktBlock = array(); - $this->ktReference = array(); - $this->ktBMoutlines = array(); - $this->_kttoc = array(); - $this->keep_block_together = 0; - return; - } - else { - foreach($this->divbuffer AS $key=>$s) { - // callback function in htmltoolkit - $t = $s['s']; - $p = $s['page']; - $t = preg_replace('/BT (\d+\.\d\d+) (\d+\.\d\d+) Td/e',"\$this->blockAdjust('Td',$k,$xadj[$p],$yadj[$p],'\\1','\\2')",$t); - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) ([\-]{0,1}\d+\.\d\d+) re/e',"\$this->blockAdjust('re',$k,$xadj[$p],$yadj[$p],'\\1','\\2','\\3','\\4')",$t); - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) l/e',"\$this->blockAdjust('l',$k,$xadj[$p],$yadj[$p],'\\1','\\2')",$t); - $t = preg_replace('/q (\d+\.\d\d+) 0 0 (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) cm \/(I|FO)/e',"\$this->blockAdjust('img',$k,$xadj[$p],$yadj[$p],'\\1','\\2','\\3','\\4','\\5')",$t); // mPDF 4.5.007 - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) m/e',"\$this->blockAdjust('draw',$k,$xadj[$p],$yadj[$p],'\\1','\\2')",$t); - $t = preg_replace('/(\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) (\d+\.\d\d+) c/e',"\$this->blockAdjust('bezier',$k,$xadj[$p],$yadj[$p],'\\1','\\2','\\3','\\4','\\5','\\6')",$t); - - $this->pages[$this->page] .= $t."\n"; - } - // Adjust hyperLinks - foreach($this->ktLinks AS $p => $l) { - foreach($l AS $v) { - $v[0] += ($xadj[$p]*$k); - $v[1] -= ($yadj[$p]*$k); - $this->PageLinks[$p2][] = $v; - } - } -/*-- ANNOTATIONS --*/ - foreach($this->ktAnnots AS $p => $l) { - foreach($l AS $v) { - if ($v['x']>0) { $v['x'] += $xadj[$p]; } - else if ($v['x']<0) { $v['x'] -= $xadj[$p]; } - // mPDF 3.0 -= -> += - $v['y'] += $yadj[$p]; - $this->PageAnnots[$p2][] = $v; - } - } -/*-- END ANNOTATIONS --*/ - -/*-- BOOKMARKS --*/ - // Adjust Bookmarks - foreach($this->ktBMoutlines AS $v) { - if ($v['y'] != 0) { $v['y'] += ($yadj[$v['p']]); } - $this->BMoutlines[]=array('t'=>$v['t'],'l'=>$v['l'],'y'=>$v['y'],'p'=>$p2); - } -/*-- END BOOKMARKS --*/ - -/*-- INDEX --*/ - // Adjust Reference (index) - foreach($this->ktReference AS $v) { - // mPDF 3.0 - $Present=0; - //Search the reference (AND Ref/PageNo) in the array - for ($i=0;$iReference);$i++){ - if ($this->Reference[$i]['t']==$v['t']){ - $Present=1; - if (!in_array($p2,$this->Reference[$i]['p'])) { - $this->Reference[$i]['p'][] = $p2; - } - } - } - //If not found, add it - if ($Present==0) { - $this->Reference[]=array('t'=>$v['t'],'p'=>array($p2)); - } - } -/*-- END INDEX --*/ - -/*-- TOC --*/ - // Adjust ToC - foreach($this->_kttoc AS $v) { - $this->_toc[]=array('t'=>$v['t'],'l'=>$v['l'],'p'=>$p2,'link'=>$v['link'],'toc_id'=>$v['toc_id']); - // mPDF 3.0 - $this->links[$v['link']][0] = $p2; - $this->links[$v['link']][1] += $yadj[$p]; - } -/*-- END TOC --*/ - - $this->y = $top[$p2] + $height[$p1] + $height[$p2]; - $this->x = $this->lMargin; - - $this->divbuffer = array(); - $this->ktLinks = array(); - $this->ktAnnots = array(); - $this->ktBlock = array(); - $this->ktReference = array(); - $this->ktBMoutlines = array(); - $this->_kttoc = array(); - $this->keep_block_together = 0; - } -} - - -//================================================================== -// Added ELLIPSES and CIRCLES -function Circle($x,$y,$r,$style='S') { - $this->Ellipse($x,$y,$r,$r,$style); -} - -function Ellipse($x,$y,$rx,$ry,$style='S') { - if($style=='F') { $op='f'; } - elseif($style=='FD' or $style=='DF') { $op='B'; } - else { $op='S'; } - $lx=4/3*(M_SQRT2-1)*$rx; - $ly=4/3*(M_SQRT2-1)*$ry; - $k=$this->k; - $h=$this->h; - $this->_out(sprintf('%.3f %.3f m %.3f %.3f %.3f %.3f %.3f %.3f c', ($x+$rx)*$k,($h-$y)*$k, ($x+$rx)*$k,($h-($y-$ly))*$k, ($x+$lx)*$k,($h-($y-$ry))*$k, $x*$k,($h-($y-$ry))*$k)); - $this->_out(sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c', ($x-$lx)*$k,($h-($y-$ry))*$k, ($x-$rx)*$k,($h-($y-$ly))*$k, ($x-$rx)*$k,($h-$y)*$k)); - $this->_out(sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c', ($x-$rx)*$k,($h-($y+$ly))*$k, ($x-$lx)*$k,($h-($y+$ry))*$k, $x*$k,($h-($y+$ry))*$k)); - $this->_out(sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c %s', ($x+$lx)*$k,($h-($y+$ry))*$k, ($x+$rx)*$k,($h-($y+$ly))*$k, ($x+$rx)*$k,($h-$y)*$k, $op)); -} - -/*-- DIRECTW --*/ -// Added adaptation of shaded_box = AUTOSIZE-TEXT -// Label and number of invoice/estimate -function AutosizeText($text,$w,$font,$style,$szfont=72) { - $text = $this->purify_utf8_text($text); - if ($this->text_input_as_HTML) { - $text = $this->all_entities_to_utf8($text); - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if (!$this->is_MB) { $text = mb_convert_encoding($text,$this->mb_enc,'UTF-8'); } - if (!$this->is_MB) { $text = api_convert_encoding($text,$this->mb_enc,'UTF-8'); } - // - $text = ' '.$text.' '; - $width = $this->ConvertSize($w); - $loop = 0; - while ( $loop == 0 ) { - $this->SetFont($font,$style,$szfont); - $sz = $this->GetStringWidth( $text ); - if ( $sz > $w ) { $szfont --; } - else { $loop ++; } - } - $this->SetFont($font,$style,$szfont); - $this->Cell($w, 0, $text, 0, 0, "C"); -} -/*-- END DIRECTW --*/ - - - - - -// ==================================================== -// ==================================================== -/*-- RTL --*/ -function reverse_letters($str) { - // mPDF 4.0 - $str = strtr($str, '{}[]()', '}{][)('); - - // Modified by Ivan Tcholakov, 28-JAN-2010. - //return $this->mb_strrev($str, $this->mb_enc); - return api_strrev($str, $this->mb_enc); - // -} - -function magic_reverse_dir(&$chunk, $join=true) { - if (!$this->is_MB || $this->isCJK) { return 0; } - if (($this->directionality == 'rtl') || (($this->directionality == 'ltr') && ($this->biDirectional))) { - // Change Arabic + Persian. to Presentation Forms - if ($join) { - // mPDF 4.0 Remove rtlAsArabicFarsi - $chunk = preg_replace("/([".$this->pregRTLchars."]+)/ue", '$this->ArabJoin(stripslashes(\'\\1\'))', $chunk ); - } - $contains_rtl = false; - $all_rtl = true; - if (preg_match("/[".$this->pregRTLchars."]/u",$chunk)) { // Chunk contains RTL characters - if (preg_match("/[^".$this->pregRTLchars."\x{A0}\"\'\(\)., :\-]/u",$chunk)) { // Chunk also contains LTR characters (added , mPDF 4.0) - $all_rtl = false; - $bits = explode(' ',$chunk); // mPDF 4.4.012 - foreach($bits AS $bitkey=>$bit) { - if (preg_match("/[".$this->pregRTLchars."]/u",$bit)) { // Chunk also contains LTR characters - $bits[$bitkey] = $this->reverse_letters($bit); - } - else { - $bits[$bitkey] = $bit; - } - } - $bits = array_reverse($bits,false); - $chunk = implode(' ',$bits); - } - else { - $chunk = $this->reverse_letters($chunk); - } - $contains_rtl = true; - } - else { $all_rtl = false; } - if ($all_rtl) { return 2; } - else if ($contains_rtl) { return 1; } - else { return 0; } - } - return 0; -} -/*-- END RTL --*/ - -// -// **************************** -// **************************** - - -// mPDF 4.0 -function SetSubstitutions($dummy=array()) { // parameter only for backward compatability - $subsarray = array(); - @include(_MPDF_PATH.'includes/subs_'.strtolower($this->codepage).'.php'); - $this->substitute = array(); - foreach($subsarray AS $key => $val) { - $this->substitute[code2utf($key)] = $val; - } -} - - -function SubstituteChars($html) { - // mPDF 4.2.018 - if ($this->PDFA && $this->useSubstitutions) { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "Core Adobe fonts [Helvetica, Times, Symbol etc] cannot be embedded with mPDF, which is required for PDFA1-b (Character substitution [useSubstitutions] disabled)"; } - $this->useSubstitutions = false; - } - // only substitute characters between tags - if ($this->useSubstitutions && count($this->substitute)) { - $a=preg_split('/(<.*?>)/ms',$html,-1,PREG_SPLIT_DELIM_CAPTURE); - $html = ''; - foreach($a as $i => $e) { - if($i%2==0) { - $e = strtr($e, $this->substitute); - } - $html .= $e; - } - } - return $html; -} - -/*-- UNICODE-FONTS --*/ -// mPDF 4.2 -function SubstituteCharsMB(&$writehtml_a, &$writehtml_i, &$writehtml_e) { - // mPDF 4.2.018 - if ($this->PDFA) { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "Core Adobe fonts [Helvetica, Times, Symbol etc] cannot be embedded with mPDF, which is required for PDFA1-b (Character substitution [useSubstitutionsMB] disabled)"; } - $this->useSubstitutionsMB = false; - return 0; - } - $cw = &$this->CurrentFont['cw']; - $unicode = $this->UTF8StringToArray($writehtml_e); - $start = -1; - $end = 0; - $flag = 0; - $ftype = ''; - $u = array(); - foreach($unicode AS $c => $char) { - if ($char != 173 && !isset($cw[$char]) && (!isset($this->chrs[$char]) || !isset($cw[$this->chrs[$char]])) && - ($char<1423 || ($char>3583 && $char < 11263))) { - if ($flag==0) { $start=$c; } - $flag=1; - $u[] = $char; - } - else if ($flag==1) { $end=$c-1; break; } - } - if ($flag==1 && !$end) { $end=count($unicode)-1; } - if ($start==-1) { return 0; } - - if (!$this->subArrMB) { - include(_MPDF_PATH.'includes/subs_core.php'); - $this->subArrMB['a'] = $aarr; - $this->subArrMB['s'] = $sarr; - $this->subArrMB['z'] = $zarr; - } - // TRY CORE FONTS FIRST - if (isset($this->subArrMB['a'][$u[0]])) { - $font = 'tta'; $ftype = 'C'; - foreach($u AS $char) { - if ($this->subArrMB['a'][$char]) { $repl[] = $this->subArrMB['a'][$char]; } - else { break; } - } - } - else if (isset($this->subArrMB['z'][$u[0]])) { - $font = 'ttz'; $ftype = 'C'; - foreach($u AS $char) { - if ($this->subArrMB['z'][$char]) { $repl[] = $this->subArrMB['z'][$char]; } - else { break; } - } - } - else if (isset($this->subArrMB['s'][$u[0]])) { - $font = 'tts'; $ftype = 'C'; - foreach($u AS $char) { - if ($this->subArrMB['s'][$char]) { $repl[] = $this->subArrMB['s'][$char]; } - else { break; } - } - } - if ($ftype=='C') { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$patt = mb_substr($writehtml_e, $start, count($repl)); - $patt = api_substr($writehtml_e, $start, count($repl)); - // - if (preg_match("/(.*?)(".preg_quote($patt,'/').")(.*)/u", $writehtml_e, $m)) { - $writehtml_e = $m[1]; - array_splice($writehtml_a, $writehtml_i+1, 0, array($font, implode('|', $repl), '/'.$font, $m[3])); // e.g. - $this->subPos = $writehtml_i+3; - return 4; - } - return 0; - } - // ELSE FIND IN DEFAULT FONT - if (strtolower($this->CurrentFont['name']) != $this->default_font) { $font = $this->default_font; } - - else { unset($cw); return 0; } - - if (isset($this->fonts[$font])) { $cw = &$this->fonts[$font]['cw']; } - else { @include(_MPDF_PATH.'unifont/'.$font.'.php'); } - if (!$cw) { return 0; } - $l = 0; - foreach($u AS $char) { - if ($char == 173 || isset($cw[$char]) || (isset($this->chrs[$char]) && isset($cw[$this->chrs[$char]])) || - ($char>1422 && $char<3584) || $char > 11262) { - $l++; - } - else { break; } - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$patt = mb_substr($writehtml_e, $start, $l); - $patt = api_substr($writehtml_e, $start, $l); - // - if (preg_match("/(.*?)(".preg_quote($patt,'/').")(.*)/u", $writehtml_e, $m)) { - $writehtml_e = $m[1]; - array_splice($writehtml_a, $writehtml_i+1, 0, array('span style="font-family: '.$font.'"', $m[2], '/span', $m[3])); - $this->subPos = $writehtml_i+3; - return 4; - } - return 0; -} -/*-- END UNICODE-FONTS --*/ - -function setHiEntitySubstitutions() { - $entarr = array ( - 'nbsp' => '160', 'iexcl' => '161', 'cent' => '162', 'pound' => '163', 'curren' => '164', 'yen' => '165', 'brvbar' => '166', 'sect' => '167', - 'uml' => '168', 'copy' => '169', 'ordf' => '170', 'laquo' => '171', 'not' => '172', 'shy' => '173', 'reg' => '174', 'macr' => '175', - 'deg' => '176', 'plusmn' => '177', 'sup2' => '178', 'sup3' => '179', 'acute' => '180', 'micro' => '181', 'para' => '182', 'middot' => '183', - 'cedil' => '184', 'sup1' => '185', 'ordm' => '186', 'raquo' => '187', 'frac14' => '188', 'frac12' => '189', 'frac34' => '190', - 'iquest' => '191', 'Agrave' => '192', 'Aacute' => '193', 'Acirc' => '194', 'Atilde' => '195', 'Auml' => '196', 'Aring' => '197', - 'AElig' => '198', 'Ccedil' => '199', 'Egrave' => '200', 'Eacute' => '201', 'Ecirc' => '202', 'Euml' => '203', 'Igrave' => '204', - 'Iacute' => '205', 'Icirc' => '206', 'Iuml' => '207', 'ETH' => '208', 'Ntilde' => '209', 'Ograve' => '210', 'Oacute' => '211', - 'Ocirc' => '212', 'Otilde' => '213', 'Ouml' => '214', 'times' => '215', 'Oslash' => '216', 'Ugrave' => '217', 'Uacute' => '218', - 'Ucirc' => '219', 'Uuml' => '220', 'Yacute' => '221', 'THORN' => '222', 'szlig' => '223', 'agrave' => '224', 'aacute' => '225', - 'acirc' => '226', 'atilde' => '227', 'auml' => '228', 'aring' => '229', 'aelig' => '230', 'ccedil' => '231', 'egrave' => '232', - 'eacute' => '233', 'ecirc' => '234', 'euml' => '235', 'igrave' => '236', 'iacute' => '237', 'icirc' => '238', 'iuml' => '239', - 'eth' => '240', 'ntilde' => '241', 'ograve' => '242', 'oacute' => '243', 'ocirc' => '244', 'otilde' => '245', 'ouml' => '246', - 'divide' => '247', 'oslash' => '248', 'ugrave' => '249', 'uacute' => '250', 'ucirc' => '251', 'uuml' => '252', 'yacute' => '253', - 'thorn' => '254', 'yuml' => '255', 'OElig' => '338', 'oelig' => '339', 'Scaron' => '352', 'scaron' => '353', 'Yuml' => '376', - 'fnof' => '402', 'circ' => '710', 'tilde' => '732', 'Alpha' => '913', 'Beta' => '914', 'Gamma' => '915', 'Delta' => '916', - 'Epsilon' => '917', 'Zeta' => '918', 'Eta' => '919', 'Theta' => '920', 'Iota' => '921', 'Kappa' => '922', 'Lambda' => '923', - 'Mu' => '924', 'Nu' => '925', 'Xi' => '926', 'Omicron' => '927', 'Pi' => '928', 'Rho' => '929', 'Sigma' => '931', 'Tau' => '932', - 'Upsilon' => '933', 'Phi' => '934', 'Chi' => '935', 'Psi' => '936', 'Omega' => '937', 'alpha' => '945', 'beta' => '946', 'gamma' => '947', - 'delta' => '948', 'epsilon' => '949', 'zeta' => '950', 'eta' => '951', 'theta' => '952', 'iota' => '953', 'kappa' => '954', - 'lambda' => '955', 'mu' => '956', 'nu' => '957', 'xi' => '958', 'omicron' => '959', 'pi' => '960', 'rho' => '961', 'sigmaf' => '962', - 'sigma' => '963', 'tau' => '964', 'upsilon' => '965', 'phi' => '966', 'chi' => '967', 'psi' => '968', 'omega' => '969', - 'thetasym' => '977', 'upsih' => '978', 'piv' => '982', 'ensp' => '8194', 'emsp' => '8195', 'thinsp' => '8201', 'zwnj' => '8204', - 'zwj' => '8205', 'lrm' => '8206', 'rlm' => '8207', 'ndash' => '8211', 'mdash' => '8212', 'lsquo' => '8216', 'rsquo' => '8217', - 'sbquo' => '8218', 'ldquo' => '8220', 'rdquo' => '8221', 'bdquo' => '8222', 'dagger' => '8224', 'Dagger' => '8225', 'bull' => '8226', - 'hellip' => '8230', 'permil' => '8240', 'prime' => '8242', 'Prime' => '8243', 'lsaquo' => '8249', 'rsaquo' => '8250', 'oline' => '8254', - 'frasl' => '8260', 'euro' => '8364', 'image' => '8465', 'weierp' => '8472', 'real' => '8476', 'trade' => '8482', 'alefsym' => '8501', - 'larr' => '8592', 'uarr' => '8593', 'rarr' => '8594', 'darr' => '8595', 'harr' => '8596', 'crarr' => '8629', 'lArr' => '8656', - 'uArr' => '8657', 'rArr' => '8658', 'dArr' => '8659', 'hArr' => '8660', 'forall' => '8704', 'part' => '8706', 'exist' => '8707', - 'empty' => '8709', 'nabla' => '8711', 'isin' => '8712', 'notin' => '8713', 'ni' => '8715', 'prod' => '8719', 'sum' => '8721', - 'minus' => '8722', 'lowast' => '8727', 'radic' => '8730', 'prop' => '8733', 'infin' => '8734', 'ang' => '8736', 'and' => '8743', - 'or' => '8744', 'cap' => '8745', 'cup' => '8746', 'int' => '8747', 'there4' => '8756', 'sim' => '8764', 'cong' => '8773', - 'asymp' => '8776', 'ne' => '8800', 'equiv' => '8801', 'le' => '8804', 'ge' => '8805', 'sub' => '8834', 'sup' => '8835', 'nsub' => '8836', - 'sube' => '8838', 'supe' => '8839', 'oplus' => '8853', 'otimes' => '8855', 'perp' => '8869', 'sdot' => '8901', 'lceil' => '8968', - 'rceil' => '8969', 'lfloor' => '8970', 'rfloor' => '8971', 'lang' => '9001', 'rang' => '9002', 'loz' => '9674', 'spades' => '9824', - 'clubs' => '9827', 'hearts' => '9829', 'diams' => '9830', - ); - foreach($entarr AS $key => $val) { - $this->entsearch[] = '&'.$key.';'; - $this->entsubstitute[] = code2utf($val); - } -} - -function SubstituteHiEntities($html) { - // converts html_entities > ASCII 127 to unicode (defined in includes/pdf/config.php - // Leaves in particular < to distinguish from tag marker - if (count($this->entsearch)) { - $html = str_replace($this->entsearch,$this->entsubstitute,$html); - } - return $html; -} - - -// Edited v1.2 Pass by reference; option to continue if invalid UTF-8 chars -function is_utf8(&$string) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($string === mb_convert_encoding(mb_convert_encoding($string, "UTF-32", "UTF-8"), "UTF-8", "UTF-32")) { - if ($string === api_convert_encoding(api_convert_encoding($string, "UTF-32", "UTF-8"), "UTF-8", "UTF-32")) { - // - return true; - } - else { - if ($this->ignore_invalid_utf8) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$string = mb_convert_encoding(mb_convert_encoding($string, "UTF-32", "UTF-8"), "UTF-8", "UTF-32") ; - $string = api_convert_encoding(api_convert_encoding($string, "UTF-32", "UTF-8"), "UTF-8", "UTF-32") ; - // - return true; - } - else { - return false; - } - } -} - - -function purify_utf8($html,$lo=true) { - // For HTML - // Checks string is valid UTF-8 encoded - // converts html_entities > ASCII 127 to UTF-8 - // Only exception - leaves low ASCII entities e.g. < & etc. - // Leaves in particular < to distinguish from tag marker - if (!$this->is_utf8($html)) { $this->Error("HTML contains invalid UTF-8 character(s)"); } - $html = preg_replace("/\r/", "", $html ); - - // converts html_entities > ASCII 127 to UTF-8 - // Leaves in particular < to distinguish from tag marker - $html = $this->SubstituteHiEntities($html); - - // converts all &#nnn; or &#xHHH; to UTF-8 multibyte - // If $lo==true then includes ASCII < 128 - $html = strcode2utf($html,$lo); - -/*-- CJK --*/ - // NON-BREAKING SPACE - convert to space as doesn't exist in CJK codepages (except japanese SJIS) - if ($this->isCJK) { - $html = preg_replace("/\xc2\xa0/"," ",$html); // non-breaking space - } -/*-- END CJK --*/ - - return ($html); -} - -function purify_utf8_text($txt) { - // For TEXT - // Make sure UTF-8 string of characters - if (!$this->is_utf8($txt)) { $this->Error("Text contains invalid UTF-8 character(s)"); } - - $txt = preg_replace("/\r/", "", $txt ); - -/*-- CJK --*/ - // NON-BREAKING SPACE - convert to space as doesn't exist in CJK codepages - if ($this->isCJK) { - $txt = preg_replace("/\xc2\xa0/"," ",$txt); // non-breaking space - } -/*-- END CJK --*/ - - return ($txt); -} -function all_entities_to_utf8($txt) { - // converts txt_entities > ASCII 127 to UTF-8 - // Leaves in particular < to distinguish from tag marker - $txt = $this->SubstituteHiEntities($txt); - - // converts all &#nnn; or &#xHHH; to UTF-8 multibyte - $txt = strcode2utf($txt); - - - $txt = $this->lesser_entity_decode($txt); - return ($txt); -} - - - -// ==================================================== -/*-- BARCODES --*/ -// UPC/EAN barcode -// EAN13, EAN8, UPCA, UPCE, ISBN, ISSN -// Accepts 12 or 13 digits with or without - hyphens -function WriteBarcode($code, $showtext=1, $x='', $y='', $size=1, $border=0, $paddingL=1, $paddingR=1, $paddingT=2, $paddingB=2, $height=1, $bgcol=false, $col=false, $btype='ISBN', $supplement='0', $supplement_code='', $k=1) { - if (empty($code)) { - return; - } - $codestr = $code; - $code = preg_replace('/\-/','',$code); - - if (!class_exists('PDFBarcode')) { - include(_MPDF_PATH.'classes/barcode.php'); - $this->barcode = new PDFBarcode(); - } - if ($btype == 'ISSN' || $btype == 'ISBN') { - $arrcode = $this->barcode->getBarcodeArray($code, 'EAN13'); - } - else { $arrcode = $this->barcode->getBarcodeArray($code, $btype); } - - if ($arrcode === false) { $this->Error('Error in barcode string: '.$codestr); } - if((($btype=='EAN13' || $btype=='ISBN' || $btype=='ISSN') && strlen($code) == 12) || ($btype=='UPCA' && strlen($code) == 11) - || ($btype=='UPCE' && strlen($code) == 11) || ($btype=='EAN8' && strlen($code) == 7)) { - $code .= $arrcode['checkdigit']; - if (stristr($codestr,'-')) { $codestr .= '-' . $arrcode['checkdigit']; } - else { $codestr .= $arrcode['checkdigit']; } - } - if ($btype == 'ISBN') { $codestr = 'ISBN '.$codestr; } - if ($btype == 'ISSN') { $codestr = 'ISSN '.$codestr; } - - if (empty($x)) { - $x = $this->GetX(); - } - if (empty($y)) { - $y = $this->GetY(); - } - // set foreground color - $prevDrawColor = $this->DrawColor; - $prevTextColor = $this->TextColor; - $prevFillColor = $this->FillColor; - $lw = $this->LineWidth; - $this->SetLineWidth(0.01); - - $size /= $k; // in case resized in a table - - $xres = $arrcode['nom-X'] * $size; - $llm = $arrcode['lightmL'] * $arrcode['nom-X'] * $size; // Left Light margin - $rlm = $arrcode['lightmR'] * $arrcode['nom-X'] * $size; // Right Light margin - - $bcw = ($arrcode["maxw"] * $xres); // Barcode width = Should always be 31.35mm * $size - - $fbw = $bcw + $llm + $rlm; // Full barcode width incl. light margins - $ow = $fbw + $paddingL + $paddingR; // Full overall width incl. user-defined padding - - $fbwi = $fbw - 2; // Full barcode width incl. light margins - 2mm - for isbn string - - // cf. http://www.gs1uk.org/downloads/bar_code/Bar coding getting it right.pdf - $num_height = 3 * $size; // Height of numerals - $fbh = $arrcode['nom-H'] * $size * $height; // Full barcode height incl. numerals - $bch = $fbh - (1.5 * $size); // Barcode height of bars (3mm for numerals) - - if (($btype=='EAN13' && $showtext) || $btype == 'ISSN' || $btype == 'ISBN') { // Add height for ISBN string + margin from top of bars - $tisbnm = 1.5 * $size; // Top margin between isbn (if shown) & bars - $codestr_fontsize = 2.1 * $size; - $paddingT += $codestr_fontsize + $tisbnm ; - } - $oh = $fbh + $paddingT + $paddingB; // Full overall height incl. user-defined padding - - // PRINT border background color - $xpos = $x; - $ypos = $y; - if (is_array($col)) { // from - $this->SetDrawColor($col['R'],$col['G'],$col['B']); - $this->SetTextColor($col['R'],$col['G'],$col['B']); - } - else { - $this->SetDrawColor(0); - $this->SetTextColor(0); - } - if (is_array($bgcol)) { // from - $this->SetFillColor($bgcol['R'],$bgcol['G'],$bgcol['B']); - } - else { $this->SetFillColor(255); } - if (!$bgcol && !$col) { // fn. called directly - not via HTML - if ($border) { $fillb = 'DF'; } else { $fillb = 'F'; } - $this->Rect($xpos, $ypos, $ow, $oh, $fillb); - } - - - // PRINT BARS - $xpos = $x + $paddingL + $llm ; - $ypos = $y + $paddingT; - if (is_array($col)) { $this->SetFillColor($col['R'],$col['G'],$col['B']); } - else { $this->SetFillColor(0); } - if ($arrcode !== false) { - foreach ($arrcode["bcode"] AS $v) { - $bw = ($v["w"] * $xres); - if ($v["t"]) { - // draw a vertical bar - $this->Rect($xpos, $ypos, $bw, $bch, 'F'); - } - $xpos += $bw; - } - } - - - // print text - $prevFontFamily = $this->FontFamily; - $prevFontStyle = $this->FontStyle; - $prevFontSizePt = $this->FontSizePt; - - // ISBN string - if (($btype=='EAN13' && $showtext) || $btype=='ISBN' || $btype=='ISSN') { - // mPDF 4.2.018 - if ($this->PDFA) { - if (!$this->PDFAauto) { $this->PDFAwarnings[] = "Core Adobe font Helvetica cannot be embedded in mPDF - used in barcode - which is required for PDFA1-b. (Embedded font will be substituted.)"; } - $this->SetFont('sans'); - } - else { - $this->SetFont('helvetica'); - } - // mPDF 4.0 - if (is_array($bgcol)) { $this->SetFillColor($bgcol['R'],$bgcol['G'],$bgcol['B']); } - else { $this->SetFillColor(255); } - $this->x = $x + $paddingL + 1; // 1mm left margin (cf. $fbwi above) - // max width is $fbwi - $loop = 0; - while ( $loop == 0 ) { - $this->SetFontSize($codestr_fontsize*1.4*$this->k, false); // don't write - $sz = $this->GetStringWidth( $codestr ); - if ($sz > $fbwi) - $codestr_fontsize -= 0.1; - else - $loop ++; - } - $this->SetFont('','',$codestr_fontsize*1.4*$this->k, true, true); // * 1.4 because font height is only 7/10 of given mm - // WORD SPACING - if ($fbwi > $sz) { - $xtra = $fbwi - $sz; - $charspacing = $xtra / (strlen($codestr)-1); - if ($charspacing) { $this->_out(sprintf('BT %.3f Tc ET',$charspacing*$this->k)); } - } - $this->y = $y + $paddingT - ($codestr_fontsize ) - $tisbnm ; - $this->Cell($fbw , $codestr_fontsize, $codestr); - if ($charspacing) { $this->_out('BT 0 Tc ET'); } - } - - - // Bottom NUMERALS -/*-- UNICODE-FONTS --*/ - if ($this->is_MB) { - if (in_array('ocrb',$this->available_unifonts)) { $this->SetFont('ocrb'); } - else { $this->SetFont('mono'); } - } - else { -/*-- END UNICODE-FONTS --*/ - if (in_array('ocrb',$this->available_fonts)) { $this->SetFont('ocrb'); } - else { $this->SetFont('mono'); } - } // *UNICODE-FONTS* - if (isset($this->CurrentFont['desc']['Ascent']) && $this->CurrentFont['desc']['Ascent']) { $fh = 1000/$this->CurrentFont['desc']['Ascent']; } - else { $fh = 1.4; } - - $charRO = ''; - if ($btype=='EAN13' || $btype=='ISBN' || $btype=='ISSN') { - $outerfontsize = 3; // Inner fontsize = 3 - $outerp = $xres * 4; - $innerp = $xres * 2.5; - $textw = ($bcw*0.5) - $outerp - $innerp; - $chars = 6; // number of numerals in each half - $charLO = substr($code,0,1); // Left Outer - $charLI = substr($code,1,6); // Left Inner - $charRI = substr($code,7,6); // Right Inner - if (!$supplement) $charRO = '>'; // Right Outer - } - else if ($btype=='UPCA') { - $outerfontsize = 2.3; // Inner fontsize = 3 - $outerp = $xres * 10; - $innerp = $xres * 2.5; - $textw = ($bcw*0.5) - $outerp - $innerp; - $chars = 5; - $charLO = substr($code,0,1); // Left Outer - $charLI = substr($code,1,5); // Left Inner - $charRI = substr($code,6,5); // Right Inner - $charRO = substr($code,11,1); // Right Outer - } - else if ($btype=='UPCE') { - $outerfontsize = 2.3; // Inner fontsize = 3 - $outerp = $xres * 4; - $innerp = 0; - $textw = ($bcw*0.5) - $outerp - $innerp; - $chars = 3; - $upce_code = $arrcode['code']; - $charLO = substr($code,0,1); // Left Outer - $charLI = substr($upce_code,0,3); // Left Inner - $charRI = substr($upce_code,3,3); // Right Inner - $charRO = substr($code,11,1); // Right Outer - } - else if ($btype=='EAN8') { - $outerfontsize = 3; // Inner fontsize = 3 - $outerp = $xres * 4; - $innerp = $xres * 2.5; - $textw = ($bcw*0.5) - $outerp - $innerp; - $chars = 4; - $charLO = '<'; // Left Outer - $charLI = substr($code,0,4); // Left Inner - $charRI = substr($code,4,4); // Right Inner - if (!$supplement) $charRO = '>'; // Right Outer - } - - $this->SetFontSize(($outerfontsize/3)*3*$fh*$size*$this->k); // 3mm numerals (FontSize is larger to account for space above/below characters) - - if ($this->is_MB) { $cw = $this->CurrentFont['cw'][32]*3*$fh*$size/1000; } // character width at 3mm - else { $cw = $this->CurrentFont['cw']['0']*$this->FontSize/1000; } // - - // Outer left character - $y_text = $y + $paddingT + $bch - ($num_height/2); - $y_text_outer = $y + $paddingT + $bch - ($num_height*($outerfontsize/3)/2); - - $this->x = $x + $paddingL - ($cw*($outerfontsize/3)*0.1); // 0.1 is correction as char does not fill full width; - $this->y = $y_text_outer; - $this->Cell($cw, $num_height, $charLO ); - - // WORD SPACING for inner chars - $xtra = $textw - ($cw*$chars); - $charspacing = $xtra / ($chars-1); - if ($charspacing) { $this->_out(sprintf('BT %.3f Tc ET',$charspacing*$this->k)); } - - if (is_array($bgcol)) { $this->SetFillColor($bgcol['R'],$bgcol['G'],$bgcol['B']); } - else { $this->SetFillColor(255); } - - $this->SetFontSize(3*$fh*$size*$this->k); // 3mm numerals (FontSize is larger to account for space above/below characters) - - // Inner left half characters - $this->x = $x + $paddingL + $llm + $outerp; - $this->y = $y_text; - $this->Cell($textw, $num_height, $charLI , 0, 0, '', 1); - - // Inner right half characters - $this->x = $x + $paddingL + $llm + ($bcw*0.5) + $innerp; - $this->y = $y_text; - $this->Cell($textw, $num_height, $charRI , 0, 0, '', 1); - - if ($charspacing) { $this->_out('BT 0 Tc ET'); } - - // Outer Right character - $this->SetFontSize(($outerfontsize/3)*3*$fh*$size*$this->k); // 3mm numerals (FontSize is larger to account for space above/below characters) - - $this->x = $x + $paddingL + $llm + $bcw + $rlm - ($cw*($outerfontsize/3)*0.9); // 0.9 is correction as char does not fill full width - $this->y = $y_text_outer; - $this->Cell($cw*($outerfontsize/3), $num_height, $charRO , 0, 0, 'R'); - - if ($supplement) { // EAN-2 or -5 Supplement - // PRINT BARS - $supparrcode = $this->barcode->getBarcodeArray($supplement_code, 'EAN'.$supplement); - if ($supparrcode === false) { $this->Error('Error in barcode string (supplement): '.$codestr.' '.$supplement_code); } - if(strlen($supplement_code) != $supplement) { - $this->Error('Barcode supplement incorrect: '.$supplement_code); - } - $llm = $fbw - (($arrcode['lightmR'] - $supparrcode['sepM']) * $arrcode['nom-X'] * $size); // Left Light margin - $rlm = $arrcode['lightmR'] * $arrcode['nom-X'] * $size; // Right Light margin - - $bcw = ($supparrcode["maxw"] * $xres); // Barcode width = Should always be 31.35mm * $size - - $fbw = $bcw + $llm + $rlm; // Full barcode width incl. light margins - $ow = $fbw + $paddingL + $paddingR; // Full overall width incl. user-defined padding - $bch = $fbh - (1.5 * $size) - ($num_height + 0.5); // Barcode height of bars (3mm for numerals) - - $xpos = $x + $paddingL + $llm ; - $ypos = $y + $paddingT + $num_height + 0.5; - if (is_array($col)) { $this->SetFillColor($col['R'],$col['G'],$col['B']); } - else { $this->SetFillColor(0); } - if ($supparrcode !== false) { - foreach ($supparrcode["bcode"] AS $v) { - $bw = ($v["w"] * $xres); - if ($v["t"]) { - // draw a vertical bar - $this->Rect($xpos, $ypos, $bw, $bch, 'F'); - } - $xpos += $bw; - } - } - - // Characters - if (is_array($bgcol)) { $this->SetFillColor($bgcol['R'],$bgcol['G'],$bgcol['B']); } - else { $this->SetFillColor(255); } - $this->SetFontSize(3*$fh*$size*$this->k); // 3mm numerals (FontSize is larger to account for space above/below characters) - $this->x = $x + $paddingL + $llm; - $this->y = $y + $paddingT; - $this->Cell($bcw, $num_height, $supplement_code, 0, 0, 'C'); - - // Outer Right character (light margin) - $this->SetFontSize(($outerfontsize/3)*3*$fh*$size*$this->k); // 3mm numerals (FontSize is larger to account for space above/below characters) - $this->x = $x + $paddingL + $llm + $bcw + $rlm - ($cw*0.9); // 0.9 is correction as char does not fill full width - $this->y = $y + $paddingT; - $this->Cell($cw*($outerfontsize/3), $num_height, '>', 0, 0, 'R'); - } - - - - // Restore ************** - $this->SetFont($prevFontFamily, $prevFontStyle, $prevFontSizePt); - $this->DrawColor = $prevDrawColor; - $this->TextColor = $prevTextColor; - $this->FillColor = $prevFillColor; - $this->SetLineWidth($lw); - $this->SetY($y); -} - - - -// ==================================================== -// POSTAL and OTHER barcodes -function WriteBarcode2($code, $x='', $y='', $size=1, $height=1, $bgcol=false, $col=false, $btype='IMB', $print_ratio='', $k=1) { - if (empty($code)) { return; } - if (!class_exists('PDFBarcode')) { - include(_MPDF_PATH.'classes/barcode.php'); - $this->barcode = new PDFBarcode(); - } - $arrcode = $this->barcode->getBarcodeArray($code, $btype, $print_ratio); - - if ($arrcode === false) { $this->Error('Error in barcode string: '.$code); } - if (empty($x)) { $x = $this->GetX(); } - if (empty($y)) { $y = $this->GetY(); } - $prevDrawColor = $this->DrawColor; - $prevTextColor = $this->TextColor; - $prevFillColor = $this->FillColor; - $lw = $this->LineWidth; - $this->SetLineWidth(0.01); - $size /= $k; // in case resized in a table - $xres = $arrcode['nom-X'] * $size; - - if ($btype == 'IMB' || $btype == 'RM4SCC' || $btype == 'KIX' || $btype == 'POSTNET' || $btype == 'PLANET') { - $llm = $arrcode['quietL'] / $k; // Left Quiet margin - $rlm = $arrcode['quietR'] / $k; // Right Quiet margin - $tlm = $blm = $arrcode['quietTB'] / $k; - $height=1; // Overrides - } - else if (in_array($btype, array('C128A','C128B','C128C','EAN128A','EAN128B','EAN128C','C39','C39+','C39E','C39E+','S25','S25+','I25','I25+','I25B','I25B+','C93','MSI','MSI+','CODABAR','CODE11'))) { - $llm = $arrcode['lightmL'] * $xres; // Left Quiet margin - $rlm = $arrcode['lightmR'] * $xres; // Right Quiet margin - $tlm = $blm = $arrcode['lightTB'] * $xres * $height; - } - - - $bcw = ($arrcode["maxw"] * $xres); - $fbw = $bcw + $llm + $rlm; // Full barcode width incl. light margins - - $bch = ($arrcode["nom-H"] * $size * $height); - $fbh = $bch + $tlm + $blm; // Full barcode height - - // PRINT border background color - $xpos = $x; - $ypos = $y; - if (is_array($col)) { // from - $this->SetDrawColor($col['R'],$col['G'],$col['B']); - $this->SetTextColor($col['R'],$col['G'],$col['B']); - } - else { - $this->SetDrawColor(0); - $this->SetTextColor(0); - } - if (is_array($bgcol)) { // from - $this->SetFillColor($bgcol['R'],$bgcol['G'],$bgcol['B']); - } - else { $this->SetFillColor(255); } - - // PRINT BARS - if (is_array($col)) { $this->SetFillColor($col['R'],$col['G'],$col['B']); } - else { $this->SetFillColor(0); } - $xpos = $x + $llm ; - - if ($arrcode !== false) { - foreach ($arrcode["bcode"] AS $v) { - $bw = ($v["w"] * $xres); - if ($v["t"]) { - $ypos = $y + $tlm + ($bch * $v['p'] / $arrcode['maxh']); - $this->Rect($xpos, $ypos, $bw, ($v['h'] * $bch / $arrcode['maxh']), 'F'); - } - $xpos += $bw; - } - } - - // PRINT BEARER BARS - if ($btype == 'I25B' || $btype == 'I25B+') { - $this->Rect($x, $y, $fbw, ($arrcode['lightTB'] * $xres * $height), 'F'); - $this->Rect($x, $y+$tlm+$bch, $fbw, ($arrcode['lightTB'] * $xres * $height), 'F'); - } - - // Restore ************** - $this->SetFont($prevFontFamily, $prevFontStyle, $prevFontSizePt); - $this->DrawColor = $prevDrawColor; - $this->TextColor = $prevTextColor; - $this->FillColor = $prevFillColor; - $this->SetLineWidth($lw); - $this->SetY($y); -} - -/*-- END BARCODES --*/ - -// ==================================================== -// ==================================================== - - // START TRANSFORMATIONS SECTION ----------------------- - // authors: Moritz Wagner, Andreas Wurmser, Nicola Asuni - // From TCPDF - // Starts a 2D tranformation saving current graphic state. - function StartTransform($returnstring=false) { - if ($returnstring) { return('q'); } - else { $this->_out('q'); } - } - - function StopTransform($returnstring=false) { - if ($returnstring) { return('Q'); } - else { $this->_out('Q'); } - } - - // Vertical and horizontal non-proportional Scaling. - function transformScale($s_x, $s_y, $x='', $y='', $returnstring=false) { - if ($x === '') { - $x=$this->x; - } - if ($y === '') { - $y=$this->y; - } - if (($s_x == 0) OR ($s_y == 0)) { - $this->Error('Please do not use values equal to zero for scaling'); - } - $y = ($this->h - $y) * $this->k; - $x *= $this->k; - //calculate elements of transformation matrix - $s_x /= 100; - $s_y /= 100; - $tm[0] = $s_x; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = $s_y; - $tm[4] = $x * (1 - $s_x); - $tm[5] = $y * (1 - $s_y); - //scale the coordinate system - if ($returnstring) { return($this->_transform($tm, true)); } - else { $this->_transform($tm); } - } - - - // Translate graphic object horizontally and vertically. - function transformTranslate($t_x, $t_y, $returnstring=false) { - //calculate elements of transformation matrix - $tm[0] = 1; - $tm[1] = 0; - $tm[2] = 0; - $tm[3] = 1; - $tm[4] = $t_x * $this->k; - $tm[5] = -$t_y * $this->k; - //translate the coordinate system - if ($returnstring) { return($this->_transform($tm, true)); } - else { $this->_transform($tm); } - } - - // Rotate object. - function transformRotate($angle, $x='', $y='', $returnstring=false) { - if ($x === '') { - $x=$this->x; - } - if ($y === '') { - $y=$this->y; - } - $angle = -$angle; - $y = ($this->h - $y) * $this->k; - $x *= $this->k; - //calculate elements of transformation matrix - $tm[0] = cos(deg2rad($angle)); - $tm[1] = sin(deg2rad($angle)); - $tm[2] = -$tm[1]; - $tm[3] = $tm[0]; - $tm[4] = $x + $tm[1] * $y - $tm[0] * $x; - $tm[5] = $y - $tm[0] * $y - $tm[1] * $x; - //rotate the coordinate system around ($x,$y) - if ($returnstring) { return($this->_transform($tm, true)); } - else { $this->_transform($tm); } - } - - - function _transform($tm, $returnstring=false) { - if ($returnstring) { return(sprintf('%.3f %.3f %.3f %.3f %.3f %.3f cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5])); } - else { $this->_out(sprintf('%.3f %.3f %.3f %.3f %.3f %.3f cm', $tm[0], $tm[1], $tm[2], $tm[3], $tm[4], $tm[5])); } - } - - // END TRANSFORMATIONS SECTION ------------------------- - - - -/*-- INDIC --*/ -// INDIC ============================ -// mPDF 4.0 Font-specific ligature substitution for Indic fonts -// This conversion can only be done when font is set -function ConvertIndic(&$str) { - if (preg_match('/^ind_([a-z]{2})_/',strtolower($this->CurrentFont['name']), $m)) { - if (!class_exists('indic')) { include(_MPDF_PATH.'classes/indic.php'); } - if (empty($this->indic)) { $this->indic = new indic($this); } - $earr = $this->UTF8StringToArray($str); - $str = $this->indic->substituteIndic($earr, $m[1], strtolower($this->CurrentFont['name']), $this->useSubsets); - } -} -/*-- END INDIC --*/ - -// AUTOFONT ========================= -function AutoFont($html) { - if ( !$this->is_MB ) { return $html; } - $this->useLang = true; - if ($this->autoFontGroupSize == 1) { $extra = $this->pregASCIIchars1; } - else if ($this->autoFontGroupSize == 3) { $extra = $this->pregASCIIchars3; } - else { $extra = $this->pregASCIIchars2; } - $n = ''; - $a=preg_split('/<(.*?)>/ms',$html,-1,PREG_SPLIT_DELIM_CAPTURE); - foreach($a as $i => $e) { - if($i%2==0) { - // mPDF 3.0 - $e = strcode2utf($e); - $e = $this->lesser_entity_decode($e); - - // mPDF 4.0 Use U=FFF0 and U+FFF1 to mark start and end of span tags to prevent nesting occurring - // "\xef\xbf\xb0" ##lthtmltag## "\xef\xbf\xb1" ##gthtmltag## - -/*-- CJK --*/ - // CJK - if ($this->autoFontGroups & AUTOFONT_CJK) { - $e = preg_replace("/([".$this->pregCJKchars.$extra."]*[".$this->pregCJKchars."][".$this->pregCJKchars.$extra."]*)/ue", '$this->replaceCJK(stripslashes(\'\\1\'))', $e); - } -/*-- END CJK --*/ - -/*-- RTL --*/ - if ($this->autoFontGroups & AUTOFONT_RTL) { - // HEBREW - $e = preg_replace("/([".$this->pregHEBchars .$extra."]*[".$this->pregHEBchars ."][".$this->pregHEBchars .$extra."]*)/u", "\xef\xbf\xb0span lang=\"he\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // All Arabic - $e = preg_replace("/([".$this->pregARABICchars .$extra."]*[".$this->pregARABICchars ."][".$this->pregARABICchars .$extra."]*)/ue", '$this->replaceArabic(stripslashes(\'\\1\'))', $e); - } -/*-- END RTL --*/ - -/*-- INDIC --*/ - // INDIC - if ($this->autoFontGroups & AUTOFONT_INDIC) { - // mPDF 4.0 - // Bengali - $e = preg_replace("/([".$this->pregBNchars .$this->pregINDextra."]*[".$this->pregBNchars ."][".$this->pregBNchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"bn\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Devanagari (= script for Hindi, Nepali + Sindhi) - $e = preg_replace("/([".$this->pregHIchars .$this->pregINDextra."]*[".$this->pregHIchars ."][".$this->pregHIchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"hi\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Gujarati - $e = preg_replace("/([".$this->pregGUchars .$this->pregINDextra."]*[".$this->pregGUchars ."][".$this->pregGUchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"gu\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Malayalam - $e = preg_replace("/([".$this->pregMLchars .$this->pregINDextra."]*[".$this->pregMLchars ."][".$this->pregMLchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"ml\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Kannada - $e = preg_replace("/([".$this->pregKNchars .$this->pregINDextra."]*[".$this->pregKNchars ."][".$this->pregKNchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"kn\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Oriya - $e = preg_replace("/([".$this->pregORchars .$this->pregINDextra."]*[".$this->pregORchars ."][".$this->pregORchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"or\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Punjabi ?= Gurmuhki - $e = preg_replace("/([".$this->pregPAchars .$this->pregINDextra."]*[".$this->pregPAchars ."][".$this->pregPAchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"pa\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Tamil - $e = preg_replace("/([".$this->pregTAchars .$this->pregINDextra."]*[".$this->pregTAchars ."][".$this->pregTAchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"ta\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Telugu - $e = preg_replace("/([".$this->pregTEchars .$this->pregINDextra."]*[".$this->pregTEchars ."][".$this->pregTEchars .$this->pregINDextra."]*)/u", "\xef\xbf\xb0span lang=\"te\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - } -/*-- END INDIC --*/ - - - // mPDF 4.0 Moved so Vietnamese detection better - if ($this->autoFontGroups & AUTOFONT_THAIVIET) { - // THAI - $e = preg_replace("/([\x{0E00}-\x{0E7F}".$extra."]*[\x{0E00}-\x{0E7F}][\x{0E00}-\x{0E7F}".$extra."]*)/u", "\xef\xbf\xb0span lang=\"th\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - // Vietnamese - $e = preg_replace("/([".$this->pregVIETchars .$this->pregVIETPluschars ."]*[".$this->pregVIETchars ."][".$this->pregVIETchars .$this->pregVIETPluschars ."]*)/u", "\xef\xbf\xb0span lang=\"vi\"\xef\xbf\xb1\\1\xef\xbf\xb0/span\xef\xbf\xb1", $e); - } - - // mPDF 3.0 - $e = preg_replace('/[&]/','&',$e); // mPDF 4.4.012 - $e = preg_replace('/[<]/','<',$e); // mPDF 4.4.012 - $e = preg_replace('/[>]/','>',$e); // mPDF 4.4.012 - // mPDF 4.0 - $e = preg_replace("/(\xef\xbf\xb0span lang=\"([a-z\-A-Z]{2,5})\"\xef\xbf\xb1)\s+/",' \\1',$e); - $e = preg_replace("/[ ]+(\xef\xbf\xb0\/span\xef\xbf\xb1)/",'\\1 ',$e); // mPDF 4.3.012C - - $e = preg_replace("/\xef\xbf\xb0span lang=\"([a-z\-A-Z]{2,5})\"\xef\xbf\xb1/","\xef\xbf\xb0span lang=\"\\1\" class=\"lang_\\1\"\xef\xbf\xb1",$e); - - $e = preg_replace("/\xef\xbf\xb0/",'<',$e); - $e = preg_replace("/\xef\xbf\xb1/",'>',$e); - - $a[$i] = $e; - } - else { - $a[$i] = '<'.$e.'>'; - } - } - $n = implode('',$a); - return $n; -} - - -/*-- CJK --*/ -function replaceCJK($str) { - // mPDF 4.0 Use U=FFF0 and U+FFF1 to mark start and end of span tags to prevent nesting occurring - // "\xef\xbf\xb0" ##lthtmltag## "\xef\xbf\xb1" ##gthtmltag## - if (preg_match("/[".$this->pregUHCchars."]/u", $str)) { - return "\xef\xbf\xb0span lang=\"ko\"\xef\xbf\xb1" . $str ."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - else if (preg_match("/[".$this->pregSJISchars."]/u", $str)) { - return "\xef\xbf\xb0span lang=\"ja\"\xef\xbf\xb1" . $str ."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - // mPDF 3.0 if in Unicode Plane 2, probably HKCS (incl in BIG5) if not Japanese - else if (preg_match("/[\x{20000}-\x{2AFFF}]/u", $str)) { - return "\xef\xbf\xb0span lang=\"zh-HK\"\xef\xbf\xb1" . $str ."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - else{ - return "\xef\xbf\xb0span lang=\"zh-CN\"\xef\xbf\xb1" . $str ."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - return $str; -} -/*-- END CJK --*/ - -/*-- RTL --*/ -function replaceArabic($str) { - // mPDF 4.0 remove rtlAsArabicFarsi - // PASHTO, SINDHI, URDU, ARABIC, PERSIAN - $persian = "\x{067E}\x{0686}\x{0698}\x{06AF}"; - - $urdu = "\x{0679}\x{0688}\x{0691}\x{06BA}\x{06BE}\x{06C1}\x{06D2}"; - $pashto = "\x{067C}\x{0681}\x{0685}\x{0689}\x{0693}\x{0696}\x{069A}\x{06BC}\x{06D0}"; - $sindhi = "\x{067A}\x{067B}\x{067D}\x{067F}\x{0680}\x{0684}\x{068D}\x{068A}\x{068F}\x{068C}\x{0687}\x{0683}\x{0699}\x{06AA}\x{06A6}\x{06BB}\x{06B1}\x{06B3}"; - // mPDF 4.0 Use U=FFF0 and U+FFF1 to mark start and end of span tags to prevent nesting occurring - // "\xef\xbf\xb0" ##lthtmltag## "\xef\xbf\xb1" ##gthtmltag## - - if (preg_match("/[".$this->pregNonARABICchars ."]/u", $str) ) { - if (preg_match("/[".$sindhi ."]/u", $str) ) { - return "\xef\xbf\xb0span lang=\"sd\"\xef\xbf\xb1".$str."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - else if (preg_match("/[".$urdu ."]/u", $str) ) { - return "\xef\xbf\xb0span lang=\"ur\"\xef\xbf\xb1".$str."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - else if (preg_match("/[".$pashto ."]/u", $str) ) { - return "\xef\xbf\xb0span lang=\"ps\"\xef\xbf\xb1".$str."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - else if (preg_match("/[".$persian ."]/u", $str) ) { - return "\xef\xbf\xb0span lang=\"fa\"\xef\xbf\xb1".$str."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - else { - return "\xef\xbf\xb0span lang=\"ar\"\xef\xbf\xb1".$str."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - } - if (preg_match("/[".$persian ."]/u", $str) ) { - return "\xef\xbf\xb0span lang=\"fa\"\xef\xbf\xb1".$str."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - else { - return "\xef\xbf\xb0span lang=\"ar\"\xef\xbf\xb1".$str."\xef\xbf\xb0/span\xef\xbf\xb1"; - } - return $str; -} - -// ARABIC =========================== -function InitArabic() { - - // JOIN TO FOLLOWING LETTER IN LOGICAL ORDER - // U+060c U+061f; U+061b; U+0640; U+0626; U+0628; U+062a; U+062b; U+062c; U+062d; U+062e; U+0633; U+0634; U+0635; U+0636; U+0637; - // U+0638; U+0639; U+063a; U+0641; U+0642; U+0643; U+0644; U+0645; U+0646; U+0647; U+064a; U+06a9; U+06cc; U+0686; U+06af; U+067e; - // U+06D0; U+0681; U+06C1; - $this->arabPrevLink = "\xd8\x8c\xd8\x9f\xd8\x9b\xd9\x80\xd8\xa6\xd8\xa8\xd8\xaa\xd8\xab\xd8\xac\xd8\xad\xd8\xae\xd8\xb3\xd8\xb4\xd8\xb5\xd8\xb6\xd8\xb7\xd8\xb8\xd8\xb9\xd8\xba\xd9\x81\xd9\x82\xd9\x83\xd9\x84\xd9\x85\xd9\x86\xd9\x87\xd9\x8a\xda\xa9\xdb\x8c\xda\x86\xda\xaf\xd9\xbe\xdb\x90\xda\x81\xdb\x81"; - - // mPDF 4.0 - // \xda\x98 (U+0698) removed from arabPrevLink - // \xd9\xb1 (U+0671) added to arabNextLink & final form added to Persian Glyphs (FB51) - - - // JOIN TO PREVIOUS LETTER IN LOGICAL ORDER - // U+0640 U+0622; U+0623; U+0624; U+0625; U+0627; U+0626; U+0628; U+0629; U+062a; U+062b; U+062c; U+062d; U+062e; U+062f; U+0630; - // U+0631; U+0632; U+0633; U+0634; U+0635; U+0636; U+0637; U+0638; U+0639; U+063a; U+0641; U+0642; U+0643; U+0644; U+0645; U+0646; - // U+0647; U+0648; U+0649; U+064a; U+06a9; U+06cc; U+0686; U+06af; U+0698; U+067e; - // U+0671; U+06D0; U+0696; U+0693; U+06D2; U+06C1; - $this->arabNextLink = "\xd9\x80\xd8\xa2\xd8\xa3\xd8\xa4\xd8\xa5\xd8\xa7\xd8\xa6\xd8\xa8\xd8\xa9\xd8\xaa\xd8\xab\xd8\xac\xd8\xad\xd8\xae\xd8\xaf\xd8\xb0\xd8\xb1\xd8\xb2\xd8\xb3\xd8\xb4\xd8\xb5\xd8\xb6\xd8\xb7\xd8\xb8\xd8\xb9\xd8\xba\xd9\x81\xd9\x82\xd9\x83\xd9\x84\xd9\x85\xd9\x86\xd9\x87\xd9\x88\xd9\x89\xd9\x8a\xda\xa9\xdb\x8c\xda\x86\xda\xaf\xda\x98\xd9\xbe\xd9\xb1\xdb\x90\xda\x96\xda\x93\xdb\x92\xdb\x81"; - - - // U+064b U+064c; U+064d; U+064e; U+064f; U+0650; U+0651; U+0652; - $this->arabVowels = "\xd9\x8b\xd9\x8c\xd9\x8d\xd9\x8e\xd9\x8f\xd9\x90\xd9\x91\xd9\x92"; - - // mPDF 4.0 Added chars that may not be vowels but should not interrupt joining - // U+0670; U+0653; - $this->arabVowels .= "\xd9\xb0\xd9\x93"; - // ? should also add - U+615, 616, 617-61A, 653-65E, 6D6-6DC, 6DF-6E4, 6E7, 6E8, 6EA-6ED - - // DON'T ADD ANY MORE TO ARABGLYPHS - cf. ArabJoin() counts 48 then does ligatures - use PersianGlyphs below - // ISOLATED FORM :: FINAL :: INITIAL :: MEDIAL - - // U+064B; U+064C; U+064D; U+064E; U+064F; U+0650; U+0651; U+0652; - $this->arabGlyphs = "\xd9\x8b\xd9\x8c\xd9\x8d\xd9\x8e\xd9\x8f\xd9\x90\xd9\x91\xd9\x92"; - $this->arabHex = '064B064B064B064B064C064C064C064C064D064D064D064D064E064E064E064E064F064F064F064F065006500650065006510651065106510652065206520652'; - - // U+0621; U+0622; U+0623; U+0624; U+0625; U+0626; U+0627; U+0628; - $this->arabGlyphs .= "\xd8\xa1\xd8\xa2\xd8\xa3\xd8\xa4\xd8\xa5\xd8\xa6\xd8\xa7\xd8\xa8"; - $this->arabHex .= '06210621062106210622FE820622FE820623FE840623FE840624FE860624FE860625FE880625FE880626FE8AFE8BFE8C0627FE8E0627FE8E0628FE90FE91FE92'; - - - // U+0629; U+062A; U+062B; U+062C; U+062D; U+062E; U+062F; U+0630; - $this->arabGlyphs .= "\xd8\xa9\xd8\xaa\xd8\xab\xd8\xac\xd8\xad\xd8\xae\xd8\xaf\xd8\xb0"; - $this->arabHex .= '0629FE940629FE94062AFE96FE97FE98062BFE9AFE9BFE9C062CFE9EFE9FFEA0062DFEA2FEA3FEA4062EFEA6FEA7FEA8062FFEAA062FFEAA0630FEAC0630FEAC'; - - - // U+0631; U+0632; U+0633; U+0634; U+0635; U+0636; U+0637; U+0638; - $this->arabGlyphs .= "\xd8\xb1\xd8\xb2\xd8\xb3\xd8\xb4\xd8\xb5\xd8\xb6\xd8\xb7\xd8\xb8"; - $this->arabHex .= '0631FEAE0631FEAE0632FEB00632FEB00633FEB2FEB3FEB40634FEB6FEB7FEB80635FEBAFEBBFEBC0636FEBEFEBFFEC00637FEC2FEC3FEC40638FEC6FEC7FEC8'; - - - // U+0639; U+063A; U+0641; U+0642; U+0643; U+0644; U+0645; U+0646; - $this->arabGlyphs .= "\xd8\xb9\xd8\xba\xd9\x81\xd9\x82\xd9\x83\xd9\x84\xd9\x85\xd9\x86"; - $this->arabHex .= '0639FECAFECBFECC063AFECEFECFFED00641FED2FED3FED40642FED6FED7FED80643FEDAFEDBFEDC0644FEDEFEDFFEE00645FEE2FEE3FEE40646FEE6FEE7FEE8'; - - - // U+0647; U+0648; U+0649; U+064A; U+0640; U+060C; U+061F; U+061B; - $this->arabGlyphs .= "\xd9\x87\xd9\x88\xd9\x89\xd9\x8a\xd9\x80\xd8\x8c\xd8\x9f\xd8\x9b"; - // 0649 Initial or medial probably meant to be YEH (064A) so Initial and Medial forms of YEH given - $this->arabHex .= '0647FEEAFEEBFEEC0648FEEE0648FEEE0649FEF0FEF3FEF4064AFEF2FEF3FEF40640064006400640060C060C060C060C061F061F061F061F061B061B061B061B'; - // 0649 Alef Maksura should only appear at end of word (in Arabic) So final form given as FEF0. Initial and medial are shown as isolated/final -// $this->arabHex .= '0647FEEAFEEBFEEC0648FEEE0648FEEE0649FEF00649FEF0064AFEF2FEF3FEF40640064006400640060C060C060C060C061F061F061F061F061B061B061B061B'; - // 0649 Alef Maksura Initial and Medial forms as given in Unicode FBE8 and FBE9 (not in most fonts) - dotless vesions of above -// $this->arabHex .= '0647FEEAFEEBFEEC0648FEEE0648FEEE0649FEF0FBE8FBE9064AFEF2FEF3FEF40640064006400640060C060C060C060C061F061F061F061F061B061B061B061B'; - - // LAM with ALEF ligatures - // U+0644; U+0622; U+0644; U+0623; U+0644; U+0625; U+0644; U+0627; - $this->arabGlyphs .= "\xd9\x84\xd8\xa2\xd9\x84\xd8\xa3\xd9\x84\xd8\xa5\xd9\x84\xd8\xa7"; - $this->arabHex .= 'FEF5FEF6FEF5FEF6FEF7FEF8FEF7FEF8FEF9FEFAFEF9FEFAFEFBFEFCFEFBFEFC'; - - - - // Added Arabic Presentation Forms - A - for Persian and other langauges - // U+067B; U+067E; U+0680; U+067A; U+067F; U+0679; U+06A4; U+06A6; - $this->persianGlyphs = "\xd9\xbb\xd9\xbe\xda\x80\xd9\xba\xd9\xbf\xd9\xb9\xda\xa4\xda\xa6"; - $this->persianHex = '067BFB53FB54FB55067EFB57FB58FB590680FB5BFB5CFB5D067AFB5FFB60FB61067FFB63FB64FB650679FB67FB68FB6906A4FB6BFB6CFB6D06A6FB6FFB70FB71'; - - // U+0684; U+0683; U+0686; U+0687; U+0698; U+0691; U+06A9; U+06Af; - $this->persianGlyphs .= "\xda\x84\xda\x83\xda\x86\xda\x87\xda\x98\xda\x91\xda\xa9\xda\xaf"; - $this->persianHex .= '0684FB73FB74FB750683FB77FB78FB790686FB7BFB7CFB7D0687FB7FFB80FB810698FB8B0698FB8B0691FB8D0691FB8D06A9FB8FFB90FB9106AfFB93FB94FB95'; - - // U+06BA; U+06CC; U+06C1; U+0671; U+06D0; U+06D2; - // 06C1 final form is same as isolated so use 06C1 - $this->persianGlyphs .= "\xda\xba\xdb\x8c\xdb\x81\xd9\xb1\xdb\x90\xdb\x92"; - $this->persianHex .= '06BAFB9F06BAFB9F06CCFBFDFBFEFBFF06C106C1FBA8FBA90671FB510671FB5106D0FBE5FBE6FBE706D2FBAF06D2FBAF'; - -} - - // ---------------------------------------------------------------------- - // Derived from ArPHP - // by Khaled Al-Shamaa - // http://www.ar-php.org - // ---------------------------------------------------------------------- -function ArabJoin($str) { - if (!$this->arabGlyphs) { $this->InitArabic(); } - $crntChar = null; - $prevChar = null; - $nextChar = null; - $output = array(); - $chars = preg_split('//u', $str); - $max = count($chars); - for ($i = $max - 1; $i >= 0; $i--) { - $crntChar = $chars[$i]; - if ($i > 0){ $prevChar = $chars[$i - 1]; } - else{ $prevChar = NULL; } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($prevChar && mb_strpos($this->arabVowels, $prevChar, 0, 'utf-8') !== false) { - if ($prevChar && api_strpos($this->arabVowels, $prevChar, 0, 'utf-8') !== false) { - // - $prevChar = $chars[$i - 2]; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($prevChar && mb_strpos($this->arabVowels, $prevChar, 0, 'utf-8') !== false) { - if ($prevChar && api_strpos($this->arabVowels, $prevChar, 0, 'utf-8') !== false) { - // - $prevChar = $chars[$i - 3]; - } - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($crntChar && mb_strpos($this->arabVowels, $crntChar, 0, 'utf-8') !== false) { - if ($crntChar && api_strpos($this->arabVowels, $crntChar, 0, 'utf-8') !== false) { - // - // If next_char = nextLink && prev_char = prevLink: - // mPDF 4.0 Added && $prevchar (defined) else error on mb_strpos() - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($chars[$i + 1] && (mb_strpos($this->arabNextLink, $chars[$i + 1], 0, 'utf-8') !== false) && $prevChar && (mb_strpos($this->arabPrevLink, $prevChar, 0, 'utf-8') !== false)) { - if ($chars[$i + 1] && (api_strpos($this->arabNextLink, $chars[$i + 1], 0, 'utf-8') !== false) && $prevChar && (api_strpos($this->arabPrevLink, $prevChar, 0, 'utf-8') !== false)) { - // - $output[] = '&#x' . $this->get_arab_glyphs($crntChar, 1) . ';'; // form - } - else { - $output[] = '&#x' . $this->get_arab_glyphs($crntChar, 0) . ';'; // form - } - continue; - } - // NB = آ أ إ ا ل - if (isset($chars[$i + 1]) && in_array($chars[$i + 1], array("\xd8\xa2","\xd8\xa3","\xd8\xa5","\xd8\xa7")) && $crntChar == "\xd9\x84"){ - continue; - } - if (ord($crntChar) < 128) { - $output[] = $crntChar; - $nextChar = $crntChar; - continue; - } - $form = 0; - if (in_array($crntChar, array("\xd8\xa2", "\xd8\xa3", "\xd8\xa5", "\xd8\xa7")) && $prevChar == "\xd9\x84") { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($chars[$i - 2] && mb_strpos($this->arabPrevLink, $chars[$i - 2], 0, 'utf-8') !== false) { - if ($chars[$i - 2] && api_strpos($this->arabPrevLink, $chars[$i - 2], 0, 'utf-8') !== false) { - // - $form++; // form - } - $output[] = '&#x' . $this->get_arab_glyphs($prevChar . $crntChar, $form) . ';'; - $nextChar = $prevChar; - continue; - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($prevChar && mb_strpos($this->arabPrevLink, $prevChar, 0, 'utf-8') !== false) { - if ($prevChar && api_strpos($this->arabPrevLink, $prevChar, 0, 'utf-8') !== false) { - // - $form++; - } - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($nextChar && mb_strpos($this->arabNextLink, $nextChar, 0, 'utf-8') !== false) { - if ($nextChar && api_strpos($this->arabNextLink, $nextChar, 0, 'utf-8') !== false) { - // - $form += 2; - } - $output[] = '&#x' . $this->get_arab_glyphs($crntChar, $form) . ';'; - $nextChar = $crntChar; - } - $ra = array_reverse($output); - $s = implode($ra); - $s = strcode2utf($s); - return $s; -} - -function get_arab_glyphs($char, $type) { - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$pos = mb_strpos($this->arabGlyphs, $char, 0, 'utf-8'); - $pos = api_strpos($this->arabGlyphs, $char, 0, 'utf-8'); - // - if ($pos === false) { // If character not covered here - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$pos = mb_strpos($this->persianGlyphs, $char, 0, 'utf-8'); // Try Persian additions - $pos = api_strpos($this->persianGlyphs, $char, 0, 'utf-8'); // Try Persian additions - // - if ($pos === false) { // return original character - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$x = mb_encode_numericentity ($char, array (0x0, 0xffff, 0, 0xffff), 'UTF-8'); - if (function_exists('mb_encode_numericentity')) { - $x = mb_encode_numericentity ($char, array (0x0, 0xffff, 0, 0xffff), 'UTF-8'); - } else { - $x = api_htmlentities($char, ENT_NOQUOTES, 'UTF-8'); - } - // - preg_match('/&#(\d+);/', $x, $m); - return dechex($m[1]); - } - else { // if covered by Added Persian chars - $pos = $pos*16 + $type*4; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //return mb_substr($this->persianHex, $pos, 4, 'utf-8'); - return api_substr($this->persianHex, $pos, 4, 'utf-8'); - // - } - } - if ($pos > 48){ - $pos = ($pos-48)/2 + 48; - } - $pos = $pos*16 + $type*4; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //return mb_substr($this->arabHex, $pos, 4, 'utf-8'); - return api_substr($this->arabHex, $pos, 4, 'utf-8'); - // -} -/*-- END RTL --*/ - - - -//=========================== -// Functions originally in htmltoolkit - moved mPDF 4.0 - -// Call-back function Used for usort in fn _tableWrite - -function _cmpdom($a, $b) { - return ($a["dom"] < $b["dom"]) ? -1 : 1; -} - -function mb_strrev($str, $enc = 'utf-8'){ - // Modified by Ivan Tcholakov, 28-JAN-2010. - //$ch = array(); - //for($i=0;$i'#FAEBD7','aqua'=>'#00FFFF','aquamarine'=>'#7FFFD4','beige'=>'#F5F5DC','black'=>'#000000', -'blue'=>'#0000FF','brown'=>'#A52A2A','cadetblue'=>'#5F9EA0','chocolate'=>'#D2691E','cornflowerblue'=>'#6495ED','crimson'=>'#DC143C', -'darkblue'=>'#00008B','darkgoldenrod'=>'#B8860B','darkgreen'=>'#006400','darkmagenta'=>'#8B008B','darkorange'=>'#FF8C00', -'darkred'=>'#8B0000','darkseagreen'=>'#8FBC8F','darkslategray'=>'#2F4F4F','darkviolet'=>'#9400D3','deepskyblue'=>'#00BFFF', -'dodgerblue'=>'#1E90FF','firebrick'=>'#B22222','forestgreen'=>'#228B22','fuchsia'=>'#FF00FF','gainsboro'=>'#DCDCDC','gold'=>'#FFD700', -'gray'=>'#808080','green'=>'#008000','greenyellow'=>'#ADFF2F','hotpink'=>'#FF69B4','indigo'=>'#4B0082','khaki'=>'#F0E68C', -'lavenderblush'=>'#FFF0F5','lemonchiffon'=>'#FFFACD','lightcoral'=>'#F08080','lightgoldenrodyellow'=>'#FAFAD2','lightgreen'=>'#90EE90', -'lightsalmon'=>'#FFA07A','lightskyblue'=>'#87CEFA','lightslategray'=>'#778899','lightyellow'=>'#FFFFE0','lime'=>'#00FF00','limegreen'=>'#32CD32', -'magenta'=>'#FF00FF','maroon'=>'#800000','mediumaquamarine'=>'#66CDAA','mediumorchid'=>'#BA55D3','mediumseagreen'=>'#3CB371', -'mediumspringgreen'=>'#00FA9A','mediumvioletred'=>'#C71585','midnightblue'=>'#191970','mintcream'=>'#F5FFFA','moccasin'=>'#FFE4B5','navy'=>'#000080', -'olive'=>'#808000','orange'=>'#FFA500','orchid'=>'#DA70D6','palegreen'=>'#98FB98', -'palevioletred'=>'#D87093','peachpuff'=>'#FFDAB9','pink'=>'#FFC0CB','powderblue'=>'#B0E0E6','purple'=>'#800080', -'red'=>'#FF0000','royalblue'=>'#4169E1','salmon'=>'#FA8072','seagreen'=>'#2E8B57','sienna'=>'#A0522D','silver'=>'#C0C0C0','skyblue'=>'#87CEEB', -'slategray'=>'#708090','springgreen'=>'#00FF7F','steelblue'=>'#4682B4','tan'=>'#D2B48C','teal'=>'#008080','thistle'=>'#D8BFD8','turquoise'=>'#40E0D0', -'violetred'=>'#D02090','white'=>'#FFFFFF','yellow'=>'#FFFF00', -'aliceblue'=>'#f0f8ff', 'azure'=>'#f0ffff', 'bisque'=>'#ffe4c4', 'blanchedalmond'=>'#ffebcd', 'blueviolet'=>'#8a2be2', 'burlywood'=>'#deb887', -'chartreuse'=>'#7fff00', 'coral'=>'#ff7f50', 'cornsilk'=>'#fff8dc', 'cyan'=>'#00ffff', 'darkcyan'=>'#008b8b', 'darkgray'=>'#a9a9a9', -'darkgrey'=>'#a9a9a9', 'darkkhaki'=>'#bdb76b', 'darkolivegreen'=>'#556b2f', 'darkorchid'=>'#9932cc', 'darksalmon'=>'#e9967a', -'darkslateblue'=>'#483d8b', 'darkslategrey'=>'#2f4f4f', 'darkturquoise'=>'#00ced1', 'deeppink'=>'#ff1493', 'dimgray'=>'#696969', -'dimgrey'=>'#696969', 'floralwhite'=>'#fffaf0', 'ghostwhite'=>'#f8f8ff', 'goldenrod'=>'#daa520', 'grey'=>'#808080', 'honeydew'=>'#f0fff0', -'indianred'=>'#cd5c5c', 'ivory'=>'#fffff0', 'lavender'=>'#e6e6fa', 'lawngreen'=>'#7cfc00', 'lightblue'=>'#add8e6', 'lightcyan'=>'#e0ffff', -'lightgray'=>'#d3d3d3', 'lightgrey'=>'#d3d3d3', 'lightpink'=>'#ffb6c1', 'lightseagreen'=>'#20b2aa', 'lightslategrey'=>'#778899', -'lightsteelblue'=>'#b0c4de', 'linen'=>'#faf0e6', 'mediumblue'=>'#0000cd', 'mediumpurple'=>'#9370db', 'mediumslateblue'=>'#7b68ee', -'mediumturquoise'=>'#48d1cc', 'mistyrose'=>'#ffe4e1', 'navajowhite'=>'#ffdead', 'oldlace'=>'#fdf5e6', 'olivedrab'=>'#6b8e23', 'orangered'=>'#ff4500', -'palegoldenrod'=>'#eee8aa', 'paleturquoise'=>'#afeeee', 'papayawhip'=>'#ffefd5', 'peru'=>'#cd853f', 'plum'=>'#dda0dd', 'rosybrown'=>'#bc8f8f', -'saddlebrown'=>'#8b4513', 'sandybrown'=>'#f4a460', 'seashell'=>'#fff5ee', 'slateblue'=>'#6a5acd', 'slategrey'=>'#708090', 'snow'=>'#fffafa', -'tomato'=>'#ff6347', 'violet'=>'#ee82ee', 'wheat'=>'#f5deb3', 'whitesmoke'=>'#f5f5f5', 'yellowgreen'=>'#9acd32'); - //http://www.w3schools.com/css/css_colornames.asp - if (strtoupper($color)=='TRANSPARENT') { return false; } - if (strtoupper($color)=='INHERIT') { return false; } - - if (isset($common_colors[strtolower($color)])) $color = $common_colors[strtolower($color)]; - - if ($color{0} == '#') //case of #nnnnnn or #nnn - { - $cor = strtoupper($color); - $cor = preg_replace('/\s+.*/','',$cor); // in case of Background: #CCC url() x-repeat etc. - if (strlen($cor) == 4) { // Turn #RGB into #RRGGBB - $cor = "#" . $cor{1} . $cor{1} . $cor{2} . $cor{2} . $cor{3} . $cor{3}; - } - $R = substr($cor, 1, 2); - $vermelho = hexdec($R); - $V = substr($cor, 3, 2); - $verde = hexdec($V); - $B = substr($cor, 5, 2); - $azul = hexdec($B); - $color = array(); - $color['R']=$vermelho; - $color['G']=$verde; - $color['B']=$azul; - } - else if (stristr($color,'cmyk(')) { //case of CMYK(c,m,y,k) - $color = str_replace("cmyk(",'',$color); //remove �cmyk(� - $color = str_replace("CMYK(",'',$color); //remove �CMYK(� - $color = str_replace(")",'',$color); //remove �)� - $cores = explode(",", $color); - $color = array(); - $color['R']=$cores[0]; - $color['G']=$cores[1]; - $color['B']=$cores[2]; - $color['K']=$cores[3]; - } - else if (stristr($color,'rgb(')) //case of RGB(r,g,b) - { - $color = str_replace("rgb(",'',$color); //remove �rgb(� - $color = str_replace("RGB(",'',$color); //remove �RGB(� -- PHP < 5 does not have str_ireplace - $color = str_replace(")",'',$color); //remove �)� - $cores = explode(",", $color); - $color = array(); - $color['R']=$cores[0]; - $color['G']=$cores[1]; - $color['B']=$cores[2]; - } - else { return false; } - if (empty($color)) return false; - else return $color; // array['R']['G']['B'] -} - -function ConvertSize($size=5,$maxsize=0,$fontsize=false,$usefontsize=true){ -// usefontsize - setfalse for e.g. margins - will ignore fontsize for % values -// Depends of maxsize value to make % work properly. Usually maxsize == pagewidth -// For text $maxsize = Fontsize -// Setting e.g. margin % will use maxsize (pagewidth) and em will use fontsize - //Identify size (remember: we are using 'mm' units here) - if ( strtolower($size) == 'thin' ) $size = 1*(25.4/$this->dpi); //1 pixel width for table borders // mPDF 4.4.003 - elseif ( strtolower($size) == 'medium' ) $size = 3*(25.4/$this->dpi); //3 pixel width for table borders // mPDF 4.4.003 - elseif ( strtolower($size) == 'thick' ) $size = 5*(25.4/$this->dpi); //5 pixel width for table borders // mPDF 4.4.003 - elseif ( stristr($size,'px') ) $size *= (25.4/$this->dpi); //pixels // mPDF 4.4.003 - elseif ( stristr($size,'cm') ) $size *= 10; //centimeters - elseif ( stristr($size,'mm') ) $size += 0; //millimeters - elseif ( stristr($size,'in') ) $size *= 25.4; //inches - elseif ( stristr($size,'pc') ) $size *= 38.1/9; //PostScript picas - elseif ( stristr($size,'pt') ) $size *= 25.4/72; //72 pts/inch - elseif ( stristr($size,'ex') ) { // mPDF 4.4.003 Approximates "ex" as half of font height - $size += 0; //make "3.5ex" become simply "3.5" - if ($fontsize) { $size *= $fontsize/2; } - else { $size *= $maxsize/2; } - } - elseif ( stristr($size,'em') ) { - $size += 0; //make "0.83em" become simply "0.83" - if ($fontsize) { $size *= $fontsize; } - else { $size *= $maxsize; } - } - elseif ( stristr($size,'%') ) { - $size += 0; //make "90%" become simply "90" - if ($fontsize && $usefontsize) { $size *= $fontsize/100; } - else { $size *= $maxsize/100; } - } - // mPDF 2.3 - elseif (strtoupper($size) == 'XX-SMALL') { - if ($fontsize) { $size *= $fontsize*0.7; } - else { $size *= $maxsize*0.7; } - } - elseif (strtoupper($size) == 'X-SMALL') { - if ($fontsize) { $size *= $fontsize*0.77; } - else { $size *= $maxsize*0.77; } - } - elseif (strtoupper($size) == 'SMALL') { - if ($fontsize) { $size *= $fontsize*0.86; } - else { $size *= $maxsize*0.86; } - } - elseif (strtoupper($size) == 'MEDIUM') { - if ($fontsize) { $size *= $fontsize; } - else { $size *= $maxsize; } - } - elseif (strtoupper($size) == 'LARGE') { - if ($fontsize) { $size *= $fontsize*1.2; } - else { $size *= $maxsize*1.2; } - } - elseif (strtoupper($size) == 'X-LARGE') { - if ($fontsize) { $size *= $fontsize*1.5; } - else { $size *= $maxsize*1.5; } - } - elseif (strtoupper($size) == 'XX-LARGE') { - if ($fontsize) { $size *= $fontsize*2; } - else { $size *= $maxsize*2; } - } - else $size *= (25.4/$this->dpi); //nothing == px // mPDF 4.4.003 - - return $size; -} - - -function lesser_entity_decode($html) { - //supports the most used entity codes (only does ascii safe characters) - $html = str_replace(" "," ",$html); - $html = str_replace("<","<",$html); - $html = str_replace(">",">",$html); - - $html = str_replace("'","'",$html); - $html = str_replace(""",'"',$html); - $html = str_replace("&","&",$html); - return $html; -} - -function AdjustHTML($html,$directionality='ltr',$usepre=true, $tabSpaces=8) { - //Try to make the html text more manageable (turning it into XHTML) -/*-- ANNOTATIONS --*/ - preg_match_all("/()/si", $html, $m); - if (count($m[1])) { - for($i=0;$i/is','',$html); // mPDF 3.0 changed from ereg_ - - //Remove special comments - $html = preg_replace('//i','',$html); // mPDF 3.0 changed from ereg_ - - //Remove comments from HTML (should not appear in the PDF file) - $html = preg_replace('//s','',$html); // mPDF 3.0 changed from ereg_ - - $html = preg_replace('/\f/','',$html); //replace formfeed by nothing // mPDF 3.0 changed from ereg_ - $html = preg_replace('/\r/','',$html); //replace carriage return by nothing // mPDF 3.0 changed from ereg_ - - // Well formed XHTML end tags - $html = preg_replace('/<(br|hr)\/>/i',"<\\1 />",$html); - -/*-- TABLES --*/ - // Get rid of empty - $html = preg_replace('/\s*<\/thead>/i','',$html); // mPDF 3.0 changed from ereg_ - $html = preg_replace('/\s*<\/tfoot>/i','',$html); // mPDF 3.2 - $html = preg_replace('/]*>\s*<\/table>/i','',$html); // mPDF 3.2 - - // Remove spaces at end of table cells - $html = preg_replace("/[ ]+<\/t(d|h)/",'(.*?)<\/table>/is',$html,$matches); - for($i=0;$i'; - $post = ''; - // mPDF 3.2 Don't change if nested tables - if (!preg_match('/]*>)/is',$table,$m)) { $thead = $m[0]; } else { $thead = ''; } - preg_match_all('/(.*?)<\/tr>/is',$table,$tmatches); - $newrows = array(); - for($j=0;$j'; - $rpost = ''; - $row = $tmatches[0][$j]; - preg_match_all('/.*?<\/t[hd]>/is',$row,$rmatches); - $cells = array(); - for($k=0;$k'; - } - else if (($thead) && ($j == (count($tmatches[0]) - 1))) { // last row adds - $newrows[] = $rpre . implode('',$cells) . $rpost . ''; - } - else { - $newrows[] = $rpre . implode('',$cells) . $rpost; - } - } - $newtable = $pre . implode('',$newrows) . $post; - $html = str_replace($table,$newtable,$html); - } - } - } -/*-- END TABLES --*/ - - // mPDF 4.2.031 - $html = preg_replace("/[ ]*[ ]*/",'',$html); - - // Concatenates any Substitute characters from symbols/dingbats - $html = str_replace('','|',$html); - $html = str_replace('','|',$html); - $html = str_replace('','|',$html); - - // Modified by Ivan Tcholakov, 16-FEB-2010. - //$html = mb_eregi_replace('/
    \s*/is',"
    ",$html); // mPDF 3.0 changed from ereg_ - $html = preg_replace('/
    \s*/is',"
    ",$html); // mPDF 3.0 changed from ereg_ - // - if ($usepre) //used to keep \n on content inside
     and inside 
    -		$thereistextarea = preg_match_all('#(.*?)#si',$html,$temp2);
    -		$html = preg_replace('/[\n]/',' ',$html); //replace linefeed by spaces // mPDF 3.0 changed from ereg_
    -		$html = preg_replace('/[\t]/',' ',$html); //replace tabs by spaces // mPDF 3.0 changed from ereg_
    -
    -		// mPDF 2.3 - moved
    -		// Converts < to < when not a tag
    -		$html = preg_replace('/<([^!\/a-zA-Z])/i','<\\1',$html);
    -
    -		// mPDF changed to prevent   chars replaced
    -		$html = preg_replace("/[ ]+/",' ',$html);
    -
    -		$html = preg_replace('/\/li>\s+<\/(u|o)l/i','/li>\s+<\/li/i','/\\1l>\s+<\/(u|o)l/i','/li>\s+
  • ]*)>[ ]+/i','<\\1l\\2>',$html); - $html = preg_replace('/[ ]+<(u|o)l/i','<\\1l',$html); // mPDF 3.0 changed from ereg_ - - $iterator = 0; - while($thereispre) //Recover
    content
    - { - // mPDF 2.4 - $temp[2][$iterator] = str_replace("<||@mpdf@||pre", "",$temp[2][$iterator]); // mPDF 3.0 changed from ereg_ - // mPDF 1.3 Edited to fix bug with empty pre - // mPDF 2.4 Removed /u as not needed to be Unicode and causing bugs with annotations - $html = preg_replace('#(.*?)
  • #si',''.$temp[2][$iterator].'',$html,1); - $thereispre--; - $iterator++; - } - $iterator = 0; - while($thereistextarea) //Recover - { - $temp2[2][$iterator] = preg_replace('/&/',"&",$temp2[2][$iterator]); // mPDF 3.0 changed from ereg_ - $temp2[2][$iterator] = preg_replace('/(.*?)#si',''.trim($temp2[2][$iterator]) .'',$html,1); - $thereistextarea--; - $iterator++; - } - //Restore original tag names - $html = str_replace("","",$html); - $html = str_replace("","",$html); - // (the code above might slowdown overall performance?) - } //end of if($usepre) - else - { - $html = preg_replace('/\n/',' ',$html); //replace linefeed by spaces // mPDF 3.0 changed from ereg_ - $html = preg_replace('/\t/',' ',$html); //replace tabs by spaces // mPDF 3.0 changed from ereg_ - - // Converts < to < when not a tag - $html = preg_replace('/<([^!\/a-zA-Z])/i','<\\1',$html); - - // mPDF changed to prevent   chars replaced - $html = preg_replace("/[ ]+/",' ',$html); // mPDF 4.4.012 - - $html = preg_replace('/\/li>\s+<\/(u|o)l/i','/li>\s+<\/li/i','/\\1l>\s+<\/(u|o)l/i','/li>\s+
  • ]*)>[ ]+/i','<\\1l\\2>',$html); - $html = preg_replace('/[ ]+<(u|o)l/i','<\\1l',$html); // mPDF 3.0 changed from ereg_ - - } - $html = preg_replace('/]*)><\/textarea>/si',' ',$html); -// mPDF 4.5.015 -// $html = preg_replace('/<(h[1-6])([^>]*)(>(?:(?!h[1-6]).)*<\/\\1>\s*]*)(>(?:(?!h[1-6]).)*?<\/\\1>\s* 18278)) return "?"; //supports 'only' up to 18278 - $c1 = $c2 = $c3 = ''; - if ($valor > 702) // 3 letters (up to 18278) - { - $c1 = 65 + floor(($valor-703)/676); - $c2 = 65 + floor((($valor-703)%676)/26); - $c3 = 65 + floor((($valor-703)%676)%26); - } - elseif ($valor > 26) // 2 letters (up to 702) - { - $c1 = (64 + (int)(($valor-1) / 26)); - $c2 = (64 + (int)($valor % 26)); - if ($c2 == 64) $c2 += 26; - } - else // 1 letter (up to 26) - { - $c1 = (64 + $valor); - } - $alpha = chr($c1); - if ($c2 != '') $alpha .= chr($c2); - if ($c3 != '') $alpha .= chr($c3); - if (!$toupper) $alpha = strtolower($alpha); - return $alpha; -} - - -function dec2roman($valor,$toupper=true){ - //returns a string as a roman numeral - $r1=$r2=$r3=$r4=''; - if (($valor >= 5000) || ($valor < 1)) return "?"; //supports 'only' up to 4999 - $aux = (int)($valor/1000); - if ($aux!==0) - { - $valor %= 1000; - while($aux!==0) - { - $r1 .= "M"; - $aux--; - } - } - $aux = (int)($valor/100); - if ($aux!==0) - { - $valor %= 100; - switch($aux){ - case 3: $r2="C"; - case 2: $r2.="C"; - case 1: $r2.="C"; break; - case 9: $r2="CM"; break; - case 8: $r2="C"; - case 7: $r2.="C"; - case 6: $r2.="C"; - case 5: $r2="D".$r2; break; - case 4: $r2="CD"; break; - default: break; - } - } - $aux = (int)($valor/10); - if ($aux!==0) - { - $valor %= 10; - switch($aux){ - case 3: $r3="X"; - case 2: $r3.="X"; - case 1: $r3.="X"; break; - case 9: $r3="XC"; break; - case 8: $r3="X"; - case 7: $r3.="X"; - case 6: $r3.="X"; - case 5: $r3="L".$r3; break; - case 4: $r3="XL"; break; - default: break; - } - } - switch($valor){ - case 3: $r4="I"; - case 2: $r4.="I"; - case 1: $r4.="I"; break; - case 9: $r4="IX"; break; - case 8: $r4="I"; - case 7: $r4.="I"; - case 6: $r4.="I"; - case 5: $r4="V".$r4; break; - case 4: $r4="IV"; break; - default: break; - } - $roman = $r1.$r2.$r3.$r4; - if (!$toupper) $roman = strtolower($roman); - return $roman; -} -/*-- END LISTS --*/ - - -//=========================== -/*-- IMPORTS --*/ -// mPDF 4.2.006 -function SetImportUse() { - $this->enableImports = true; - ini_set('auto_detect_line_endings',1); - require_once(_MPDF_PATH."mpdfi/pdf_context.php"); - require_once(_MPDF_PATH."mpdfi/pdf_parser.php"); - require_once(_MPDF_PATH."mpdfi/fpdi_pdf_parser.php"); -} - -// from mPDFI -function hex2str($hex) { - return pack("H*", str_replace(array("\r","\n"," "),"", $hex)); -} - -function str2hex($str) { - return current(unpack("H*",$str)); -} - - -function pdf_write_value(&$value) { - switch ($value[0]) { - case PDF_TYPE_NUMERIC : - case PDF_TYPE_TOKEN : - // A numeric value or a token. - // Simply output them - $this->_out($value[1]." ", false); - break; - - case PDF_TYPE_ARRAY : - // An array. Output the proper - // structure and move on. - $this->_out("[",false); - for ($i = 0; $i < count($value[1]); $i++) { - $this->pdf_write_value($value[1][$i]); - } - $this->_out("]"); - break; - - case PDF_TYPE_DICTIONARY : - // A dictionary. - $this->_out("<<",false); - reset ($value[1]); - while (list($k, $v) = each($value[1])) { - $this->_out($k . " ",false); - $this->pdf_write_value($v); - } - $this->_out(">>"); - break; - - case PDF_TYPE_OBJREF : - // An indirect object reference - // Fill the object stack if needed - $cpfn =& $this->current_parser->filename; - if (!isset($this->_don_obj_stack[$cpfn][$value[1]])) { - $this->_newobj(false,true); - $this->_obj_stack[$cpfn][$value[1]] = array($this->n, $value); - $this->_don_obj_stack[$cpfn][$value[1]] = array($this->n, $value); - } - $objid = $this->_don_obj_stack[$cpfn][$value[1]][0]; - $this->_out("{$objid} 0 R"); //{$value[2]} - break; - - case PDF_TYPE_STRING : - if ($this->encrypted) { - $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]); - $value[1] = $this->_escape($value[1]); - } - // A string. - $this->_out('('.$value[1].')'); - break; - - case PDF_TYPE_STREAM : - // A stream. First, output the - // stream dictionary, then the - // stream data itself. - $this->pdf_write_value($value[1]); - if ($this->encrypted) { - $value[2][1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[2][1]); - } - $this->_out("stream"); - $this->_out($value[2][1]); - $this->_out("endstream"); - break; - - case PDF_TYPE_HEX : - if ($this->encrypted) { - $value[1] = $this->hex2str($value[1]); - $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]); - // remake hexstring of encrypted string - $value[1] = $this->str2hex($value[1]); - } - $this->_out("<".$value[1].">"); - break; - - case PDF_TYPE_NULL : - // The null object. - $this->_out("null"); - break; - } -} - -// ========== OVERWRITE SEARCH STRING IN A PDF FILE ================ -function OverWrite($file_in, $search, $replacement, $dest="D", $file_out="mpdf" ) { - $pdf = file_get_contents($file_in); - - if (!is_array($search)) { - $x = $search; - $search = array($x); - } - if (!is_array($replacement)) { - $x = $replacement; - $search = array($x); - } - - if ($this->isunicode && !$this->isCJK) { - foreach($search AS $k=>$val) { - $search[$k] = $this->UTF8ToUTF16BE($search[$k] , false); - $search[$k] = $this->_escape($search[$k]); - $replacement[$k] = $this->UTF8ToUTF16BE($replacement[$k], false); - $replacement[$k] = $this->_escape($replacement[$k]); - } - } - else { - foreach($replacement AS $k=>$val) { - $replacement[$k] = mb_convert_encoding($replacement[$k],$this->mb_encoding,'utf-8'); - $replacement[$k] = $this->_escape($replacement[$k]); - } - } - - // Get xref into array - $xref = array(); - preg_match("/xref\n0 (\d+)\n(.*?)\ntrailer/s",$pdf,$m); - $xref_objid = $m[1]; - preg_match_all('/(\d{10}) (\d{5}) (f|n)/',$m[2],$x); - for($i=0; $icompress) { - preg_match("/".($obj+1)." 0 obj\n<<\s*\/Filter\s*\/FlateDecode\s*\/Length (\d+)>>\nstream\n(.*?)\nendstream\n/s",$pdf,$m); // mPDF 4.2.030 - } - else { - preg_match("/".($obj+1)." 0 obj\n<<\s*\/Length (\d+)>>\nstream\n(.*?)\nendstream\n/s",$pdf,$m); // mPDF 4.2.030 - } - $s = $m[2]; - if (!$s) { continue; } // mPDF 4.2.030 - $oldlen = $m[1]; - if ($this->encrypted) { - $s = $this->_RC4($this->_objectkey($obj+1), $s); - } - if ($this->compress) { - $s = gzuncompress($s); - } - foreach($search AS $k=>$val) { - $s = str_replace($search[$k],$replacement[$k],$s); - } - if ($this->compress) { - $s = gzcompress($s); - } - if ($this->encrypted) { - $s = $this->_RC4($this->_objectkey($obj+1), $s); - } - $newlen = strlen($s); - $changes[($xref[$obj+1][0])] = ($newlen - $oldlen) + (strlen($newlen) - strlen($oldlen )); - if ($this->compress) { - $newstr = ($obj+1) . " 0 obj\n<>\nstream\n".$s."\nendstream\n"; - } - else { - $newstr = ($obj+1) . " 0 obj\n<>\nstream\n".$s."\nendstream\n"; - } - $pdf = str_replace($m[0],$newstr,$pdf); - } - - // Update xref in PDF - krsort($changes); - $newxref = "xref\n0 ".$xref_objid."\n"; - foreach($xref AS $v) { - foreach($changes AS $ck => $cv) { - if ($v[0] > $ck) { $v[0] += $cv; } - } - $newxref .= sprintf('%010d',$v[0]) . ' ' . $v[1] . ' ' .$v[2] . " \n"; - } - $newxref .= "trailer"; - $pdf = preg_replace("/xref\n0 \d+\n.*?\ntrailer/s",$newxref,$pdf); - - // Update startxref in PDF - preg_match("/startxref\n(\d+)\n%%EOF/s", $pdf, $m); - $startxref = $m[1]; - $startxref += array_sum($changes); - $pdf = preg_replace("/startxref\n(\d+)\n%%EOF/s","startxref\n".$startxref."\n%%EOF",$pdf); - - // OUTPUT - switch($dest) { - case 'I': - //Send to standard output - if(isset($_SERVER['SERVER_NAME'])) - { - //We send to a browser - Header('Content-Type: application/pdf'); - Header('Content-Length: '.strlen($pdf)); - Header('Content-disposition: inline; filename='.$file_out); - } - echo $pdf; - break; - case 'F': - //Save to local file - if (!$file_out) { $file_out = 'mpdf.pdf'; } - $f=fopen($file_out,'wb'); - if(!$f) die('Unable to create output file: '.$file_out); - fwrite($f,$pdf,strlen($pdf)); - fclose($f); - break; - case 'S': - //Return as a string - return $pdf; - case 'D': - default: - //Download file - if(isset($_SERVER['HTTP_USER_AGENT']) and strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) - Header('Content-Type: application/force-download'); - else - Header('Content-Type: application/octet-stream'); - Header('Content-Length: '.strlen($pdf)); - Header('Content-disposition: attachment; filename='.$file_out); - echo $pdf; - break; - } -} - - -function GetTemplateSize($tplidx, $_w=0, $_h=0) { - if (!$this->tpls[$tplidx]) - return false; - $w = $this->tpls[$tplidx]['box']['w']; - $h = $this->tpls[$tplidx]['box']['h']; - if ($_w == 0 and $_h == 0) { - $_w = $w; - $_h = $h; - } - if($_w==0) - $_w=$_h*$w/$h; - if($_h==0) - $_h=$_w*$h/$w; - return array("w" => $_w, "h" => $_h); -} - -// Thumbnails -// mPDF 2.3 Templates -function Thumbnail($file, $npr=3, $spacing=10) { //$npr = number per row - $w = (($this->pgwidth + $spacing)/$npr) - $spacing; - $oldlinewidth = $this->LineWidth; - $this->SetLineWidth(0.02); $this->SetDrawColor(0); - $h = 0; - $maxh = 0; - $x = $_x = $this->lMargin; - $_y = $this->tMargin; - if ($this->y==0) { $y = $_y; } else { $y = $this->y; } - $pagecount = $this->SetSourceFile($file); - for ($n = 1; $n <= $pagecount; $n++) { - $tplidx = $this->ImportPage($n); - $size = $this->useTemplate($tplidx, $x, $y, $w); - $this->Rect($x, $y, $size['w'], $size['h']); - $h = max($h, $size['h']); - $maxh = max($h, $maxh); - if ($n % $npr == 0) { - if (($y + $h + $spacing + $maxh)>$this->PageBreakTrigger && $n != $pagecount) { - $this->AddPage(); - $x = $_x; - $y = $_y; - } - else { - $y += $h+$spacing ; - $x = $_x; - $h = 0; - } - } - else { - $x += $w+$spacing ; - } - } - $this->SetLineWidth($oldlinewidth); -} - -function SetSourceFile($filename) { - $this->current_filename = $filename; - $fn =& $this->current_filename; - if (!isset($this->parsers[$fn])) - // mPDF 4.3.007D - // $this->parsers[$fn] =& new fpdi_pdf_parser($fn,$this); - $this->parsers[$fn] = new fpdi_pdf_parser($fn,$this); - if (!$this->parsers[$fn]->success) { - $this->Error($this->parsers[$fn]->errormsg); // Delete this line to return false on fail - return false; - } - $this->current_parser =& $this->parsers[$fn]; - return $this->parsers[$fn]->getPageCount(); -} - -function ImportPage($pageno=1, $crop_x=null, $crop_y=null, $crop_w=0, $crop_h=0, $boxName='/CropBox') { - $fn =& $this->current_filename; - - $parser =& $this->parsers[$fn]; - $parser->setPageno($pageno); - - $this->tpl++; - $this->tpls[$this->tpl] = array(); - $tpl =& $this->tpls[$this->tpl]; - $tpl['parser'] =& $parser; - $tpl['resources'] = $parser->getPageResources(); - $tpl['buffer'] = $parser->getContent(); - - if (!in_array($boxName, $parser->availableBoxes)) - return $this->Error(sprintf("Unknown box: %s", $boxName)); - $pageboxes = $parser->getPageBoxes($pageno); - - /** - * MediaBox - * CropBox: Default -> MediaBox - * BleedBox: Default -> CropBox - * TrimBox: Default -> CropBox - * ArtBox: Default -> CropBox - */ - if (!isset($pageboxes[$boxName]) && ($boxName == "/BleedBox" || $boxName == "/TrimBox" || $boxName == "/ArtBox")) - $boxName = "/CropBox"; - if (!isset($pageboxes[$boxName]) && $boxName == "/CropBox") - $boxName = "/MediaBox"; - - if (!isset($pageboxes[$boxName])) - return false; - - $box = $pageboxes[$boxName]; - - $tpl['box'] = $box; - // To build an array that can be used by useTemplate() - $this->tpls[$this->tpl] = array_merge($this->tpls[$this->tpl],$box); - // An imported page will start at 0,0 everytime. Translation will be set in _putformxobjects() - $tpl['x'] = 0; - $tpl['y'] = 0; - - $tpl['w'] = $tpl['box']['w'] ; - $tpl['h'] = $tpl['box']['h'] ; - if ($crop_w) { $tpl['box']['w'] = $crop_w; } - if ($crop_h) { $tpl['box']['h'] = $crop_h; } - if (isset($crop_x)) { $tpl['box']['x'] = $crop_x; } - if (isset($crop_y)) {$tpl['box']['y'] = $tpl['h'] - $crop_y - $crop_h ; } - - $page =& $parser->pages[$parser->pageno]; - - // fix for rotated pages - $rotation = $parser->getPageRotation($pageno); - - if (isset($rotation[1]) && ($angle = $rotation[1] % 360) != 0 && $tpl['box']['w'] == $tpl['w']) { - $steps = $angle / 90; - - $_w = $tpl['w']; - $_h = $tpl['h']; - $tpl['w'] = $steps % 2 == 0 ? $_w : $_h; - $tpl['h'] = $steps % 2 == 0 ? $_h : $_w; - - if ($steps % 2 != 0) { - $x = $y = ($steps == 1 || $steps == -3) ? $tpl['h'] : $tpl['w']; - } else { - $x = $tpl['w']; - $y = $tpl['h']; - } - - $cx=($x/2+$tpl['box']['x'])*$this->k; - $cy=($y/2+$tpl['box']['y'])*$this->k; - - $angle*=-1; - - $angle*=M_PI/180; - $c=cos($angle); - $s=sin($angle); - $tpl['box']['w'] = $tpl['w'] ; - $tpl['box']['h'] = $tpl['h'] ; - - $tpl['buffer'] = sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm %s Q',$c,$s,-$s,$c,$cx,$cy,-$cx,-$cy, $tpl['buffer']); - } - - return $this->tpl; -} - -function UseTemplate($tplidx, $_x=null, $_y=null, $_w=0, $_h=0) { - if (!isset($this->tpls[$tplidx])) - $this->Error("Template does not exist!"); - if($this->state==0) { $this->AddPage(); } - $out = 'q 0 J 1 w 0 j 0 G'."\n"; // reset standard values - - $x = $this->tpls[$tplidx]['x']; - $y = $this->tpls[$tplidx]['y']; - $w = $this->tpls[$tplidx]['w']; - $h = $this->tpls[$tplidx]['h']; - if ($_x == null) { $_x = $x; } - if ($_y == null) { $_y = $y; } - if ($_x === -1) { $_x = $this->x; } - if ($_y === -1) { $_y = $this->y; } - - $wh = $this->getTemplateSize($tplidx,$_w,$_h); - $_w = $wh['w']; - $_h = $wh['h']; - - $out .= sprintf("q %.4f 0 0 %.4f %.2f %.2f cm", ($_w/$this->tpls[$tplidx]['box']['w']), ($_h/$this->tpls[$tplidx]['box']['h']), $_x*$this->k, ($this->h-($_y+$_h))*$this->k)."\n"; - $out .= $this->tplprefix.$tplidx." Do Q\n"; - - $s = array("w" => $_w, "h" => $_h); - $out .= "Q\n"; - $this->pages[$this->page] = $out . $this->pages[$this->page]; // mPDF 4.2.004 - return $s; -} - -function SetPageTemplate($tplidx='') { - if (!isset($this->tpls[$tplidx])) { - $this->pageTemplate = ''; - return false; - } - $this->pageTemplate = $tplidx; -} - -function SetDocTemplate($file='', $continue=0) { - $this->docTemplate = $file; - $this->docTemplateContinue = $continue; -} -/*-- END IMPORTS --*/ - - - -}//end of Class - - - - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/mpdfi/filters/FilterASCII85.php b/main/inc/lib/mpdf/mpdfi/filters/FilterASCII85.php deleted file mode 100755 index fc42d5742e..0000000000 --- a/main/inc/lib/mpdf/mpdfi/filters/FilterASCII85.php +++ /dev/null @@ -1,98 +0,0 @@ - ORD_u) { - $this->error('Illegal character in ASCII85Decode.'); - } - - $chn[$state++] = $ch - ORD_exclmark; - - if ($state == 5) { - $state = 0; - $r = 0; - for ($j = 0; $j < 5; ++$j) - $r = $r * 85 + $chn[$j]; - $out .= chr($r >> 24); - $out .= chr($r >> 16); - $out .= chr($r >> 8); - $out .= chr($r); - } - } - $r = 0; - - if ($state == 1) - $this->error('Illegal length in ASCII85Decode.'); - if ($state == 2) { - $r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1]+1) * 85 * 85 * 85; - $out .= chr($r >> 24); - } - else if ($state == 3) { - $r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + ($chn[2]+1) * 85 * 85; - $out .= chr($r >> 24); - $out .= chr($r >> 16); - } - else if ($state == 4) { - $r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + $chn[2] * 85 * 85 + ($chn[3]+1) * 85 ; - $out .= chr($r >> 24); - $out .= chr($r >> 16); - $out .= chr($r >> 8); - } - - return $out; - } - - function encode($in) { - $this->error("ASCII85 encoding not implemented."); - } -} \ No newline at end of file diff --git a/main/inc/lib/mpdf/mpdfi/filters/FilterLZW.php b/main/inc/lib/mpdf/mpdfi/filters/FilterLZW.php deleted file mode 100755 index 5867603fc6..0000000000 --- a/main/inc/lib/mpdf/mpdfi/filters/FilterLZW.php +++ /dev/null @@ -1,154 +0,0 @@ -error('LZW flavour not supported.'); - } - - $this->initsTable(); - - $this->data = $data; - $this->dataLength = strlen($data); - - // Initialize pointers - $this->bytePointer = 0; - $this->bitPointer = 0; - - $this->nextData = 0; - $this->nextBits = 0; - - $oldCode = 0; - - $string = ''; - $uncompData = ''; - - while (($code = $this->getNextCode()) != 257) { - if ($code == 256) { - $this->initsTable(); - $code = $this->getNextCode(); - - if ($code == 257) { - break; - } - - $uncompData .= $this->sTable[$code]; - $oldCode = $code; - - } else { - - if ($code < $this->tIdx) { - $string = $this->sTable[$code]; - $uncompData .= $string; - - $this->addStringToTable($this->sTable[$oldCode], $string[0]); - $oldCode = $code; - } else { - $string = $this->sTable[$oldCode]; - $string = $string.$string[0]; - $uncompData .= $string; - - $this->addStringToTable($string); - $oldCode = $code; - } - } - } - - return $uncompData; - } - - - /** - * Initialize the string table. - */ - function initsTable() { - $this->sTable = array(); - - for ($i = 0; $i < 256; $i++) - $this->sTable[$i] = chr($i); - - $this->tIdx = 258; - $this->bitsToGet = 9; - } - - /** - * Add a new string to the string table. - */ - function addStringToTable ($oldString, $newString='') { - $string = $oldString.$newString; - - // Add this new String to the table - $this->sTable[$this->tIdx++] = $string; - - if ($this->tIdx == 511) { - $this->bitsToGet = 10; - } else if ($this->tIdx == 1023) { - $this->bitsToGet = 11; - } else if ($this->tIdx == 2047) { - $this->bitsToGet = 12; - } - } - - // Returns the next 9, 10, 11 or 12 bits - function getNextCode() { - if ($this->bytePointer == $this->dataLength) { - return 257; - } - - $this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff); - $this->nextBits += 8; - - if ($this->nextBits < $this->bitsToGet) { - $this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff); - $this->nextBits += 8; - } - - $code = ($this->nextData >> ($this->nextBits - $this->bitsToGet)) & $this->andTable[$this->bitsToGet-9]; - $this->nextBits -= $this->bitsToGet; - - return $code; - } - - function encode($in) { - $this->error("LZW encoding not implemented."); - } -} \ No newline at end of file diff --git a/main/inc/lib/mpdf/mpdfi/filters/index.html b/main/inc/lib/mpdf/mpdfi/filters/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/mpdfi/filters/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/mpdfi/fpdi_pdf_parser.php b/main/inc/lib/mpdf/mpdfi/fpdi_pdf_parser.php deleted file mode 100755 index 123b2a39c3..0000000000 --- a/main/inc/lib/mpdf/mpdfi/fpdi_pdf_parser.php +++ /dev/null @@ -1,361 +0,0 @@ -fpdi =& $fpdi; - $this->filename = $filename; - - parent::pdf_parser($filename); - if ($this->success == false) { return false; } - - // resolve Pages-Dictonary - $pages = $this->pdf_resolve_object($this->c, $this->root[1][1]['/Pages']); - if ($this->success == false) { return false; } - - // Read pages - $this->read_pages($this->c, $pages, $this->pages); - if ($this->success == false) { return false; } - - // count pages; - $this->page_count = count($this->pages); - } - - - /** - * Get pagecount from sourcefile - * - * @return int - */ - function getPageCount() { - return $this->page_count; - } - - - /** - * Set pageno - * - * @param int $pageno Pagenumber to use - */ - function setPageno($pageno) { - $pageno = ((int) $pageno) - 1; - - if ($pageno < 0 || $pageno >= $this->getPageCount()) { - $this->fpdi->error("Pagenumber is wrong!"); - } - - $this->pageno = $pageno; - } - - /** - * Get page-resources from current page - * - * @return array - */ - function getPageResources() { - return $this->_getPageResources($this->pages[$this->pageno]); - } - - /** - * Get page-resources from /Page - * - * @param array $obj Array of pdf-data - */ - function _getPageResources ($obj) { // $obj = /Page - $obj = $this->pdf_resolve_object($this->c, $obj); - - // If the current object has a resources - // dictionary associated with it, we use - // it. Otherwise, we move back to its - // parent object. - if (isset ($obj[1][1]['/Resources'])) { - $res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Resources']); - if ($res[0] == PDF_TYPE_OBJECT) - return $res[1]; - return $res; - } else { - if (!isset ($obj[1][1]['/Parent'])) { - return false; - } else { - $res = $this->_getPageResources($obj[1][1]['/Parent']); - if ($res[0] == PDF_TYPE_OBJECT) - return $res[1]; - return $res; - } - } - } - - - /** - * Get content of current page - * - * If more /Contents is an array, the streams are concated - * - * @return string - */ - function getContent() { - $buffer = ""; - - if (isset($this->pages[$this->pageno][1][1]['/Contents'])) { - $contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']); - foreach($contents AS $tmp_content) { - $buffer .= $this->_rebuildContentStream($tmp_content).' '; - } - } - - return $buffer; - } - - - /** - * Resolve all content-objects - * - * @param array $content_ref - * @return array - */ - function _getPageContent($content_ref) { - $contents = array(); - - if ($content_ref[0] == PDF_TYPE_OBJREF) { - $content = $this->pdf_resolve_object($this->c, $content_ref); - if ($content[1][0] == PDF_TYPE_ARRAY) { - $contents = $this->_getPageContent($content[1]); - } else { - $contents[] = $content; - } - } else if ($content_ref[0] == PDF_TYPE_ARRAY) { - foreach ($content_ref[1] AS $tmp_content_ref) { - $contents = array_merge($contents,$this->_getPageContent($tmp_content_ref)); - } - } - - return $contents; - } - - - /** - * Rebuild content-streams - * - * @param array $obj - * @return string - */ - function _rebuildContentStream($obj) { - $filters = array(); - - if (isset($obj[1][1]['/Filter'])) { - $_filter = $obj[1][1]['/Filter']; - - if ($_filter[0] == PDF_TYPE_TOKEN) { - $filters[] = $_filter; - } else if ($_filter[0] == PDF_TYPE_ARRAY) { - $filters = $_filter[1]; - } - } - - $stream = $obj[2][1]; - - foreach ($filters AS $_filter) { - switch ($_filter[1]) { - case "/FlateDecode": - if (function_exists('gzuncompress')) { - $stream = (strlen($stream) > 0) ? @gzuncompress($stream) : ''; - } else { - $this->fpdi->error(sprintf("To handle %s filter, please compile php with zlib support.",$_filter[1])); - } - if ($stream === false) { - $this->fpdi->error("Error while decompressing stream."); - } - break; - // mPDF 4.2.003 - case '/LZWDecode': - include_once(_MPDF_PATH.'mpdfi/filters/FilterLZW.php'); - $decoder =& new FilterLZW(); - $stream = $decoder->decode($stream); - break; - case '/ASCII85Decode': - include_once(_MPDF_PATH.'mpdfi/filters/FilterASCII85.php'); - $decoder =& new FilterASCII85(); - $stream = $decoder->decode($stream); - break; - case null: - $stream = $stream; - break; - default: - $this->fpdi->error(sprintf("Unsupported Filter: %s",$_filter[1])); - } - } - - return $stream; - } - - - /** - * Get a Box from a page - * Arrayformat is same as used by fpdf_tpl - * - * @param array $page a /Page - * @param string $box_index Type of Box @see $availableBoxes - * @return array - */ - function getPageBox($page, $box_index) { - $page = $this->pdf_resolve_object($this->c,$page); - $box = null; - if (isset($page[1][1][$box_index])) - $box =& $page[1][1][$box_index]; - - if (!is_null($box) && $box[0] == PDF_TYPE_OBJREF) { - $tmp_box = $this->pdf_resolve_object($this->c,$box); - $box = $tmp_box[1]; - } - - if (!is_null($box) && $box[0] == PDF_TYPE_ARRAY) { - $b =& $box[1]; - return array("x" => $b[0][1]/$this->fpdi->k, - "y" => $b[1][1]/$this->fpdi->k, - "w" => abs($b[0][1]-$b[2][1])/$this->fpdi->k, - "h" => abs($b[1][1]-$b[3][1])/$this->fpdi->k); - } else if (!isset ($page[1][1]['/Parent'])) { - return false; - } else { - return $this->getPageBox($this->pdf_resolve_object($this->c, $page[1][1]['/Parent']), $box_index); - } - } - - function getPageBoxes($pageno) { - return $this->_getPageBoxes($this->pages[$pageno-1]); - } - - /** - * Get all Boxes from /Page - * - * @param array a /Page - * @return array - */ - function _getPageBoxes($page) { - $boxes = array(); - - foreach($this->availableBoxes AS $box) { - if ($_box = $this->getPageBox($page,$box)) { - $boxes[$box] = $_box; - } - } - - return $boxes; - } - - function getPageRotation($pageno) { - return $this->_getPageRotation($this->pages[$pageno-1]); - } - - function _getPageRotation ($obj) { // $obj = /Page - $obj = $this->pdf_resolve_object($this->c, $obj); - if (isset ($obj[1][1]['/Rotate'])) { - $res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Rotate']); - if ($res[0] == PDF_TYPE_OBJECT) - return $res[1]; - return $res; - } else { - if (!isset ($obj[1][1]['/Parent'])) { - return false; - } else { - $res = $this->_getPageRotation($obj[1][1]['/Parent']); - if ($res[0] == PDF_TYPE_OBJECT) - return $res[1]; - return $res; - } - } - } - - /** - * Read all /Page(es) - * - * @param object pdf_context - * @param array /Pages - * @param array the result-array - */ - function read_pages (&$c, &$pages, &$result) { - // Get the kids dictionary - $kids = $this->pdf_resolve_object ($c, $pages[1][1]['/Kids']); - - if (!is_array($kids)) { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("Cannot find /Kids in current /Page-Dictionary"); - return false; - } - foreach ($kids[1] as $v) { - $pg = $this->pdf_resolve_object ($c, $v); - if ($pg[1][1]['/Type'][1] === '/Pages') { - // If one of the kids is an embedded - // /Pages array, resolve it as well. - $this->read_pages ($c, $pg, $result); - } else { - $result[] = $pg; - } - } - } - - - - -} - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/mpdfi/index.html b/main/inc/lib/mpdf/mpdfi/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/mpdfi/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/mpdfi/pdf_context.php b/main/inc/lib/mpdf/mpdfi/pdf_context.php deleted file mode 100755 index 0e961ca5f0..0000000000 --- a/main/inc/lib/mpdf/mpdfi/pdf_context.php +++ /dev/null @@ -1,78 +0,0 @@ -file = $f; - $this->reset(); - } - - // Optionally move the file - // pointer to a new location - // and reset the buffered data - - function reset($pos = null, $l = 100) { - if (!is_null ($pos)) { - fseek ($this->file, $pos); - } - - $this->buffer = $l > 0 ? fread($this->file, $l) : ''; - $this->offset = 0; - $this->length = strlen($this->buffer); - $this->stack = array(); - } - - // Make sure that there is at least one - // character beyond the current offset in - // the buffer to prevent the tokenizer - // from attempting to access data that does - // not exist - - function ensure_content() { - if ($this->offset >= $this->length - 1) { - return $this->increase_length(); - } else { - return true; - } - } - - // Forcefully read more data into the buffer - - function increase_length($l=100) { - if (feof($this->file)) { - return false; - } else { - $this->buffer .= fread($this->file, $l); - $this->length = strlen($this->buffer); - return true; - } - } - -} -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/mpdfi/pdf_parser.php b/main/inc/lib/mpdf/mpdfi/pdf_parser.php deleted file mode 100755 index bb99a280a2..0000000000 --- a/main/inc/lib/mpdf/mpdfi/pdf_parser.php +++ /dev/null @@ -1,688 +0,0 @@ -filename = $filename; - // mPDF 4.0 - $this->success = true; - - $this->f = @fopen($this->filename, "rb"); - - if (!$this->f) { - $this->success = false; - $this->errormsg = sprintf("Cannot open %s !", $filename); - return false; - } - - $this->c =& new pdf_context($this->f); - // Read xref-Data - $offset = $this->pdf_find_xref(); - if ($offset===false) { - $this->success = false; - $this->errormsg = sprintf("Cannot open %s !", $filename); - return false; - } - $this->pdf_read_xref($this->xref, $offset); - if ($this->success == false) { return false; } - - // Check for Encryption - $this->getEncryption(); - if ($this->success == false) { return false; } - - // Read root - $this->pdf_read_root(); - if ($this->success == false) { return false; } - } - - /** - * Close the opened file - */ - function closeFile() { - if (isset($this->f)) { - fclose($this->f); - unset($this->f); - } - } - - /** - * Print Error and die - * - * @param string $msg Error-Message - */ - function error($msg) { - die("PDF-Parser Error: ".$msg); - } - - /** - * Check Trailer for Encryption - */ - function getEncryption() { - if (isset($this->xref['trailer'][1]['/Encrypt'])) { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("File is encrypted!"); - return false; - } - } - - /** - * Find/Return /Root - * - * @return array - */ - function pdf_find_root() { - if ($this->xref['trailer'][1]['/Root'][0] != PDF_TYPE_OBJREF) { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("Wrong Type of Root-Element! Must be an indirect reference"); - return false; - } - return $this->xref['trailer'][1]['/Root']; - } - - /** - * Read the /Root - */ - function pdf_read_root() { - // read root - $root = $this->pdf_find_root(); - if ($root ===false) { - $this->success = false; - return false; - } - $this->root = $this->pdf_resolve_object($this->c, $root); - } - - /** - * Find the xref-Table - */ - function pdf_find_xref() { - fseek ($this->f, -min(filesize($this->filename),1500), SEEK_END); - $data = fread($this->f, 1500); - - $pos = strlen($data) - strpos(strrev($data), strrev('startxref')); - $data = substr($data, $pos); - - if (!preg_match('/\s*(\d+).*$/s', $data, $matches)) { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("Unable to find pointer to xref table"); - return false; - } - - return (int) $matches[1]; - } - - /** - * Read xref-table - * - * @param array $result Array of xref-table - * @param integer $offset of xref-table - * @param integer $start start-position in xref-table - * @param integer $end end-position in xref-table - */ - function pdf_read_xref(&$result, $offset, $start = null, $end = null) { - if (is_null ($start) || is_null ($end)) { - fseek($this->f, $o_pos = $offset); - $data = trim(fgets($this->f,1024)); - - if (strlen($data) == 0) - $data = trim(fgets($this->f,1024)); - - if ($data !== 'xref') { - fseek($this->f, $o_pos); - $data = trim(_fgets($this->f, true)); - if ($data !== 'xref') { - if (preg_match('/(.*xref)(.*)/m', $data, $m)) { // xref 0 128 - in one line - fseek($this->f, $o_pos+strlen($m[1])); - } elseif (preg_match('/(x|r|e|f)+/', $data, $m)) { // correct invalid xref-pointer - $tmpOffset = $offset-4+strlen($m[0]); - $this->pdf_read_xref($result, $tmpOffset, $start, $end); - return; - } else { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("Unable to find xref table - Maybe a Problem with 'auto_detect_line_endings'"); - return; - } - } - } - - $o_pos = ftell($this->f); - $data = explode(' ', trim(fgets($this->f,1024))); - if (count($data) != 2) { - fseek($this->f, $o_pos); - $data = explode(' ', trim(_fgets($this->f, true))); - - if (count($data) != 2) { - if (count($data) > 2) { // no lineending - $n_pos = $o_pos+strlen($data[0])+strlen($data[1])+2; - fseek($this->f, $n_pos); - } else { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("Unexpected header in xref table"); - return; - } - } - } - $start = $data[0]; - $end = $start + $data[1]; - } - - if (!isset($result['xref_location'])) { - $result['xref_location'] = $offset; - } - - if (!isset($result['max_object']) || $end > $result['max_object']) { - $result['max_object'] = $end; - } - - for (; $start < $end; $start++) { - $data = ltrim(fread($this->f, 20)); // Spezifications says: 20 bytes including newlines - $offset = substr($data, 0, 10); - $generation = substr($data, 11, 5); - - if (!isset ($result['xref'][$start][(int) $generation])) { - $result['xref'][$start][(int) $generation] = (int) $offset; - } - } - - $o_pos = ftell($this->f); - $data = fgets($this->f,1024); - if (strlen(trim($data)) == 0) - $data = fgets($this->f, 1024); - - if (preg_match("/trailer/",$data)) { - if (preg_match("/(.*trailer[ \n\r]*)/",$data,$m)) { - fseek($this->f, $o_pos+strlen($m[1])); - } - - $c =& new pdf_context($this->f); - $trailer = $this->pdf_read_value($c); - - if (isset($trailer[1]['/Prev'])) { - $this->pdf_read_xref($result, $trailer[1]['/Prev'][1]); - $result['trailer'][1] = array_merge($result['trailer'][1], $trailer[1]); - } else { - $result['trailer'] = $trailer; - } - } else { - $data = explode(' ', trim($data)); - - if (count($data) != 2) { - fseek($this->f, $o_pos); - $data = explode(' ', trim (_fgets ($this->f, true))); - - if (count($data) != 2) { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("Unexpected data in xref table"); - return; - } - } - - $this->pdf_read_xref($result, null, (int) $data[0], (int) $data[0] + (int) $data[1]); - } - } - - - /** - * Reads an Value - * - * @param object $c pdf_context - * @param string $token a Token - * @return mixed - */ - function pdf_read_value(&$c, $token = null) { - if (is_null($token)) { - $token = $this->pdf_read_token($c); - } - - if ($token === false) { - return false; - } - - switch ($token) { - case '<': - // This is a hex string. - // Read the value, then the terminator - - $pos = $c->offset; - - while(1) { - - $match = strpos ($c->buffer, '>', $pos); - - // If you can't find it, try - // reading more data from the stream - - if ($match === false) { - if (!$c->increase_length()) { - return false; - } else { - continue; - } - } - - $result = substr ($c->buffer, $c->offset, $match - $c->offset); - $c->offset = $match+1; - - return array (PDF_TYPE_HEX, $result); - } - - break; - case '<<': - // This is a dictionary. - - $result = array(); - - // Recurse into this function until we reach - // the end of the dictionary. - while (($key = $this->pdf_read_token($c)) !== '>>') { - if ($key === false) { - return false; - } - - if (($value = $this->pdf_read_value($c)) === false) { - return false; - } - $result[$key] = $value; - } - - return array (PDF_TYPE_DICTIONARY, $result); - - case '[': - // This is an array. - - $result = array(); - - // Recurse into this function until we reach - // the end of the array. - while (($token = $this->pdf_read_token($c)) !== ']') { - if ($token === false) { - return false; - } - - if (($value = $this->pdf_read_value($c, $token)) === false) { - return false; - } - - $result[] = $value; - } - - return array (PDF_TYPE_ARRAY, $result); - - case '(' : - // This is a string - - $pos = $c->offset; - - while(1) { - - // Start by finding the next closed - // parenthesis - - $match = strpos ($c->buffer, ')', $pos); - - // If you can't find it, try - // reading more data from the stream - - if ($match === false) { - if (!$c->increase_length()) { - return false; - } else { - continue; - } - } - - // Make sure that there is no backslash - // before the parenthesis. If there is, - // move on. Otherwise, return the string. - $esc = preg_match('/([\\\\]+)$/', $tmpresult = substr($c->buffer, $c->offset, $match - $c->offset), $m); - - if ($esc === 0 || strlen($m[1]) % 2 == 0) { - $result = $tmpresult; - $c->offset = $match + 1; - return array (PDF_TYPE_STRING, $result); - } else { - $pos = $match + 1; - - if ($pos > $c->offset + $c->length) { - $c->increase_length(); - } - } - } - - case "stream": - $o_pos = ftell($c->file)-strlen($c->buffer); - $o_offset = $c->offset; - - $c->reset($startpos = $o_pos + $o_offset); - - $e = 0; // ensure line breaks in front of the stream - if ($c->buffer[0] == chr(10) || $c->buffer[0] == chr(13)) - $e++; - if ($c->buffer[1] == chr(10) && $c->buffer[0] != chr(10)) - $e++; - - if ($this->actual_obj[1][1]['/Length'][0] == PDF_TYPE_OBJREF) { - $tmp_c =& new pdf_context($this->f); - $tmp_length = $this->pdf_resolve_object($tmp_c,$this->actual_obj[1][1]['/Length']); - $length = $tmp_length[1][1]; - } else { - $length = $this->actual_obj[1][1]['/Length'][1]; - } - - if ($length > 0) { - $c->reset($startpos+$e,$length); - $v = $c->buffer; - } else { - $v = ''; - } - $c->reset($startpos+$e+$length+9); // 9 = strlen("endstream") - - return array(PDF_TYPE_STREAM, $v); - - default : - if (is_numeric ($token)) { - // A numeric token. Make sure that - // it is not part of something else. - if (($tok2 = $this->pdf_read_token ($c)) !== false) { - if (is_numeric ($tok2)) { - - // Two numeric tokens in a row. - // In this case, we're probably in - // front of either an object reference - // or an object specification. - // Determine the case and return the data - if (($tok3 = $this->pdf_read_token ($c)) !== false) { - switch ($tok3) { - case 'obj' : - return array (PDF_TYPE_OBJDEC, (int) $token, (int) $tok2); - case 'R' : - return array (PDF_TYPE_OBJREF, (int) $token, (int) $tok2); - } - // If we get to this point, that numeric value up - // there was just a numeric value. Push the extra - // tokens back into the stack and return the value. - array_push ($c->stack, $tok3); - } - } - - array_push ($c->stack, $tok2); - } - - return array (PDF_TYPE_NUMERIC, $token); - } else { - - // Just a token. Return it. - return array (PDF_TYPE_TOKEN, $token); - } - - } - } - - /** - * Resolve an object - * - * @param object $c pdf_context - * @param array $obj_spec The object-data - * @param boolean $encapsulate Must set to true, cause the parsing and fpdi use this method only without this para - */ - function pdf_resolve_object(&$c, $obj_spec, $encapsulate = true) { - // Exit if we get invalid data - if (!is_array($obj_spec)) { - return false; - } - - if ($obj_spec[0] == PDF_TYPE_OBJREF) { - - // This is a reference, resolve it - if (isset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]])) { - - // Save current file position - // This is needed if you want to resolve - // references while you're reading another object - // (e.g.: if you need to determine the length - // of a stream) - - $old_pos = ftell($c->file); - - // Reposition the file pointer and - // load the object header. - - $c->reset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]]); - - $header = $this->pdf_read_value($c,null,true); - - if ($header[0] != PDF_TYPE_OBJDEC || $header[1] != $obj_spec[1] || $header[2] != $obj_spec[2]) { - // mPDF 4.0 - $this->success = false; - $this->errormsg = sprintf("Unable to find object ({$obj_spec[1]}, {$obj_spec[2]}) at expected location"); - return false; - } - - // If we're being asked to store all the information - // about the object, we add the object ID and generation - // number for later use - $this->actual_obj =& $result; - if ($encapsulate) { - $result = array ( - PDF_TYPE_OBJECT, - 'obj' => $obj_spec[1], - 'gen' => $obj_spec[2] - ); - } else { - $result = array(); - } - - // Now simply read the object data until - // we encounter an end-of-object marker - while(1) { - $value = $this->pdf_read_value($c); - if ($value === false || count($result) > 4) { - // in this case the parser coudn't find an endobj so we break here - break; - } - - if ($value[0] == PDF_TYPE_TOKEN && $value[1] === 'endobj') { - break; - } - - $result[] = $value; - } - - $c->reset($old_pos); - - if (isset($result[2][0]) && $result[2][0] == PDF_TYPE_STREAM) { - $result[0] = PDF_TYPE_STREAM; - } - - return $result; - } - } else { - return $obj_spec; - } - } - - - - /** - * Reads a token from the file - * - * @param object $c pdf_context - * @return mixed - */ - function pdf_read_token(&$c) - { - // If there is a token available - // on the stack, pop it out and - // return it. - - if (count($c->stack)) { - return array_pop($c->stack); - } - - // Strip away any whitespace - - do { - if (!$c->ensure_content()) { - return false; - } - $c->offset += _strspn($c->buffer, " \n\r\t", $c->offset); - } while ($c->offset >= $c->length - 1); - - // Get the first character in the stream - - $char = $c->buffer[$c->offset++]; - - switch ($char) { - - case '[' : - case ']' : - case '(' : - case ')' : - - // This is either an array or literal string - // delimiter, Return it - - return $char; - - case '<' : - case '>' : - - // This could either be a hex string or - // dictionary delimiter. Determine the - // appropriate case and return the token - - if ($c->buffer[$c->offset] == $char) { - if (!$c->ensure_content()) { - return false; - } - $c->offset++; - return $char . $char; - } else { - return $char; - } - - default : - - // This is "another" type of token (probably - // a dictionary entry or a numeric value) - // Find the end and return it. - - if (!$c->ensure_content()) { - return false; - } - - while(1) { - - // Determine the length of the token - - $pos = _strcspn($c->buffer, " []<>()\r\n\t/", $c->offset); - if ($c->offset + $pos <= $c->length - 1) { - break; - } else { - // If the script reaches this point, - // the token may span beyond the end - // of the current buffer. Therefore, - // we increase the size of the buffer - // and try again--just to be safe. - - $c->increase_length(); - } - } - - $result = substr($c->buffer, $c->offset - 1, $pos + 1); - - $c->offset += $pos; - return $result; - } - } - - -} - -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/NOTES.txt b/main/inc/lib/mpdf/patterns/NOTES.txt deleted file mode 100755 index 89c9c57e28..0000000000 --- a/main/inc/lib/mpdf/patterns/NOTES.txt +++ /dev/null @@ -1,5 +0,0 @@ -Alternative sources of Hyphenation programs or TEX files: - -OpenOffice: http://wiki.services.openoffice.org/wiki/Dictionaries - -Hyphenator4PHP- alternative PHP hyphenator scripts: http://apps.sourceforge.net/trac/hyphenator4php/ \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/de.php b/main/inc/lib/mpdf/patterns/de.php deleted file mode 100755 index 01548ed8e4..0000000000 --- a/main/inc/lib/mpdf/patterns/de.php +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/dictionary.txt b/main/inc/lib/mpdf/patterns/dictionary.txt deleted file mode 100755 index 2241840894..0000000000 --- a/main/inc/lib/mpdf/patterns/dictionary.txt +++ /dev/null @@ -1 +0,0 @@ -dis/es/tab/lish/men/tar/i/an/ism diff --git a/main/inc/lib/mpdf/patterns/en.php b/main/inc/lib/mpdf/patterns/en.php deleted file mode 100755 index 21d8baa50a..0000000000 --- a/main/inc/lib/mpdf/patterns/en.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/es.php b/main/inc/lib/mpdf/patterns/es.php deleted file mode 100755 index 96b40c58ea..0000000000 --- a/main/inc/lib/mpdf/patterns/es.php +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/fi.php b/main/inc/lib/mpdf/patterns/fi.php deleted file mode 100755 index 2cf77af7fa..0000000000 --- a/main/inc/lib/mpdf/patterns/fi.php +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/fr.php b/main/inc/lib/mpdf/patterns/fr.php deleted file mode 100755 index 2e0fe4ec21..0000000000 --- a/main/inc/lib/mpdf/patterns/fr.php +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/index.html b/main/inc/lib/mpdf/patterns/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/patterns/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/it.php b/main/inc/lib/mpdf/patterns/it.php deleted file mode 100755 index 30eb9a9bb0..0000000000 --- a/main/inc/lib/mpdf/patterns/it.php +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/nl.php b/main/inc/lib/mpdf/patterns/nl.php deleted file mode 100755 index ae02aa1616..0000000000 --- a/main/inc/lib/mpdf/patterns/nl.php +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/pl.php b/main/inc/lib/mpdf/patterns/pl.php deleted file mode 100755 index 8cae52a439..0000000000 --- a/main/inc/lib/mpdf/patterns/pl.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/main/inc/lib/mpdf/patterns/ru.php b/main/inc/lib/mpdf/patterns/ru.php deleted file mode 100755 index c87b58c017..0000000000 --- a/main/inc/lib/mpdf/patterns/ru.php +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/patterns/sv.php b/main/inc/lib/mpdf/patterns/sv.php deleted file mode 100755 index 9029b3357d..0000000000 --- a/main/inc/lib/mpdf/patterns/sv.php +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/main/inc/lib/mpdf/progress/index.html b/main/inc/lib/mpdf/progress/index.html deleted file mode 100755 index aa7b9c934b..0000000000 --- a/main/inc/lib/mpdf/progress/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/main/inc/lib/mpdf/progress/jsProgressBarHandler.js.php b/main/inc/lib/mpdf/progress/jsProgressBarHandler.js.php deleted file mode 100755 index 8df3be2730..0000000000 --- a/main/inc/lib/mpdf/progress/jsProgressBarHandler.js.php +++ /dev/null @@ -1,504 +0,0 @@ -/***************************************************************** - * - * jsProgressBarHandler 0.3.3 - by Bramus! - http://www.bram.us/ - * - * v 0.3.3 - 2008.11.10 - UPD: fixed IE compatibility issue (thanks Kevin - Sep 19 2008 / 6pm) - * - UPD: setPercentage now parses the targetPercentage to an Integer to avoid infinite loop (thanks Jack - Sep 07 2008 / 9pm) - * - UPD: Moved from Event.Observe(window, 'load', fn) to document.observe('dom:loaded', fn) in order to force people to use an up to date Prototype release. - * - UPD: setPercentage now takes an overrideQueue param. If set the current queue is cleared. - * - ADD: Added onTick callback event which gets called when the percentage is updated. - * - ADD: Added stable (as in "non-crashing") versions of the additions which first surfaced in the (unreleased) 0.3.2 release - * Preloading support partially implemented in IE as all versions (IE6,7&8) are quite hard to tame (one time they work, the next reload they don't anymore) - * v 0.3.2 - 2008.04.09 (*UNRELEASED*) - * - ADD: implemented preloading of images to avoid slight flicker when switching images (BUGGY!) - * - ADD: percentage image now has class percentImage and percentage Text now has class percentText; This allows you to style the output easily. - * v 0.3.1 - 2008.02.20 - UPD: fixed queue bug when animate was set to false (thanks Jamie Chong) - * - UPD: update Prototype to version 1.6.0.2 - * v 0.3.0 - 2008.02.01 - ADD: animation queue, prevents from the progressbar getting stuck when multiple calls are made during an animation - * - UPD: multiple barImages now work properly in Safari - * v 0.2.1 - 2007.12.20 - ADD: option : set boxImage - * ADD: option : set barImage (one or more) - * ADD: option : showText - * v 0.2 - 2007.12.13 - SYS: rewrite in 2 classs including optimisations - * ADD: Config options - * v 0.1 - 2007.08.02 - initial release - * - * @see http://www.barenakedapp.com/the-design/displaying-percentages on how to create a progressBar Background Image! - * - * Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/ - * - *****************************************************************/ - -// mPDF - see edit near end of script - - /** - * CONFIG - * ------------------------------------------------------------- - */ - - // Should jsProgressBarHandler hook itself to all span.progressBar elements? - default : true - var autoHook = true; - - // Default Options - var defaultOptions = { - animate : false, // Animate the progress? - default: true - showText : false, // show text with percentage in next to the progressbar? - default : true - width : 120, // Width of the progressbar - don't forget to adjust your image too!!! - height : 12, // Height of the progressbar - don't forget to adjust your image too!!! - boxImage : 'progress/progbarback.png', // boxImage : image around the progress bar - barImage : 'progress/progbar.png', // Image to use in the progressbar. Can be an array of images - onTick : function(pbObj) { return true } - } - - /** - * NO NEED TO CHANGE ANYTHING BENEATH THIS LINE - * ------------------------------------------------------------- - */ - - /** - * JS_BRAMUS Object - * ------------------------------------------------------------- - */ - - if (!JS_BRAMUS) { var JS_BRAMUS = new Object(); } - - - /** - * ProgressBar Class - * ------------------------------------------------------------- - */ - - JS_BRAMUS.jsProgressBar = Class.create(); - - JS_BRAMUS.jsProgressBar.prototype = { - - - /** - * Datamembers - * ------------------------------------------------------------- - */ - - el : null, // Element where to render the progressBar in - id : null, // Unique ID of the progressbar - percentage : null, // Percentage of the progressbar - options : null, // The options - - initialPos : null, // Initial postion of the background in the progressbar - initialPerc : null, // Initial percentage the progressbar should hold - pxPerPercent : null, // Number of pixels per 1 percent - - backIndex : null, // index in the array of background images currently used - numPreloaded : null, // number of images preloaded - - running : null, // is this one running (being animated) or not? - - queue : false, // queue of percentages to set to - - - /** - * Constructor - * - * @param HTMLElement el - * @param string id - * @param int percentage - * @return void - * ------------------------------------------------------------- - */ - - initialize : function(el, percentage, options) { - - // get the options - this.options = Object.clone(defaultOptions); - Object.extend(this.options, options || {}); - - // datamembers from arguments - this.el = $(el); - this.id = $(el).id; - this.percentage = 0; // Set to 0 intially, we'll change this later. - this.backIndex = 0; // Set to 0 initially - this.numPreloaded = 0; // Set to 0 initially - this.running = false; // Set to false initially - this.queue = Array(); // Set to empty Array initially - - // datamembers which are calculatef - this.imgWidth = this.options.width * 2; // define the width of the image (twice the width of the progressbar) - this.initialPos = this.options.width * (-1); // Initial postion of the background in the progressbar (0% is the middle of our image!) - this.pxPerPercent = this.options.width / 100; // Define how much pixels go into 1% - this.initialPerc = percentage; // Store this, we'll need it later. - - // enfore backimage array - if (this.options.barImage.constructor != Array) { // used to be (but doesn't work in Safari): if (this.options.barImage.constructor.toString().indexOf("Array") == -1) { - this.options.barImage = Array(this.options.barImage); - } - - // preload Images - this.preloadImages(); - - }, - - - /** - * Preloads the images needed for the progressbar - * - * @return void - * ------------------------------------------------------------- - */ - - preloadImages : function() { - - // loop all barimages - for (i = 0; i < this.options.barImage.length; i++) { - - // create new image ref - var newImage = null; - newImage = new Image(); - - // set onload, onerror and onabort functions - newImage.onload = function() { this.numPreloaded++; }.bind(this); - newImage.onerror = function() { this.numPreloaded++; }.bind(this); - newImage.onabort = function() { this.numPreloaded++; }.bind(this); - - // set image source (preload it!) - newImage.src = this.options.barImage[i]; - - // image is in cache - if (newImage.complete) { - this.numPreloaded++; - } - - } - - // if not IE, check if they're loaded - if (!Prototype.Browser.IE) { - this.checkPreloadedImages(); - - // if IE, just init the visuals as it's quite hard to tame all IE's - } else { - this.initVisuals(); - } - - }, - - - /** - * Check whether all images are preloaded and loads the percentage if so - * - * @return void - * ------------------------------------------------------------- - */ - - checkPreloadedImages : function() { - - // all images are loaded, go init the visuals - if (parseInt(this.numPreloaded,10) >= parseInt(this.options.barImage.length,10) ) { - - // initVisuals - this.initVisuals(); - - // not all images are loaded ... wait a little and then retry - } else { - - if ( parseInt(this.numPreloaded,10) <= parseInt(this.options.barImage.length,10) ) { - // $(this.el).update(this.id + ' : ' + this.numPreloaded + '/' + this.options.barImage.length); - setTimeout(function() { this.checkPreloadedImages(); }.bind(this), 100); - } - - } - - }, - - - /** - * Intializes the visual output and sets the percentage - * - * @return void - * ------------------------------------------------------------- - */ - - initVisuals : function () { - - // create the visual aspect of the progressBar - $(this.el).update( - '0%' + - ((this.options.showText == true)?'0%':'')); - - // set the percentage - this.setPercentage(this.initialPerc); - }, - - - /** - * Sets the percentage of the progressbar - * - * @param string targetPercentage - * @param boolen clearQueue - * @return void - * ------------------------------------------------------------- - */ - setPercentage : function(targetPercentage, clearQueue) { - - // if clearQueue is set, empty the queue and then set the percentage - if (clearQueue) { - - this.percentage = (this.queue.length != 0) ? this.queue[0] : targetPercentage; - this.timer = null; - this.queue = []; - - setTimeout(function() { this.setPercentage(targetPercentage); }.bind(this), 10); - - // no clearQueue defined, set the percentage - } else { - - // add the percentage on the queue - this.queue.push(targetPercentage); - - // process the queue (if not running already) - if (this.running == false) { - this.processQueue(); - } - } - - }, - - - /** - * Processes the queue - * - * @return void - * ------------------------------------------------------------- - */ - - processQueue : function() { - - // stuff on queue? - if (this.queue.length > 0) { - - // tell the world that we're busy - this.running = true; - - // process the entry - this.processQueueEntry(this.queue[0]); - - // no stuff on queue - } else { - - // return; - return; - - } - - }, - - - /** - * Processes an entry from the queue (viz. animates it) - * - * @param string targetPercentage - * @return void - * ------------------------------------------------------------- - */ - - processQueueEntry : function(targetPercentage) { - - // get the current percentage - var curPercentage = parseInt(this.percentage,10); - - // define the new percentage - if ((targetPercentage.toString().substring(0,1) == "+") || (targetPercentage.toString().substring(0,1) == "-")) { - targetPercentage = curPercentage + parseInt(targetPercentage); - } - - // min and max percentages - if (targetPercentage < 0) targetPercentage = 0; - if (targetPercentage > 100) targetPercentage = 100; - - // if we don't need to animate, just change the background position right now and return - if (this.options.animate == false) { - - // remove the entry from the queue - this.queue.splice(0,1); // @see: http://www.bram.us/projects/js_bramus/jsprogressbarhandler/#comment-174878 - - // Change the background position (and update this.percentage) - this._setBgPosition(targetPercentage); - - // call onTick - if (!this.options.onTick(this)) { - return; - } - - // we're not running anymore - this.running = false; - - // continue processing the queue - this.processQueue(); - - // we're done! - return; - } - - // define if we need to add/subtract something to the current percentage in order to reach the target percentage - if (targetPercentage != curPercentage) { - if (curPercentage < targetPercentage) { - newPercentage = curPercentage + 1; - } else { - newPercentage = curPercentage - 1; - } - callTick = true; - } else { - newPercentage = curPercentage; - callTick = false; - } - - // Change the background position (and update this.percentage) - this._setBgPosition(newPercentage); - - // call onTick - if (callTick && !this.options.onTick(this)) { - return; - } - - // Percentage not reached yet : continue processing entry - if (curPercentage != newPercentage) { - - this.timer = setTimeout(function() { this.processQueueEntry(targetPercentage); }.bind(this), 10); - - // Percentage reached! - } else { - - // remove the entry from the queue - this.queue.splice(0,1); - - // we're not running anymore - this.running = false; - - // unset timer - this.timer = null; - - // process the rest of the queue - this.processQueue(); - - // we're done! - return; - } - - }, - - - /** - * Gets the percentage of the progressbar - * - * @return int - */ - getPercentage : function(id) { - return this.percentage; - }, - - - /** - * Set the background position - * - * @param int percentage - */ - _setBgPosition : function(percentage) { - // adjust the background position - $(this.id + "_percentImage").style.backgroundPosition = (this.initialPos + (percentage * this.pxPerPercent)) + "px 50%"; - - // adjust the background image and backIndex - var newBackIndex = Math.floor((percentage-1) / (100/this.options.barImage.length)); - - if ((newBackIndex != this.backIndex) && (this.options.barImage[newBackIndex] != undefined)) { - $(this.id + "_percentImage").style.backgroundImage = "url(" + this.options.barImage[newBackIndex] + ")"; - } - - this.backIndex = newBackIndex; - - // Adjust the alt & title of the image - $(this.id + "_percentImage").alt = percentage + "%"; - $(this.id + "_percentImage").title = percentage + "%"; - - // Update the text - if (this.options.showText == true) { - $(this.id + "_percentText").update("" + percentage + "%"); - } - - // adjust datamember to stock the percentage - this.percentage = percentage; - } - } - - - /** - * ProgressHandlerBar Class - automatically create ProgressBar instances - * ------------------------------------------------------------- - */ - - JS_BRAMUS.jsProgressBarHandler = Class.create(); - - - JS_BRAMUS.jsProgressBarHandler.prototype = { - - - /** - * Datamembers - * ------------------------------------------------------------- - */ - - pbArray : new Array(), // Array of progressBars - - - /** - * Constructor - * - * @return void - * ------------------------------------------------------------- - */ - - initialize : function() { - - // get all span.progressBar elements - $$('span.progressBar').each(function(el) { - - // create a progressBar for each element - this.pbArray[el.id] = new JS_BRAMUS.jsProgressBar(el, parseInt(el.innerHTML.replace("%",""))); - - }.bind(this)); - }, - - - /** - * Set the percentage of a progressbar - * - * @param string el - * @param string percentage - * @return void - * ------------------------------------------------------------- - */ - setPercentage : function(el, percentage, clearQueue) { - this.pbArray[el].setPercentage(percentage, clearQueue); - }, - - - /** - * Get the percentage of a progressbar - * - * @param string el - * @return int percentage - * ------------------------------------------------------------- - */ - getPercentage : function(el) { - return this.pbArray[el].getPercentage(); - } - - } - - - /** - * ProgressHandlerBar Class - hook me or not? - * ------------------------------------------------------------- - */ - - if (autoHook == true) { - function initProgressBarHandler() { myJsProgressBarHandler = new JS_BRAMUS.jsProgressBarHandler(); } - //document.observe('dom:loaded', initProgressBarHandler, false); - initProgressBarHandler(); // mPDF edit to show immediately before loaded - } \ No newline at end of file diff --git a/main/inc/lib/mpdf/progress/out.php b/main/inc/lib/mpdf/progress/out.php deleted file mode 100755 index 8b49fe184d..0000000000 --- a/main/inc/lib/mpdf/progress/out.php +++ /dev/null @@ -1,75 +0,0 @@ -24 hrs old - $interval = 86400; - // Modified by Ivan Tcholakov, 28-JAN-2010. - //if ($handle = opendir('../tmp')) { - // while (false !== ($file = readdir($handle))) { - // if (((filemtime('../tmp/'.$file)+$interval) < time()) && ($file != "..") && ($file != ".")) { - // unlink('../tmp/'.$file); - // } - // } - // closedir($handle); - //} - if ($handle = opendir(_MPDF_TEMP_PATH)) { - while (false !== ($file = readdir($handle))) { - if (((filemtime(_MPDF_TEMP_PATH.$file)+$interval) < time()) && ($file != "..") && ($file != ".")) { - unlink(_MPDF_TEMP_PATH.$file); - } - } - closedir($handle); - } - // - exit; - } -?> \ No newline at end of file diff --git a/main/inc/lib/mpdf/progress/progbar.png b/main/inc/lib/mpdf/progress/progbar.png deleted file mode 100755 index 794cb49f10..0000000000 Binary files a/main/inc/lib/mpdf/progress/progbar.png and /dev/null differ diff --git a/main/inc/lib/mpdf/progress/progbarback.png b/main/inc/lib/mpdf/progress/progbarback.png deleted file mode 100755 index c528d65eb8..0000000000 Binary files a/main/inc/lib/mpdf/progress/progbarback.png and /dev/null differ diff --git a/main/inc/lib/mpdf/progress/prototype.js.php b/main/inc/lib/mpdf/progress/prototype.js.php deleted file mode 100755 index 6385503a1c..0000000000 --- a/main/inc/lib/mpdf/progress/prototype.js.php +++ /dev/null @@ -1,4221 +0,0 @@ -/* Prototype JavaScript framework, version 1.6.0.2 - * (c) 2005-2008 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://www.prototypejs.org/ - * - *--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.6.0.2', - - Browser: { - IE: !!(window.attachEvent && !window.opera), - Opera: !!window.opera, - WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, - Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, - MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) - }, - - BrowserFeatures: { - XPath: !!document.evaluate, - ElementExtensions: !!window.HTMLElement, - SpecificElementExtensions: - document.createElement('div').__proto__ && - document.createElement('div').__proto__ !== - document.createElement('form').__proto__ - }, - - ScriptFragment: ']*>([\\S\\s]*?)<\/script>', - JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, - - emptyFunction: function() { }, - K: function(x) { return x } -}; - -if (Prototype.Browser.MobileSafari) - Prototype.BrowserFeatures.SpecificElementExtensions = false; - - -/* Based on Alex Arnell's inheritance implementation. */ -var Class = { - create: function() { - var parent = null, properties = $A(arguments); - if (Object.isFunction(properties[0])) - parent = properties.shift(); - - function klass() { - this.initialize.apply(this, arguments); - } - - Object.extend(klass, Class.Methods); - klass.superclass = parent; - klass.subclasses = []; - - if (parent) { - var subclass = function() { }; - subclass.prototype = parent.prototype; - klass.prototype = new subclass; - parent.subclasses.push(klass); - } - - for (var i = 0; i < properties.length; i++) - klass.addMethods(properties[i]); - - if (!klass.prototype.initialize) - klass.prototype.initialize = Prototype.emptyFunction; - - klass.prototype.constructor = klass; - - return klass; - } -}; - -Class.Methods = { - addMethods: function(source) { - var ancestor = this.superclass && this.superclass.prototype; - var properties = Object.keys(source); - - if (!Object.keys({ toString: true }).length) - properties.push("toString", "valueOf"); - - for (var i = 0, length = properties.length; i < length; i++) { - var property = properties[i], value = source[property]; - if (ancestor && Object.isFunction(value) && - value.argumentNames().first() == "$super") { - var method = value, value = Object.extend((function(m) { - return function() { return ancestor[m].apply(this, arguments) }; - })(property).wrap(method), { - valueOf: function() { return method }, - toString: function() { return method.toString() } - }); - } - this.prototype[property] = value; - } - - return this; - } -}; - -var Abstract = { }; - -Object.extend = function(destination, source) { - for (var property in source) - destination[property] = source[property]; - return destination; -}; - -Object.extend(Object, { - inspect: function(object) { - try { - if (Object.isUndefined(object)) return 'undefined'; - if (object === null) return 'null'; - return object.inspect ? object.inspect() : String(object); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } - }, - - toJSON: function(object) { - var type = typeof object; - switch (type) { - case 'undefined': - case 'function': - case 'unknown': return; - case 'boolean': return object.toString(); - } - - if (object === null) return 'null'; - if (object.toJSON) return object.toJSON(); - if (Object.isElement(object)) return; - - var results = []; - for (var property in object) { - var value = Object.toJSON(object[property]); - if (!Object.isUndefined(value)) - results.push(property.toJSON() + ': ' + value); - } - - return '{' + results.join(', ') + '}'; - }, - - toQueryString: function(object) { - return $H(object).toQueryString(); - }, - - toHTML: function(object) { - return object && object.toHTML ? object.toHTML() : String.interpret(object); - }, - - keys: function(object) { - var keys = []; - for (var property in object) - keys.push(property); - return keys; - }, - - values: function(object) { - var values = []; - for (var property in object) - values.push(object[property]); - return values; - }, - - clone: function(object) { - return Object.extend({ }, object); - }, - - isElement: function(object) { - return object && object.nodeType == 1; - }, - - isArray: function(object) { - return object != null && typeof object == "object" && - 'splice' in object && 'join' in object; - }, - - isHash: function(object) { - return object instanceof Hash; - }, - - isFunction: function(object) { - return typeof object == "function"; - }, - - isString: function(object) { - return typeof object == "string"; - }, - - isNumber: function(object) { - return typeof object == "number"; - }, - - isUndefined: function(object) { - return typeof object == "undefined"; - } -}); - -Object.extend(Function.prototype, { - argumentNames: function() { - var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip"); - return names.length == 1 && !names[0] ? [] : names; - }, - - bind: function() { - if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this; - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } - }, - - bindAsEventListener: function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [event || window.event].concat(args)); - } - }, - - curry: function() { - if (!arguments.length) return this; - var __method = this, args = $A(arguments); - return function() { - return __method.apply(this, args.concat($A(arguments))); - } - }, - - delay: function() { - var __method = this, args = $A(arguments), timeout = args.shift() * 1000; - return window.setTimeout(function() { - return __method.apply(__method, args); - }, timeout); - }, - - wrap: function(wrapper) { - var __method = this; - return function() { - return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); - } - }, - - methodize: function() { - if (this._methodized) return this._methodized; - var __method = this; - return this._methodized = function() { - return __method.apply(null, [this].concat($A(arguments))); - }; - } -}); - -Function.prototype.defer = Function.prototype.delay.curry(0.01); - -Date.prototype.toJSON = function() { - return '"' + this.getUTCFullYear() + '-' + - (this.getUTCMonth() + 1).toPaddedString(2) + '-' + - this.getUTCDate().toPaddedString(2) + 'T' + - this.getUTCHours().toPaddedString(2) + ':' + - this.getUTCMinutes().toPaddedString(2) + ':' + - this.getUTCSeconds().toPaddedString(2) + 'Z"'; -}; - -var Try = { - these: function() { - var returnValue; - - for (var i = 0, length = arguments.length; i < length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) { } - } - - return returnValue; - } -}; - -RegExp.prototype.match = RegExp.prototype.test; - -RegExp.escape = function(str) { - return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); -}; - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create({ - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - execute: function() { - this.callback(this); - }, - - stop: function() { - if (!this.timer) return; - clearInterval(this.timer); - this.timer = null; - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.execute(); - } finally { - this.currentlyExecuting = false; - } - } - } -}); -Object.extend(String, { - interpret: function(value) { - return value == null ? '' : String(value); - }, - specialChar: { - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '\\': '\\\\' - } -}); - -Object.extend(String.prototype, { - gsub: function(pattern, replacement) { - var result = '', source = this, match; - replacement = arguments.callee.prepareReplacement(replacement); - - while (source.length > 0) { - if (match = source.match(pattern)) { - result += source.slice(0, match.index); - result += String.interpret(replacement(match)); - source = source.slice(match.index + match[0].length); - } else { - result += source, source = ''; - } - } - return result; - }, - - sub: function(pattern, replacement, count) { - replacement = this.gsub.prepareReplacement(replacement); - count = Object.isUndefined(count) ? 1 : count; - - return this.gsub(pattern, function(match) { - if (--count < 0) return match[0]; - return replacement(match); - }); - }, - - scan: function(pattern, iterator) { - this.gsub(pattern, iterator); - return String(this); - }, - - truncate: function(length, truncation) { - length = length || 30; - truncation = Object.isUndefined(truncation) ? '...' : truncation; - return this.length > length ? - this.slice(0, length - truncation.length) + truncation : String(this); - }, - - strip: function() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); - }, - - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(function(script) { return eval(script) }); - }, - - escapeHTML: function() { - var self = arguments.callee; - self.text.data = this; - return self.div.innerHTML; - }, - - unescapeHTML: function() { - var div = new Element('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? (div.childNodes.length > 1 ? - $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : - div.childNodes[0].nodeValue) : ''; - }, - - toQueryParams: function(separator) { - var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return { }; - - return match[1].split(separator || '&').inject({ }, function(hash, pair) { - if ((pair = pair.split('='))[0]) { - var key = decodeURIComponent(pair.shift()); - var value = pair.length > 1 ? pair.join('=') : pair[0]; - if (value != undefined) value = decodeURIComponent(value); - - if (key in hash) { - if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; - hash[key].push(value); - } - else hash[key] = value; - } - return hash; - }); - }, - - toArray: function() { - return this.split(''); - }, - - succ: function() { - return this.slice(0, this.length - 1) + - String.fromCharCode(this.charCodeAt(this.length - 1) + 1); - }, - - times: function(count) { - return count < 1 ? '' : new Array(count + 1).join(this); - }, - - camelize: function() { - var parts = this.split('-'), len = parts.length; - if (len == 1) return parts[0]; - - var camelized = this.charAt(0) == '-' - ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) - : parts[0]; - - for (var i = 1; i < len; i++) - camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); - - return camelized; - }, - - capitalize: function() { - return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); - }, - - underscore: function() { - return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); - }, - - dasherize: function() { - return this.gsub(/_/,'-'); - }, - - inspect: function(useDoubleQuotes) { - var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { - var character = String.specialChar[match[0]]; - return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); - }); - if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; - }, - - toJSON: function() { - return this.inspect(true); - }, - - unfilterJSON: function(filter) { - return this.sub(filter || Prototype.JSONFilter, '#{1}'); - }, - - isJSON: function() { - var str = this; - if (str.blank()) return false; - str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); - return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); - }, - - evalJSON: function(sanitize) { - var json = this.unfilterJSON(); - try { - if (!sanitize || json.isJSON()) return eval('(' + json + ')'); - } catch (e) { } - throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); - }, - - include: function(pattern) { - return this.indexOf(pattern) > -1; - }, - - startsWith: function(pattern) { - return this.indexOf(pattern) === 0; - }, - - endsWith: function(pattern) { - var d = this.length - pattern.length; - return d >= 0 && this.lastIndexOf(pattern) === d; - }, - - empty: function() { - return this == ''; - }, - - blank: function() { - return /^\s*$/.test(this); - }, - - interpolate: function(object, pattern) { - return new Template(this, pattern).evaluate(object); - } -}); - -if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, { - escapeHTML: function() { - return this.replace(/&/g,'&').replace(//g,'>'); - }, - unescapeHTML: function() { - return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); - } -}); - -String.prototype.gsub.prepareReplacement = function(replacement) { - if (Object.isFunction(replacement)) return replacement; - var template = new Template(replacement); - return function(match) { return template.evaluate(match) }; -}; - -String.prototype.parseQuery = String.prototype.toQueryParams; - -Object.extend(String.prototype.escapeHTML, { - div: document.createElement('div'), - text: document.createTextNode('') -}); - -with (String.prototype.escapeHTML) div.appendChild(text); - -var Template = Class.create({ - initialize: function(template, pattern) { - this.template = template.toString(); - this.pattern = pattern || Template.Pattern; - }, - - evaluate: function(object) { - if (Object.isFunction(object.toTemplateReplacements)) - object = object.toTemplateReplacements(); - - return this.template.gsub(this.pattern, function(match) { - if (object == null) return ''; - - var before = match[1] || ''; - if (before == '\\') return match[2]; - - var ctx = object, expr = match[3]; - var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/; - match = pattern.exec(expr); - if (match == null) return before; - - while (match != null) { - var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; - ctx = ctx[comp]; - if (null == ctx || '' == match[3]) break; - expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); - match = pattern.exec(expr); - } - - return before + String.interpret(ctx); - }); - } -}); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; - -var $break = { }; - -var Enumerable = { - each: function(iterator, context) { - var index = 0; - iterator = iterator.bind(context); - try { - this._each(function(value) { - iterator(value, index++); - }); - } catch (e) { - if (e != $break) throw e; - } - return this; - }, - - eachSlice: function(number, iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var index = -number, slices = [], array = this.toArray(); - while ((index += number) < array.length) - slices.push(array.slice(index, index+number)); - return slices.collect(iterator, context); - }, - - all: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result = true; - this.each(function(value, index) { - result = result && !!iterator(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result = false; - this.each(function(value, index) { - if (result = !!iterator(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function(iterator, context) { - iterator = iterator.bind(context); - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator, context) { - iterator = iterator.bind(context); - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(filter, iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var results = []; - - if (Object.isString(filter)) - filter = new RegExp(filter); - - this.each(function(value, index) { - if (filter.match(value)) - results.push(iterator(value, index)); - }); - return results; - }, - - include: function(object) { - if (Object.isFunction(this.indexOf)) - if (this.indexOf(object) != -1) return true; - - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inGroupsOf: function(number, fillWith) { - fillWith = Object.isUndefined(fillWith) ? null : fillWith; - return this.eachSlice(number, function(slice) { - while(slice.length < number) slice.push(fillWith); - return slice; - }); - }, - - inject: function(memo, iterator, context) { - iterator = iterator.bind(context); - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.map(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result; - this.each(function(value, index) { - value = iterator(value, index); - if (result == null || value >= result) - result = value; - }); - return result; - }, - - min: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result; - this.each(function(value, index) { - value = iterator(value, index); - if (result == null || value < result) - result = value; - }); - return result; - }, - - partition: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var trues = [], falses = []; - this.each(function(value, index) { - (iterator(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator, context) { - iterator = iterator.bind(context); - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator, context) { - iterator = iterator.bind(context); - return this.map(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.map(); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (Object.isFunction(args.last())) - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - return iterator(collections.pluck(index)); - }); - }, - - size: function() { - return this.toArray().length; - }, - - inspect: function() { - return '#'; - } -}; - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - filter: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray, - every: Enumerable.all, - some: Enumerable.any -}); -function $A(iterable) { - if (!iterable) return []; - if (iterable.toArray) return iterable.toArray(); - var length = iterable.length || 0, results = new Array(length); - while (length--) results[length] = iterable[length]; - return results; -} - -if (Prototype.Browser.WebKit) { - $A = function(iterable) { - if (!iterable) return []; - if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') && - iterable.toArray) return iterable.toArray(); - var length = iterable.length || 0, results = new Array(length); - while (length--) results[length] = iterable[length]; - return results; - }; -} - -Array.from = $A; - -Object.extend(Array.prototype, Enumerable); - -if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0, length = this.length; i < length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(Object.isArray(value) ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - reduce: function() { - return this.length > 1 ? this : this[0]; - }, - - uniq: function(sorted) { - return this.inject([], function(array, value, index) { - if (0 == index || (sorted ? array.last() != value : !array.include(value))) - array.push(value); - return array; - }); - }, - - intersect: function(array) { - return this.uniq().findAll(function(item) { - return array.detect(function(value) { return item === value }); - }); - }, - - clone: function() { - return [].concat(this); - }, - - size: function() { - return this.length; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - }, - - toJSON: function() { - var results = []; - this.each(function(object) { - var value = Object.toJSON(object); - if (!Object.isUndefined(value)) results.push(value); - }); - return '[' + results.join(', ') + ']'; - } -}); - -// use native browser JS 1.6 implementation if available -if (Object.isFunction(Array.prototype.forEach)) - Array.prototype._each = Array.prototype.forEach; - -if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) { - i || (i = 0); - var length = this.length; - if (i < 0) i = length + i; - for (; i < length; i++) - if (this[i] === item) return i; - return -1; -}; - -if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) { - i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; - var n = this.slice(0, i).reverse().indexOf(item); - return (n < 0) ? n : i - n - 1; -}; - -Array.prototype.toArray = Array.prototype.clone; - -function $w(string) { - if (!Object.isString(string)) return []; - string = string.strip(); - return string ? string.split(/\s+/) : []; -} - -if (Prototype.Browser.Opera){ - Array.prototype.concat = function() { - var array = []; - for (var i = 0, length = this.length; i < length; i++) array.push(this[i]); - for (var i = 0, length = arguments.length; i < length; i++) { - if (Object.isArray(arguments[i])) { - for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) - array.push(arguments[i][j]); - } else { - array.push(arguments[i]); - } - } - return array; - }; -} -Object.extend(Number.prototype, { - toColorPart: function() { - return this.toPaddedString(2, 16); - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - }, - - toPaddedString: function(length, radix) { - var string = this.toString(radix || 10); - return '0'.times(length - string.length) + string; - }, - - toJSON: function() { - return isFinite(this) ? this.toString() : 'null'; - } -}); - -$w('abs round ceil floor').each(function(method){ - Number.prototype[method] = Math[method].methodize(); -}); -function $H(object) { - return new Hash(object); -}; - -var Hash = Class.create(Enumerable, (function() { - - function toQueryPair(key, value) { - if (Object.isUndefined(value)) return key; - return key + '=' + encodeURIComponent(String.interpret(value)); - } - - return { - initialize: function(object) { - this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); - }, - - _each: function(iterator) { - for (var key in this._object) { - var value = this._object[key], pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, - - set: function(key, value) { - return this._object[key] = value; - }, - - get: function(key) { - return this._object[key]; - }, - - unset: function(key) { - var value = this._object[key]; - delete this._object[key]; - return value; - }, - - toObject: function() { - return Object.clone(this._object); - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - index: function(value) { - var match = this.detect(function(pair) { - return pair.value === value; - }); - return match && match.key; - }, - - merge: function(object) { - return this.clone().update(object); - }, - - update: function(object) { - return new Hash(object).inject(this, function(result, pair) { - result.set(pair.key, pair.value); - return result; - }); - }, - - toQueryString: function() { - return this.map(function(pair) { - var key = encodeURIComponent(pair.key), values = pair.value; - - if (values && typeof values == 'object') { - if (Object.isArray(values)) - return values.map(toQueryPair.curry(key)).join('&'); - } - return toQueryPair(key, values); - }).join('&'); - }, - - inspect: function() { - return '#'; - }, - - toJSON: function() { - return Object.toJSON(this.toObject()); - }, - - clone: function() { - return new Hash(this); - } - } -})()); - -Hash.prototype.toTemplateReplacements = Hash.prototype.toObject; -Hash.from = $H; -var ObjectRange = Class.create(Enumerable, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - while (this.include(value)) { - iterator(value); - value = value.succ(); - } - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -}; - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new XMLHttpRequest()}, - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')} - ) || false; - }, - - activeRequestCount: 0 -}; - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responder) { - if (!this.include(responder)) - this.responders.push(responder); - }, - - unregister: function(responder) { - this.responders = this.responders.without(responder); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (Object.isFunction(responder[callback])) { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) { } - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { Ajax.activeRequestCount++ }, - onComplete: function() { Ajax.activeRequestCount-- } -}); - -Ajax.Base = Class.create({ - initialize: function(options) { - this.options = { - method: 'post', - asynchronous: true, - contentType: 'application/x-www-form-urlencoded', - encoding: 'UTF-8', - parameters: '', - evalJSON: true, - evalJS: true - }; - Object.extend(this.options, options || { }); - - this.options.method = this.options.method.toLowerCase(); - - if (Object.isString(this.options.parameters)) - this.options.parameters = this.options.parameters.toQueryParams(); - else if (Object.isHash(this.options.parameters)) - this.options.parameters = this.options.parameters.toObject(); - } -}); - -Ajax.Request = Class.create(Ajax.Base, { - _complete: false, - - initialize: function($super, url, options) { - $super(options); - this.transport = Ajax.getTransport(); - this.request(url); - }, - - request: function(url) { - this.url = url; - this.method = this.options.method; - var params = Object.clone(this.options.parameters); - - if (!['get', 'post'].include(this.method)) { - // simulate other verbs over post - params['_method'] = this.method; - this.method = 'post'; - } - - this.parameters = params; - - if (params = Object.toQueryString(params)) { - // when GET, append parameters to URL - if (this.method == 'get') - this.url += (this.url.include('?') ? '&' : '?') + params; - else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - params += '&_='; - } - - try { - var response = new Ajax.Response(this); - if (this.options.onCreate) this.options.onCreate(response); - Ajax.Responders.dispatch('onCreate', this, response); - - this.transport.open(this.method.toUpperCase(), this.url, - this.options.asynchronous); - - if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); - - this.transport.onreadystatechange = this.onStateChange.bind(this); - this.setRequestHeaders(); - - this.body = this.method == 'post' ? (this.options.postBody || params) : null; - this.transport.send(this.body); - - /* Force Firefox to handle ready state 4 for synchronous requests */ - if (!this.options.asynchronous && this.transport.overrideMimeType) - this.onStateChange(); - - } - catch (e) { - this.dispatchException(e); - } - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState > 1 && !((readyState == 4) && this._complete)) - this.respondToReadyState(this.transport.readyState); - }, - - setRequestHeaders: function() { - var headers = { - 'X-Requested-With': 'XMLHttpRequest', - 'X-Prototype-Version': Prototype.Version, - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' - }; - - if (this.method == 'post') { - headers['Content-type'] = this.options.contentType + - (this.options.encoding ? '; charset=' + this.options.encoding : ''); - - /* Force "Connection: close" for older Mozilla browsers to work - * around a bug where XMLHttpRequest sends an incorrect - * Content-length header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType && - (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) - headers['Connection'] = 'close'; - } - - // user-defined headers - if (typeof this.options.requestHeaders == 'object') { - var extras = this.options.requestHeaders; - - if (Object.isFunction(extras.push)) - for (var i = 0, length = extras.length; i < length; i += 2) - headers[extras[i]] = extras[i+1]; - else - $H(extras).each(function(pair) { headers[pair.key] = pair.value }); - } - - for (var name in headers) - this.transport.setRequestHeader(name, headers[name]); - }, - - success: function() { - var status = this.getStatus(); - return !status || (status >= 200 && status < 300); - }, - - getStatus: function() { - try { - return this.transport.status || 0; - } catch (e) { return 0 } - }, - - respondToReadyState: function(readyState) { - var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); - - if (state == 'Complete') { - try { - this._complete = true; - (this.options['on' + response.status] - || this.options['on' + (this.success() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - var contentType = response.getHeader('Content-type'); - if (this.options.evalJS == 'force' - || (this.options.evalJS && this.isSameOrigin() && contentType - && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) - this.evalResponse(); - } - - try { - (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); - Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - if (state == 'Complete') { - // avoid memory leak in MSIE: clean up - this.transport.onreadystatechange = Prototype.emptyFunction; - } - }, - - isSameOrigin: function() { - var m = this.url.match(/^\s*https?:\/\/[^\/]*/); - return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({ - protocol: location.protocol, - domain: document.domain, - port: location.port ? ':' + location.port : '' - })); - }, - - getHeader: function(name) { - try { - return this.transport.getResponseHeader(name) || null; - } catch (e) { return null } - }, - - evalResponse: function() { - try { - return eval((this.transport.responseText || '').unfilterJSON()); - } catch (e) { - this.dispatchException(e); - } - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Response = Class.create({ - initialize: function(request){ - this.request = request; - var transport = this.transport = request.transport, - readyState = this.readyState = transport.readyState; - - if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { - this.status = this.getStatus(); - this.statusText = this.getStatusText(); - this.responseText = String.interpret(transport.responseText); - this.headerJSON = this._getHeaderJSON(); - } - - if(readyState == 4) { - var xml = transport.responseXML; - this.responseXML = Object.isUndefined(xml) ? null : xml; - this.responseJSON = this._getResponseJSON(); - } - }, - - status: 0, - statusText: '', - - getStatus: Ajax.Request.prototype.getStatus, - - getStatusText: function() { - try { - return this.transport.statusText || ''; - } catch (e) { return '' } - }, - - getHeader: Ajax.Request.prototype.getHeader, - - getAllHeaders: function() { - try { - return this.getAllResponseHeaders(); - } catch (e) { return null } - }, - - getResponseHeader: function(name) { - return this.transport.getResponseHeader(name); - }, - - getAllResponseHeaders: function() { - return this.transport.getAllResponseHeaders(); - }, - - _getHeaderJSON: function() { - var json = this.getHeader('X-JSON'); - if (!json) return null; - json = decodeURIComponent(escape(json)); - try { - return json.evalJSON(this.request.options.sanitizeJSON || - !this.request.isSameOrigin()); - } catch (e) { - this.request.dispatchException(e); - } - }, - - _getResponseJSON: function() { - var options = this.request.options; - if (!options.evalJSON || (options.evalJSON != 'force' && - !(this.getHeader('Content-type') || '').include('application/json')) || - this.responseText.blank()) - return null; - try { - return this.responseText.evalJSON(options.sanitizeJSON || - !this.request.isSameOrigin()); - } catch (e) { - this.request.dispatchException(e); - } - } -}); - -Ajax.Updater = Class.create(Ajax.Request, { - initialize: function($super, container, url, options) { - this.container = { - success: (container.success || container), - failure: (container.failure || (container.success ? null : container)) - }; - - options = Object.clone(options); - var onComplete = options.onComplete; - options.onComplete = (function(response, json) { - this.updateContent(response.responseText); - if (Object.isFunction(onComplete)) onComplete(response, json); - }).bind(this); - - $super(url, options); - }, - - updateContent: function(responseText) { - var receiver = this.container[this.success() ? 'success' : 'failure'], - options = this.options; - - if (!options.evalScripts) responseText = responseText.stripScripts(); - - if (receiver = $(receiver)) { - if (options.insertion) { - if (Object.isString(options.insertion)) { - var insertion = { }; insertion[options.insertion] = responseText; - receiver.insert(insertion); - } - else options.insertion(receiver, responseText); - } - else receiver.update(responseText); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { - initialize: function($super, container, url, options) { - $super(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = { }; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.options.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(response) { - if (this.options.decay) { - this.decay = (response.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = response.responseText; - } - this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -function $(element) { - if (arguments.length > 1) { - for (var i = 0, elements = [], length = arguments.length; i < length; i++) - elements.push($(arguments[i])); - return elements; - } - if (Object.isString(element)) - element = document.getElementById(element); - return Element.extend(element); -} - -if (Prototype.BrowserFeatures.XPath) { - document._getElementsByXPath = function(expression, parentElement) { - var results = []; - var query = document.evaluate(expression, $(parentElement) || document, - null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - for (var i = 0, length = query.snapshotLength; i < length; i++) - results.push(Element.extend(query.snapshotItem(i))); - return results; - }; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Node) var Node = { }; - -if (!Node.ELEMENT_NODE) { - // DOM level 2 ECMAScript Language Binding - Object.extend(Node, { - ELEMENT_NODE: 1, - ATTRIBUTE_NODE: 2, - TEXT_NODE: 3, - CDATA_SECTION_NODE: 4, - ENTITY_REFERENCE_NODE: 5, - ENTITY_NODE: 6, - PROCESSING_INSTRUCTION_NODE: 7, - COMMENT_NODE: 8, - DOCUMENT_NODE: 9, - DOCUMENT_TYPE_NODE: 10, - DOCUMENT_FRAGMENT_NODE: 11, - NOTATION_NODE: 12 - }); -} - -(function() { - var element = this.Element; - this.Element = function(tagName, attributes) { - attributes = attributes || { }; - tagName = tagName.toLowerCase(); - var cache = Element.cache; - if (Prototype.Browser.IE && attributes.name) { - tagName = '<' + tagName + ' name="' + attributes.name + '">'; - delete attributes.name; - return Element.writeAttribute(document.createElement(tagName), attributes); - } - if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); - return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); - }; - Object.extend(this.Element, element || { }); -}).call(window); - -Element.cache = { }; - -Element.Methods = { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function(element) { - element = $(element); - Element[Element.visible(element) ? 'hide' : 'show'](element); - return element; - }, - - hide: function(element) { - $(element).style.display = 'none'; - return element; - }, - - show: function(element) { - $(element).style.display = ''; - return element; - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - return element; - }, - - update: function(element, content) { - element = $(element); - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) return element.update().insert(content); - content = Object.toHTML(content); - element.innerHTML = content.stripScripts(); - content.evalScripts.bind(content).defer(); - return element; - }, - - replace: function(element, content) { - element = $(element); - if (content && content.toElement) content = content.toElement(); - else if (!Object.isElement(content)) { - content = Object.toHTML(content); - var range = element.ownerDocument.createRange(); - range.selectNode(element); - content.evalScripts.bind(content).defer(); - content = range.createContextualFragment(content.stripScripts()); - } - element.parentNode.replaceChild(content, element); - return element; - }, - - insert: function(element, insertions) { - element = $(element); - - if (Object.isString(insertions) || Object.isNumber(insertions) || - Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) - insertions = {bottom:insertions}; - - var content, insert, tagName, childNodes; - - for (var position in insertions) { - content = insertions[position]; - position = position.toLowerCase(); - insert = Element._insertionTranslations[position]; - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - insert(element, content); - continue; - } - - content = Object.toHTML(content); - - tagName = ((position == 'before' || position == 'after') - ? element.parentNode : element).tagName.toUpperCase(); - - childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - - if (position == 'top' || position == 'after') childNodes.reverse(); - childNodes.each(insert.curry(element)); - - content.evalScripts.bind(content).defer(); - } - - return element; - }, - - wrap: function(element, wrapper, attributes) { - element = $(element); - if (Object.isElement(wrapper)) - $(wrapper).writeAttribute(attributes || { }); - else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes); - else wrapper = new Element('div', wrapper); - if (element.parentNode) - element.parentNode.replaceChild(wrapper, element); - wrapper.appendChild(element); - return wrapper; - }, - - inspect: function(element) { - element = $(element); - var result = '<' + element.tagName.toLowerCase(); - $H({'id': 'id', 'className': 'class'}).each(function(pair) { - var property = pair.first(), attribute = pair.last(); - var value = (element[property] || '').toString(); - if (value) result += ' ' + attribute + '=' + value.inspect(true); - }); - return result + '>'; - }, - - recursivelyCollect: function(element, property) { - element = $(element); - var elements = []; - while (element = element[property]) - if (element.nodeType == 1) - elements.push(Element.extend(element)); - return elements; - }, - - ancestors: function(element) { - return $(element).recursivelyCollect('parentNode'); - }, - - descendants: function(element) { - return $(element).select("*"); - }, - - firstDescendant: function(element) { - element = $(element).firstChild; - while (element && element.nodeType != 1) element = element.nextSibling; - return $(element); - }, - - immediateDescendants: function(element) { - if (!(element = $(element).firstChild)) return []; - while (element && element.nodeType != 1) element = element.nextSibling; - if (element) return [element].concat($(element).nextSiblings()); - return []; - }, - - previousSiblings: function(element) { - return $(element).recursivelyCollect('previousSibling'); - }, - - nextSiblings: function(element) { - return $(element).recursivelyCollect('nextSibling'); - }, - - siblings: function(element) { - element = $(element); - return element.previousSiblings().reverse().concat(element.nextSiblings()); - }, - - match: function(element, selector) { - if (Object.isString(selector)) - selector = new Selector(selector); - return selector.match($(element)); - }, - - up: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(element.parentNode); - var ancestors = element.ancestors(); - return Object.isNumber(expression) ? ancestors[expression] : - Selector.findElement(ancestors, expression, index); - }, - - down: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return element.firstDescendant(); - return Object.isNumber(expression) ? element.descendants()[expression] : - element.select(expression)[index || 0]; - }, - - previous: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element)); - var previousSiblings = element.previousSiblings(); - return Object.isNumber(expression) ? previousSiblings[expression] : - Selector.findElement(previousSiblings, expression, index); - }, - - next: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element)); - var nextSiblings = element.nextSiblings(); - return Object.isNumber(expression) ? nextSiblings[expression] : - Selector.findElement(nextSiblings, expression, index); - }, - - select: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element, args); - }, - - adjacent: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element.parentNode, args).without(element); - }, - - identify: function(element) { - element = $(element); - var id = element.readAttribute('id'), self = arguments.callee; - if (id) return id; - do { id = 'anonymous_element_' + self.counter++ } while ($(id)); - element.writeAttribute('id', id); - return id; - }, - - readAttribute: function(element, name) { - element = $(element); - if (Prototype.Browser.IE) { - var t = Element._attributeTranslations.read; - if (t.values[name]) return t.values[name](element, name); - if (t.names[name]) name = t.names[name]; - if (name.include(':')) { - return (!element.attributes || !element.attributes[name]) ? null : - element.attributes[name].value; - } - } - return element.getAttribute(name); - }, - - writeAttribute: function(element, name, value) { - element = $(element); - var attributes = { }, t = Element._attributeTranslations.write; - - if (typeof name == 'object') attributes = name; - else attributes[name] = Object.isUndefined(value) ? true : value; - - for (var attr in attributes) { - name = t.names[attr] || attr; - value = attributes[attr]; - if (t.values[attr]) name = t.values[attr](element, value); - if (value === false || value === null) - element.removeAttribute(name); - else if (value === true) - element.setAttribute(name, name); - else element.setAttribute(name, value); - } - return element; - }, - - getHeight: function(element) { - return $(element).getDimensions().height; - }, - - getWidth: function(element) { - return $(element).getDimensions().width; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - var elementClassName = element.className; - return (elementClassName.length > 0 && (elementClassName == className || - new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - if (!element.hasClassName(className)) - element.className += (element.className ? ' ' : '') + className; - return element; - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - element.className = element.className.replace( - new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); - return element; - }, - - toggleClassName: function(element, className) { - if (!(element = $(element))) return; - return element[element.hasClassName(className) ? - 'removeClassName' : 'addClassName'](className); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - var node = element.firstChild; - while (node) { - var nextNode = node.nextSibling; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - element.removeChild(node); - node = nextNode; - } - return element; - }, - - empty: function(element) { - return $(element).innerHTML.blank(); - }, - - descendantOf: function(element, ancestor) { - element = $(element), ancestor = $(ancestor); - var originalAncestor = ancestor; - - if (element.compareDocumentPosition) - return (element.compareDocumentPosition(ancestor) & 8) === 8; - - if (element.sourceIndex && !Prototype.Browser.Opera) { - var e = element.sourceIndex, a = ancestor.sourceIndex, - nextAncestor = ancestor.nextSibling; - if (!nextAncestor) { - do { ancestor = ancestor.parentNode; } - while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode); - } - if (nextAncestor && nextAncestor.sourceIndex) - return (e > a && e < nextAncestor.sourceIndex); - } - - while (element = element.parentNode) - if (element == originalAncestor) return true; - return false; - }, - - scrollTo: function(element) { - element = $(element); - var pos = element.cumulativeOffset(); - window.scrollTo(pos[0], pos[1]); - return element; - }, - - getStyle: function(element, style) { - element = $(element); - style = style == 'float' ? 'cssFloat' : style.camelize(); - var value = element.style[style]; - if (!value) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css[style] : null; - } - if (style == 'opacity') return value ? parseFloat(value) : 1.0; - return value == 'auto' ? null : value; - }, - - getOpacity: function(element) { - return $(element).getStyle('opacity'); - }, - - setStyle: function(element, styles) { - element = $(element); - var elementStyle = element.style, match; - if (Object.isString(styles)) { - element.style.cssText += ';' + styles; - return styles.include('opacity') ? - element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; - } - for (var property in styles) - if (property == 'opacity') element.setOpacity(styles[property]); - else - elementStyle[(property == 'float' || property == 'cssFloat') ? - (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') : - property] = styles[property]; - - return element; - }, - - setOpacity: function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - return element; - }, - - getDimensions: function(element) { - element = $(element); - var display = $(element).getStyle('display'); - if (display != 'none' && display != null) // Safari bug - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - var originalDisplay = els.display; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = 'block'; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = originalDisplay; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - return element; - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - return element; - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return element; - element._overflow = Element.getStyle(element, 'overflow') || 'auto'; - if (element._overflow !== 'hidden') - element.style.overflow = 'hidden'; - return element; - }, - - undoClipping: function(element) { - element = $(element); - if (!element._overflow) return element; - element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; - element._overflow = null; - return element; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - if (element.tagName == 'BODY') break; - var p = Element.getStyle(element, 'position'); - if (p !== 'static') break; - } - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - absolutize: function(element) { - element = $(element); - if (element.getStyle('position') == 'absolute') return; - // Position.prepare(); // To be done manually by Scripty when it needs it. - - var offsets = element.positionedOffset(); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.width = width + 'px'; - element.style.height = height + 'px'; - return element; - }, - - relativize: function(element) { - element = $(element); - if (element.getStyle('position') == 'relative') return; - // Position.prepare(); // To be done manually by Scripty when it needs it. - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - return element; - }, - - cumulativeScrollOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - getOffsetParent: function(element) { - if (element.offsetParent) return $(element.offsetParent); - if (element == document.body) return $(element); - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return $(element); - - return $(document.body); - }, - - viewportOffset: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent == document.body && - Element.getStyle(element, 'position') == 'absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - if (!Prototype.Browser.Opera || element.tagName == 'BODY') { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } - } while (element = element.parentNode); - - return Element._returnOffset(valueL, valueT); - }, - - clonePosition: function(element, source) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || { }); - - // find page position of source - source = $(source); - var p = source.viewportOffset(); - - // find coordinate system to use - element = $(element); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(element, 'position') == 'absolute') { - parent = element.getOffsetParent(); - delta = parent.viewportOffset(); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if (options.setWidth) element.style.width = source.offsetWidth + 'px'; - if (options.setHeight) element.style.height = source.offsetHeight + 'px'; - return element; - } -}; - -Element.Methods.identify.counter = 1; - -Object.extend(Element.Methods, { - getElementsBySelector: Element.Methods.select, - childElements: Element.Methods.immediateDescendants -}); - -Element._attributeTranslations = { - write: { - names: { - className: 'class', - htmlFor: 'for' - }, - values: { } - } -}; - -if (Prototype.Browser.Opera) { - Element.Methods.getStyle = Element.Methods.getStyle.wrap( - function(proceed, element, style) { - switch (style) { - case 'left': case 'top': case 'right': case 'bottom': - if (proceed(element, 'position') === 'static') return null; - case 'height': case 'width': - // returns '0px' for hidden elements; we want it to return null - if (!Element.visible(element)) return null; - - // returns the border-box dimensions rather than the content-box - // dimensions, so we subtract padding and borders from the value - var dim = parseInt(proceed(element, style), 10); - - if (dim !== element['offset' + style.capitalize()]) - return dim + 'px'; - - var properties; - if (style === 'height') { - properties = ['border-top-width', 'padding-top', - 'padding-bottom', 'border-bottom-width']; - } - else { - properties = ['border-left-width', 'padding-left', - 'padding-right', 'border-right-width']; - } - return properties.inject(dim, function(memo, property) { - var val = proceed(element, property); - return val === null ? memo : memo - parseInt(val, 10); - }) + 'px'; - default: return proceed(element, style); - } - } - ); - - Element.Methods.readAttribute = Element.Methods.readAttribute.wrap( - function(proceed, element, attribute) { - if (attribute === 'title') return element.title; - return proceed(element, attribute); - } - ); -} - -else if (Prototype.Browser.IE) { - // IE doesn't report offsets correctly for static elements, so we change them - // to "relative" to get the values, then change them back. - Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap( - function(proceed, element) { - element = $(element); - var position = element.getStyle('position'); - if (position !== 'static') return proceed(element); - element.setStyle({ position: 'relative' }); - var value = proceed(element); - element.setStyle({ position: position }); - return value; - } - ); - - $w('positionedOffset viewportOffset').each(function(method) { - Element.Methods[method] = Element.Methods[method].wrap( - function(proceed, element) { - element = $(element); - var position = element.getStyle('position'); - if (position !== 'static') return proceed(element); - // Trigger hasLayout on the offset parent so that IE6 reports - // accurate offsetTop and offsetLeft values for position: fixed. - var offsetParent = element.getOffsetParent(); - if (offsetParent && offsetParent.getStyle('position') === 'fixed') - offsetParent.setStyle({ zoom: 1 }); - element.setStyle({ position: 'relative' }); - var value = proceed(element); - element.setStyle({ position: position }); - return value; - } - ); - }); - - Element.Methods.getStyle = function(element, style) { - element = $(element); - style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); - var value = element.style[style]; - if (!value && element.currentStyle) value = element.currentStyle[style]; - - if (style == 'opacity') { - if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) - if (value[1]) return parseFloat(value[1]) / 100; - return 1.0; - } - - if (value == 'auto') { - if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) - return element['offset' + style.capitalize()] + 'px'; - return null; - } - return value; - }; - - Element.Methods.setOpacity = function(element, value) { - function stripAlpha(filter){ - return filter.replace(/alpha\([^\)]*\)/gi,''); - } - element = $(element); - var currentStyle = element.currentStyle; - if ((currentStyle && !currentStyle.hasLayout) || - (!currentStyle && element.style.zoom == 'normal')) - element.style.zoom = 1; - - var filter = element.getStyle('filter'), style = element.style; - if (value == 1 || value === '') { - (filter = stripAlpha(filter)) ? - style.filter = filter : style.removeAttribute('filter'); - return element; - } else if (value < 0.00001) value = 0; - style.filter = stripAlpha(filter) + - 'alpha(opacity=' + (value * 100) + ')'; - return element; - }; - - Element._attributeTranslations = { - read: { - names: { - 'class': 'className', - 'for': 'htmlFor' - }, - values: { - _getAttr: function(element, attribute) { - return element.getAttribute(attribute, 2); - }, - _getAttrNode: function(element, attribute) { - var node = element.getAttributeNode(attribute); - return node ? node.value : ""; - }, - _getEv: function(element, attribute) { - attribute = element.getAttribute(attribute); - return attribute ? attribute.toString().slice(23, -2) : null; - }, - _flag: function(element, attribute) { - return $(element).hasAttribute(attribute) ? attribute : null; - }, - style: function(element) { - return element.style.cssText.toLowerCase(); - }, - title: function(element) { - return element.title; - } - } - } - }; - - Element._attributeTranslations.write = { - names: Object.extend({ - cellpadding: 'cellPadding', - cellspacing: 'cellSpacing' - }, Element._attributeTranslations.read.names), - values: { - checked: function(element, value) { - element.checked = !!value; - }, - - style: function(element, value) { - element.style.cssText = value ? value : ''; - } - } - }; - - Element._attributeTranslations.has = {}; - - $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + - 'encType maxLength readOnly longDesc').each(function(attr) { - Element._attributeTranslations.write.names[attr.toLowerCase()] = attr; - Element._attributeTranslations.has[attr.toLowerCase()] = attr; - }); - - (function(v) { - Object.extend(v, { - href: v._getAttr, - src: v._getAttr, - type: v._getAttr, - action: v._getAttrNode, - disabled: v._flag, - checked: v._flag, - readonly: v._flag, - multiple: v._flag, - onload: v._getEv, - onunload: v._getEv, - onclick: v._getEv, - ondblclick: v._getEv, - onmousedown: v._getEv, - onmouseup: v._getEv, - onmouseover: v._getEv, - onmousemove: v._getEv, - onmouseout: v._getEv, - onfocus: v._getEv, - onblur: v._getEv, - onkeypress: v._getEv, - onkeydown: v._getEv, - onkeyup: v._getEv, - onsubmit: v._getEv, - onreset: v._getEv, - onselect: v._getEv, - onchange: v._getEv - }); - })(Element._attributeTranslations.read.values); -} - -else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1) ? 0.999999 : - (value === '') ? '' : (value < 0.00001) ? 0 : value; - return element; - }; -} - -else if (Prototype.Browser.WebKit) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - - if (value == 1) - if(element.tagName == 'IMG' && element.width) { - element.width++; element.width--; - } else try { - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch (e) { } - - return element; - }; - - // Safari returns margins on body which is incorrect if the child is absolutely - // positioned. For performance reasons, redefine Element#cumulativeOffset for - // KHTML/WebKit only. - Element.Methods.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return Element._returnOffset(valueL, valueT); - }; -} - -if (Prototype.Browser.IE || Prototype.Browser.Opera) { - // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements - Element.Methods.update = function(element, content) { - element = $(element); - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) return element.update().insert(content); - - content = Object.toHTML(content); - var tagName = element.tagName.toUpperCase(); - - if (tagName in Element._insertionTranslations.tags) { - $A(element.childNodes).each(function(node) { element.removeChild(node) }); - Element._getContentFromAnonymousElement(tagName, content.stripScripts()) - .each(function(node) { element.appendChild(node) }); - } - else element.innerHTML = content.stripScripts(); - - content.evalScripts.bind(content).defer(); - return element; - }; -} - -if ('outerHTML' in document.createElement('div')) { - Element.Methods.replace = function(element, content) { - element = $(element); - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - element.parentNode.replaceChild(content, element); - return element; - } - - content = Object.toHTML(content); - var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); - - if (Element._insertionTranslations.tags[tagName]) { - var nextSibling = element.next(); - var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - parent.removeChild(element); - if (nextSibling) - fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); - else - fragments.each(function(node) { parent.appendChild(node) }); - } - else element.outerHTML = content.stripScripts(); - - content.evalScripts.bind(content).defer(); - return element; - }; -} - -Element._returnOffset = function(l, t) { - var result = [l, t]; - result.left = l; - result.top = t; - return result; -}; - -Element._getContentFromAnonymousElement = function(tagName, html) { - var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; - if (t) { - div.innerHTML = t[0] + html + t[1]; - t[2].times(function() { div = div.firstChild }); - } else div.innerHTML = html; - return $A(div.childNodes); -}; - -Element._insertionTranslations = { - before: function(element, node) { - element.parentNode.insertBefore(node, element); - }, - top: function(element, node) { - element.insertBefore(node, element.firstChild); - }, - bottom: function(element, node) { - element.appendChild(node); - }, - after: function(element, node) { - element.parentNode.insertBefore(node, element.nextSibling); - }, - tags: { - TABLE: ['
  • ', '
    ', 1], - TBODY: ['', '
    ', 2], - TR: ['', '
    ', 3], - TD: ['
    ', '
    ', 4], - SELECT: ['', 1] - } -}; - -(function() { - Object.extend(this.tags, { - THEAD: this.tags.TBODY, - TFOOT: this.tags.TBODY, - TH: this.tags.TD - }); -}).call(Element._insertionTranslations); - -Element.Methods.Simulated = { - hasAttribute: function(element, attribute) { - attribute = Element._attributeTranslations.has[attribute] || attribute; - var node = $(element).getAttributeNode(attribute); - return node && node.specified; - } -}; - -Element.Methods.ByTag = { }; - -Object.extend(Element, Element.Methods); - -if (!Prototype.BrowserFeatures.ElementExtensions && - document.createElement('div').__proto__) { - window.HTMLElement = { }; - window.HTMLElement.prototype = document.createElement('div').__proto__; - Prototype.BrowserFeatures.ElementExtensions = true; -} - -Element.extend = (function() { - if (Prototype.BrowserFeatures.SpecificElementExtensions) - return Prototype.K; - - var Methods = { }, ByTag = Element.Methods.ByTag; - - var extend = Object.extend(function(element) { - if (!element || element._extendedByPrototype || - element.nodeType != 1 || element == window) return element; - - var methods = Object.clone(Methods), - tagName = element.tagName, property, value; - - // extend methods for specific tags - if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); - - for (property in methods) { - value = methods[property]; - if (Object.isFunction(value) && !(property in element)) - element[property] = value.methodize(); - } - - element._extendedByPrototype = Prototype.emptyFunction; - return element; - - }, { - refresh: function() { - // extend methods for all tags (Safari doesn't need this) - if (!Prototype.BrowserFeatures.ElementExtensions) { - Object.extend(Methods, Element.Methods); - Object.extend(Methods, Element.Methods.Simulated); - } - } - }); - - extend.refresh(); - return extend; -})(); - -Element.hasAttribute = function(element, attribute) { - if (element.hasAttribute) return element.hasAttribute(attribute); - return Element.Methods.Simulated.hasAttribute(element, attribute); -}; - -Element.addMethods = function(methods) { - var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; - - if (!methods) { - Object.extend(Form, Form.Methods); - Object.extend(Form.Element, Form.Element.Methods); - Object.extend(Element.Methods.ByTag, { - "FORM": Object.clone(Form.Methods), - "INPUT": Object.clone(Form.Element.Methods), - "SELECT": Object.clone(Form.Element.Methods), - "TEXTAREA": Object.clone(Form.Element.Methods) - }); - } - - if (arguments.length == 2) { - var tagName = methods; - methods = arguments[1]; - } - - if (!tagName) Object.extend(Element.Methods, methods || { }); - else { - if (Object.isArray(tagName)) tagName.each(extend); - else extend(tagName); - } - - function extend(tagName) { - tagName = tagName.toUpperCase(); - if (!Element.Methods.ByTag[tagName]) - Element.Methods.ByTag[tagName] = { }; - Object.extend(Element.Methods.ByTag[tagName], methods); - } - - function copy(methods, destination, onlyIfAbsent) { - onlyIfAbsent = onlyIfAbsent || false; - for (var property in methods) { - var value = methods[property]; - if (!Object.isFunction(value)) continue; - if (!onlyIfAbsent || !(property in destination)) - destination[property] = value.methodize(); - } - } - - function findDOMClass(tagName) { - var klass; - var trans = { - "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", - "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", - "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", - "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", - "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": - "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": - "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": - "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": - "FrameSet", "IFRAME": "IFrame" - }; - if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName.capitalize() + 'Element'; - if (window[klass]) return window[klass]; - - window[klass] = { }; - window[klass].prototype = document.createElement(tagName).__proto__; - return window[klass]; - } - - if (F.ElementExtensions) { - copy(Element.Methods, HTMLElement.prototype); - copy(Element.Methods.Simulated, HTMLElement.prototype, true); - } - - if (F.SpecificElementExtensions) { - for (var tag in Element.Methods.ByTag) { - var klass = findDOMClass(tag); - if (Object.isUndefined(klass)) continue; - copy(T[tag], klass.prototype); - } - } - - Object.extend(Element, Element.Methods); - delete Element.ByTag; - - if (Element.extend.refresh) Element.extend.refresh(); - Element.cache = { }; -}; - -document.viewport = { - getDimensions: function() { - var dimensions = { }; - var B = Prototype.Browser; - $w('width height').each(function(d) { - var D = d.capitalize(); - dimensions[d] = (B.WebKit && !document.evaluate) ? self['inner' + D] : - (B.Opera) ? document.body['client' + D] : document.documentElement['client' + D]; - }); - return dimensions; - }, - - getWidth: function() { - return this.getDimensions().width; - }, - - getHeight: function() { - return this.getDimensions().height; - }, - - getScrollOffsets: function() { - return Element._returnOffset( - window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, - window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); - } -}; -/* Portions of the Selector class are derived from Jack Slocum’s DomQuery, - * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style - * license. Please see http://www.yui-ext.com/ for more information. */ - -var Selector = Class.create({ - initialize: function(expression) { - this.expression = expression.strip(); - this.compileMatcher(); - }, - - shouldUseXPath: function() { - if (!Prototype.BrowserFeatures.XPath) return false; - - var e = this.expression; - - // Safari 3 chokes on :*-of-type and :empty - if (Prototype.Browser.WebKit && - (e.include("-of-type") || e.include(":empty"))) - return false; - - // XPath can't do namespaced attributes, nor can it read - // the "checked" property from DOM nodes - if ((/(\[[\w-]*?:|:checked)/).test(this.expression)) - return false; - - return true; - }, - - compileMatcher: function() { - if (this.shouldUseXPath()) - return this.compileXPathMatcher(); - - var e = this.expression, ps = Selector.patterns, h = Selector.handlers, - c = Selector.criteria, le, p, m; - - if (Selector._cache[e]) { - this.matcher = Selector._cache[e]; - return; - } - - this.matcher = ["this.matcher = function(root) {", - "var r = root, h = Selector.handlers, c = false, n;"]; - - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - p = ps[i]; - if (m = e.match(p)) { - this.matcher.push(Object.isFunction(c[i]) ? c[i](m) : - new Template(c[i]).evaluate(m)); - e = e.replace(m[0], ''); - break; - } - } - } - - this.matcher.push("return h.unique(n);\n}"); - eval(this.matcher.join('\n')); - Selector._cache[this.expression] = this.matcher; - }, - - compileXPathMatcher: function() { - var e = this.expression, ps = Selector.patterns, - x = Selector.xpath, le, m; - - if (Selector._cache[e]) { - this.xpath = Selector._cache[e]; return; - } - - this.matcher = ['.//*']; - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - if (m = e.match(ps[i])) { - this.matcher.push(Object.isFunction(x[i]) ? x[i](m) : - new Template(x[i]).evaluate(m)); - e = e.replace(m[0], ''); - break; - } - } - } - - this.xpath = this.matcher.join(''); - Selector._cache[this.expression] = this.xpath; - }, - - findElements: function(root) { - root = root || document; - if (this.xpath) return document._getElementsByXPath(this.xpath, root); - return this.matcher(root); - }, - - match: function(element) { - this.tokens = []; - - var e = this.expression, ps = Selector.patterns, as = Selector.assertions; - var le, p, m; - - while (e && le !== e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - p = ps[i]; - if (m = e.match(p)) { - // use the Selector.assertions methods unless the selector - // is too complex. - if (as[i]) { - this.tokens.push([i, Object.clone(m)]); - e = e.replace(m[0], ''); - } else { - // reluctantly do a document-wide search - // and look for a match in the array - return this.findElements(document).include(element); - } - } - } - } - - var match = true, name, matches; - for (var i = 0, token; token = this.tokens[i]; i++) { - name = token[0], matches = token[1]; - if (!Selector.assertions[name](element, matches)) { - match = false; break; - } - } - - return match; - }, - - toString: function() { - return this.expression; - }, - - inspect: function() { - return "#"; - } -}); - -Object.extend(Selector, { - _cache: { }, - - xpath: { - descendant: "//*", - child: "/*", - adjacent: "/following-sibling::*[1]", - laterSibling: '/following-sibling::*', - tagName: function(m) { - if (m[1] == '*') return ''; - return "[local-name()='" + m[1].toLowerCase() + - "' or local-name()='" + m[1].toUpperCase() + "']"; - }, - className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", - id: "[@id='#{1}']", - attrPresence: function(m) { - m[1] = m[1].toLowerCase(); - return new Template("[@#{1}]").evaluate(m); - }, - attr: function(m) { - m[1] = m[1].toLowerCase(); - m[3] = m[5] || m[6]; - return new Template(Selector.xpath.operators[m[2]]).evaluate(m); - }, - pseudo: function(m) { - var h = Selector.xpath.pseudos[m[1]]; - if (!h) return ''; - if (Object.isFunction(h)) return h(m); - return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); - }, - operators: { - '=': "[@#{1}='#{3}']", - '!=': "[@#{1}!='#{3}']", - '^=': "[starts-with(@#{1}, '#{3}')]", - '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", - '*=': "[contains(@#{1}, '#{3}')]", - '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", - '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" - }, - pseudos: { - 'first-child': '[not(preceding-sibling::*)]', - 'last-child': '[not(following-sibling::*)]', - 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', - 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]", - 'checked': "[@checked]", - 'disabled': "[@disabled]", - 'enabled': "[not(@disabled)]", - 'not': function(m) { - var e = m[6], p = Selector.patterns, - x = Selector.xpath, le, v; - - var exclusion = []; - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in p) { - if (m = e.match(p[i])) { - v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m); - exclusion.push("(" + v.substring(1, v.length - 1) + ")"); - e = e.replace(m[0], ''); - break; - } - } - } - return "[not(" + exclusion.join(" and ") + ")]"; - }, - 'nth-child': function(m) { - return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m); - }, - 'nth-last-child': function(m) { - return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m); - }, - 'nth-of-type': function(m) { - return Selector.xpath.pseudos.nth("position() ", m); - }, - 'nth-last-of-type': function(m) { - return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); - }, - 'first-of-type': function(m) { - m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m); - }, - 'last-of-type': function(m) { - m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); - }, - 'only-of-type': function(m) { - var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m); - }, - nth: function(fragment, m) { - var mm, formula = m[6], predicate; - if (formula == 'even') formula = '2n+0'; - if (formula == 'odd') formula = '2n+1'; - if (mm = formula.match(/^(\d+)$/)) // digit only - return '[' + fragment + "= " + mm[1] + ']'; - if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b - if (mm[1] == "-") mm[1] = -1; - var a = mm[1] ? Number(mm[1]) : 1; - var b = mm[2] ? Number(mm[2]) : 0; - predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " + - "((#{fragment} - #{b}) div #{a} >= 0)]"; - return new Template(predicate).evaluate({ - fragment: fragment, a: a, b: b }); - } - } - } - }, - - criteria: { - tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;', - className: 'n = h.className(n, r, "#{1}", c); c = false;', - id: 'n = h.id(n, r, "#{1}", c); c = false;', - attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;', - attr: function(m) { - m[3] = (m[5] || m[6]); - return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m); - }, - pseudo: function(m) { - if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); - return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); - }, - descendant: 'c = "descendant";', - child: 'c = "child";', - adjacent: 'c = "adjacent";', - laterSibling: 'c = "laterSibling";' - }, - - patterns: { - // combinators must be listed first - // (and descendant needs to be last combinator) - laterSibling: /^\s*~\s*/, - child: /^\s*>\s*/, - adjacent: /^\s*\+\s*/, - descendant: /^\s/, - - // selectors follow - tagName: /^\s*(\*|[\w\-]+)(\b|$)?/, - id: /^#([\w\-\*]+)(\b|$)/, - className: /^\.([\w\-\*]+)(\b|$)/, - pseudo: -/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/, - attrPresence: /^\[([\w]+)\]/, - attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ - }, - - // for Selector.match and Element#match - assertions: { - tagName: function(element, matches) { - return matches[1].toUpperCase() == element.tagName.toUpperCase(); - }, - - className: function(element, matches) { - return Element.hasClassName(element, matches[1]); - }, - - id: function(element, matches) { - return element.id === matches[1]; - }, - - attrPresence: function(element, matches) { - return Element.hasAttribute(element, matches[1]); - }, - - attr: function(element, matches) { - var nodeValue = Element.readAttribute(element, matches[1]); - return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]); - } - }, - - handlers: { - // UTILITY FUNCTIONS - // joins two collections - concat: function(a, b) { - for (var i = 0, node; node = b[i]; i++) - a.push(node); - return a; - }, - - // marks an array of nodes for counting - mark: function(nodes) { - var _true = Prototype.emptyFunction; - for (var i = 0, node; node = nodes[i]; i++) - node._countedByPrototype = _true; - return nodes; - }, - - unmark: function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node._countedByPrototype = undefined; - return nodes; - }, - - // mark each child node with its position (for nth calls) - // "ofType" flag indicates whether we're indexing for nth-of-type - // rather than nth-child - index: function(parentNode, reverse, ofType) { - parentNode._countedByPrototype = Prototype.emptyFunction; - if (reverse) { - for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) { - var node = nodes[i]; - if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++; - } - } else { - for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++) - if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++; - } - }, - - // filters out duplicates and extends all nodes - unique: function(nodes) { - if (nodes.length == 0) return nodes; - var results = [], n; - for (var i = 0, l = nodes.length; i < l; i++) - if (!(n = nodes[i])._countedByPrototype) { - n._countedByPrototype = Prototype.emptyFunction; - results.push(Element.extend(n)); - } - return Selector.handlers.unmark(results); - }, - - // COMBINATOR FUNCTIONS - descendant: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName('*')); - return results; - }, - - child: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) { - for (var j = 0, child; child = node.childNodes[j]; j++) - if (child.nodeType == 1 && child.tagName != '!') results.push(child); - } - return results; - }, - - adjacent: function(nodes) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - var next = this.nextElementSibling(node); - if (next) results.push(next); - } - return results; - }, - - laterSibling: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, Element.nextSiblings(node)); - return results; - }, - - nextElementSibling: function(node) { - while (node = node.nextSibling) - if (node.nodeType == 1) return node; - return null; - }, - - previousElementSibling: function(node) { - while (node = node.previousSibling) - if (node.nodeType == 1) return node; - return null; - }, - - // TOKEN FUNCTIONS - tagName: function(nodes, root, tagName, combinator) { - var uTagName = tagName.toUpperCase(); - var results = [], h = Selector.handlers; - if (nodes) { - if (combinator) { - // fastlane for ordinary descendant combinators - if (combinator == "descendant") { - for (var i = 0, node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName(tagName)); - return results; - } else nodes = this[combinator](nodes); - if (tagName == "*") return nodes; - } - for (var i = 0, node; node = nodes[i]; i++) - if (node.tagName.toUpperCase() === uTagName) results.push(node); - return results; - } else return root.getElementsByTagName(tagName); - }, - - id: function(nodes, root, id, combinator) { - var targetNode = $(id), h = Selector.handlers; - if (!targetNode) return []; - if (!nodes && root == document) return [targetNode]; - if (nodes) { - if (combinator) { - if (combinator == 'child') { - for (var i = 0, node; node = nodes[i]; i++) - if (targetNode.parentNode == node) return [targetNode]; - } else if (combinator == 'descendant') { - for (var i = 0, node; node = nodes[i]; i++) - if (Element.descendantOf(targetNode, node)) return [targetNode]; - } else if (combinator == 'adjacent') { - for (var i = 0, node; node = nodes[i]; i++) - if (Selector.handlers.previousElementSibling(targetNode) == node) - return [targetNode]; - } else nodes = h[combinator](nodes); - } - for (var i = 0, node; node = nodes[i]; i++) - if (node == targetNode) return [targetNode]; - return []; - } - return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : []; - }, - - className: function(nodes, root, className, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - return Selector.handlers.byClassName(nodes, root, className); - }, - - byClassName: function(nodes, root, className) { - if (!nodes) nodes = Selector.handlers.descendant([root]); - var needle = ' ' + className + ' '; - for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { - nodeClassName = node.className; - if (nodeClassName.length == 0) continue; - if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) - results.push(node); - } - return results; - }, - - attrPresence: function(nodes, root, attr, combinator) { - if (!nodes) nodes = root.getElementsByTagName("*"); - if (nodes && combinator) nodes = this[combinator](nodes); - var results = []; - for (var i = 0, node; node = nodes[i]; i++) - if (Element.hasAttribute(node, attr)) results.push(node); - return results; - }, - - attr: function(nodes, root, attr, value, operator, combinator) { - if (!nodes) nodes = root.getElementsByTagName("*"); - if (nodes && combinator) nodes = this[combinator](nodes); - var handler = Selector.operators[operator], results = []; - for (var i = 0, node; node = nodes[i]; i++) { - var nodeValue = Element.readAttribute(node, attr); - if (nodeValue === null) continue; - if (handler(nodeValue, value)) results.push(node); - } - return results; - }, - - pseudo: function(nodes, name, value, root, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - if (!nodes) nodes = root.getElementsByTagName("*"); - return Selector.pseudos[name](nodes, value, root); - } - }, - - pseudos: { - 'first-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.previousElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'last-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.nextElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'only-child': function(nodes, value, root) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) - results.push(node); - return results; - }, - 'nth-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root); - }, - 'nth-last-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true); - }, - 'nth-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, false, true); - }, - 'nth-last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true, true); - }, - 'first-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, false, true); - }, - 'last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, true, true); - }, - 'only-of-type': function(nodes, formula, root) { - var p = Selector.pseudos; - return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root); - }, - - // handles the an+b logic - getIndices: function(a, b, total) { - if (a == 0) return b > 0 ? [b] : []; - return $R(1, total).inject([], function(memo, i) { - if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); - return memo; - }); - }, - - // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type - nth: function(nodes, formula, root, reverse, ofType) { - if (nodes.length == 0) return []; - if (formula == 'even') formula = '2n+0'; - if (formula == 'odd') formula = '2n+1'; - var h = Selector.handlers, results = [], indexed = [], m; - h.mark(nodes); - for (var i = 0, node; node = nodes[i]; i++) { - if (!node.parentNode._countedByPrototype) { - h.index(node.parentNode, reverse, ofType); - indexed.push(node.parentNode); - } - } - if (formula.match(/^\d+$/)) { // just a number - formula = Number(formula); - for (var i = 0, node; node = nodes[i]; i++) - if (node.nodeIndex == formula) results.push(node); - } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b - if (m[1] == "-") m[1] = -1; - var a = m[1] ? Number(m[1]) : 1; - var b = m[2] ? Number(m[2]) : 0; - var indices = Selector.pseudos.getIndices(a, b, nodes.length); - for (var i = 0, node, l = indices.length; node = nodes[i]; i++) { - for (var j = 0; j < l; j++) - if (node.nodeIndex == indices[j]) results.push(node); - } - } - h.unmark(nodes); - h.unmark(indexed); - return results; - }, - - 'empty': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - // IE treats comments as element nodes - if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue; - results.push(node); - } - return results; - }, - - 'not': function(nodes, selector, root) { - var h = Selector.handlers, selectorType, m; - var exclusions = new Selector(selector).findElements(root); - h.mark(exclusions); - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node._countedByPrototype) results.push(node); - h.unmark(exclusions); - return results; - }, - - 'enabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node.disabled) results.push(node); - return results; - }, - - 'disabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.disabled) results.push(node); - return results; - }, - - 'checked': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.checked) results.push(node); - return results; - } - }, - - operators: { - '=': function(nv, v) { return nv == v; }, - '!=': function(nv, v) { return nv != v; }, - '^=': function(nv, v) { return nv.startsWith(v); }, - '$=': function(nv, v) { return nv.endsWith(v); }, - '*=': function(nv, v) { return nv.include(v); }, - '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); }, - '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); } - }, - - split: function(expression) { - var expressions = []; - expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { - expressions.push(m[1].strip()); - }); - return expressions; - }, - - matchElements: function(elements, expression) { - var matches = $$(expression), h = Selector.handlers; - h.mark(matches); - for (var i = 0, results = [], element; element = elements[i]; i++) - if (element._countedByPrototype) results.push(element); - h.unmark(matches); - return results; - }, - - findElement: function(elements, expression, index) { - if (Object.isNumber(expression)) { - index = expression; expression = false; - } - return Selector.matchElements(elements, expression || '*')[index || 0]; - }, - - findChildElements: function(element, expressions) { - expressions = Selector.split(expressions.join(',')); - var results = [], h = Selector.handlers; - for (var i = 0, l = expressions.length, selector; i < l; i++) { - selector = new Selector(expressions[i].strip()); - h.concat(results, selector.findElements(element)); - } - return (l > 1) ? h.unique(results) : results; - } -}); - -if (Prototype.Browser.IE) { - Object.extend(Selector.handlers, { - // IE returns comment nodes on getElementsByTagName("*"). - // Filter them out. - concat: function(a, b) { - for (var i = 0, node; node = b[i]; i++) - if (node.tagName !== "!") a.push(node); - return a; - }, - - // IE improperly serializes _countedByPrototype in (inner|outer)HTML. - unmark: function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node.removeAttribute('_countedByPrototype'); - return nodes; - } - }); -} - -function $$() { - return Selector.findChildElements(document, $A(arguments)); -} -var Form = { - reset: function(form) { - $(form).reset(); - return form; - }, - - serializeElements: function(elements, options) { - if (typeof options != 'object') options = { hash: !!options }; - else if (Object.isUndefined(options.hash)) options.hash = true; - var key, value, submitted = false, submit = options.submit; - - var data = elements.inject({ }, function(result, element) { - if (!element.disabled && element.name) { - key = element.name; value = $(element).getValue(); - if (value != null && (element.type != 'submit' || (!submitted && - submit !== false && (!submit || key == submit) && (submitted = true)))) { - if (key in result) { - // a key is already present; construct an array of values - if (!Object.isArray(result[key])) result[key] = [result[key]]; - result[key].push(value); - } - else result[key] = value; - } - } - return result; - }); - - return options.hash ? data : Object.toQueryString(data); - } -}; - -Form.Methods = { - serialize: function(form, options) { - return Form.serializeElements(Form.getElements(form), options); - }, - - getElements: function(form) { - return $A($(form).getElementsByTagName('*')).inject([], - function(elements, child) { - if (Form.Element.Serializers[child.tagName.toLowerCase()]) - elements.push(Element.extend(child)); - return elements; - } - ); - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) return $A(inputs).map(Element.extend); - - for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || (name && input.name != name)) - continue; - matchingInputs.push(Element.extend(input)); - } - - return matchingInputs; - }, - - disable: function(form) { - form = $(form); - Form.getElements(form).invoke('disable'); - return form; - }, - - enable: function(form) { - form = $(form); - Form.getElements(form).invoke('enable'); - return form; - }, - - findFirstElement: function(form) { - var elements = $(form).getElements().findAll(function(element) { - return 'hidden' != element.type && !element.disabled; - }); - var firstByIndex = elements.findAll(function(element) { - return element.hasAttribute('tabIndex') && element.tabIndex >= 0; - }).sortBy(function(element) { return element.tabIndex }).first(); - - return firstByIndex ? firstByIndex : elements.find(function(element) { - return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - form = $(form); - form.findFirstElement().activate(); - return form; - }, - - request: function(form, options) { - form = $(form), options = Object.clone(options || { }); - - var params = options.parameters, action = form.readAttribute('action') || ''; - if (action.blank()) action = window.location.href; - options.parameters = form.serialize(true); - - if (params) { - if (Object.isString(params)) params = params.toQueryParams(); - Object.extend(options.parameters, params); - } - - if (form.hasAttribute('method') && !options.method) - options.method = form.method; - - return new Ajax.Request(action, options); - } -}; - -/*--------------------------------------------------------------------------*/ - -Form.Element = { - focus: function(element) { - $(element).focus(); - return element; - }, - - select: function(element) { - $(element).select(); - return element; - } -}; - -Form.Element.Methods = { - serialize: function(element) { - element = $(element); - if (!element.disabled && element.name) { - var value = element.getValue(); - if (value != undefined) { - var pair = { }; - pair[element.name] = value; - return Object.toQueryString(pair); - } - } - return ''; - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - return Form.Element.Serializers[method](element); - }, - - setValue: function(element, value) { - element = $(element); - var method = element.tagName.toLowerCase(); - Form.Element.Serializers[method](element, value); - return element; - }, - - clear: function(element) { - $(element).value = ''; - return element; - }, - - present: function(element) { - return $(element).value != ''; - }, - - activate: function(element) { - element = $(element); - try { - element.focus(); - if (element.select && (element.tagName.toLowerCase() != 'input' || - !['button', 'reset', 'submit'].include(element.type))) - element.select(); - } catch (e) { } - return element; - }, - - disable: function(element) { - element = $(element); - element.blur(); - element.disabled = true; - return element; - }, - - enable: function(element) { - element = $(element); - element.disabled = false; - return element; - } -}; - -/*--------------------------------------------------------------------------*/ - -var Field = Form.Element; -var $F = Form.Element.Methods.getValue; - -/*--------------------------------------------------------------------------*/ - -Form.Element.Serializers = { - input: function(element, value) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element, value); - default: - return Form.Element.Serializers.textarea(element, value); - } - }, - - inputSelector: function(element, value) { - if (Object.isUndefined(value)) return element.checked ? element.value : null; - else element.checked = !!value; - }, - - textarea: function(element, value) { - if (Object.isUndefined(value)) return element.value; - else element.value = value; - }, - - select: function(element, index) { - if (Object.isUndefined(index)) - return this[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - else { - var opt, value, single = !Object.isArray(index); - for (var i = 0, length = element.length; i < length; i++) { - opt = element.options[i]; - value = this.optionValue(opt); - if (single) { - if (value == index) { - opt.selected = true; - return; - } - } - else opt.selected = index.include(value); - } - } - }, - - selectOne: function(element) { - var index = element.selectedIndex; - return index >= 0 ? this.optionValue(element.options[index]) : null; - }, - - selectMany: function(element) { - var values, length = element.length; - if (!length) return null; - - for (var i = 0, values = []; i < length; i++) { - var opt = element.options[i]; - if (opt.selected) values.push(this.optionValue(opt)); - } - return values; - }, - - optionValue: function(opt) { - // extend element because hasAttribute may not be native - return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; - } -}; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = Class.create(PeriodicalExecuter, { - initialize: function($super, element, frequency, callback) { - $super(callback, frequency); - this.element = $(element); - this.lastValue = this.getValue(); - }, - - execute: function() { - var value = this.getValue(); - if (Object.isString(this.lastValue) && Object.isString(value) ? - this.lastValue != value : String(this.lastValue) != String(value)) { - this.callback(this.element, value); - this.lastValue = value; - } - } -}); - -Form.Element.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = Class.create({ - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - Form.getElements(this.element).each(this.registerCallback, this); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - default: - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -}); - -Form.Element.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) var Event = { }; - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - KEY_HOME: 36, - KEY_END: 35, - KEY_PAGEUP: 33, - KEY_PAGEDOWN: 34, - KEY_INSERT: 45, - - cache: { }, - - relatedTarget: function(event) { - var element; - switch(event.type) { - case 'mouseover': element = event.fromElement; break; - case 'mouseout': element = event.toElement; break; - default: return null; - } - return Element.extend(element); - } -}); - -Event.Methods = (function() { - var isButton; - - if (Prototype.Browser.IE) { - var buttonMap = { 0: 1, 1: 4, 2: 2 }; - isButton = function(event, code) { - return event.button == buttonMap[code]; - }; - - } else if (Prototype.Browser.WebKit) { - isButton = function(event, code) { - switch (code) { - case 0: return event.which == 1 && !event.metaKey; - case 1: return event.which == 1 && event.metaKey; - default: return false; - } - }; - - } else { - isButton = function(event, code) { - return event.which ? (event.which === code + 1) : (event.button === code); - }; - } - - return { - isLeftClick: function(event) { return isButton(event, 0) }, - isMiddleClick: function(event) { return isButton(event, 1) }, - isRightClick: function(event) { return isButton(event, 2) }, - - element: function(event) { - var node = Event.extend(event).target; - return Element.extend(node.nodeType == Node.TEXT_NODE ? node.parentNode : node); - }, - - findElement: function(event, expression) { - var element = Event.element(event); - if (!expression) return element; - var elements = [element].concat(element.ancestors()); - return Selector.findElement(elements, expression, 0); - }, - - pointer: function(event) { - return { - x: event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)), - y: event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)) - }; - }, - - pointerX: function(event) { return Event.pointer(event).x }, - pointerY: function(event) { return Event.pointer(event).y }, - - stop: function(event) { - Event.extend(event); - event.preventDefault(); - event.stopPropagation(); - event.stopped = true; - } - }; -})(); - -Event.extend = (function() { - var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { - m[name] = Event.Methods[name].methodize(); - return m; - }); - - if (Prototype.Browser.IE) { - Object.extend(methods, { - stopPropagation: function() { this.cancelBubble = true }, - preventDefault: function() { this.returnValue = false }, - inspect: function() { return "[object Event]" } - }); - - return function(event) { - if (!event) return false; - if (event._extendedByPrototype) return event; - - event._extendedByPrototype = Prototype.emptyFunction; - var pointer = Event.pointer(event); - Object.extend(event, { - target: event.srcElement, - relatedTarget: Event.relatedTarget(event), - pageX: pointer.x, - pageY: pointer.y - }); - return Object.extend(event, methods); - }; - - } else { - Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__; - Object.extend(Event.prototype, methods); - return Prototype.K; - } -})(); - -Object.extend(Event, (function() { - var cache = Event.cache; - - function getEventID(element) { - if (element._prototypeEventID) return element._prototypeEventID[0]; - arguments.callee.id = arguments.callee.id || 1; - return element._prototypeEventID = [++arguments.callee.id]; - } - - function getDOMEventName(eventName) { - if (eventName && eventName.include(':')) return "dataavailable"; - return eventName; - } - - function getCacheForID(id) { - return cache[id] = cache[id] || { }; - } - - function getWrappersForEventName(id, eventName) { - var c = getCacheForID(id); - return c[eventName] = c[eventName] || []; - } - - function createWrapper(element, eventName, handler) { - var id = getEventID(element); - var c = getWrappersForEventName(id, eventName); - if (c.pluck("handler").include(handler)) return false; - - var wrapper = function(event) { - if (!Event || !Event.extend || - (event.eventName && event.eventName != eventName)) - return false; - - Event.extend(event); - handler.call(element, event); - }; - - wrapper.handler = handler; - c.push(wrapper); - return wrapper; - } - - function findWrapper(id, eventName, handler) { - var c = getWrappersForEventName(id, eventName); - return c.find(function(wrapper) { return wrapper.handler == handler }); - } - - function destroyWrapper(id, eventName, handler) { - var c = getCacheForID(id); - if (!c[eventName]) return false; - c[eventName] = c[eventName].without(findWrapper(id, eventName, handler)); - } - - function destroyCache() { - for (var id in cache) - for (var eventName in cache[id]) - cache[id][eventName] = null; - } - - if (window.attachEvent) { - window.attachEvent("onunload", destroyCache); - } - - return { - observe: function(element, eventName, handler) { - element = $(element); - var name = getDOMEventName(eventName); - - var wrapper = createWrapper(element, eventName, handler); - if (!wrapper) return element; - - if (element.addEventListener) { - element.addEventListener(name, wrapper, false); - } else { - element.attachEvent("on" + name, wrapper); - } - - return element; - }, - - stopObserving: function(element, eventName, handler) { - element = $(element); - var id = getEventID(element), name = getDOMEventName(eventName); - - if (!handler && eventName) { - getWrappersForEventName(id, eventName).each(function(wrapper) { - element.stopObserving(eventName, wrapper.handler); - }); - return element; - - } else if (!eventName) { - Object.keys(getCacheForID(id)).each(function(eventName) { - element.stopObserving(eventName); - }); - return element; - } - - var wrapper = findWrapper(id, eventName, handler); - if (!wrapper) return element; - - if (element.removeEventListener) { - element.removeEventListener(name, wrapper, false); - } else { - element.detachEvent("on" + name, wrapper); - } - - destroyWrapper(id, eventName, handler); - - return element; - }, - - fire: function(element, eventName, memo) { - element = $(element); - if (element == document && document.createEvent && !element.dispatchEvent) - element = document.documentElement; - - var event; - if (document.createEvent) { - event = document.createEvent("HTMLEvents"); - event.initEvent("dataavailable", true, true); - } else { - event = document.createEventObject(); - event.eventType = "ondataavailable"; - } - - event.eventName = eventName; - event.memo = memo || { }; - - if (document.createEvent) { - element.dispatchEvent(event); - } else { - element.fireEvent(event.eventType, event); - } - - return Event.extend(event); - } - }; -})()); - -Object.extend(Event, Event.Methods); - -Element.addMethods({ - fire: Event.fire, - observe: Event.observe, - stopObserving: Event.stopObserving -}); - -Object.extend(document, { - fire: Element.Methods.fire.methodize(), - observe: Element.Methods.observe.methodize(), - stopObserving: Element.Methods.stopObserving.methodize(), - loaded: false -}); - -(function() { - /* Support for the DOMContentLoaded event is based on work by Dan Webb, - Matthias Miller, Dean Edwards and John Resig. */ - - var timer; - - function fireContentLoadedEvent() { - if (document.loaded) return; - if (timer) window.clearInterval(timer); - document.fire("dom:loaded"); - document.loaded = true; - } - - if (document.addEventListener) { - if (Prototype.Browser.WebKit) { - timer = window.setInterval(function() { - if (/loaded|complete/.test(document.readyState)) - fireContentLoadedEvent(); - }, 0); - - Event.observe(window, "load", fireContentLoadedEvent); - - } else { - document.addEventListener("DOMContentLoaded", - fireContentLoadedEvent, false); - } - - } else { - document.write("