You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

599 lines
25KB

  1. <?php
  2. // PAGING
  3. $this->mirrorMargins = 0;
  4. $this->forcePortraitMargins = false;
  5. $this->displayDefaultOrientation = false;
  6. $this->printers_info = false; // Adds date and page info for printer when using @page and "marks:crop;"
  7. $this->bleedMargin = 5;
  8. $this->crossMarkMargin = 5; // Distance of cross mark from margin in mm
  9. $this->cropMarkMargin = 8; // Distance of crop mark from margin in mm
  10. $this->cropMarkLength = 18; // Default length in mm of crop line
  11. $this->nonPrintMargin = 8; // Non-printable border at edge of paper sheet in mm
  12. $this->defaultPagebreakType = 'cloneall'; // 'slice' or 'cloneall' or 'clonebycss' - for forced pagebreaks using <pagebreak />
  13. // Automatic pagebreaks (flow in text) are always 'slice'
  14. // Avoid just the border/background-color of the end of a block being moved on to next page
  15. $this->margBuffer = 2; // Allows an (empty) end of block to extend beyond the bottom margin by this amount (mm)
  16. // PAGE NUMBERING
  17. $this->pagenumPrefix = '';
  18. $this->pagenumSuffix = '';
  19. $this->nbpgPrefix = '';
  20. $this->nbpgSuffix = '';
  21. $this->defaultPageNumStyle = '1'; // 1:Decimal, A:uppercase alphabetic etc. (as for list-style shorthands)
  22. // FONTS, LANGUAGES & CHARACTER SETS
  23. // Set maximum size of TTF font file to allow non-subsets - in kB
  24. // Used to avoid a font e.g. Arial Unicode MS (perhaps used for substitutions) ever being fully embedded
  25. // NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
  26. $this->maxTTFFilesize = 2000;
  27. // this value determines whether to subset or not
  28. // 0 - 100 = percent characters
  29. // i.e. if ==40, mPDF will embed whole font if >40% characters in that font
  30. // or embed subset if <40% characters
  31. // 0 will force whole file to be embedded (NO subsetting)
  32. // 100 will force always to subset
  33. // This value is overridden if you set new mPDF('s')
  34. // and/or Can set at runtime
  35. $this->percentSubset = 30;
  36. $this->useAdobeCJK = false; // Uses Adobe CJK fonts for CJK languages
  37. // default TRUE; only set false if you have defined some available fonts that support CJK
  38. // If true this will not stop use of other CJK fonts if specified by font-family:
  39. // and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
  40. // // When embedding full TTF font files, remakes the font file using only core tables
  41. // May improve function with some PostScript printers (GhostScript/GSView)
  42. // Does not work with TTC font collections
  43. // Slightly smaller file; increased processing time
  44. $this->repackageTTF = false;
  45. // Allows automatic character set conversion if "charset=xxx" detected in html header (WriteHTML() )
  46. $this->allow_charset_conversion = true;
  47. $this->biDirectional = false; // automatically determine BIDI text in LTR page
  48. // AUTOMATIC FONT SELECTION
  49. // Based on script and/or language
  50. $this->autoScriptToLang = false; // mPDF 6.0 (similar to previously using function SetAutoFont() )
  51. $this->baseScript = 1; // =Latin; to set another base script see constants in classes/ucdn.php
  52. $this->autoVietnamese = true;
  53. $this->autoArabic = true;
  54. $this->autoLangToFont = false; // mPDF 6.0 (similar to old useLang)
  55. $this->useSubstitutions = false; // Substitute missing characters in UTF-8(multibyte) documents - from other fonts
  56. $this->falseBoldWeight = 5; // Weight for bold text when using an artificial (outline) bold; value 0 (off) - 10 (rec. max)
  57. // CONFIGURATION
  58. $this->allow_output_buffering = false;
  59. $this->enableImports = false; // Adding mPDFI functions
  60. $this->collapseBlockMargins = true; // Allows top and bottom margins to collapse between block elements
  61. $this->progressBar = 0; // Shows progress-bars whilst generating file 0 off, 1 simple, 2 advanced
  62. $this->progbar_heading = 'mPDF file progress';
  63. $this->progbar_altHTML = ''; // Should include <html> and <body> but NOT end tags
  64. // Can include <head> and link to stylesheet etc.
  65. // e.g. '<html><body><p><img src="loading.gif" /> Creating PDF file. Please wait...</p>';
  66. $this->dpi = 96; // To interpret "px" pixel values in HTML/CSS (see img_dpi below)
  67. // Automatically correct for tags where HTML specifies optional end tags e.g. P,LI,DD,TD
  68. // If you are confident input html is valid XHTML, turning this off may make it more reliable(?)
  69. $this->allow_html_optional_endtags = true;
  70. $this->ignore_invalid_utf8 = false;
  71. $this->text_input_as_HTML = false; // Converts all entities in Text inputs to UTF-8 before encoding
  72. $this->useGraphs = false;
  73. // When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space
  74. // by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out
  75. // the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be.
  76. // FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer.
  77. $this->incrementFPR1 = 10; // i.e. will alter by 1/[10]th of width and try again until within closer limits
  78. $this->incrementFPR2 = 20;
  79. $this->incrementFPR3 = 30;
  80. $this->incrementFPR4 = 50; // i.e. will alter by 1/[50]th of width and try again when it nearly fits
  81. // COLORSPACE
  82. // 1 - allow GRAYSCALE only [convert CMYK/RGB->gray]
  83. // 2 - allow RGB / SPOT COLOR / Grayscale [convert CMYK->RGB]
  84. // 3 - allow CMYK / SPOT COLOR / Grayscale [convert RGB->CMYK]
  85. $this->restrictColorSpace = 0;
  86. // PDFX/1-a Compliant files
  87. $this->PDFX = false; // true=Forces compliance with PDFX-1a spec
  88. // Cannot be used with $this->restrictColorSpace (i.e. no RGB)
  89. $this->PDFXauto = false; // Overrides warnings making changes when possible to force PDFX1-a compliance
  90. // PDFA1-b Compliant files
  91. $this->PDFA = false; // true=Forces compliance with PDFA-1b spec
  92. // Can use with $this->restrictColorSpace=3 (for a CMYK file)
  93. // Any other settings, uses RGB profile
  94. $this->PDFAauto = false; // Overrides warnings making changes when possible to force PDFA1-b compliance
  95. $this->ICCProfile = ''; // Colour profile OutputIntent
  96. // sRGB_IEC61966-2-1 (=default if blank and PDFA), or other added .icc profile
  97. // Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
  98. // DEBUGGING & DEVELOPERS
  99. $this->showStats = false;
  100. $this->debug = false;
  101. $this->debugfonts = false; // Checks and reports on errors when parsing TTF files - adds significantly to processing time
  102. $this->showImageErrors = false;
  103. $this->table_error_report = false; // Die and report error if table is too wide to contain whole words
  104. $this->table_error_report_param = ''; // Parameter which can be passed to show in error report i.e. chapter number being processed//
  105. $this->title2annots = false; // Automatically convert title="" properties in tags, to annotations
  106. $this->annotSize = 0.5; // default mm for Adobe annotations - nominal
  107. $this->annotMargin; // default position for Annotations
  108. $this->annotOpacity = 0.5; // default opacity for Annotations
  109. // BOOKMARKS
  110. $this->anchor2Bookmark = 0; // makes <a name=""> into a bookmark as well as internal link target; 1 = just name; 2 = name (p.34)
  111. // Set an optional array to specify appearance of Bookmarks (by level)
  112. // Default values are Black and normal style
  113. /*
  114. Example:
  115. $this->bookmarkStyles = array(
  116. 0 => array('color'=> array(0,64,128), 'style'=>'B'),
  117. 1 => array('color'=> array(128,0,0), 'style'=>''),
  118. 2 => array('color'=> array(0,128,0), 'style'=>'I'),
  119. );
  120. */
  121. $this->bookmarkStyles = array();
  122. // Specify whether to automatically generate bookmarks from h1 - h6 tags
  123. $this->h2bookmarks = array();
  124. /* Define arrays with e.g. the tag=>Bookmark-level
  125. Remember bookmark levels start at 0
  126. (does not work inside tables)
  127. H1 - H6 must be uppercase
  128. $this->h2bookmarks = array('H1'=>0, 'H2'=>1, 'H3'=>2);
  129. */
  130. // TABLE OF CONTENTS
  131. // Specify whether to automatically generate ToC entries from h1 - h6 tags
  132. $this->h2toc = array();
  133. /* Define arrays with e.g. the tag=>ToC-level
  134. Remember ToC levels start at 0
  135. (does not work inside tables)
  136. Only the default ToC will be used if > 1 ToCs are defined for the document
  137. H1 - H6 must be uppercase
  138. $this->h2toc = array('H1'=>0, 'H2'=>1, 'H3'=>2);
  139. */
  140. // INDEX
  141. /* Specifies whether to repeat the main entry for each subEntry (true suppresses this)
  142. e.g. Mammal:dog ... Mammal:elephant ->
  143. [true]
  144. Mammal
  145. - dog
  146. - elephant
  147. [false]
  148. Mammal, dog
  149. Mammal, elephant
  150. */
  151. $this->indexUseSubentries = true;
  152. // CSS & STYLES
  153. $this->CSSselectMedia = 'print'; // screen, print, or any other CSS @media type (except "all")
  154. // PAGE HEADERS & FOOTERS
  155. $this->forcePortraitHeaders = false;
  156. // Values used if simple FOOTER/HEADER given i.e. not array
  157. $this->defaultheaderfontsize = 8; // pt
  158. $this->defaultheaderfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI'
  159. $this->defaultheaderline = 1; // 1 or 0 - line under the header
  160. $this->defaultfooterfontsize = 8; // pt
  161. $this->defaultfooterfontstyle = 'BI'; // '', or 'B' or 'I' or 'BI'
  162. $this->defaultfooterline = 1; // 1 or 0 - line over the footer
  163. $this->header_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize
  164. $this->footer_line_spacing = 0.25; // spacing between bottom of header and line (if present) - function of fontsize
  165. // If 'pad' margin-top sets fixed distance in mm (padding) between bottom of header and top of text.
  166. // 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.
  167. $this->setAutoTopMargin = false;
  168. $this->setAutoBottomMargin = false;
  169. $this->autoMarginPadding = 2; // distance in mm used as padding if 'stretch' mode is used
  170. // TABLES
  171. $this->simpleTables = false; // Forces all cells to have same border, background etc. Improves performance
  172. $this->packTableData = false; // Reduce memory usage processing tables (but with increased processing time)
  173. $this->ignore_table_percents = false;
  174. $this->ignore_table_widths = false;
  175. $this->keep_table_proportions = true; // If table width set > page width, force resizing but keep relative sizes
  176. // Also forces respect of cell widths set by %
  177. $this->shrink_tables_to_fit = 1.4; // automatically reduce fontsize in table if words would have to split ( not in CJK)
  178. // 0 or false to disable; value (if set) gives maximum factor to reduce fontsize
  179. $this->tableMinSizePriority = false; // If page-break-inside:avoid but cannot fit on full page without
  180. // exceeding autosize; setting this value to true will force respect for
  181. // autosize, and disable the page-break-inside:avoid
  182. $this->use_kwt = false; // "Keep-with-table" Attempts to keep a <h1> to <h6> tagged heading together
  183. // with a table which comes immediately after it.
  184. $this->iterationCounter = false; // Set to TRUE to use table Head iteration counter
  185. $this->splitTableBorderWidth = 0; // Use table border (using this width in mm) when table breaks across pages
  186. // Recommended to use small value e.g. 0.01
  187. // // Allowed characters for text alignment on decimal marks. Additional codes must start with D
  188. // DM - middot U+00B7
  189. // DA - arabic decimal mark U+066B
  190. $this->decimal_align = array('DP' => '.', 'DC' => ',', 'DM' => "\xc2\xb7", 'DA' => "\xd9\xab", 'DD' => '-');
  191. // IMAGES
  192. $this->interpolateImages = false; // if image-rendering=='auto', this defines value for image-rendering
  193. // if true, image interpolation shall be performed by a conforming reader
  194. $this->img_dpi = 96; // Default dpi to output images if size not defined
  195. // See also above "dpi"
  196. // TEXT SPACING & JUSTIFICATION
  197. $this->useKerning = false; // Specify whether kerning should be used when CSS font-kerning="auto" used for HTML;
  198. // Also whether kerning should be used in any direct writing e.g. $mpdf->Text();
  199. $this->justifyB4br = false; // In justified text, <BR> does not cause the preceding text to be justified in browsers
  200. // Change to true to force justification (as in MS Word)
  201. $this->tabSpaces = 8; // Number of spaces to replace for a TAB in <pre> sections
  202. // Notepad uses 6, HTML specification recommends 8
  203. $this->jSWord = 0.4; // Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character
  204. $this->jSmaxChar = 2; // Maximum spacing to allocate to character spacing. (0 = no maximum)
  205. $this->jSmaxCharLast = 1; // Maximum character spacing allowed (carried over) when finishing a last line
  206. $this->jSmaxWordLast = 2; // Maximum word spacing allowed (carried over) when finishing a last line
  207. // LINE SPACING & TEXT BASELINE
  208. $this->useFixedNormalLineHeight = false; // Use the fixed factor ($this->normalLineheight) when line-height:normal
  209. // Compatible with mPDF versions < 6
  210. $this->useFixedTextBaseline = false; // Use a fixed ratio ($this->baselineC) to set the text baseline
  211. // Compatible with mPDF versions < 6
  212. $this->normalLineheight = 1.33; // Default Value used for line-height when CSS specified as 'normal' (default)
  213. $this->adjustFontDescLineheight = 1.14; // Correction factor applied to lineheight values derived from 'win', 'mac', 'winTypo'
  214. // Small Caps
  215. $this->smCapsScale = 0.75; // Factor of 1 to scale capital letters
  216. $this->smCapsStretch = 110; // % to stretch small caps horizontally (i.e. 100 = no stretch)
  217. // Line-breaking
  218. // The alternative to these next 2 is the use of U+200B Zero-width space
  219. // These are only effective if using OTL for the fonts
  220. $this->useDictionaryLBR = true; // Use the dictionaries to determine line-breaking in Lao, Khmer and Thai
  221. $this->useTibetanLBR = true; // Use the inbuilt algorithm to determine line-breaking in Tibetan
  222. // CJK Line-breaking
  223. $this->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow
  224. $this->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables)
  225. $this->CJKforceend = false; // Forces overflowng punctuation to hang outside right margin mPDF 5.6.40
  226. // HYPHENATION (using word dictionaries)
  227. $this->SHYlang = "en"; // Should be one of: 'en','de','es','fi','fr','it','nl','pl','ru','sv'
  228. $this->SHYleftmin = 2;
  229. $this->SHYrightmin = 2;
  230. $this->SHYcharmin = 2;
  231. $this->SHYcharmax = 10;
  232. // COLUMNS
  233. $this->keepColumns = false; // Set to go to the second column only when the first is full of text etc.
  234. $this->max_colH_correction = 1.15; // Maximum ratio to adjust column height when justifying - too large a value can give ugly results
  235. $this->ColGap = 5;
  236. // LISTS
  237. // mPDF 6
  238. $this->list_auto_mode = 'browser'; // 'mpdf' or 'browser' - Specify whether to use mPDF custom method of automatic
  239. // indentation of lists, or standard browser-compatible
  240. // custom mPDF method is ignored if list-style-position: inside, or image used for marker (or custom U+)
  241. $this->list_indent_default = '40px'; // List Indentation when set to 'auto' if using standard browser-compatible method
  242. $this->list_indent_default_mpdf = '0em'; // List Indentation when set to 'auto' if using mPDF custom method
  243. $this->list_indent_first_level = 0; // 1/0 yes/no to indent first level of list, if using mPDF custom method
  244. $this->list_number_suffix = '.'; // Content to follow a numbered list marker e.g. '.' gives 1. or IV.; ')' gives 1) or a)
  245. // To specify a bullet size and offset proportional to the list item's font size:
  246. //$this->list_marker_offset = '0.45em'; // Offset (CSS length) of list marker bullets (disc/circle/square)
  247. //$this->list_symbol_size = '0.31em'; // Size (CSS) of list marker bullets (disc/circle/square)
  248. // Browsers use a fixed bullet size and offset
  249. $this->list_marker_offset = '5.5pt'; // Offset (CSS length) of list marker bullets (disc/circle/square)
  250. $this->list_symbol_size = '3.6pt'; // Size (CSS) of list marker bullets (disc/circle/square)
  251. // ACTIVE FORMS
  252. $this->useActiveForms = false;
  253. // WATERMARKS
  254. $this->watermarkImgBehind = false;
  255. $this->showWatermarkText = 0;
  256. $this->showWatermarkImage = 0;
  257. $this->watermarkText = '';
  258. $this->watermarkImage = '';
  259. $this->watermark_font = '';
  260. $this->watermarkTextAlpha = 0.2;
  261. $this->watermarkImageAlpha = 0.2;
  262. $this->watermarkImgAlphaBlend = 'Normal';
  263. // Accepts any PDF spec. value: Normal, Multiply, Screen, Overlay, Darken, Lighten, ColorDodge, ColorBurn,
  264. // HardLight, SoftLight, Difference, Exclusion
  265. // "Multiply" works well for watermark image on top
  266. // BORDERS
  267. $this->autoPadding = false; // Automatically increases padding in block elements when border-radius set - if required
  268. //////////////////////////////////////////////
  269. // Default values if no style sheet offered (cf. http://www.w3.org/TR/CSS21/sample.html)
  270. $this->defaultCSS = array(
  271. 'BODY' => array(
  272. 'FONT-FAMILY' => 'serif',
  273. 'FONT-SIZE' => '11pt',
  274. 'TEXT-INDENT' => '0pt',
  275. 'LINE-HEIGHT' => 'normal',
  276. 'MARGIN-COLLAPSE' => 'collapse', /* Custom property to collapse top/bottom margins at top/bottom of page - ignored in tables/lists */
  277. 'HYPHENS' => 'manual', /* mPDF 5.6.08 */
  278. 'FONT-KERNING' => 'auto', /* mPDF 6 */
  279. ),
  280. 'P' => array(
  281. 'MARGIN' => '1.12em 0',
  282. ),
  283. 'H1' => array(
  284. 'FONT-SIZE' => '2em',
  285. 'FONT-WEIGHT' => 'bold',
  286. 'MARGIN' => '0.67em 0',
  287. 'PAGE-BREAK-AFTER' => 'avoid',
  288. ),
  289. 'H2' => array(
  290. 'FONT-SIZE' => '1.5em',
  291. 'FONT-WEIGHT' => 'bold',
  292. 'MARGIN' => '0.75em 0',
  293. 'PAGE-BREAK-AFTER' => 'avoid',
  294. ),
  295. 'H3' => array(
  296. 'FONT-SIZE' => '1.17em',
  297. 'FONT-WEIGHT' => 'bold',
  298. 'MARGIN' => '0.83em 0',
  299. 'PAGE-BREAK-AFTER' => 'avoid',
  300. ),
  301. 'H4' => array(
  302. 'FONT-WEIGHT' => 'bold',
  303. 'MARGIN' => '1.12em 0',
  304. 'PAGE-BREAK-AFTER' => 'avoid',
  305. ),
  306. 'H5' => array(
  307. 'FONT-SIZE' => '0.83em',
  308. 'FONT-WEIGHT' => 'bold',
  309. 'MARGIN' => '1.5em 0',
  310. 'PAGE-BREAK-AFTER' => 'avoid',
  311. ),
  312. 'H6' => array(
  313. 'FONT-SIZE' => '0.75em',
  314. 'FONT-WEIGHT' => 'bold',
  315. 'MARGIN' => '1.67em 0',
  316. 'PAGE-BREAK-AFTER' => 'avoid',
  317. ),
  318. 'HR' => array(
  319. 'COLOR' => '#888888',
  320. 'TEXT-ALIGN' => 'center',
  321. 'WIDTH' => '100%',
  322. 'HEIGHT' => '0.2mm',
  323. 'MARGIN-TOP' => '0.83em',
  324. 'MARGIN-BOTTOM' => '0.83em',
  325. ),
  326. 'PRE' => array(
  327. 'MARGIN' => '0.83em 0',
  328. 'FONT-FAMILY' => 'monospace',
  329. ),
  330. 'S' => array(
  331. 'TEXT-DECORATION' => 'line-through',
  332. ),
  333. 'STRIKE' => array(
  334. 'TEXT-DECORATION' => 'line-through',
  335. ),
  336. 'DEL' => array(
  337. 'TEXT-DECORATION' => 'line-through',
  338. ),
  339. 'SUB' => array(
  340. 'VERTICAL-ALIGN' => 'sub',
  341. 'FONT-SIZE' => '55%', /* Recommended 0.83em */
  342. ),
  343. 'SUP' => array(
  344. 'VERTICAL-ALIGN' => 'super',
  345. 'FONT-SIZE' => '55%', /* Recommended 0.83em */
  346. ),
  347. 'U' => array(
  348. 'TEXT-DECORATION' => 'underline',
  349. ),
  350. 'INS' => array(
  351. 'TEXT-DECORATION' => 'underline',
  352. ),
  353. 'B' => array(
  354. 'FONT-WEIGHT' => 'bold',
  355. ),
  356. 'STRONG' => array(
  357. 'FONT-WEIGHT' => 'bold',
  358. ),
  359. 'I' => array(
  360. 'FONT-STYLE' => 'italic',
  361. ),
  362. 'CITE' => array(
  363. 'FONT-STYLE' => 'italic',
  364. ),
  365. 'Q' => array(
  366. 'FONT-STYLE' => 'italic',
  367. ),
  368. 'EM' => array(
  369. 'FONT-STYLE' => 'italic',
  370. ),
  371. 'VAR' => array(
  372. 'FONT-STYLE' => 'italic',
  373. ),
  374. 'SAMP' => array(
  375. 'FONT-FAMILY' => 'monospace',
  376. ),
  377. 'CODE' => array(
  378. 'FONT-FAMILY' => 'monospace',
  379. ),
  380. 'KBD' => array(
  381. 'FONT-FAMILY' => 'monospace',
  382. ),
  383. 'TT' => array(
  384. 'FONT-FAMILY' => 'monospace',
  385. ),
  386. 'SMALL' => array(
  387. 'FONT-SIZE' => '83%',
  388. ),
  389. 'BIG' => array(
  390. 'FONT-SIZE' => '117%',
  391. ),
  392. 'ACRONYM' => array(
  393. 'FONT-SIZE' => '77%',
  394. 'FONT-WEIGHT' => 'bold',
  395. ),
  396. 'ADDRESS' => array(
  397. 'FONT-STYLE' => 'italic',
  398. ),
  399. 'BLOCKQUOTE' => array(
  400. 'MARGIN-LEFT' => '40px',
  401. 'MARGIN-RIGHT' => '40px',
  402. 'MARGIN-TOP' => '1.12em',
  403. 'MARGIN-BOTTOM' => '1.12em',
  404. ),
  405. 'A' => array(
  406. 'COLOR' => '#0000FF',
  407. 'TEXT-DECORATION' => 'underline',
  408. ),
  409. 'UL' => array(
  410. 'PADDING' => '0 auto', /* mPDF 6 */
  411. 'MARGIN-TOP' => '0.83em', /* mPDF 6 */
  412. 'MARGIN-BOTTOM' => '0.83em', /* mPDF 6 */
  413. ),
  414. 'OL' => array(
  415. 'PADDING' => '0 auto', /* mPDF 6 */
  416. 'MARGIN-TOP' => '0.83em', /* mPDF 6 */
  417. 'MARGIN-BOTTOM' => '0.83em', /* mPDF 6 */
  418. ),
  419. 'DL' => array(
  420. 'MARGIN' => '1.67em 0',
  421. ),
  422. 'DT' => array(
  423. ),
  424. 'DD' => array(
  425. 'PADDING-LEFT' => '40px',
  426. ),
  427. 'TABLE' => array(
  428. 'MARGIN' => '0',
  429. 'BORDER-COLLAPSE' => 'separate',
  430. 'BORDER-SPACING' => '2px',
  431. 'EMPTY-CELLS' => 'show',
  432. 'LINE-HEIGHT' => '1.2',
  433. 'VERTICAL-ALIGN' => 'middle',
  434. 'HYPHENS' => 'manual', /* mPDF 6 */
  435. 'FONT-KERNING' => 'auto', /* mPDF 6 */
  436. ),
  437. 'THEAD' => array(
  438. ),
  439. 'TFOOT' => array(
  440. ),
  441. 'TH' => array(
  442. 'FONT-WEIGHT' => 'bold',
  443. 'TEXT-ALIGN' => 'center',
  444. 'PADDING-LEFT' => '0.1em',
  445. 'PADDING-RIGHT' => '0.1em',
  446. 'PADDING-TOP' => '0.1em',
  447. 'PADDING-BOTTOM' => '0.1em',
  448. ),
  449. 'TD' => array(
  450. 'PADDING-LEFT' => '0.1em',
  451. 'PADDING-RIGHT' => '0.1em',
  452. 'PADDING-TOP' => '0.1em',
  453. 'PADDING-BOTTOM' => '0.1em',
  454. ),
  455. 'CAPTION' => array(
  456. 'TEXT-ALIGN' => 'center',
  457. ),
  458. 'IMG' => array(
  459. 'MARGIN' => '0',
  460. 'VERTICAL-ALIGN' => 'baseline',
  461. 'IMAGE-RENDERING' => 'auto',
  462. ),
  463. 'INPUT' => array(
  464. 'FONT-FAMILY' => 'sans-serif',
  465. 'VERTICAL-ALIGN' => 'middle',
  466. 'FONT-SIZE' => '0.9em',
  467. ),
  468. 'SELECT' => array(
  469. 'FONT-FAMILY' => 'sans-serif',
  470. 'FONT-SIZE' => '0.9em',
  471. 'VERTICAL-ALIGN' => 'middle',
  472. ),
  473. 'TEXTAREA' => array(
  474. 'FONT-FAMILY' => 'monospace',
  475. 'FONT-SIZE' => '0.9em',
  476. 'VERTICAL-ALIGN' => 'text-bottom',
  477. ),
  478. 'MARK' => array(/* mPDF 5.5.09 */
  479. 'BACKGROUND-COLOR' => 'yellow',
  480. ),
  481. );
  482. //////////////////////////////////////////////////
  483. // VALUES ONLY LIKELY TO BE CHANGED BY DEVELOPERS
  484. //////////////////////////////////////////////////
  485. $this->pdf_version = '1.4';
  486. // Hyphenation
  487. $this->SHYlanguages = array('en', 'de', 'es', 'fi', 'fr', 'it', 'nl', 'pl', 'ru', 'sv'); // existing defined patterns
  488. $this->default_lineheight_correction = 1.2; // Value 1 sets lineheight=fontsize height;
  489. // Value used if line-height not set by CSS (usually is)
  490. $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);
  491. // CHARACTER PATTERN MATCHES TO DETECT LANGUAGES
  492. // pattern used to detect RTL characters -> force RTL
  493. $this->pregRTLchars = "\x{0590}-\x{06FF}\x{0700}-\x{085F}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}"; // 085F to include Mandaic
  494. // Chars which distinguish CJK but not between different
  495. $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}";
  496. // For CJK Line-breaking - References:
  497. // http://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages
  498. // http://msdn.microsoft.com/en-us/goglobal/bb688158.aspx - listed using charsets
  499. // Word wrapping in other langauges - http://msdn.microsoft.com/en-us/goglobal/bb688158.aspx
  500. // Word wrapping in Japanese/Korean - http://en.wikipedia.org/wiki/Kinsoku_shori
  501. // Unicode character types: http://unicode.org/reports/tr14/
  502. // http://xml.ascc.net/en/utf-8/faq/zhl10n-faq-xsl.html#qb1
  503. // ECMA-376 4th edition Part 1
  504. // http://www.ecma-international.org/publications/standards/Ecma-376.htm
  505. //Leading characters - Not allowed at end of line
  506. $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{fe35}\x{fe37}\x{fe39}\x{fe3b}\x{fe3d}\x{fe3f}\x{fe41}\x{fe43}\x{fe57}\x{fe59}\x{fe5b}\x{fe5d}\x{ff04}\x{ff08}\x{ff0e}\x{ff3b}\x{ff5b}\x{ff5f}\x{ff62}\x{ffe1}\x{ffe5}\x{ffe6}";
  507. // Following characters - Not allowed at start
  508. $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{2030}\x{2032}\x{2033}\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{309b}-\x{309e}\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{30fd}\x{30fe}\x{31f0}-\x{31ff}\x{fe30}\x{fe31}-\x{fe34}\x{fe36}\x{fe38}\x{fe3a}\x{fe3c}\x{fe3e}\x{fe40}\x{fe42}\x{fe44}\x{fe4f}\x{fe50}-\x{fe58}\x{fe5a}\x{fe5c}-\x{fe5e}\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{ff61}\x{ff63}-\x{ff65}\x{ff9e}\x{ff9f}\x{ffe0}";
  509. // Characters which are allowed to overflow the right margin (from CSS3 http://www.w3.org/TR/2012/WD-css3-text-20120814/#hanging-punctuation)
  510. $this->CJKoverflow = "\.,\x{ff61}\x{ff64}\x{3001}\x{3002}\x{fe50}-\x{fe52}\x{ff0c}\x{ff0e}";
  511. // mPDF 6
  512. // Used for preventing letter-spacing in cursive scripts
  513. // NB The following scripts in Unicode 6 are considered to be cursive scripts,
  514. // and do not allow expansion opportunities between their letters:
  515. // Arabic, Syriac, Mandaic, Mongolian, N'Ko, Phags Pa
  516. $this->pregCURSchars = "\x{0590}-\x{083E}\x{0900}-\x{0DFF}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}";
  517. $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';
  518. $this->allowedCSStags .= '|ARTICLE|ASIDE|FIGURE|FIGCAPTION|FOOTER|HEADER|HGROUP|NAV|SECTION|MAIN|MARK|DETAILS|SUMMARY|METER|PROGRESS|TIME';
  519. $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';
  520. $this->allowedCSStags .= '|SELECT|INPUT|TEXTAREA|CAPTION|FIELDSET|LEGEND';
  521. $this->allowedCSStags .= '|TEXTCIRCLE|DOTTAB|BDO|BDI';
  522. $this->outerblocktags = array('DIV', 'FORM', 'CENTER', 'DL', 'FIELDSET', 'ARTICLE', 'ASIDE', 'FIGURE', 'FIGCAPTION', 'FOOTER', 'HEADER', 'HGROUP', 'MAIN', 'NAV', 'SECTION', 'DETAILS', 'SUMMARY', 'UL', 'OL', 'LI');
  523. $this->innerblocktags = array('P', 'BLOCKQUOTE', 'ADDRESS', 'PRE', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'DT', 'DD', 'CAPTION');