PluginProbe
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin / 1.5
PDF & Print by BestWebSoft – WordPress Posts and Pages PDF Generator Plugin v1.5
trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 All 71 releases
← All changes | mpdf/config.php +69 -93 1.71.5 View file →
@@ -1,51 +1,32 @@
1 1 <?php
2 2
3 -// mPDF 5.7
4 -// Specify whether to automatically generate bookmarks or ToC entries from h1 - h6 tags
5 -$this->h2bookmarks = array();
6 -$this->h2toc = array();
7 -/* Define arrays with e.g. the tag=>ToC-level
8 -Remember bookmark and ToC levels start at 0
9 -(does not work inside tables)
10 -Only the default ToC will be used if > 1 ToCs are defined for the document
11 -H1 - H6 must be uppercase
12 -$this->h2toc = array('H1'=>0, 'H2'=>1, 'H3'=>2);
13 -$this->h2bookmarks = array('H1'=>0, 'H2'=>1, 'H3'=>2);
3 +// mPDF 5.4
4 +// Using disk to cache table data can reduce memory usage dramatically, but at a cost of increased
5 +// executon time and disk access (read and write)
6 +$this->cacheTables = false;
7 +
8 +// Set an optional array to specify appearance of Bookmarks (by level)
9 +// Default values are Black and normal style
10 +/*
11 + Example:
12 +$this->bookmarkStyles = array(
13 + 0 => array('color'=> array(0,64,128), 'style'=>'B'),
14 + 1 => array('color'=> array(128,0,0), 'style'=>''),
15 + 2 => array('color'=> array(0,128,0), 'style'=>'I'),
16 +);
14 17 */
18 +$this->bookmarkStyles = array();
15 19
16 -// mPDF 5.7
17 -// Text-align on decimal marks
18 -// Allowed characters for alignment on decimal marks. Additional codes must start with D
19 -// Non-ASCII characters should be in utf-8 encoding
20 -// DM - middot U+00B7
21 -// DA - arabic decimal mark U+066B
22 -$this->decimal_align = array('DP'=>'.', 'DC'=>',', 'DM'=>"\xc2\xb7", 'DA'=>"\xd9\xab", 'DD'=>'-');
20 +// ACTIVE FORMS
21 +$this->useActiveForms = false;
23 22
24 -// PAGING
25 -$this->mirrorMargins = 0;
26 -$this->restoreBlockPagebreaks = false;
27 -$this->forcePortraitMargins = false;
28 -$this->displayDefaultOrientation = false;
29 -$this->printers_info = false; // Adds date and page info for printer when using @page and "marks:crop;"
30 -$this->bleedMargin = 5;
31 -$this->crossMarkMargin = 5; // Distance of cross mark from margin in mm
32 -$this->cropMarkMargin = 8; // Distance of crop mark from margin in mm
33 -$this->cropMarkLength = 18; // Default length in mm of crop line
34 -$this->nonPrintMargin = 8; // Non-printable border at edge of paper sheet in mm
35 -// mPDF 5.5
36 -// Avoid just the border/background-color of the end of a block being moved on to next page
37 -$this->margBuffer = 2; // Allows an (empty) end of block to extend beyond the bottom margin by this amount (mm)
23 +// When embedding full TTF font files, remakes the font file using only core tables
24 +// May improve function with some PostScript printers (GhostScript/GSView)
25 +// Does not work with TTC font collections
26 +// Slightly smaller file; increased processing time
27 +$this->repackageTTF = false;
38 28
39 -
40 -// PAGE NUMBERING
41 -$this->pagenumPrefix;
42 -$this->pagenumSuffix;
43 -$this->nbpgPrefix;
44 -$this->nbpgSuffix;
45 -
46 -
47 -// FONTS, LANGUAGES & CHARACTER SETS
48 29 // Set maximum size of TTF font file to allow non-subsets - in kB
49 30 // Used to avoid e.g. Arial Unicode MS (perhaps used for substitutions) to ever be fully embedded
50 31 // NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
51 32 $this->maxTTFFilesize = 2000;
@@ -64,14 +45,36 @@
64 45 // default TRUE; only set false if you have defined some available fonts that support CJK
65 46 // If true this will not stop use of other CJK fonts if specified by font-family:
66 47 // and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
67 48
68 -// When embedding full TTF font files, remakes the font file using only core tables
69 -// May improve function with some PostScript printers (GhostScript/GSView)
70 -// Does not work with TTC font collections
71 -// Slightly smaller file; increased processing time
72 -$this->repackageTTF = false;
73 49
50 +// Small Caps
51 +$this->smCapsScale = 0.75; // Factor of 1 to scale capital letters
52 +$this->smCapsStretch = 110; // % to stretch small caps horizontally (i.e. 100 = no stretch)
53 +
54 +
55 +// PAGING
56 +$this->mirrorMargins = 0;
57 +$this->restoreBlockPagebreaks = false;
58 +$this->forcePortraitMargins = false;
59 +$this->displayDefaultOrientation = false;
60 +$this->printers_info = false; // Adds date and page info for printer when using @page and "marks:crop;"
61 +$this->bleedMargin = 5; // mPDF 5.0.047
62 +$this->crossMarkMargin = 5; // Distance of cross mark from margin in mm
63 +$this->cropMarkMargin = 8; // Distance of crop mark from margin in mm
64 +$this->cropMarkLength = 18; // Default length in mm of crop line
65 +$this->nonPrintMargin = 8; // Non-printable border at edge of paper sheet in mm
66 +
67 +
68 +// PAGE NUMBERING
69 +// Page numbering - Conditional Text
70 +$this->pagenumPrefix;
71 +$this->pagenumSuffix;
72 +$this->nbpgPrefix;
73 +$this->nbpgSuffix;
74 +
75 +
76 +// FONTS LANGUAGES & CHARACTER SETS
74 77 // Allows automatic character set conversion if "charset=xxx" detected in html header (WriteHTML() )
75 78 $this->allow_charset_conversion = true;
76 79 $this->biDirectional=false; // automatically determine BIDI text in LTR page
77 80 $this->autoFontGroupSize = 2; // 1: individual words are spanned; 2: words+; 3: as big chunks as possible.
@@ -96,24 +99,14 @@
96 99
97 100 // Automatically correct for tags where HTML specifies optional end tags e.g. P,LI,DD,TD
98 101 // If you are confident input html is valid XHTML, turning this off may make it more reliable(?)
99 102 $this->allow_html_optional_endtags = true;
100 -
101 103 $this->ignore_invalid_utf8 = false;
102 104 $this->text_input_as_HTML = false; // Converts all entities in Text inputs to UTF-8 before encoding
103 105 $this->useGraphs = false;
104 106
105 107
106 -// When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space
107 -// by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out
108 -// the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be.
109 -// FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer.
110 -$this->incrementFPR1 = 10; // i.e. will alter by 1/[10]th of width and try again until within closer limits
111 -$this->incrementFPR2 = 20;
112 -$this->incrementFPR3 = 30;
113 -$this->incrementFPR4 = 50; // i.e. will alter by 1/[50]th of width and try again when it nearly fits
114 108
115 -
116 109 // COLORSPACE
117 110 // 1 - allow GRAYSCALE only [convert CMYK/RGB->gray]
118 111 // 2 - allow RGB / SPOT COLOR / Grayscale [convert CMYK->RGB]
119 112 // 3 - allow CMYK / SPOT COLOR / Grayscale [convert RGB->CMYK]
@@ -129,14 +122,24 @@
129 122 $this->PDFA = false; // true=Forces compliance with PDFA-1b spec
130 123 // Can use with $this->restrictColorSpace=3 (for a CMYK file)
131 124 // Any other settings, uses RGB profile
132 125 $this->PDFAauto = false; // Overrides warnings making changes when possible to force PDFA1-b compliance
126 +
133 127 $this->ICCProfile = ''; // Colour profile OutputIntent
134 128 // sRGB_IEC61966-2-1 (=default if blank and PDFA), or other added .icc profile
135 129 // Must be CMYK for PDFX, or appropriate type for PDFA(RGB or CMYK)
136 130
137 131
132 +// When writing a block element with position:fixed and overflow:auto, mPDF scales it down to fit in the space
133 +// by repeatedly rewriting it and making adjustments. These values give the adjustments used, depending how far out
134 +// the previous guess was. The lower the number, the quicker it will finish, but the less accurate the fit may be.
135 +// FPR1 is for coarse adjustments, and FPR4 for fine adjustments when it is getting closer.
136 +$this->incrementFPR1 = 10; // i.e. will alter by 1/[10]th of width and try again until within closer limits
137 +$this->incrementFPR2 = 20;
138 +$this->incrementFPR3 = 30;
139 +$this->incrementFPR4 = 50; // i.e. will alter by 1/[50]th of width and try again when it nearly fits
138 140
141 +
139 142 // DEBUGGING & DEVELOPERS
140 143 $this->showStats = false;
141 144 $this->debug = false;
142 145 $this->debugfonts = false; // Checks and reports on errors when parsing TTF files - adds significantly to processing time
@@ -152,21 +155,9 @@
152 155 $this->annotOpacity = 0.5; // default opacity for Annotations
153 156
154 157 // BOOKMARKS
155 158 $this->anchor2Bookmark = 0; // makes <a name=""> into a bookmark as well as internal link target; 1 = just name; 2 = name (p.34)
156 -// Set an optional array to specify appearance of Bookmarks (by level)
157 -// Default values are Black and normal style
158 -/*
159 - Example:
160 -$this->bookmarkStyles = array(
161 - 0 => array('color'=> array(0,64,128), 'style'=>'B'),
162 - 1 => array('color'=> array(128,0,0), 'style'=>''),
163 - 2 => array('color'=> array(0,128,0), 'style'=>'I'),
164 -);
165 -*/
166 -$this->bookmarkStyles = array();
167 159
168 -
169 160 // CSS & STYLES
170 161 $this->CSSselectMedia='print'; // screen, print, or any other CSS @media type (not "all")
171 162
172 163
@@ -191,12 +182,8 @@
191 182
192 183 // TABLES
193 184 $this->simpleTables = false; // Forces all cells to have same border, background etc. Improves performance
194 185 $this->packTableData = false; // Reduce memory usage processing tables (but with increased processing time)
195 -// Using disk to cache table data can reduce memory usage dramatically, but at a cost of increased
196 -// executon time and disk access (read and write)
197 -$this->cacheTables = false;
198 -
199 186 $this->ignore_table_percents = false;
200 187 $this->ignore_table_widths = false;
201 188 $this->keep_table_proportions = false; // If table width set > page width, force resizing but keep relative sizes
202 189 // Also forces respect of cell widths set by %
@@ -206,14 +193,11 @@
206 193 $this->tableMinSizePriority = false; // If page-break-inside:avoid but cannot fit on full page without
207 194 // exceeding autosize; setting this value to true will force respsect for
208 195 // autosize, and disable the page-break-inside:avoid
209 196
210 -$this->use_kwt = false; // "Keep-with-table"
197 +$this->use_kwt = false;
211 198 $this->iterationCounter = false; // Set to TRUE to use table Head iteration counter
212 -$this->splitTableBorderWidth = 0; // Use table border (using this width in mm) when table breaks across pages
213 - // Recommended to use small value e.g. 0.01
214 199
215 -
216 200 // IMAGES
217 201 $this->img_dpi = 96; // Default dpi to output images if size not defined
218 202 // See also above "dpi"
219 203
@@ -228,20 +212,20 @@
228 212 $this->jSmaxChar = 2; // Maximum spacing to allocate to character spacing. (0 = no maximum)
229 213
230 214 $this->jSmaxCharLast = 1; // Maximum character spacing allowed (carried over) when finishing a last line
231 215 $this->jSmaxWordLast = 2; // Maximum word spacing allowed (carried over) when finishing a last line
216 +$this->orphansAllowed = 5; // No of SUP or SUB characters to include on line to avoid leaving e.g. end of line//<sup>32</sup>
232 217 $this->normalLineheight = 1.33; // Value used for line-height when CSS specified as 'normal' (default)
233 218
234 -// Small Caps
235 -$this->smCapsScale = 0.75; // Factor of 1 to scale capital letters
236 -$this->smCapsStretch = 110; // % to stretch small caps horizontally (i.e. 100 = no stretch)
237 219
238 220 // CJK Line-breaking
239 221 $this->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow
240 222 $this->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only some characters, and disabled in tables)
241 -$this->CJKforceend = false; // Forces overflowng punctuation to hang outside right margin mPDF 5.6.40
242 223
224 +
243 225 // HYPHENATION
226 +$this->hyphenate = false;
227 +$this->hyphenateTables = false;
244 228 $this->SHYlang = "en"; // Should be one of: 'en','de','es','fi','fr','it','nl','pl','ru','sv'
245 229 $this->SHYleftmin = 2;
246 230 $this->SHYrightmin = 2;
247 231 $this->SHYcharmin = 2;
@@ -257,10 +241,8 @@
257 241 $this->list_align_style = 'R'; // Determines alignment of numbers in numbered lists
258 242 $this->list_indent_first_level = 0; // 1/0 yex/no to indent first level of list
259 243 $this->list_number_suffix = '.'; // Content to follow a numbered list marker e.g. '.' gives 1. or IV.; ')' gives 1) or a)
260 244
261 -// ACTIVE FORMS
262 -$this->useActiveForms = false;
263 245
264 246 // WATERMARKS
265 247 $this->watermarkImgBehind = false;
266 248 $this->showWatermarkText = 0;
@@ -288,9 +270,8 @@
288 270 'FONT-SIZE' => '11pt',
289 271 'TEXT-INDENT' => '0pt',
290 272 'LINE-HEIGHT' => 'normal',
291 273 'MARGIN-COLLAPSE' => 'collapse', /* Custom property to collapse top/bottom margins at top/bottom of page - ignored in tables/lists */
292 - 'HYPHENS' => 'manual', /* mPDF 5.6.08 */
293 274 ),
294 275 'P' => array(
295 276 'MARGIN' => '1.12em 0',
296 277 ),
@@ -462,9 +443,9 @@
462 443 'PADDING-TOP' => '0.1em',
463 444 'PADDING-BOTTOM' => '0.1em',
464 445 ),
465 446 'CAPTION' => array(
466 - 'TEXT-ALIGN' => 'center',
447 + 'TEXT-ALIGN' => 'center', /* Added mPDF 5.4 */
467 448 ),
468 449 'IMG' => array(
469 450 'MARGIN' => '0',
470 451 'VERTICAL-ALIGN' => 'baseline',
@@ -483,11 +464,8 @@
483 464 'FONT-FAMILY' => 'monospace',
484 465 'FONT-SIZE' => '0.9em',
485 466 'VERTICAL-ALIGN' => 'text-bottom',
486 467 ),
487 - 'MARK' => array( /* mPDF 5.5.09 */
488 - 'BACKGROUND-COLOR' => 'yellow',
489 - ),
490 468 );
491 469
492 470
493 471 //////////////////////////////////////////////////
@@ -505,8 +483,9 @@
505 483
506 484 // CHARACTER PATTERN MATCHES TO DETECT LANGUAGES
507 485 // pattern used to detect RTL characters -> force RTL
508 486 $this->pregRTLchars = "\x{0590}-\x{06FF}\x{0700}-\x{083E}\x{FB00}-\x{FDFD}\x{FE70}-\x{FEFF}";
487 + // mPDF 5 Now includes Syriac, Thaana, N'Ko and Samaritan
509 488
510 489 // CJK Chars which require changing and are distinctive of specific charset
511 490 $this->pregUHCchars = "\x{1100}-\x{11FF}\x{3130}-\x{318F}\x{AC00}-\x{D7AF}";
512 491 $this->pregSJISchars = "\x{3040}-\x{309F}\x{30A0}-\x{30FF}\x{3190}-\x{319F}\x{31F0}-\x{31FF}";
@@ -558,15 +537,12 @@
558 537 $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}";
559 538 // 200B-D=Zero-width joiners; 0964,0965=Generic Indic punctuation; NBSP & general punctuation (excludes # and / so can use in autoFont() )
560 539
561 540 $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';
562 -$this->allowedCSStags .= '|ARTICLE|ASIDE|FIGURE|FIGCAPTION|FOOTER|HEADER|HGROUP|NAV|SECTION|MARK|DETAILS|SUMMARY|METER|PROGRESS|TIME'; // mPDF 5.5.09
563 541 $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';
564 -$this->allowedCSStags .= '|SELECT|INPUT|TEXTAREA|CAPTION|FIELDSET|LEGEND'; // mPDF 5.4.18
565 -$this->allowedCSStags .= '|TEXTCIRCLE|DOTTAB'; // mPDF 5.5.23 // mPDF 5.6.33
542 +$this->allowedCSStags .= '|SELECT|INPUT|TEXTAREA|CAPTION'; // mPDF 5.4
566 543
567 -$this->outerblocktags = array('DIV','FORM','CENTER','DL','FIELDSET','ARTICLE','ASIDE','FIGURE','FIGCAPTION', 'FOOTER','HEADER','HGROUP','NAV','SECTION','DETAILS','SUMMARY'); // mPDF 5.5.09 // mPDF 5.5.22
568 -$this->innerblocktags = array('P','BLOCKQUOTE','ADDRESS','PRE','H1','H2','H3','H4','H5','H6','DT','DD','CAPTION');
569 -
544 +$this->outerblocktags = array('DIV','FORM','CENTER','DL');
545 +$this->innerblocktags = array('P','BLOCKQUOTE','ADDRESS','PRE','H1','H2','H3','H4','H5','H6','DT','DD','CAPTION'); // mPDF 5.4
570 546
571 547
572 548 ?>