config.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. <?php
  2. // mPDF 5.4
  3. // Using disk to cache table data can reduce memory usage dramatically, but at a cost of increased
  4. // executon time and disk access (read and write)
  5. $this->cacheTables = false;
  6. // Set an optional array to specify appearance of Bookmarks (by level)
  7. // Default values are Black and normal style
  8. /*
  9. Example:
  10. $this->bookmarkStyles = array(
  11. 0 => array('color'=> array(0,64,128), 'style'=>'B'),
  12. 1 => array('color'=> array(128,0,0), 'style'=>''),
  13. 2 => array('color'=> array(0,128,0), 'style'=>'I'),
  14. );
  15. */
  16. $this->bookmarkStyles = array();
  17. // ACTIVE FORMS
  18. $this->useActiveForms = false;
  19. // When embedding full TTF font files, remakes the font file using only core tables
  20. // May improve function with some PostScript printers (GhostScript/GSView)
  21. // Does not work with TTC font collections
  22. // Slightly smaller file; increased processing time
  23. $this->repackageTTF = false;
  24. // Set maximum size of TTF font file to allow non-subsets - in kB
  25. // Used to avoid e.g. Arial Unicode MS (perhaps used for substitutions) to ever be fully embedded
  26. // NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
  27. $this->maxTTFFilesize = 2000;
  28. // this value determines whether to subset or not
  29. // 0 - 100 = percent characters
  30. // i.e. if ==40, mPDF will embed whole font if >40% characters in that font
  31. // or embed subset if <40% characters
  32. // 0 will force whole file to be embedded (NO subsetting)
  33. // 100 will force always to subset
  34. // This value is overridden if you set new mPDF('s)
  35. // and/or Can set at runtime
  36. $this->percentSubset = 30;
  37. $this->useAdobeCJK = false; // Uses Adobe CJK fonts for CJK languages
  38. // default TRUE; only set false if you have defined some available fonts that support CJK
  39. // If true this will not stop use of other CJK fonts if specified by font-family:
  40. // and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
  41. // Small Caps
  42. $this->smCapsScale = 0.75; // Factor of 1 to scale capital letters
  43. $this->smCapsStretch = 110; // % to stretch small caps horizontally (i.e. 100 = no stretch)
  44. // PAGING
  45. $this->mirrorMargins = 0;
  46. $this->restoreBlockPagebreaks = false;
  47. $this->forcePortraitMargins = false;
  48. $this->displayDefaultOrientation = false;
  49. $this->printers_info = false; // Adds date and page info for printer when using @page and "marks:crop;"
  50. $this->bleedMargin = 5; // mPDF 5.0.047
  51. $this->crossMarkMargin = 5; // Distance of cross mark from margin in mm
  52. $this->cropMarkMargin = 8; // Distance of crop mark from margin in mm
  53. $this->cropMarkLength = 18; // Default length in mm of crop line
  54. $this->nonPrintMargin = 8; // Non-printable border at edge of paper sheet in mm
  55. // PAGE NUMBERING
  56. // Page numbering - Conditional Text
  57. $this->pagenumPrefix;
  58. $this->pagenumSuffix;
  59. $this->nbpgPrefix;
  60. $this->nbpgSuffix;
  61. // FONTS LANGUAGES & CHARACTER SETS
  62. // Allows automatic character set conversion if "charset=xxx" detected in html header (WriteHTML() )
  63. $this->allow_charset_conversion = true;
  64. $this->biDirectional=false; // automatically determine BIDI text in LTR page
  65. $this->autoFontGroupSize = 2; // 1: individual words are spanned; 2: words+; 3: as big chunks as possible.
  66. $this->useLang = true; // Default changed in mPDF 4.0
  67. $this->useSubstitutions = false; // Substitute missing characters in UTF-8(multibyte) documents - from other fonts
  68. $this->falseBoldWeight = 5; // Weight for bold text when using an artificial (outline) bold; value 0 (off) - 10 (rec. max)
  69. // CONFIGURATION
  70. $this->allow_output_buffering = false;
  71. $this->enableImports = false; // Adding mPDFI functions
  72. $this->collapseBlockMargins = true; // Allows top and bottom margins to collapse between block elements
  73. $this->progressBar = 0; // Shows progress-bars whilst generating file 0 off, 1 simple, 2 advanced
  74. $this->progbar_heading = 'mPDF file progress';
  75. $this->progbar_altHTML = ''; // Should include <html> and <body> but NOT end tags
  76. // Can incude <head> and link to stylesheet etc.
  77. // e.g. '<html><body><p><img src="loading.gif" /> Creating PDF file. Please wait...</p>';
  78. $this->dpi = 96; // To interpret "px" pixel values in HTML/CSS (see img_dpi below)
  79. // Automatically correct for tags where HTML specifies optional end tags e.g. P,LI,DD,TD
  80. // If you are confident input html is valid XHTML, turning this off may make it more reliable(?)
  81. $this->allow_html_optional_endtags = true;
  82. $this->ignore_invalid_utf8 = false;
  83. $this->text_input_as_HTML = false; // Converts all entities in Text inputs to UTF-8 before encoding
  84. $this->useGraphs = false;
  85. // COLORSPACE
  86. // 1 - allow GRAYSCALE only [convert CMYK/RGB->gray]
  87. // 2 - allow RGB / SPOT COLOR / Grayscale [convert CMYK->RGB]
  88. // 3 - allow CMYK / SPOT COLOR / Grayscale [convert RGB->CMYK]
  89. $this->restrictColorSpace = 0;
  90. // PDFX/1-a Compliant files
  91. $this->PDFX = false; // true=Forces compliance with PDFX-1a spec
  92. // Cannot be used with $this->restrictColorSpace (i.e. no RGB)
  93. $this->PDFXauto = false; // Overrides warnings making changes when possible to force PDFX1-a compliance
  94. // PDFA1-b Compliant files
  95. $this->PDFA = false; // true=Forces compliance with PDFA-1b spec
  96. // Can use with $this->restrictColorSpace=3 (for a CMYK file)
  97. // Any other settings, uses RGB profile
  98. $this->PDFAauto = false; // Overrides warnings making changes when possible to force PDFA1-b compliance
  99. $this->ICCProfile = ''; // Colour profile OutputIntent
  100. // sRGB_IEC61966-2-1 (=default if blank and PDFA), or other added .icc profile
  101. // Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
  102. // When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space
  103. // by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out
  104. // the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be.
  105. // FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer.
  106. $this->incrementFPR1 = 10; // i.e. will alter by 1/[10]th of width and try again until within closer limits
  107. $this->incrementFPR2 = 20;
  108. $this->incrementFPR3 = 30;
  109. $this->incrementFPR4 = 50; // i.e. will alter by 1/[50]th of width and try again when it nearly fits
  110. // DEBUGGING & DEVELOPERS
  111. $this->showStats = false;
  112. $this->debug = false;
  113. $this->debugfonts = false; // Checks and reports on errors when parsing TTF files - adds significantly to processing time
  114. $this->showImageErrors = false;
  115. $this->table_error_report = false; // Die and report error if table is too wide to contain whole words
  116. $this->table_error_report_param = ''; // Parameter which can be passed to show in error report i.e. chapter number being processed//
  117. // ANNOTATIONS
  118. $this->title2annots = false;
  119. $this->annotSize = 0.5; // default mm for Adobe annotations - nominal
  120. $this->annotMargin; // default position for Annotations
  121. $this->annotOpacity = 0.5; // default opacity for Annotations
  122. // BOOKMARKS
  123. $this->anchor2Bookmark = 0; // makes <a name=""> into a bookmark as well as internal link target; 1 = just name; 2 = name (p.34)
  124. // CSS & STYLES
  125. $this->CSSselectMedia='print'; // screen, print, or any other CSS @media type (not "all")
  126. // PAGE HEADERS & FOOTERS
  127. $this->forcePortraitHeaders = false;
  128. // Values used if simple FOOTER/HEADER given i.e. not array
  129. $this->defaultheaderfontsize = 8; // pt
  130. $this->defaultheaderfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI'
  131. $this->defaultheaderline = 1; // 1 or 0 - line under the header
  132. $this->defaultfooterfontsize = 8; // pt
  133. $this->defaultfooterfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI'
  134. $this->defaultfooterline = 1; // 1 or 0 - line over the footer
  135. $this->header_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize
  136. $this->footer_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize
  137. // If 'pad' margin-top sets fixed distance in mm (padding) between bottom of header and top of text.
  138. // 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.
  139. $this->setAutoTopMargin = false;
  140. $this->setAutoBottomMargin = false;
  141. $this->autoMarginPadding = 2; // distance in mm used as padding if 'stretch' mode is used
  142. // TABLES
  143. $this->simpleTables = false; // Forces all cells to have same border, background etc. Improves performance
  144. $this->packTableData = false; // Reduce memory usage processing tables (but with increased processing time)
  145. $this->ignore_table_percents = false;
  146. $this->ignore_table_widths = false;
  147. $this->keep_table_proportions = false; // If table width set > page width, force resizing but keep relative sizes
  148. // Also forces respect of cell widths set by %
  149. $this->shrink_tables_to_fit = 1.4; // automatically reduce fontsize in table if words would have to split ( not in CJK)
  150. // 0 or false to disable; value (if set) gives maximum factor to reduce fontsize
  151. $this->tableMinSizePriority = false; // If page-break-inside:avoid but cannot fit on full page without
  152. // exceeding autosize; setting this value to true will force respsect for
  153. // autosize, and disable the page-break-inside:avoid
  154. $this->use_kwt = false;
  155. $this->iterationCounter = false; // Set to TRUE to use table Head iteration counter
  156. // IMAGES
  157. $this->img_dpi = 96; // Default dpi to output images if size not defined
  158. // See also above "dpi"
  159. // TEXT SPACING & JUSTIFICATION
  160. $this->useKerning = false; // true to use kerning
  161. $this->justifyB4br = false; // In justified text, <BR> does not cause the preceding text to be justified in browsers
  162. // Change to true to force justification (as in MS Word)
  163. $this->tabSpaces = 8; // Number of spaces to replace for a TAB in <pre> sections
  164. // Notepad uses 6, HTML specification recommends 8
  165. $this->jSWord = 0.4; // Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
  166. $this->jSmaxChar = 2; // Maximum spacing to allocate to character spacing. (0 = no maximum)
  167. $this->jSmaxCharLast = 1; // Maximum character spacing allowed (carried over) when finishing a last line
  168. $this->jSmaxWordLast = 2; // Maximum word spacing allowed (carried over) when finishing a last line
  169. $this->orphansAllowed = 5; // No of SUP or SUB characters to include on line to avoid leaving e.g. end of line//<sup>32</sup>
  170. $this->normalLineheight = 1.33; // Value used for line-height when CSS specified as 'normal' (default)
  171. // CJK Line-breaking
  172. $this->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow
  173. $this->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables)
  174. // HYPHENATION
  175. $this->hyphenate = false;
  176. $this->hyphenateTables = false;
  177. $this->SHYlang = "en"; // Should be one of: 'en','de','es','fi','fr','it','nl','pl','ru','sv'
  178. $this->SHYleftmin = 2;
  179. $this->SHYrightmin = 2;
  180. $this->SHYcharmin = 2;
  181. $this->SHYcharmax = 10;
  182. // COLUMNS
  183. $this->keepColumns = false; // Set to go to the second column only when the first is full of text etc.
  184. $this->max_colH_correction = 1.15; // Maximum ratio to adjust column height when justifying - too large a value can give ugly results
  185. $this->ColGap=5;
  186. // LISTS
  187. $this->list_align_style = 'R'; // Determines alignment of numbers in numbered lists
  188. $this->list_indent_first_level = 0; // 1/0 yex/no to indent first level of list
  189. $this->list_number_suffix = '.'; // Content to follow a numbered list marker e.g. '.' gives 1. or IV.; ')' gives 1) or a)
  190. // WATERMARKS
  191. $this->watermarkImgBehind = false;
  192. $this->showWatermarkText = 0;
  193. $this->showWatermarkImage = 0;
  194. $this->watermarkText = '';
  195. $this->watermarkImage = '';
  196. $this->watermark_font = '';
  197. $this->watermarkTextAlpha = 0.2;
  198. $this->watermarkImageAlpha = 0.2;
  199. $this->watermarkImgAlphaBlend = 'Normal';
  200. // Accepts any PDF spec. value: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn,
  201. // HardLight, SoftLight, Difference, Exclusion
  202. // "Multiply" works well for watermark image on top
  203. // BORDERS
  204. $this->autoPadding = false; // Automatically increases padding in block elements when border-radius set - if required
  205. //////////////////////////////////////////////
  206. // Default values if no style sheet offered (cf. http://www.w3.org/TR/CSS21/sample.html)
  207. $this->defaultCSS = array(
  208. 'BODY' => array(
  209. 'FONT-FAMILY' => 'serif',
  210. 'FONT-SIZE' => '11pt',
  211. 'TEXT-INDENT' => '0pt',
  212. 'LINE-HEIGHT' => 'normal',
  213. 'MARGIN-COLLAPSE' => 'collapse', /* Custom property to collapse top/bottom margins at top/bottom of page - ignored in tables/lists */
  214. ),
  215. 'P' => array(
  216. 'MARGIN' => '1.12em 0',
  217. ),
  218. 'H1' => array(
  219. 'FONT-SIZE' => '2em',
  220. 'FONT-WEIGHT' => 'bold',
  221. 'MARGIN' => '0.67em 0',
  222. 'PAGE-BREAK-AFTER' => 'avoid',
  223. ),
  224. 'H2' => array(
  225. 'FONT-SIZE' => '1.5em',
  226. 'FONT-WEIGHT' => 'bold',
  227. 'MARGIN' => '0.75em 0',
  228. 'PAGE-BREAK-AFTER' => 'avoid',
  229. ),
  230. 'H3' => array(
  231. 'FONT-SIZE' => '1.17em',
  232. 'FONT-WEIGHT' => 'bold',
  233. 'MARGIN' => '0.83em 0',
  234. 'PAGE-BREAK-AFTER' => 'avoid',
  235. ),
  236. 'H4' => array(
  237. 'FONT-WEIGHT' => 'bold',
  238. 'MARGIN' => '1.12em 0',
  239. 'PAGE-BREAK-AFTER' => 'avoid',
  240. ),
  241. 'H5' => array(
  242. 'FONT-SIZE' => '0.83em',
  243. 'FONT-WEIGHT' => 'bold',
  244. 'MARGIN' => '1.5em 0',
  245. 'PAGE-BREAK-AFTER' => 'avoid',
  246. ),
  247. 'H6' => array(
  248. 'FONT-SIZE' => '0.75em',
  249. 'FONT-WEIGHT' => 'bold',
  250. 'MARGIN' => '1.67em 0',
  251. 'PAGE-BREAK-AFTER' => 'avoid',
  252. ),
  253. 'HR' => array(
  254. 'COLOR' => '#888888',
  255. 'TEXT-ALIGN' => 'center',
  256. 'WIDTH' => '100%',
  257. 'HEIGHT' => '0.2mm',
  258. 'MARGIN-TOP' => '0.83em',
  259. 'MARGIN-BOTTOM' => '0.83em',
  260. ),
  261. 'PRE' => array(
  262. 'MARGIN' => '0.83em 0',
  263. 'FONT-FAMILY' => 'monospace',
  264. ),
  265. 'S' => array(
  266. 'TEXT-DECORATION' => 'line-through',
  267. ),
  268. 'STRIKE' => array(
  269. 'TEXT-DECORATION' => 'line-through',
  270. ),
  271. 'DEL' => array(
  272. 'TEXT-DECORATION' => 'line-through',
  273. ),
  274. 'SUB' => array(
  275. 'VERTICAL-ALIGN' => 'sub',
  276. 'FONT-SIZE' => '55%', /* Recommended 0.83em */
  277. ),
  278. 'SUP' => array(
  279. 'VERTICAL-ALIGN' => 'super',
  280. 'FONT-SIZE' => '55%', /* Recommended 0.83em */
  281. ),
  282. 'U' => array(
  283. 'TEXT-DECORATION' => 'underline',
  284. ),
  285. 'INS' => array(
  286. 'TEXT-DECORATION' => 'underline',
  287. ),
  288. 'B' => array(
  289. 'FONT-WEIGHT' => 'bold',
  290. ),
  291. 'STRONG' => array(
  292. 'FONT-WEIGHT' => 'bold',
  293. ),
  294. 'I' => array(
  295. 'FONT-STYLE' => 'italic',
  296. ),
  297. 'CITE' => array(
  298. 'FONT-STYLE' => 'italic',
  299. ),
  300. 'Q' => array(
  301. 'FONT-STYLE' => 'italic',
  302. ),
  303. 'EM' => array(
  304. 'FONT-STYLE' => 'italic',
  305. ),
  306. 'VAR' => array(
  307. 'FONT-STYLE' => 'italic',
  308. ),
  309. 'SAMP' => array(
  310. 'FONT-FAMILY' => 'monospace',
  311. ),
  312. 'CODE' => array(
  313. 'FONT-FAMILY' => 'monospace',
  314. ),
  315. 'KBD' => array(
  316. 'FONT-FAMILY' => 'monospace',
  317. ),
  318. 'TT' => array(
  319. 'FONT-FAMILY' => 'monospace',
  320. ),
  321. 'SMALL' => array(
  322. 'FONT-SIZE' => '83%',
  323. ),
  324. 'BIG' => array(
  325. 'FONT-SIZE' => '117%',
  326. ),
  327. 'ACRONYM' => array(
  328. 'FONT-SIZE' => '77%',
  329. 'FONT-WEIGHT' => 'bold',
  330. ),
  331. 'ADDRESS' => array(
  332. 'FONT-STYLE' => 'italic',
  333. ),
  334. 'BLOCKQUOTE' => array(
  335. 'MARGIN-LEFT' => '40px',
  336. 'MARGIN-RIGHT' => '40px',
  337. 'MARGIN-TOP' => '1.12em',
  338. 'MARGIN-BOTTOM' => '1.12em',
  339. ),
  340. 'A' => array(
  341. 'COLOR' => '#0000FF',
  342. 'TEXT-DECORATION' => 'underline',
  343. ),
  344. 'UL' => array(
  345. 'MARGIN' => '0.83em 0', /* only applied to top-level of nested lists */
  346. 'TEXT-INDENT' => '1.3em', /* Custom effect - list indent */
  347. ),
  348. 'OL' => array(
  349. 'MARGIN' => '0.83em 0', /* only applied to top-level of nested lists */
  350. 'TEXT-INDENT' => '1.3em', /* Custom effect - list indent */
  351. ),
  352. 'DL' => array(
  353. 'MARGIN' => '1.67em 0',
  354. ),
  355. 'DT' => array(
  356. ),
  357. 'DD' => array(
  358. 'PADDING-LEFT' => '40px',
  359. ),
  360. 'TABLE' => array(
  361. 'MARGIN' => '0',
  362. 'BORDER-COLLAPSE' => 'separate',
  363. 'BORDER-SPACING' => '2px',
  364. 'EMPTY-CELLS' => 'show',
  365. 'LINE-HEIGHT' => '1.2',
  366. 'VERTICAL-ALIGN' => 'middle',
  367. ),
  368. 'THEAD' => array(
  369. ),
  370. 'TFOOT' => array(
  371. ),
  372. 'TH' => array(
  373. 'FONT-WEIGHT' => 'bold',
  374. 'TEXT-ALIGN' => 'center',
  375. 'PADDING-LEFT' => '0.1em',
  376. 'PADDING-RIGHT' => '0.1em',
  377. 'PADDING-TOP' => '0.1em',
  378. 'PADDING-BOTTOM' => '0.1em',
  379. ),
  380. 'TD' => array(
  381. 'PADDING-LEFT' => '0.1em',
  382. 'PADDING-RIGHT' => '0.1em',
  383. 'PADDING-TOP' => '0.1em',
  384. 'PADDING-BOTTOM' => '0.1em',
  385. ),
  386. 'CAPTION' => array(
  387. 'TEXT-ALIGN' => 'center', /* Added mPDF 5.4 */
  388. ),
  389. 'IMG' => array(
  390. 'MARGIN' => '0',
  391. 'VERTICAL-ALIGN' => 'baseline',
  392. ),
  393. 'INPUT' => array(
  394. 'FONT-FAMILY' => 'sans-serif',
  395. 'VERTICAL-ALIGN' => 'middle',
  396. 'FONT-SIZE' => '0.9em',
  397. ),
  398. 'SELECT' => array(
  399. 'FONT-FAMILY' => 'sans-serif',
  400. 'FONT-SIZE' => '0.9em',
  401. 'VERTICAL-ALIGN' => 'middle',
  402. ),
  403. 'TEXTAREA' => array(
  404. 'FONT-FAMILY' => 'monospace',
  405. 'FONT-SIZE' => '0.9em',
  406. 'VERTICAL-ALIGN' => 'text-bottom',
  407. ),
  408. );
  409. //////////////////////////////////////////////////
  410. // VALUES ONLY LIKELY TO BE CHANGED BY DEVELOPERS
  411. //////////////////////////////////////////////////
  412. $this->pdf_version = '1.4';
  413. // Hyphenation
  414. $this->SHYlanguages = array('en','de','es','fi','fr','it','nl','pl','ru','sv'); // existing defined patterns
  415. $this->default_lineheight_correction=1.2; // Value 1 sets lineheight=fontsize height;
  416. // Value used if line-height not set by CSS (usuallly is)
  417. $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);
  418. // CHARACTER PATTERN MATCHES TO DETECT LANGUAGES
  419. // pattern used to detect RTL characters -> force RTL
  420. $this->pregRTLchars = "\x{0590}-\x{06FF}\x{0700}-\x{083E}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}";
  421. // mPDF 5 Now includes Syriac, Thaana, N'Ko and Samaritan
  422. // CJK Chars which require changing and are distinctive of specific charset
  423. $this->pregUHCchars = "\x{1100}-\x{11FF}\x{3130}-\x{318F}\x{AC00}-\x{D7AF}";
  424. $this->pregSJISchars = "\x{3040}-\x{309F}\x{30A0}-\x{30FF}\x{3190}-\x{319F}\x{31F0}-\x{31FF}";
  425. // Chars which distinguish CJK but not between different
  426. $this->pregCJKchars = "\x{1100}-\x{11FF}\x{2E80}-\x{A4CF}\x{A800}-\x{D7AF}\x{F900}-\x{FAFF}\x{FE30}-\x{FE6F}\x{FF00}-\x{FFEF}\x{20000}-\x{2FA1F}";
  427. // For CJK Line-breaking
  428. //Leading characters - Not allowed at end of line
  429. $this->CJKleading = "\$\(\*\[\{\x{00a3}\x{00a5}\x{00ab}\x{00b7}\x{2018}\x{201c}\x{2035}\x{3005}\x{3007}\x{3008}\x{300a}\x{300c}\x{300e}\x{3010}\x{3014}\x{3016}\x{3018}\x{301d}\x{fe34}\x{fe57}\x{fe59}\x{fe5b}\x{ff04}\x{ff08}\x{ff0e}\x{ff3b}\x{ff5b}\x{ff5f}\x{ffe1}\x{ffe5}\x{ffe6}";
  430. // Following characters - Not allowed at start
  431. $this->CJKfollowing = "!%\),\.:;>\?\]\}\x{00a2}\x{00a8}\x{00b0}\x{00b7}\x{00bb}\x{02c7}\x{02c9}\x{2010}\x{2013}-\x{2016}\x{2019}\x{201d}-\x{201f}\x{2020}-\x{2022}\x{2025}\x{2027}\x{203a}\x{203c}\x{2047}-\x{2049}\x{2103}\x{2236}\x{2574}\x{3001}-\x{3003}\x{3005}\x{3006}\x{3009}\x{300b}\x{300d}\x{300f}\x{3011}\x{3015}\x{3017}\x{3019}\x{301c}\x{301e}\x{301f}\x{303b}\x{3041}\x{3043}\x{3045}\x{3047}\x{3049}\x{3063}\x{3083}\x{3085}\x{3087}\x{308e}\x{3095}\x{3096}\x{30a0}\x{30a1}\x{30a3}\x{30a5}\x{30a7}\x{30a9}\x{30c3}\x{30e3}\x{30e5}\x{30e7}\x{30ee}\x{30f5}\x{30f6}\x{30fb}-\x{30fe}\x{31f0}-\x{31ff}\x{fe30}-\x{fe33}\x{fe50}-\x{fe56}\x{fe58}\x{fe5a}\x{fe5c}\x{ff01}\x{ff02}\x{ff05}\x{ff07}\x{ff09}\x{ff0c}\x{ff0e}\x{ff1a}\x{ff1b}\x{ff1f}\x{ff3d}\x{ff40}\x{ff5c}-\x{ff5e}\x{ff60}\x{ff64}";
  432. // Characters which are allowed to overflow the right margin
  433. $this->CJKoverflow = "\.,\x{ff61}\x{ff64}\x{3001}\x{3002}\x{ff0c}\x{ff0e}";
  434. // ASCII Chars which shouldn't break string
  435. // Use for very specific words
  436. $this->pregASCIIchars1 = "\x{0021}-\x{002E}\x{0030}-\x{003B}?"; // no [SPACE]
  437. // Use for words+
  438. $this->pregASCIIchars2 = "\x{0020}-\x{002E}\x{0030}-\x{003B}?"; // [SPACE] punctuation and 0-9
  439. // Use for chunks > words
  440. $this->pregASCIIchars3 = "\x{0000}-\x{002E}\x{0030}-\x{003B}\x{003F}-\x{007E}"; // all except <>
  441. // Vietnamese - specific
  442. $this->pregVIETchars = "\x{01A0}\x{01A1}\x{01AF}\x{01B0}\x{1EA0}-\x{1EF1}";
  443. // Vietnamese - Chars which shouldn't break string
  444. $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 < >
  445. // Arabic
  446. $this->pregARABICchars = "\x{0600}-\x{06FF}\x{0750}-\x{077F}\x{FB50}-\x{FDFD}\x{FE70}-\x{FEFF}";
  447. // Characters of Urdu, Pashto, Sindhi (but NOT arabic or persian/farsi) [not covered by DejavuSans font]
  448. $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}";
  449. $this->pregHEBchars = "\x{0590}-\x{05FF}\x{FB00}-\x{FB49}"; // Hebrew
  450. // INDIC
  451. $this->pregHIchars = "\x{0900}-\x{0963}\x{0966}-\x{097F}"; // Devanagari (Hindi) minus the common indic punctuation 0964,0965
  452. $this->pregBNchars = "\x{0980}-\x{09FF}"; // Bengali
  453. $this->pregPAchars = "\x{0A00}-\x{0A7F}"; // Gurmukhi (Punjabi)
  454. $this->pregGUchars = "\x{0A80}-\x{0AFF}"; // Gujarati
  455. $this->pregORchars = "\x{0B00}-\x{0B7F}"; // Oriya
  456. $this->pregTAchars = "\x{0B80}-\x{0BFF}"; // Tamil
  457. $this->pregTEchars = "\x{0C00}-\x{0C7F}"; // Telugu
  458. $this->pregKNchars = "\x{0C80}-\x{0CFF}"; // Kannada
  459. $this->pregMLchars = "\x{0D00}-\x{0D7F}"; // Malayalam
  460. $this->pregSHchars = "\x{0D80}-\x{0DFF}"; // Sinhala
  461. $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}";
  462. // 200B-D=Zero-width joiners; 0964,0965=Generic Indic punctuation; NBSP & general punctuation (excludes # and / so can use in autoFont() )
  463. $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';
  464. $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';
  465. $this->allowedCSStags .= '|SELECT|INPUT|TEXTAREA|CAPTION'; // mPDF 5.4
  466. $this->outerblocktags = array('DIV','FORM','CENTER','DL');
  467. $this->innerblocktags = array('P','BLOCKQUOTE','ADDRESS','PRE','H1','H2','H3','H4','H5','H6','DT','DD','CAPTION'); // mPDF 5.4
  468. ?>