-
Notifications
You must be signed in to change notification settings - Fork 59
/
CHANGELOG.txt
executable file
·2233 lines (1789 loc) · 100 KB
/
CHANGELOG.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
===========================
mPDF v5.3 (21/07/2011)
===========================
New Features
------------
- Active forms (see on-line manual for details)
- 128-bit encryption (optional) with additional user-permissions (see on-line manual)
PLEASE READ - Change in Font management
---------------------------------------
The font name imported from the font and included by mPDF in the PDF file was stripping any '-' in the name.
This is the PostScript name which is utilised by some PostScript programmes.
mPDF has been changed to leave the PostScript font name unchanged. In 99% cases no difference will be noted, but
you MUST delete all the temporary font data files cached in the /ttfontdata/ folder for this to be effective.
Minor changes
-------------
If @page CSS is used to select a first page with settings different from the default, mPDF did create a blank page
then pagebreak to the new @page settings - this has been changed so it now will start with the new page settings.
New function added: DeletePages($start_page, $end_page=-1) e.g. $mpdf->DeletePages(1);
Can be used just before calling Output()
compress.php utility extended to exclude active forms and images-svg
Bug fixes
---------
- list-style-type: (custom version, user-defined bullet) colour change not working if colour is set on the list item line
- background-image: SVG or WMF images as background-images in tables/tr/cells not working
- font-weight: bold font not always reset after inline <b>...</b> thus miscalculating width
- forms (inactive) in 'c' core fonts using unicode characters 127-255 incorrect display in input text and button text
- form elements (inactive) if in-line with mixed size fonts, error in vertical positioning of text related to box
- ToC: wrapped lines in ToC not retaining formatting e.g. bold style
- HTMLHeaders: using setAutoTopMargin="pad"; not correctly setting top margin for first page
- output headers changed: Content-length not used if server uses output compression
- embedded font subsets from fonts which contain non-BMP plane 0 characters (incl. e.g. dejavusanscondensed)
- causing Adobe Reader to create a CJK encoded font subset internally when loading interactive Forms
- Changed so unsets the flag in the subset font to show no non-BMP characters.
Configurable variables added (see config.php file):
--------------------------------------------------
All for Active Forms:
$this->useActiveForms
$this->formExportType
$this->formSubmitNoValueFields
$this->formSelectDefaultOption
$this->form_border_color
$this->form_background_color
$this->form_border_width
$this->form_border_style
$this->form_button_border_color
$this->form_button_background_color
$this->form_button_border_width
$this->form_button_border_style
$this->form_radio_color
$this->form_radio_background_color
PLUS: see additional values added to $this->allowedCSStags close to bottom of file - required for Active forms
Updated files
-------------
mpdf.php
config.php (NB as well as form stuff at top, 5.2.07 $this->allowedCSStags close to bottom of file)
compress.php
classes/ttfontsuni.php
examples/example57...
examples/formsubmit.php
===========================
mPDF v5.2 (18/06/2011)
===========================
New Features
------------------
Improvements in font handling resulting in clearer display of fonts on screen, and improved compatibility with PostScript drivers
(e.g. use with GSView/GhostScript, see below)
CJK line-breaking implemented (roughly) according to rules. Configurable variables allow control of behaviour (except in tables).
Viewer preferences: added options for initial 2 page display where you can specify whether
1st page is on left or right (cf. SetDisplayMode).
Custom list-style-type for a list (ul,ol) or a list-item (li) in which you can determine the character and colour of the bullet:
list-style-type: U+263Argb(255,0,0); - where U+263A is the Unicode HEX value of the character you want for the bullet
- character MUST be included in the font used for that list item. rgb() bit is optional
Bug fixes
---------
- Fonts: embedding a BMP TTC font (e.g. Cambria) as a full font caused error
- Table: If cell width set by CSS as %, and page-break-inside avoid requires a new page, was losing the sizing
- Table: table borders CSS parsing error; if border-width, border-style, border-color set, not inherited correctly
- Table: Table background image or gradient not working in HTMLHeader/Footer
- Table: background color set on table (anywhere) will overwrite image/gradient
- Table Background image/gradient: If left/right margin is set on table, gradient/image set on table is too wide
- Table: rotated table - height (after first page does not correctly allow for thead i.e. too much)
- Table: blank <tr></tr> causes error
- Table/Letter-spacing: If letter-spacing set inside table, not calculating table width correctly, and if oversized, freezes
- ToC: ToC at top of page (non-mirrored or already ODD) did not reset page_number if told
- Character subsititutions: characters missed if first element in a $html code e.g. WriteHTML('Not in a tag ✓');
- Kerning: kerning info: if reading font file for first time (or if not cached in ttfontdata/) did not register kerning info
- Textarea: multiple new lines run into only one newline
- QRCode - colors wrong because QRcode class only accepts RGB input (hardcoded now to always give black on white)
- QRCode always producing "Your message here"
- Columns: if transforming height of column, not always closing transform Q
- CakePHP compatibility
- compress.php - error due to markup comments in mpdf.php script file
Backwards compatibility
-----------------------
Changes in mPDF 5.2 are backwards compatible with version 5.1
Your document fonts may appear slightly different in the PDF viewer because of the changes to embedded font subsets (cf.)
The new Indic fonts may result in a change in spacing (due to the different character width of the space character from the original font)
PostScript e.g. GSView/GhostScript
----------------------------------
A number of errors have been reported when opening mPDF-created PDF files with a PostScript programme. Some of the errors were due to mPDF,
but others were due to peculiarities of GSView/GhostScript.
- Diacritic Characters were not displayed when embedding a font subset
- Fonts containing SIP/SMP characters (supplementary Unicode planes) caused errors
- Error with text justification (word-spacing) when embedding a full font can occur in some fonts*
The first 2 problems should now be fixed in v5.2
*The error with text justification can be optionally fixed by setting the configurable variable in config.php:
$this->repackageTTF = true;
When mPDF embeds a full font, it simply embeds the whole original TTF file into the PDF document. For some fonts (containing
a GSUB table) this was causing problems. $this->repackageTTF forces mPDF to repackage the original TTF file excluding some of
the tables like GSUB.
(See ADDITIONAL INFO FONTS.txt in downloaded files)
Font appearance in PDF viewer
-----------------------------
Font subsetting has been improved to include additional information in the embedded file. Overall the effects are of greater clarity
when viewing the document on a screen (it will not affect print output), but the changes are dependent on:
- the original TTF font i.e. the options that the font's author has built into the file
- the PDF viewer i.e. whether the programme chooses to use the available information
- the resolution (zoom) of the page you are viewing
(See ADDITIONAL INFO FONTS.txt in downloaded files)
Indic fonts
-----------
A new set of Indic fonts (ind_xx_1_001) is distributed with version 5.2 containing the additional font information as described above.
In addition, some changes have been made to the ASCII characters in the font from the files previously distributed:
The original files (Raghu font files) do not contain the characters a-z and A-Z. When the first version indic files were created for mPDF,
ALL of the ASCII characters (32-127) were inserted/overwritten from DejaVuSansCondensed to make the font more usable.
In the latest version, only the missing characters are taken from DejaVuSansCondensed, leaving punctuation and numerals from the original
fonts. This also means that the space character has a different width, and this will cause slight changes to the word spacing in documents.
(See ADDITIONAL INFO FONTS.txt in downloaded files)
CJK line-breaking (text wrapping)
---------------------------------
CJK (chinese-japanese-korean) text often contains no spaces. mPDF previously has wrapped text whenever a character reached the end of
the line. mPDF version 5.2 attempts to follow the line-breaking rules described for each of the languages. Configurable variables
allow some control over this behaviour, especially whether to squeeze a character into the space available at the end of a line, or
whether to allow it to overflow the right margin.
Configurable variables (see config.php file):
----------------------
Control wrapping of CJK text:
$this->allowCJKorphans = true; // FALSE=always wrap to next line; TRUE=squeeze or overflow
$this->allowCJKoverflow = false; // FALSE=squeeze; TRUE=overflow (only selected)
When Embedding full TTF font files, remakes the font file using only core tables
May improve function with PostScript printers
$this->repackageTTF = false;
Updated files
-------------
mpdf.php
compress.php
utils/font_dump.php
classes/ttfontsuni.php
config.php (3 new variables - see above)
All ttfonts/ind_*
New set of Indic fonts for PostScript compatibilty - and clearer font display
===========================
mPDF v5.1 (27/02/2011)
===========================
New Features
------------
- CSS background (images, colours or gradients) on <TR> and <TABLE>
- CSS border on <TR> (only in border-collapsed mode)
- support for Mozilla and CSS3 gradient syntax:
-moz-linear-gradient, linear-gradient
-moz-radial-gradient, radial-gradient
-moz-repeating-linear-gradient, linear-repeating-gradient
-moz-repeating-radial-gradient, radial-repeating-gradient
- expanded support for gradients (including in SVG images):
- multiple colour 'stops'
- opacity (transparency)
- angle and/or position can be specified
- gradient can be used as an image mask (custom mPDF styles: gradient-mask)
- image-orientation supported for <IMG> (similar to existing custom mPDF attribute: rotate) [CSS3]
- image-resolution supported for <IMG> [CSS3]
- background-image-resolution (custom mPDF CSS-type style) to define resolution of background images
- improved support for SVG images
- SVG and WMF images supported in background-image
- file attachments
- numeric list-styles added e.g. arabic-indic, bengali, devanagari, persian, thai [CSS3]
- font kerning supported (inter-character spacing between specific pairs)
- letter-spacing and word-spacing supported [CSS3]
- colors supported as rgb(), rgba(), hsl(), hsla(), cmyk(), cmyka(), or spot()
- spot colors supported e.g PANTONE 310 EC
- PDF/X compatible files
- optionally force use of grayscale, RGB or CMYK colorspace
- automatic colour conversion for most objects between grayscale, RGB and CMYK
Backwards compatibility
-----------------------
Most changes in mPDF 5.1 are backwards compatible with version 5.0 i.e. your documents should
look the same running 5.1 However some changes may alter display from previous versions:
- RTL (right-to-left) languages - see below
- bleed margins when using @page CSS - see below
- Default distance for "cross" from inner margin changed 10->5mm [hardcoded in fn. Footer()]
- If height set on a block element, will force a new page if set-height will not fit on page
- If table rotated, 5mm margin at bottom is now reduced to 1mm
- If image is too big for page and automatically sixed to maximum height of page, 10mm margin at bottom reduced to 1mm
Colours may appear more vibrant
-------------------------------
Unless specifically set, Adobe Reader uses the RGB colorSpace by default when displaying documents. However
if an image or gradient using transparency (or alpha channel) is included in the document, Adobe Reader
automatically sets the default colorSpace to CMYK - which makes the colours look less vibrant/bright on screen.
mPDF 5.1 now specifies by default a colorSpace RGB for each page, and this will maintain the more
vibrant colours. This is overridden if you use on of the options to restrict the colorSpace (cf.)
RTL
---
**** IMPORTANT - PLEASE READ IF USING RTL SCRIPTS ****
Handling of RTL (right-to-left) languages has been significantly rewritten, and is likely to cause
changes to the resulting files if you have previously been using mPDF. The changes have made mPDF
act more like a browser, respecting the HTML/CSS rules.
Changes include:
- the document now has a baseline direction; this determines the
- behaviour of blocks for which text-align has not been specifically set
- layout of mirrored page-margins, columns, ToC and Indexes, headers and footers
- base direction can be set by any of:
- $mpdf->SetDirectionality('rtl');
- <html dir="rtl" or style="direction: rtl;">
- <body dir="rtl" or style="direction: rtl;">
- base direction is an inherited CSS property, so will affect all content, unless...
- direction can be set for all HTML block elements e.g. <DIV><P><TABLE><UL> etc using
- CSS property < style="direction: rtl;">
- direction can only be set on the top-level element of nested lists
- direction can only be set on <TABLE>, NOT on THEAD, TBODY, TD etc.
- nested tables CAN have different directions
- NOTE that block/table margins/paddings are NOT reversed by direction
NB mPDF <5.1 reversed the margins/paddings for blocks when RTL set.
- language (either CSS "lang", using Autofont, or through initial set-up e.g. $mpdf = new mPDF('ar') )
no longer affects direction in any way.
NB config_cp.php has been changed as a result; any values of "dir" set here are now ineffective
- default text-align is now as per CSS spec: "a nameless value which is dependent on direction"
NB default text-align removed in default stylesheet in config.php
- once text-align is specified, it is respected and inherited
NB mPDF <5.1 reversed the text-align property for all blocks when RTL set.
- the configurable value $rtlcss is depracated, as it is no longer required
- improved algorithm for dtermining text direction
- english word blocks are handled in text reversal as one block i.e. dir="rtl"
[arabic text] this will not be reversed [arabic text]
- arabic numerals 0-9 handled correctly
Although the control of direction for block elements is now more configurable, the control of
text direction (RTL arabic characters) remains fully automatic and unconfigurable.
<BDO> etc has no effect. Enclosing text in silent tags can sometimes help e.g.
content<span>[arabic text]</span>content
Justified text
--------------
Text-align: justify - no longer uses configurable variable $jSpacing= C | W | ''
The default value is for mixed letter- and word-spacing, set by jSWord and jSmaxChar
If a line contains a cursive script (RTL or Indic [devanagari, punjabi, bengali]) then it prevents letter-spacing
for justification on that line - effectively the same as setting letter-spacing:0
Spacing values have been removed from the config_cp.php configuration file, so the "lang" property
(in config_cp) no longer determines justification behaviour (this includes the use of Autofont()).
When using RTL or Indic [devanagari, punjabi, bengali] scripts, you should set CSS letter-spacing:0
whenever you use text-align:justify.
@page media
-----------
When using @page to create a print publication with page-size less than sheet-size
- bleed margin is now configurable (also crop- and cross-mark margins)
- backgrounds/gradients/images now use the bleed box as their "container box"
- odd-header-name: supports the value "_default" - allows current non-HTML header to remain unchanged
- marks: crop cross; i.e. both together supported
- background-image-opacity and background-image-resize now work with @page CSS
SVG images - extended support
-----------------------------
- support for spreadMethod property for gradients (repeat and reflect)
- support for style="font-family; font-size; font-style; font-weight" i.e. inline CSS
- when viewPort="" and width="" height="" all specified, uses width to set SVG size of a "pixel"
- support for opacity and multiple "stops" (and colorspace) in gradients
Minor Enhancements
------------------
- support for colors as rgb(87%, 56%, 25%) [used especially in SVG]
- added option of "NoPrintScaling" in SetDisplayPreferences
- compress.php - now combines BACKGROUND-IMAGES and GRADIENTS as BACKGROUNDS, and added PROGRESS-BAR
- table with THEAD row will force a new page if no room for the THEAD AND a row from TBODY
- Small-Caps now works properly together with text-align justify
- embedded font subsets restructured (minor) for greater compatibility e.g. with Postscript printers
- PDF/A will convert everything except grayscale to RGB (by default) or CMYK (optionally)
Bug fixes
---------
- Display changed to CMYK colour gamut when document contained an object with transparency set.
Now will retain RGB colorspace (brighter colours)
- If using dir="rtl", tables containing nested tables were not properly reversed
- "text-rotate: 0" set in CSS stylesheet did not 'undo' any text-rotate set on the row (TR)
- Malayalam - character re-ordering
- If height set on a block element, was not taking account of padding top/bottom
- embedded font subsets: error in array of Font Widths fixed
- <style>..</style> containing /* import url() */ the comments were not ignored
- If call mPDF class more than once, error using multiple barcodes or gif files because classes not reinstantiated
- Floating blocks were collapsing bottom/top margins - incorrectly
- Table: if colspan>1 contents are wider than the width of the included columns, did not increase column width(s) to accommodate
- Resizing table - script hanging and new page forced when not required (still)
- If a table style="page-break-inside:avoid" not fit on the page, was adding new page before resizing EVEN IF on a blank page
- End of 2 blocks (e.g. </div></div>) at very bottom of page, forcing unwanted pagebreak
- Corrected handling of tags inside <pre>
- RTL left-aligned text - line ending with <br /> not correctly left-aligned
- <input type=submit|reset etc name="xxx" e.g. Google button showed as I&039;m feeling lucky
- Annotations all linked to Page 1 (parent object)
- Error "division by zero" using columns
- MultiCell() and Write() [direct writing functions] - miscalculating length of line in non-core fonts (+ other bugs)
- error if CJK space at end or beginning of line with 0x20 spaces in as well
Configurable variables (see config.php file):
----------------------
$this->printers_info
$this->bleedMargin
$this->crossMarkMargin
$this->cropMarkMargin
$this->cropMarkLength
$this->nonPrintMargin
$this->restrictColorSpace
$this->PDFX
$this->PDFXauto;
$this->useKerning
[$this->rtlcss removed]
Updated files
-------------
mpdf.php
config.php
config_cp.php (removed references to dir - but not essential to update - just redundant information)
compress.php
includes/out.php
includes/functions.php
classes/svg.php
classes/ttfontsuni.php
classes/indic.php
/font/helvetica*.php and /times*.php
Added CSS support
=================
All Block elements including <BODY> <TABLE> <TR>
------------------------------------------------
background-image-resolution: normal | [ from-image || <dpi> ]
direction: [ rtl | ltr ] (HTML attribute dir also supported)
background: [ gradients ]
background-image: [gradients ]
For [ gradients ] syntax see:
- Mozilla linear - https://developer.mozilla.org/en/CSS/-moz-linear-gradient
- Mozilla radial - https://developer.mozilla.org/en/CSS/-moz-radial-gradient
- Mozilla gradients use - https://developer.mozilla.org/en/Using_gradients
- CSS3 linear gradients - http://dev.w3.org/csswg/css3-images/#linear-gradients
- CSS3 radial gradients - http://dev.w3.org/csswg/css3-images/#radial-gradients
Almost all elements - block and in-line
---------------------------------------
font-kerning: auto | normal | none // need to set $mpdf->useKerning = true;
letter-spacing: normal | <length>
word-spacing: normal | <length>
Colours
-------
Anywhere that color is specified (e.g. color, background-color, borders)
- rgb(255,255,255)
- rgba(255,255,255,1) // last value is transparency (alpha) - between 0-1
- rgb(100%,100%,100%)
- hsl(360,100%,100%) // H: 0-360; S/L: 0-100%; a:0-1
- hsla(360,100%,100%,1)
- cmyk(100,100,100,100) // or 0-100%
- spot(COLOR NAME, 100%) // e.g PANTONE 310 EC; use AddSpotColor() to define first
<TR>
border:
<TABLE> <TR>
background:
background-color:
background-image:
<IMG>
gradient-mask: [can use any of the gradient syntax]
image-orientation: <angle> - supports deg, rad or grad
image-resolution: normal | [ from-image || <dpi> ]
<OL|UL>
list-style: arabic-indic | bengali | devanagari | gujarati | gurmukhi | kannada | malayalam | oriya |
persian | telugu | thai | urdu | tamil
@page
marks: [ crop || cross ] - i.e. crop and cross can be used together
odd-header-name: "_default" - allows current non-HTML header to remain unchanged
background-image-opacity: [ 0-1 ]
background-image-resize: [ 1-6 ] - see Manual
===========================
mPDF v5.0 (30/09/2010)
===========================
New Features
------------
- Font handling simplified, reads TrueType font files directly
Minor Enhancements
------------------
- rotation of fixed-position block elements (see example 10 and manual for supported CSS)
- support for CSS Small-Caps font-variant added
- utility scripts in /utils/ folder to help font management
- new simplified functions AddPageByArray() and TOCPageBreakByArray() added
- progress bar simplified and customisable
- improved word-wrapping for CJK langauges
- improved recognition of CJK/Indic/Arabic characters
- invalid UTF-8 input now outputs a meaningful error by displaying input html with errors marked
- GIF or PNG images with transparency/interlaced/non-standard compression handled as internal data
if /tmp/ folder is not present or writeable
- support for <html dir="rtl">
- support for "display: none" on inline elements
- annotations supported in fixed-position block elements
Bug fixes
---------
- <br /> preceded by space does not correctly text-align to right
- zero-width character in middle of line caused line-break (e.g. diacritic or U+200C = ZWNJ)
- HTML attributes not recognised if spaces e.g. 'src = "..."'
- Headers changed for output - problem reported on IE8 64-bit using SSL
- using SetAutoPageBreak(false) used caused unexpected behaviour with table rows at page break
- (from Beta) incorrect check for temporary font data folder causing errors
- artificial Bold/Italic not working in table cell when using rotated text
- allow <dottab> to inherit font color correctly
- SVG now works with Adobe 7
- background in header overwriting text
- vertical text in table header not correctly horizontally positioned when repeated
- compatibility with PHP >= 4.3 (htmlspecialchars_decode, stripos)
- updated depracated script PHP 5.3.0 ($string{1} to $string[1], $var =& new Object(), set_magic_quotes_runtime)
- index (CreateIndex) number string incorrect if arabic(rtl) text anywhere in document
- MultiCell incorrectly calculate string length/width when using core fonts
- page-break-inside:avoid - used with non-HTML footer had space inserted for footer height
- page-break-inside:avoid - error if more than 1 page height but not enough to trigger second pagebreak
- page-break-inside:avoid - incorrectly layering page backgrounds (headers and content brought forward)
Changes from 5.0 Beta
---------------------
If you are upgrading from the Beta version - you MUST delete all files in the /ttfontdata/ temporary directory
- config.php file has been changed (extra CJK characters to recognise CJK blocks)
- $this->backupSubsFont (in config_fonts.php) optionally now takes an array
- no need to define 'cjk'=>true or 'sip|smp'=>true in config_fonts.php (ignored; cf. $this->BMPonly)
- Indic language fonts have been altered to add Latin and Latin-1 Supplement characters
- progress bars now has an external progbar.css and configurable main heading
- added initial parameter new mPDF('+aCJK') or '-aCJK' to override default useAdobeCJK at runtime
- QRCode is not included in main download (but as an extra package)
BACKWARD COMPATIBILITY
----------------------
If you have been using earlier versions of mPDF, most scripts should work as before. But note:
- Arial, Helvetica, Times and Courier are now treated like any other font
- the whole CSS font string is parsed e.g. style="font-family:'Lucida Grande';" will look for a font 'lucidagrande'
and not 'lucida'
Configurable variables (see config.php file):
----------------------
- $mpdf->useSubstitutionsMB is now depracated, but will work as an alias for $mpdf->useSubstitutions
The initial parameters e.g. new mPDF('utf-8') have all changed. Old ones may be recognised, or will be ignored.
- $mpdf->useOnlyCoreFonts is now depracated and is ignored. Use new mPDF('c')
- $this->use_CJK_only is now depracated and is ignored. See $this->useAdobeCJK and new mPDF('+aCJK') or '-aCJK'
Control SmallCaps appearance
- $mpdf->smCapsScale = 0.75; // Factor of 1 to scale capital letters
- $mpdf->smCapsStretch = 115; // % to stretch small caps horizontally
Customisable Progress bar
- $mpdf->progbar_heading = 'mPDF file progress';
- $mpdf->progbar_altHTML = '';
Control fonts/subsetting
- $mpdf->maxTTFFilesize = 2000;
- $mpdf->percentSubset = 30;
- $mpdf->debugfonts // show font errors and warnings
Replaceable alias
- $mpdf->iterationCounter = false; // Allow use of {iteration varname} in THEAD
===========================
mPDF v5.0Beta (21/07/2010)
===========================
New features
------------
The main change in mPDF v5 is the handling of TTF and TTC fonts directly.
See README.txt and FONT INFO.txt for more information
QR-code (2-dimensional barcode) Added
-------------------------------------
type="QR"
Size=1 is an arbitrary 25mm widthxheight. error="L|M|H|Q"
text="" can be numeric, alphanumeric or binary(?)
Required whitespace is always included around it
Enhancements
------------
- progress-bar is simplified (no javascript class)
- dir="rtl" supported in <html> or <body> tag
Bug fixes
---------
- artificial Bold/Italic now working in table cells with rotated text
- "-" is now allowed in a font name e.g. sun-exta
- <dottab> now inherits font color correctly
- SVG class bugs fixed (was crashing in Adobe Reader v 7)
- background color/image in header no longer overwrites the header text
Changed Config variables
------------------------
$this->useSubstitutionsMB is depracated
Character substitution always occurs when using core fonts.
Use $this->useSubstitutions for all cases.
New Configurable variables
--------------------------
$this->useAdobeCJK = true; // Uses Adobe CJK fonts for CJK languages
// default TRUE; only set false if you have defined some available fonts that support CJK
// If true this will not stop other CJK fonts if specified by font-family:
// and vice versa i.e. only dictates behaviour when specified by lang="" incl. AutoFont()
// Set maximum size of TTF font file to allow non-subsets - in kB
// Used to avoid e.g. Arial Unicode MS (perhaps used for substituteCharsMB) to ever be fully embedded
// NB Free serif is 1.5MB, most files are <= 600kB (most 200-400KB)
$this->maxTTFFilesize = 2000;
// If not -s (i.e. forced subset) this value determines whether to subset or not
// 0 - 100 = percent characters
// i.e. if ==40, mPDF will embed whole font if >40% characters in that font
// or embed subset if <40% characters
// 0 will force whole file to be embedded
// 100 will force always to subset
$this->percentSubset = 30;
$this->debugfonts - show errors and warnings for font parsing
Config variables removed
------------------------
$this->use_CJK_only
$this->useOnlyCoreFonts
================================================================================
====
4.6
====
mPDF
files changed:
mpdf.php
config.php
makefonts/makefonts.php
class/t1asm.php
class/svg.php
graph.php
examples_04 (images)
config var added:
$this->tableMinSizePriority
4.5.015
Bug fix:
Complex page with ToC entries ++ (example_ToC_bug4_5_015.php) caused Apache to crash
AdjustHTML() preg_pattern for matching <hx>... </hx> <table for keep-together - altered and fixed ? matching
Seemed to crash when content="Graph 12" between the <h> - 2 numbers (12) crash, 1 didn't!!!
4.5.014
Bug fix:
Using TrueType fonts, unused font is not embedded in the PDF doc. This was fine except an error message appeared after printing in Adobe Reader,
because Font reference /F1 still present in doc pointing to non-existent resource.
Edited so that the reference is now removed from the page if font unused.
4.5.013
Enhancement
TrueTypeUnicode fonts width array inserted as shortened form array (smaller file size)
4.5.012
Bug fix: Incorrect handling orphan characters in table
(cf. http://mpdf.bpm1.com/forum/comments.php?DiscussionID=193 fixed in 4.2 - but going back to it still problems)
If xxxxx. fits but xxxxx.. doesn't: WriteFlowingBlock wraps it to next line, TableWordWrap sqeezed it onto one line
TableWordWrap fixed to only allow one orphan char. even if it fits with that one.
4.5.011
Added Windows BMP image support
4.5.010
SVG class:
- improved recognition of lineargradients/radialgradients referenced by xlink:href
- does not die if empty text string
- support for many text properties as style="" as well as currently as attributes (bold, fill etc)
- if using MB font, was respecting "Times" and "Courier" from the SVG file but using as ANSI not utf-8
4.5.009
graph.php updated to include SVG - need to define in graph.php (as well as set up TTF fonts)
(SVG graph does not include CSIM, 3D skew.)
4.5.008
t1asm.php has an error in the error message if .dat fontfile not found (".char.dat")
4.5.007
Bug fix: Using page-break-inside:avoid, if nothing would have been printed on page 1 before next page, elements going all over the place!
Also problem shifting images - fixed
Also wasn't shifting WMF/SVG images - fixed
4.5.006
New config var
$this->tableMinSizePriority = false;
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
[NB edit Manual Table>>autolayout algorithm]
4.5.005
Bug fix
Table set to avoid page-break-inside: in some circumstances entered loop with recalculating size
Fudge factor added of 0.001 in tbsqrt to calculate shrink factor
4.5.004
Bug fix
If table set to avoid page-break-inside and table height (resized) exactly==remaining page - was triggering page break
Fudge factor added of 0.001 in tablewrite to query pagebreak
4.5.003
Bug fix in makefonts/makefonts.php
Also changed the links in Step4 & 8 which move the newly created files to the font directory - will now show error message if error -
will NOT overwrite existing files. (Put in manual already)
4.5.002
Bug fix in class/t1asm.php
If you have magic_quotes_runtime set On - problems using embedded subset.
4.5.001
JPG "Exif" file recognised from header, and handled much more quickly and efficiently (not using GD)
===========================
mPDF v4.5 (21/04/2010)
===========================
New Features
------------
The main change in 4.5 is the improved class for importing SVG images. (See details below)
Font files
----------
Some bugs in the "makefonts" utility caused some errors in the files produced for embedding font subsets.
Surprisingly these are not easily detectable (I have yet to find one!).
All the font files used for embedding font subsets (the .dat and .dat.php files in /unifont/ folder)
have been re-generated. Download them if you are having problems with any fonts - otherwise, you probably
don't need to bother.
Minor Enhancements
------------------
If keepColumns = true (i.e. disable readjustment of column length), mPDF will now reproduce
table header/footer rows in each column [4.4.015]
A number of changes to improve processing time [4.4.012]
[Thanks to carlholmberg http://mpdf.bpm1.com/forum/comments.php?DiscussionID=274&page=1#Item_3]
JPG files with header marked as "progressive DCT-based JPEG" are now supported [4.4.004]
Configurable variable (config.php) $dpi can be set to vary size interpreted from "px" values in HTML/CSS
NB Recommended that $dpi should always be set the same as $img_dpi
Support added for "ex" as a size value (approximates "ex" as half of font height)
Configurable variable (config.php) $watermarkImgAlphaBlend will determine how watermark images
will blend with underlying objects.
Bug fixes
---------
- Make-fonts utility : makefonts/makefonts.php [4.4.016]
(All font files have been updated)
- Table header of only one column width - not printing right border [4.4.014]
- WMF and SVG images not rotating correctly to 90 or -90 degrees [4.4.013]
- Using templates, error if imported doc contains templates itself [4.4.001]
Updated Files
-------------
mpdf.php
config.php
classes/svg.php
makefonts/makefonts.php
ALL subset font files (/unifont/ .dat and .dat.php files), and all garuda and norasi files
New files
---------
None
New config variables
--------------------
$this->watermarkImgAlphaBlend
$this->dpi
BACKWARD COMPATIBILITY
----------------------
All but one changes in mPDF 4.5 are fully backwards compatible.
The configurable variable $this->watermarkImgBehind was introduced in v4.4 and was unintentionally set to TRUE
In v4.5 this is set to FALSE in the config.php file.
SVG Images
----------
[svg.php CHANGED]
- Text stroke-width default changed to 1 [4.4.011]
- Text stroke - line-join type changed [4.4.010]
- Default value for fill changed to "black" [4.4.008]
- Bug fixes:
* to correct calculation of text-length (and therefore alignment R and C) [4.4.009]
* Corrected errors in path implementation esp. quadratic Bezier curves
* rounded corners to rectangles - error corrected
* Recognition of font-family improved
* remove \n (and other non-printable chars) from text
* zero length shapes are not output e.g. zero-width rectangle, zero-length line, zero-radius circle
- Support added for:
* gradient stop offsets and gradientUnits="userSpaceOnUse" [4.4.007]
In mpdf.php enabled define inner radius for radial gradients - only used internally by SVG at present
* user defined <ENTITY /> cf. 'render-elems-03-t.svg' in SVG Test Suite [4.4.006]
* "color" attribute and "currentColor" value for fill and stroke [4.4.005]
* fill:url(#...) in a style as well as attribute
* xlink:href for gradients
* 1.3002e-005 in svg path
* text-style changes (e.g. text-anchor) set on <g> element - not just on <text>
* fill-rule=evenodd|nozero
* dashed lines / stroke-dasharray & stroke-dashoffset
* gradientUnits=userSpaceOnUse;
* units e.g. 3mm or 14pt in Rectangle, Circle, Ellipse, Line and Text position
* transform on <text> element
* stroke as well as fill on text
NB The following are still NOT supported for SVG
- filters
- <marker>
- images
- DOM
- <pattern>
- textlength; lengthadjust; tspan, tref, toap, textPath;
- <use ../>
- gradient on stroke/text;
- <clipPath>
- text-underline and strikethrough
- text opacity
- colors as rgb(87%, 56%, 25%)
- rect using units for dimensions
- Only uses default spreadMethod = "pad" for gradients
===========================
mPDF v4.4 (24/03/2010)
===========================
New Features
------------
- Support SVG image files (partial)
- Rotate images or graphs (by multiples of 90 degrees)
- Set opacity (transparency) for background images
- Control resizing of background images
- Set whether to print watermark images behind or in front of page contents
- Reduced memory usage when printing tables (partly configurable)
- Option to set path to folder for temporary files
- Improved compliance for CSS text-align justify
- Increased support for CSS "media"
- Improved performance when accessing local image files
Minor Enhancements
------------------
- Allows space in output file name e.g. $mpdf->Output('t est.pdf','D'); [4.3.007B]
- Header changed in Output to improve compatability with IE6 (affects 'D' and 'I') [4.3.012B]
- background-images do not show noimage.jpg if missing [4.3.012D]
- simpleTables (which improves performance) now also allows: background-color, -gradient and -image, padding
and rotated text to be set for each cell. Only borders are not supported cell-by-cell. [4.3.006]
Bug fixes
---------
- Page width not correctly reset when defining default page margins (L/R) by @page [4.3.007C]
- Table row <TR> with a background-color, paints the whole row, including the spaces between cells [4.3.005]
NB This should have been fixed in [4.2.028] but got left out!
- UseSubstitutionsMB causes errors inside <textarea> and <select> so now disabled in these 2 situations [4.3.004]
- CSS background: 'none' did not cancel background-image/background-color if it comes later [4.3.002, 4.3.011]
- Warning message 'depracated' (as of PHP 5.3) when using Templates [4.3.007]
- AutoFont incorrectly altering multibyte characters ending in \xa0 [4.3.012C]
- "Initial" default value for border-width changed from 1px to 'medium' e.g. border-top: solid #000000; [4.3.010]
- WMF image sometimes inverted [4.3.016]
Updated Files
-------------
mpdf.php
config.php
changelog.txt
New files
---------
classes/svg.php
New config variables
--------------------
$this->justifyB4br=false;
$this->CSSselectMedia='print';
$this->watermarkImgBehind = false;
BACKWARD COMPATIBILITY
----------------------
All changes are backwards compatible except the handling of some background-images - please see notes below.
Watermark Image z-order
-----------------------
By default mPDF prints watermarks on top of the page contents to ensure that they are not hidden by backgrounds
(especially table cells).
You can specify watermark images to be printed behind page contents by setting a configurable variable:
$this->watermarkImgBehind = true; // default=false
[4.3.018]
Rotating Images and Graphs
--------------------------
Images or graphs can be rotated (by multiples of 90 degrees) using a custom HTML attribute e.g.
<img rotate="90|-90|180" ... />
<jpgraph rotate="90" ... />
Valid options are: 90|-90|180.
Positive values are clockwise.
If width is specified e.g. width="3cm" this is applied to the rotated image i.e. will be width 3cm after rotating
[4.3.016]
Background Image Opacity
------------------------
A custom CSS property "background-image-opacity": is now supported on BODY, DIV+ (block elements) and TD
Takes values between 0 and 1.0
Resizing Background Images
--------------------------
A custom CSS property "background-image-resize": is now supported on BODY, DIV+ (block elements) and TD
0 - No resizing (default)
1 - Shrink-to-fit w (keep aspect ratio)
2 - Shrink-to-fit h (keep aspect ratio)
3 - Shrink-to-fit w and/or h (keep aspect ratio)
4 - Resize-to-fit w (keep aspect ratio)
5 - Resize-to-fit h (keep aspect ratio)
6 - Resize-to-fit w and h
N.B. Prior to v4.4 background-images were incorrectly constrained to maximum width of the containing block.
The default is now to do NO resizing on background-images. Setting "background-image-resize:3" should be used
for backwards compatibility.
[4.3.015, 4.3.012D]
SVG Image files
---------------
SVG image files are now partially supported (but as for WMF - not as background-images).
viewBox (preserveAspectRatio is not supported) viewBox="0 0 400 200" width="400" height="200"
Takes viewBox in preference to width/height if present on <svg>
If neither present, will size to width of page (square) as the containing box.
Units are interpreted as pixels if undefined.
Doesn't recognise internal CSS <style> elements
Gradients only take 2 colours which are taken as stop-offset 0% and 100%
[4.3.013 & 4.3.017]
Reduced Memory Usage printing Tables
------------------------------------
mPDF uses a lot of memory when processing large tables. Parts of the script have been rewritten to
reduce memory consumption when writing tables which use collapsed borders (10-25% saving).
Memory usage can be reduced further by setting a configurable variable:
$this->packTableData = true; // default=false
but note that this causes a significant increase in processing time.
[4.3.008, 4.3.019, 4.3.014]
User-defined path to Temporary folder
-------------------------------------
mPDF uses a folder to write and store temporary files when processing images. By default this is the
[your_path_to_mpdf]/tmp/
This is now user-definable by defining the constant _MPDF_TEMP_PATH before including mpdf.php script.
Text Justification
------------------
In a justified text block, an inline image, textarea, input, or select causing a new line will now force
the previous line to be justified. HR and BR do NOT force justification (as in browsers).
For optional compliance of MS Word behaviour, there is a new configurable variable:
$this->justifyB4br = false; // Change to true to force justification before a <BR> (as in MS Word)
[4.3.003]
CSS support for @media
----------------------
Now supports media-dependent CSS styles e.g.
@media print {
p { color: red; }
}
as well as
<style media="...">...</style> and
<link rel="stylesheet" media="print" href="..." />
Proper matching of CSS media to select using configurable variable:
$this->CSSselectMedia='print'; // default="print" set in config.php : screen, print, or any other CSS @media type (not "all")
N.B. $this->disablePrintCSS in now depracated
[4.3.001]
===========================
mPDF v4.3 (28/02/2010)
===========================
NEW FEATURES
------------
- Page (sheet) size can be reset within document (http://mpdf1.com/manual/index.php?tid=436) [4.2.024, 4.2.025]
- PDF/A1-b compliant files (http://mpdf1.com/manual/index.php?tid=420)
- Improve performance using simpleTables (http://mpdf1.com/manual/index.php?tid=430)
- mPDFI incorporated into main mPDF class (http://mpdf1.com/manual/index.php?tid=432)
- <dottab> added as custom HTML tag: inserts dots to the following text, which is right-aligned [4.2.031]
See Example files 38 and 39 for PDFA compliant file and <dottab>
BACKWARD COMPATIBILITY
----------------------
All changes are backwards compatible except the use of mPDFI. You will need to make minor changes to your scripts.
See the manual http://mpdf1.com/manual/index.php?tid=432 for details.
BUG FIXES
---------
- When using Table of Contents and not resetting page numbers: HTML headers/footers showed incorrect page number [4.2.020]
- Table of Contents: last page not printing page background-color [4.2.023]
- Image file with space " " in the file name failing [4.2.016]
- Image file path unnecessarily resolved to full URI - changed to use relative path if possible [4.2.029] ***
- Table - not calculating height of cell correctly [4.2.015, 4.2.012, 4.2.011, 4.2.009]
- Table row breaking after/during cell when image in cell taller than font-height [4.2.008]
- When Table row(cell) greater height than the page-height but requiring resizing greater than allowed by autosize - not resizing [4.2.005]
- Table cell border not resized correctly [4.2.002]
- Table row <TR> with a background-color, paints the whole row, including the spaces between cells [4.2.028] ****
- Background-image in HTMLFooter not correctly setting 0,0 origin [4.2.014]
- Background-image set as an in-line style not working [4.2.013]
- Background-image set in CSS @page or <body> was being constrained to less than page size [4.2.032]
- Imported Templates overwriting Headers (with images or gradients) [4.2.004]
- When using imports/templates, HTML header with background-image causing page to disappear [4.2.001]