WooCommerce PDF Invoices & Packing Slips - Version 2.2.6

Version Description

  • Fix: ship to different address check for empty shipping addresses
  • Fix: Fix notice when using invoice number by plugin
  • Fix: Underline position
  • Fix: PHP 7.3 compatibility
  • Tweak: Updated dompdf to 0.8.3
  • Tweak: move admin menu item to the end of WooCommerce menu
  • Tweak: pass document object to paper format & orientation filters
Download this release

Release Info

Developer pomegranate
Plugin Icon 128x128 WooCommerce PDF Invoices & Packing Slips
Version 2.2.6
Comparing to
See all releases

Code changes from version 2.2.5 to 2.2.6

Files changed (84) hide show
  1. composer.lock +17 -13
  2. includes/class-wcpdf-settings.php +1 -1
  3. includes/compatibility/abstract-wc-data-compatibility.php +2 -2
  4. includes/compatibility/class-wc-core-compatibility.php +2 -2
  5. includes/compatibility/class-wc-date-compatibility.php +2 -2
  6. includes/compatibility/class-wc-order-compatibility.php +2 -2
  7. includes/compatibility/class-wc-product-compatibility.php +2 -2
  8. includes/documents/abstract-wcpdf-order-document-methods.php +22 -19
  9. includes/documents/abstract-wcpdf-order-document.php +2 -2
  10. includes/documents/class-wcpdf-bulk-document.php +2 -2
  11. includes/documents/class-wcpdf-invoice.php +3 -3
  12. readme.txt +10 -1
  13. vendor/composer/ClassLoader.php +3 -3
  14. vendor/composer/installed.json +95 -91
  15. vendor/dompdf/dompdf/README.md +1 -1
  16. vendor/dompdf/dompdf/VERSION +1 -1
  17. vendor/dompdf/dompdf/composer.json +6 -2
  18. vendor/dompdf/dompdf/lib/Cpdf.php +6 -6
  19. vendor/dompdf/dompdf/lib/fonts/OpenSans-Bold.ufm +1 -1
  20. vendor/dompdf/dompdf/lib/fonts/OpenSans-Bold.ufm.php +1 -1
  21. vendor/dompdf/dompdf/lib/fonts/OpenSans-BoldItalic.ufm +1 -1
  22. vendor/dompdf/dompdf/lib/fonts/OpenSans-BoldItalic.ufm.php +1 -1
  23. vendor/dompdf/dompdf/lib/fonts/OpenSans-Italic.ufm +1 -1
  24. vendor/dompdf/dompdf/lib/fonts/OpenSans-Italic.ufm.php +1 -1
  25. vendor/dompdf/dompdf/lib/fonts/OpenSans-Normal.ufm +1 -1
  26. vendor/dompdf/dompdf/lib/fonts/OpenSans-Normal.ufm.php +1 -1
  27. vendor/dompdf/dompdf/lib/res/broken_image.svg +8 -0
  28. vendor/dompdf/dompdf/src/Adapter/CPDF.php +26 -3
  29. vendor/dompdf/dompdf/src/Adapter/GD.php +6 -1
  30. vendor/dompdf/dompdf/src/Adapter/PDFLib.php +333 -119
  31. vendor/dompdf/dompdf/src/CanvasFactory.php +1 -1
  32. vendor/dompdf/dompdf/src/Css/Style.php +8 -8
  33. vendor/dompdf/dompdf/src/Css/Stylesheet.php +13 -9
  34. vendor/dompdf/dompdf/src/Dompdf.php +13 -8
  35. vendor/dompdf/dompdf/src/FontMetrics.php +3 -2
  36. vendor/dompdf/dompdf/src/Frame.php +2 -2
  37. vendor/dompdf/dompdf/src/Frame/FrameTree.php +2 -2
  38. vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php +2 -1
  39. vendor/dompdf/dompdf/src/FrameDecorator/ListBullet.php +2 -2
  40. vendor/dompdf/dompdf/src/FrameDecorator/Page.php +32 -39
  41. vendor/dompdf/dompdf/src/FrameReflower/AbstractFrameReflower.php +3 -3
  42. vendor/dompdf/dompdf/src/FrameReflower/Block.php +1 -1
  43. vendor/dompdf/dompdf/src/FrameReflower/Table.php +1 -1
  44. vendor/dompdf/dompdf/src/FrameReflower/Text.php +10 -1
  45. vendor/dompdf/dompdf/src/Helpers.php +2 -1
  46. vendor/dompdf/dompdf/src/Image/Cache.php +4 -4
  47. vendor/dompdf/dompdf/src/Options.php +3 -3
  48. vendor/dompdf/dompdf/src/Positioner/ListBullet.php +2 -2
  49. vendor/dompdf/dompdf/src/Renderer/AbstractRenderer.php +1 -1
  50. vendor/dompdf/dompdf/src/Renderer/ListBullet.php +1 -1
  51. vendor/dompdf/dompdf/src/Renderer/Text.php +5 -4
  52. vendor/phenx/php-svg-lib/.travis.yml +4 -7
  53. vendor/phenx/php-svg-lib/COPYING +165 -0
  54. vendor/phenx/php-svg-lib/COPYING.GPL +674 -0
  55. vendor/phenx/php-svg-lib/src/Svg/DefaultStyle.php +1 -1
  56. vendor/phenx/php-svg-lib/src/Svg/Document.php +6 -5
  57. vendor/phenx/php-svg-lib/src/Svg/Gradient/Stop.php +1 -1
  58. vendor/phenx/php-svg-lib/src/Svg/Style.php +1 -1
  59. vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php +1 -1
  60. vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php +2 -2
  61. vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceInterface.php +1 -1
  62. vendor/phenx/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php +1 -1
  63. vendor/phenx/php-svg-lib/src/Svg/Tag/AbstractTag.php +3 -3
  64. vendor/phenx/php-svg-lib/src/Svg/Tag/Anchor.php +1 -1
  65. vendor/phenx/php-svg-lib/src/Svg/Tag/Circle.php +1 -1
  66. vendor/phenx/php-svg-lib/src/Svg/Tag/ClipPath.php +1 -1
  67. vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php +1 -1
  68. vendor/phenx/php-svg-lib/src/Svg/Tag/Group.php +1 -1
  69. vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php +1 -1
  70. vendor/phenx/php-svg-lib/src/Svg/Tag/Line.php +1 -1
  71. vendor/phenx/php-svg-lib/src/Svg/Tag/LinearGradient.php +4 -4
  72. vendor/phenx/php-svg-lib/src/Svg/Tag/Path.php +1 -1
  73. vendor/phenx/php-svg-lib/src/Svg/Tag/Polygon.php +1 -1
  74. vendor/phenx/php-svg-lib/src/Svg/Tag/Polyline.php +1 -1
  75. vendor/phenx/php-svg-lib/src/Svg/Tag/RadialGradient.php +1 -1
  76. vendor/phenx/php-svg-lib/src/Svg/Tag/Rect.php +1 -1
  77. vendor/phenx/php-svg-lib/src/Svg/Tag/Shape.php +1 -1
  78. vendor/phenx/php-svg-lib/src/Svg/Tag/Stop.php +1 -1
  79. vendor/phenx/php-svg-lib/src/Svg/Tag/StyleTag.php +1 -1
  80. vendor/phenx/php-svg-lib/src/Svg/Tag/Text.php +1 -1
  81. vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php +1 -1
  82. vendor/phenx/php-svg-lib/src/autoload.php +1 -1
  83. vendor/phenx/php-svg-lib/tests/Svg/StyleTest.php +2 -2
  84. woocommerce-pdf-invoices-packingslips.php +2 -2
composer.lock CHANGED
@@ -1,37 +1,41 @@
1
  {
2
  "_readme": [
3
  "This file locks the dependencies of your project to a known state",
4
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
  "This file is @generated automatically"
6
  ],
7
  "content-hash": "7e8e737c6fffa1c43aefc1018cab381f",
8
  "packages": [
9
  {
10
  "name": "dompdf/dompdf",
11
- "version": "v0.8.2",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/dompdf/dompdf.git",
15
- "reference": "5113accd9ae5d466077cce5208dcf3fb871bf8f6"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/dompdf/dompdf/zipball/5113accd9ae5d466077cce5208dcf3fb871bf8f6",
20
- "reference": "5113accd9ae5d466077cce5208dcf3fb871bf8f6",
21
  "shasum": ""
22
  },
23
  "require": {
24
  "ext-dom": "*",
25
- "ext-gd": "*",
26
  "ext-mbstring": "*",
27
  "phenx/php-font-lib": "0.5.*",
28
  "phenx/php-svg-lib": "0.3.*",
29
  "php": ">=5.4.0"
30
  },
31
  "require-dev": {
32
- "phpunit/phpunit": "4.8.*",
33
  "squizlabs/php_codesniffer": "2.*"
34
  },
 
 
 
 
 
35
  "type": "library",
36
  "extra": {
37
  "branch-alias": {
@@ -66,7 +70,7 @@
66
  ],
67
  "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
68
  "homepage": "https://github.com/dompdf/dompdf",
69
- "time": "2017-11-26T14:49:08+00:00"
70
  },
71
  {
72
  "name": "phenx/php-font-lib",
@@ -107,16 +111,16 @@
107
  },
108
  {
109
  "name": "phenx/php-svg-lib",
110
- "version": "v0.3",
111
  "source": {
112
  "type": "git",
113
  "url": "https://github.com/PhenX/php-svg-lib.git",
114
- "reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa"
115
  },
116
  "dist": {
117
  "type": "zip",
118
- "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
119
- "reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
120
  "shasum": ""
121
  },
122
  "require": {
@@ -143,7 +147,7 @@
143
  ],
144
  "description": "A library to read, parse and export to PDF SVG files.",
145
  "homepage": "https://github.com/PhenX/php-svg-lib",
146
- "time": "2017-05-24T10:07:27+00:00"
147
  },
148
  {
149
  "name": "sabberworm/php-css-parser",
1
  {
2
  "_readme": [
3
  "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
  "This file is @generated automatically"
6
  ],
7
  "content-hash": "7e8e737c6fffa1c43aefc1018cab381f",
8
  "packages": [
9
  {
10
  "name": "dompdf/dompdf",
11
+ "version": "v0.8.3",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/dompdf/dompdf.git",
15
+ "reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/dompdf/dompdf/zipball/75f13c700009be21a1965dc2c5b68a8708c22ba2",
20
+ "reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2",
21
  "shasum": ""
22
  },
23
  "require": {
24
  "ext-dom": "*",
 
25
  "ext-mbstring": "*",
26
  "phenx/php-font-lib": "0.5.*",
27
  "phenx/php-svg-lib": "0.3.*",
28
  "php": ">=5.4.0"
29
  },
30
  "require-dev": {
31
+ "phpunit/phpunit": "^4.8|^5.5|^6.5",
32
  "squizlabs/php_codesniffer": "2.*"
33
  },
34
+ "suggest": {
35
+ "ext-gd": "Needed to process images",
36
+ "ext-gmagick": "Improves image processing performance",
37
+ "ext-imagick": "Improves image processing performance"
38
+ },
39
  "type": "library",
40
  "extra": {
41
  "branch-alias": {
70
  ],
71
  "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
72
  "homepage": "https://github.com/dompdf/dompdf",
73
+ "time": "2018-12-14T02:40:31+00:00"
74
  },
75
  {
76
  "name": "phenx/php-font-lib",
111
  },
112
  {
113
  "name": "phenx/php-svg-lib",
114
+ "version": "v0.3.2",
115
  "source": {
116
  "type": "git",
117
  "url": "https://github.com/PhenX/php-svg-lib.git",
118
+ "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c"
119
  },
120
  "dist": {
121
  "type": "zip",
122
+ "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/ccc46ef6340d4b8a4a68047e68d8501ea961442c",
123
+ "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c",
124
  "shasum": ""
125
  },
126
  "require": {
147
  ],
148
  "description": "A library to read, parse and export to PDF SVG files.",
149
  "homepage": "https://github.com/PhenX/php-svg-lib",
150
+ "time": "2018-06-03T10:10:03+00:00"
151
  },
152
  {
153
  "name": "sabberworm/php-css-parser",
includes/class-wcpdf-settings.php CHANGED
@@ -22,7 +22,7 @@ class Settings {
22
 
23
 
24
  // Settings menu item
25
- add_action( 'admin_menu', array( $this, 'menu' ) ); // Add menu.
26
  // Links on plugin page
27
  add_filter( 'plugin_action_links_'.WPO_WCPDF()->plugin_basename, array( $this, 'add_settings_link' ) );
28
  add_filter( 'plugin_row_meta', array( $this, 'add_support_links' ), 10, 2 );
22
 
23
 
24
  // Settings menu item
25
+ add_action( 'admin_menu', array( $this, 'menu' ), 999 ); // Add menu
26
  // Links on plugin page
27
  add_filter( 'plugin_action_links_'.WPO_WCPDF()->plugin_basename, array( $this, 'add_settings_link' ) );
28
  add_filter( 'plugin_row_meta', array( $this, 'add_support_links' ), 10, 2 );
includes/compatibility/abstract-wc-data-compatibility.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
 
 
2
  /**
3
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
4
  */
5
 
6
- namespace WPO\WC\PDF_Invoices\Compatibility;
7
-
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\Data' ) ) :
1
  <?php
2
+ namespace WPO\WC\PDF_Invoices\Compatibility;
3
+
4
  /**
5
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
6
  */
7
 
 
 
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\Data' ) ) :
includes/compatibility/class-wc-core-compatibility.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
 
 
2
  /**
3
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
4
  */
5
 
6
- namespace WPO\WC\PDF_Invoices\Compatibility;
7
-
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\WC_Core' ) ) :
1
  <?php
2
+ namespace WPO\WC\PDF_Invoices\Compatibility;
3
+
4
  /**
5
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
6
  */
7
 
 
 
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\WC_Core' ) ) :
includes/compatibility/class-wc-date-compatibility.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
 
 
2
  /**
3
  * Copy of WC3.0 WC_DateTime class
4
  */
5
 
6
- namespace WPO\WC\PDF_Invoices\Compatibility;
7
-
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\WC_DateTime' ) ) :
1
  <?php
2
+ namespace WPO\WC\PDF_Invoices\Compatibility;
3
+
4
  /**
5
  * Copy of WC3.0 WC_DateTime class
6
  */
7
 
 
 
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\WC_DateTime' ) ) :
includes/compatibility/class-wc-order-compatibility.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
 
 
2
  /**
3
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
4
  */
5
 
6
- namespace WPO\WC\PDF_Invoices\Compatibility;
7
-
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\Order' ) ) :
1
  <?php
2
+ namespace WPO\WC\PDF_Invoices\Compatibility;
3
+
4
  /**
5
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
6
  */
7
 
 
 
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\Order' ) ) :
includes/compatibility/class-wc-product-compatibility.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
 
 
2
  /**
3
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
4
  */
5
 
6
- namespace WPO\WC\PDF_Invoices\Compatibility;
7
-
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\Product' ) ) :
1
  <?php
2
+ namespace WPO\WC\PDF_Invoices\Compatibility;
3
+
4
  /**
5
  * Derived from SkyVerge WooCommerce Plugin Framework https://github.com/skyverge/wc-plugin-framework/
6
  */
7
 
 
 
8
  defined( 'ABSPATH' ) or exit;
9
 
10
  if ( ! class_exists( '\\WPO\\WC\\PDF_Invoices\\Compatibility\\Product' ) ) :
includes/documents/abstract-wcpdf-order-document-methods.php CHANGED
@@ -67,25 +67,28 @@ abstract class Order_Document_Methods extends Order_Document {
67
  $order = $this->order;
68
  }
69
 
70
- $address_comparison_fields = apply_filters( 'wpo_wcpdf_address_comparison_fields', array(
71
- 'first_name',
72
- 'last_name',
73
- 'company',
74
- 'address_1',
75
- 'address_2',
76
- 'city',
77
- 'state',
78
- 'postcode',
79
- 'country'
80
- ), $this );
81
-
82
- foreach ($address_comparison_fields as $address_field) {
83
- $billing_field = WCX_Order::get_prop( $order, "billing_{$address_field}", 'view');
84
- $shipping_field = WCX_Order::get_prop( $order, "shipping_{$address_field}", 'view');
85
- if ( $shipping_field != $billing_field ) {
86
- // this address field is different -> ships to different address!
87
- return true;
88
- }
 
 
 
89
  }
90
 
91
  //if we got here, it means the addresses are equal -> doesn't ship to different address!
67
  $order = $this->order;
68
  }
69
 
70
+ // only check if there is a shipping address at all
71
+ if ( $formatted_shipping_address = $order->get_formatted_shipping_address() ) {
72
+ $address_comparison_fields = apply_filters( 'wpo_wcpdf_address_comparison_fields', array(
73
+ 'first_name',
74
+ 'last_name',
75
+ 'company',
76
+ 'address_1',
77
+ 'address_2',
78
+ 'city',
79
+ 'state',
80
+ 'postcode',
81
+ 'country'
82
+ ), $this );
83
+
84
+ foreach ($address_comparison_fields as $address_field) {
85
+ $billing_field = WCX_Order::get_prop( $order, "billing_{$address_field}", 'view');
86
+ $shipping_field = WCX_Order::get_prop( $order, "shipping_{$address_field}", 'view');
87
+ if ( $shipping_field != $billing_field ) {
88
+ // this address field is different -> ships to different address!
89
+ return true;
90
+ }
91
+ }
92
  }
93
 
94
  //if we got here, it means the addresses are equal -> doesn't ship to different address!
includes/documents/abstract-wcpdf-order-document.php CHANGED
@@ -577,8 +577,8 @@ abstract class Order_Document {
577
  do_action( 'wpo_wcpdf_before_pdf', $this->get_type(), $this );
578
 
579
  $pdf_settings = array(
580
- 'paper_size' => apply_filters( 'wpo_wcpdf_paper_format', $this->get_setting( 'paper_size', 'A4' ), $this->get_type() ),
581
- 'paper_orientation' => apply_filters( 'wpo_wcpdf_paper_orientation', 'portrait', $this->get_type() ),
582
  'font_subsetting' => $this->get_setting( 'font_subsetting', false ),
583
  );
584
  $pdf_maker = wcpdf_get_pdf_maker( $this->get_html(), $pdf_settings );
577
  do_action( 'wpo_wcpdf_before_pdf', $this->get_type(), $this );
578
 
579
  $pdf_settings = array(
580
+ 'paper_size' => apply_filters( 'wpo_wcpdf_paper_format', $this->get_setting( 'paper_size', 'A4' ), $this->get_type(), $this ),
581
+ 'paper_orientation' => apply_filters( 'wpo_wcpdf_paper_orientation', 'portrait', $this->get_type(), $this ),
582
  'font_subsetting' => $this->get_setting( 'font_subsetting', false ),
583
  );
584
  $pdf_maker = wcpdf_get_pdf_maker( $this->get_html(), $pdf_settings );
includes/documents/class-wcpdf-bulk-document.php CHANGED
@@ -55,8 +55,8 @@ class Bulk_Document {
55
 
56
  $html = $this->get_html();
57
  $pdf_settings = array(
58
- 'paper_size' => apply_filters( 'wpo_wcpdf_paper_format', $this->wrapper_document->get_setting( 'paper_size', 'A4' ), $this->get_type() ),
59
- 'paper_orientation' => apply_filters( 'wpo_wcpdf_paper_orientation', 'portrait', $this->get_type() ),
60
  'font_subsetting' => $this->wrapper_document->get_setting( 'font_subsetting', false ),
61
  );
62
  $pdf_maker = wcpdf_get_pdf_maker( $html, $pdf_settings );
55
 
56
  $html = $this->get_html();
57
  $pdf_settings = array(
58
+ 'paper_size' => apply_filters( 'wpo_wcpdf_paper_format', $this->wrapper_document->get_setting( 'paper_size', 'A4' ), $this->get_type(), $this ),
59
+ 'paper_orientation' => apply_filters( 'wpo_wcpdf_paper_orientation', 'portrait', $this->get_type(), $this ),
60
  'font_subsetting' => $this->wrapper_document->get_setting( 'font_subsetting', false ),
61
  );
62
  $pdf_maker = wcpdf_get_pdf_maker( $html, $pdf_settings );
includes/documents/class-wcpdf-invoice.php CHANGED
@@ -361,8 +361,8 @@ class Invoice extends Order_Document_Methods {
361
  } elseif ( $settings_field['id'] == 'display_number' ) {
362
  // alternate description for invoice number
363
  $invoice_number_desc = __( 'Invoice numbers are created by a third-party extension.', 'woocommerce-pdf-invoices-packing-slips' );
364
- if ( esc_attr( apply_filters( 'woocommerce_invoice_number_configuration_link', null ) ) ) {
365
- $invoice_number_desc .= ' '.sprintf(__( 'Configure it <a href="%s">here</a>.', 'woocommerce-pdf-invoices-packing-slips' ), $config_link);
366
  }
367
  $settings_fields[$key]['args']['description'] = '<i>'.$invoice_number_desc.'</i>';
368
  }
@@ -380,4 +380,4 @@ class Invoice extends Order_Document_Methods {
380
 
381
  endif; // class_exists
382
 
383
- return new Invoice();
361
  } elseif ( $settings_field['id'] == 'display_number' ) {
362
  // alternate description for invoice number
363
  $invoice_number_desc = __( 'Invoice numbers are created by a third-party extension.', 'woocommerce-pdf-invoices-packing-slips' );
364
+ if ( $config_link = apply_filters( 'woocommerce_invoice_number_configuration_link', null ) ) {
365
+ $invoice_number_desc .= ' '.sprintf(__( 'Configure it <a href="%s">here</a>.', 'woocommerce-pdf-invoices-packing-slips' ), esc_attr( $config_link ) );
366
  }
367
  $settings_fields[$key]['args']['description'] = '<i>'.$invoice_number_desc.'</i>';
368
  }
380
 
381
  endif; // class_exists
382
 
383
+ return new Invoice();
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice,
5
  Requires at least: 3.5
6
  Tested up to: 5.0
7
  Requires PHP: 5.3
8
- Stable tag: 2.2.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -103,6 +103,15 @@ There's a setting on the Status tab of the settings page that allows you to togg
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
 
 
 
 
106
  = 2.2.5 =
107
  * Feature: Check marks to indicate whether a document exists
108
  * Feature: Test mode to automatically apply updated settings to existing documents
5
  Requires at least: 3.5
6
  Tested up to: 5.0
7
  Requires PHP: 5.3
8
+ Stable tag: 2.2.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
103
 
104
  == Changelog ==
105
 
106
+ = 2.2.6 =
107
+ * Fix: ship to different address check for empty shipping addresses
108
+ * Fix: Fix notice when using invoice number by plugin
109
+ * Fix: Underline position
110
+ * Fix: PHP 7.3 compatibility
111
+ * Tweak: Updated dompdf to 0.8.3
112
+ * Tweak: move admin menu item to the end of WooCommerce menu
113
+ * Tweak: pass document object to paper format & orientation filters
114
+
115
  = 2.2.5 =
116
  * Feature: Check marks to indicate whether a document exists
117
  * Feature: Test mode to automatically apply updated settings to existing documents
vendor/composer/ClassLoader.php CHANGED
@@ -377,11 +377,11 @@ class ClassLoader
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
- $search = $subPath.'\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
 
382
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
383
- $length = $this->prefixLengthsPsr4[$first][$search];
384
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
385
  return $file;
386
  }
387
  }
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath . '\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
382
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
+ if (file_exists($file = $dir . $pathEnd)) {
 
385
  return $file;
386
  }
387
  }
vendor/composer/installed.json CHANGED
@@ -1,77 +1,96 @@
1
  [
2
  {
3
- "name": "sabberworm/php-css-parser",
4
- "version": "8.1.0",
5
- "version_normalized": "8.1.0.0",
6
  "source": {
7
  "type": "git",
8
- "url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
9
- "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/850cbbcbe7fbb155387a151ea562897a67e242ef",
14
- "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef",
15
  "shasum": ""
16
  },
17
  "require": {
18
- "php": ">=5.3.2"
 
 
 
 
19
  },
20
  "require-dev": {
21
- "phpunit/phpunit": "*"
 
22
  },
23
- "time": "2016-07-19T19:14:21+00:00",
 
 
 
 
 
24
  "type": "library",
 
 
 
 
 
25
  "installation-source": "dist",
26
  "autoload": {
27
- "psr-0": {
28
- "Sabberworm\\CSS": "lib/"
29
- }
 
 
 
30
  },
31
  "notification-url": "https://packagist.org/downloads/",
32
  "license": [
33
- "MIT"
34
  ],
35
  "authors": [
36
  {
37
- "name": "Raphael Schweikert"
 
 
 
 
 
 
 
 
 
38
  }
39
  ],
40
- "description": "Parser for CSS Files written in PHP",
41
- "homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser",
42
- "keywords": [
43
- "css",
44
- "parser",
45
- "stylesheet"
46
- ]
47
  },
48
  {
49
- "name": "phenx/php-svg-lib",
50
- "version": "v0.3",
51
- "version_normalized": "0.3.0.0",
52
  "source": {
53
  "type": "git",
54
- "url": "https://github.com/PhenX/php-svg-lib.git",
55
- "reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa"
56
  },
57
  "dist": {
58
  "type": "zip",
59
- "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
60
- "reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
61
  "shasum": ""
62
  },
63
- "require": {
64
- "sabberworm/php-css-parser": "8.1.*"
65
- },
66
  "require-dev": {
67
- "phpunit/phpunit": "~5.0"
68
  },
69
- "time": "2017-05-24T10:07:27+00:00",
70
  "type": "library",
71
  "installation-source": "dist",
72
  "autoload": {
73
- "psr-0": {
74
- "Svg\\": "src/"
75
  }
76
  },
77
  "notification-url": "https://packagist.org/downloads/",
@@ -84,33 +103,36 @@
84
  "email": "fabien.menager@gmail.com"
85
  }
86
  ],
87
- "description": "A library to read, parse and export to PDF SVG files.",
88
- "homepage": "https://github.com/PhenX/php-svg-lib"
89
  },
90
  {
91
- "name": "phenx/php-font-lib",
92
- "version": "0.5.1",
93
- "version_normalized": "0.5.1.0",
94
  "source": {
95
  "type": "git",
96
- "url": "https://github.com/PhenX/php-font-lib.git",
97
- "reference": "760148820110a1ae0936e5cc35851e25a938bc97"
98
  },
99
  "dist": {
100
  "type": "zip",
101
- "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/760148820110a1ae0936e5cc35851e25a938bc97",
102
- "reference": "760148820110a1ae0936e5cc35851e25a938bc97",
103
  "shasum": ""
104
  },
 
 
 
105
  "require-dev": {
106
- "phpunit/phpunit": "^4.8"
107
  },
108
- "time": "2017-09-13T16:14:37+00:00",
109
  "type": "library",
110
  "installation-source": "dist",
111
  "autoload": {
112
- "psr-4": {
113
- "FontLib\\": "src/FontLib"
114
  }
115
  },
116
  "notification-url": "https://packagist.org/downloads/",
@@ -123,71 +145,53 @@
123
  "email": "fabien.menager@gmail.com"
124
  }
125
  ],
126
- "description": "A library to read, parse, export and make subsets of different types of font files.",
127
- "homepage": "https://github.com/PhenX/php-font-lib"
128
  },
129
  {
130
- "name": "dompdf/dompdf",
131
- "version": "v0.8.2",
132
- "version_normalized": "0.8.2.0",
133
  "source": {
134
  "type": "git",
135
- "url": "https://github.com/dompdf/dompdf.git",
136
- "reference": "5113accd9ae5d466077cce5208dcf3fb871bf8f6"
137
  },
138
  "dist": {
139
  "type": "zip",
140
- "url": "https://api.github.com/repos/dompdf/dompdf/zipball/5113accd9ae5d466077cce5208dcf3fb871bf8f6",
141
- "reference": "5113accd9ae5d466077cce5208dcf3fb871bf8f6",
142
  "shasum": ""
143
  },
144
  "require": {
145
- "ext-dom": "*",
146
- "ext-gd": "*",
147
- "ext-mbstring": "*",
148
- "phenx/php-font-lib": "0.5.*",
149
- "phenx/php-svg-lib": "0.3.*",
150
- "php": ">=5.4.0"
151
  },
152
  "require-dev": {
153
- "phpunit/phpunit": "4.8.*",
154
- "squizlabs/php_codesniffer": "2.*"
155
  },
156
- "time": "2017-11-26T14:49:08+00:00",
157
  "type": "library",
158
- "extra": {
159
- "branch-alias": {
160
- "dev-develop": "0.7-dev"
161
- }
162
- },
163
  "installation-source": "dist",
164
  "autoload": {
165
- "psr-4": {
166
- "Dompdf\\": "src/"
167
- },
168
- "classmap": [
169
- "lib/"
170
- ]
171
  },
172
  "notification-url": "https://packagist.org/downloads/",
173
  "license": [
174
- "LGPL-2.1"
175
  ],
176
  "authors": [
177
  {
178
- "name": "Fabien Ménager",
179
- "email": "fabien.menager@gmail.com"
180
- },
181
- {
182
- "name": "Brian Sweeney",
183
- "email": "eclecticgeek@gmail.com"
184
- },
185
- {
186
- "name": "Gabriel Bull",
187
- "email": "me@gabrielbull.com"
188
  }
189
  ],
190
- "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
191
- "homepage": "https://github.com/dompdf/dompdf"
 
 
 
 
 
192
  }
193
  ]
1
  [
2
  {
3
+ "name": "dompdf/dompdf",
4
+ "version": "v0.8.3",
5
+ "version_normalized": "0.8.3.0",
6
  "source": {
7
  "type": "git",
8
+ "url": "https://github.com/dompdf/dompdf.git",
9
+ "reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/dompdf/dompdf/zipball/75f13c700009be21a1965dc2c5b68a8708c22ba2",
14
+ "reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2",
15
  "shasum": ""
16
  },
17
  "require": {
18
+ "ext-dom": "*",
19
+ "ext-mbstring": "*",
20
+ "phenx/php-font-lib": "0.5.*",
21
+ "phenx/php-svg-lib": "0.3.*",
22
+ "php": ">=5.4.0"
23
  },
24
  "require-dev": {
25
+ "phpunit/phpunit": "^4.8|^5.5|^6.5",
26
+ "squizlabs/php_codesniffer": "2.*"
27
  },
28
+ "suggest": {
29
+ "ext-gd": "Needed to process images",
30
+ "ext-gmagick": "Improves image processing performance",
31
+ "ext-imagick": "Improves image processing performance"
32
+ },
33
+ "time": "2018-12-14T02:40:31+00:00",
34
  "type": "library",
35
+ "extra": {
36
+ "branch-alias": {
37
+ "dev-develop": "0.7-dev"
38
+ }
39
+ },
40
  "installation-source": "dist",
41
  "autoload": {
42
+ "psr-4": {
43
+ "Dompdf\\": "src/"
44
+ },
45
+ "classmap": [
46
+ "lib/"
47
+ ]
48
  },
49
  "notification-url": "https://packagist.org/downloads/",
50
  "license": [
51
+ "LGPL-2.1"
52
  ],
53
  "authors": [
54
  {
55
+ "name": "Fabien Ménager",
56
+ "email": "fabien.menager@gmail.com"
57
+ },
58
+ {
59
+ "name": "Brian Sweeney",
60
+ "email": "eclecticgeek@gmail.com"
61
+ },
62
+ {
63
+ "name": "Gabriel Bull",
64
+ "email": "me@gabrielbull.com"
65
  }
66
  ],
67
+ "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
68
+ "homepage": "https://github.com/dompdf/dompdf"
 
 
 
 
 
69
  },
70
  {
71
+ "name": "phenx/php-font-lib",
72
+ "version": "0.5.1",
73
+ "version_normalized": "0.5.1.0",
74
  "source": {
75
  "type": "git",
76
+ "url": "https://github.com/PhenX/php-font-lib.git",
77
+ "reference": "760148820110a1ae0936e5cc35851e25a938bc97"
78
  },
79
  "dist": {
80
  "type": "zip",
81
+ "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/760148820110a1ae0936e5cc35851e25a938bc97",
82
+ "reference": "760148820110a1ae0936e5cc35851e25a938bc97",
83
  "shasum": ""
84
  },
 
 
 
85
  "require-dev": {
86
+ "phpunit/phpunit": "^4.8"
87
  },
88
+ "time": "2017-09-13T16:14:37+00:00",
89
  "type": "library",
90
  "installation-source": "dist",
91
  "autoload": {
92
+ "psr-4": {
93
+ "FontLib\\": "src/FontLib"
94
  }
95
  },
96
  "notification-url": "https://packagist.org/downloads/",
103
  "email": "fabien.menager@gmail.com"
104
  }
105
  ],
106
+ "description": "A library to read, parse, export and make subsets of different types of font files.",
107
+ "homepage": "https://github.com/PhenX/php-font-lib"
108
  },
109
  {
110
+ "name": "phenx/php-svg-lib",
111
+ "version": "v0.3.2",
112
+ "version_normalized": "0.3.2.0",
113
  "source": {
114
  "type": "git",
115
+ "url": "https://github.com/PhenX/php-svg-lib.git",
116
+ "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c"
117
  },
118
  "dist": {
119
  "type": "zip",
120
+ "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/ccc46ef6340d4b8a4a68047e68d8501ea961442c",
121
+ "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c",
122
  "shasum": ""
123
  },
124
+ "require": {
125
+ "sabberworm/php-css-parser": "8.1.*"
126
+ },
127
  "require-dev": {
128
+ "phpunit/phpunit": "~5.0"
129
  },
130
+ "time": "2018-06-03T10:10:03+00:00",
131
  "type": "library",
132
  "installation-source": "dist",
133
  "autoload": {
134
+ "psr-0": {
135
+ "Svg\\": "src/"
136
  }
137
  },
138
  "notification-url": "https://packagist.org/downloads/",
145
  "email": "fabien.menager@gmail.com"
146
  }
147
  ],
148
+ "description": "A library to read, parse and export to PDF SVG files.",
149
+ "homepage": "https://github.com/PhenX/php-svg-lib"
150
  },
151
  {
152
+ "name": "sabberworm/php-css-parser",
153
+ "version": "8.1.0",
154
+ "version_normalized": "8.1.0.0",
155
  "source": {
156
  "type": "git",
157
+ "url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
158
+ "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef"
159
  },
160
  "dist": {
161
  "type": "zip",
162
+ "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/850cbbcbe7fbb155387a151ea562897a67e242ef",
163
+ "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef",
164
  "shasum": ""
165
  },
166
  "require": {
167
+ "php": ">=5.3.2"
 
 
 
 
 
168
  },
169
  "require-dev": {
170
+ "phpunit/phpunit": "*"
 
171
  },
172
+ "time": "2016-07-19T19:14:21+00:00",
173
  "type": "library",
 
 
 
 
 
174
  "installation-source": "dist",
175
  "autoload": {
176
+ "psr-0": {
177
+ "Sabberworm\\CSS": "lib/"
178
+ }
 
 
 
179
  },
180
  "notification-url": "https://packagist.org/downloads/",
181
  "license": [
182
+ "MIT"
183
  ],
184
  "authors": [
185
  {
186
+ "name": "Raphael Schweikert"
 
 
 
 
 
 
 
 
 
187
  }
188
  ],
189
+ "description": "Parser for CSS Files written in PHP",
190
+ "homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser",
191
+ "keywords": [
192
+ "css",
193
+ "parser",
194
+ "stylesheet"
195
+ ]
196
  }
197
  ]
vendor/dompdf/dompdf/README.md CHANGED
@@ -68,7 +68,7 @@ https://github.com/dompdf/dompdf/wiki/Requirements
68
  PDF documents internally support the following fonts: Helvetica, Times-Roman,
69
  Courier, Zapf-Dingbats, & Symbol. These fonts only support Windows ANSI
70
  encoding. In order for a PDF to display characters that are not available in
71
- Windows ANSI you must supply an external font. Dompdf will embed any referenced
72
  font in the PDF so long as it has been pre-loaded or is accessible to dompdf and
73
  reference in CSS @font-face rules. See the
74
  [font overview](https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding)
68
  PDF documents internally support the following fonts: Helvetica, Times-Roman,
69
  Courier, Zapf-Dingbats, & Symbol. These fonts only support Windows ANSI
70
  encoding. In order for a PDF to display characters that are not available in
71
+ Windows ANSI, you must supply an external font. Dompdf will embed any referenced
72
  font in the PDF so long as it has been pre-loaded or is accessible to dompdf and
73
  reference in CSS @font-face rules. See the
74
  [font overview](https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding)
vendor/dompdf/dompdf/VERSION CHANGED
@@ -1 +1 @@
1
- <5113accd>
1
+ <75f13c70>
vendor/dompdf/dompdf/composer.json CHANGED
@@ -26,16 +26,20 @@
26
  },
27
  "require": {
28
  "php": ">=5.4.0",
29
- "ext-gd": "*",
30
  "ext-dom": "*",
31
  "ext-mbstring": "*",
32
  "phenx/php-font-lib": "0.5.*",
33
  "phenx/php-svg-lib": "0.3.*"
34
  },
35
  "require-dev": {
36
- "phpunit/phpunit": "4.8.*",
37
  "squizlabs/php_codesniffer": "2.*"
38
  },
 
 
 
 
 
39
  "extra": {
40
  "branch-alias": {
41
  "dev-develop": "0.7-dev"
26
  },
27
  "require": {
28
  "php": ">=5.4.0",
 
29
  "ext-dom": "*",
30
  "ext-mbstring": "*",
31
  "phenx/php-font-lib": "0.5.*",
32
  "phenx/php-svg-lib": "0.3.*"
33
  },
34
  "require-dev": {
35
+ "phpunit/phpunit": "^4.8|^5.5|^6.5",
36
  "squizlabs/php_codesniffer": "2.*"
37
  },
38
+ "suggest": {
39
+ "ext-gd": "Needed to process images",
40
+ "ext-imagick": "Improves image processing performance",
41
+ "ext-gmagick": "Improves image processing performance"
42
+ },
43
  "extra": {
44
  "branch-alias": {
45
  "dev-develop": "0.7-dev"
vendor/dompdf/dompdf/lib/Cpdf.php CHANGED
@@ -464,28 +464,28 @@ class Cpdf
464
  // Named with limited valid values
465
  case 'NonFullScreenPageMode':
466
  if (!in_array($v, array('UseNone', 'UseOutlines', 'UseThumbs', 'UseOC'))) {
467
- continue;
468
  }
469
  $o['info'][$k] = $v;
470
  break;
471
 
472
  case 'Direction':
473
  if (!in_array($v, array('L2R', 'R2L'))) {
474
- continue;
475
  }
476
  $o['info'][$k] = $v;
477
  break;
478
 
479
  case 'PrintScaling':
480
  if (!in_array($v, array('None', 'AppDefault'))) {
481
- continue;
482
  }
483
  $o['info'][$k] = $v;
484
  break;
485
 
486
  case 'Duplex':
487
  if (!in_array($v, array('None', 'AppDefault'))) {
488
- continue;
489
  }
490
  $o['info'][$k] = $v;
491
  break;
@@ -4801,12 +4801,12 @@ EOT;
4801
  imagesavealpha($img, false);
4802
 
4803
  // create temp alpha file
4804
- $tempfile_alpha = tempnam($this->tmp, "cpdf_img_");
4805
  @unlink($tempfile_alpha);
4806
  $tempfile_alpha = "$tempfile_alpha.png";
4807
 
4808
  // create temp plain file
4809
- $tempfile_plain = tempnam($this->tmp, "cpdf_img_");
4810
  @unlink($tempfile_plain);
4811
  $tempfile_plain = "$tempfile_plain.png";
4812
 
464
  // Named with limited valid values
465
  case 'NonFullScreenPageMode':
466
  if (!in_array($v, array('UseNone', 'UseOutlines', 'UseThumbs', 'UseOC'))) {
467
+ break;
468
  }
469
  $o['info'][$k] = $v;
470
  break;
471
 
472
  case 'Direction':
473
  if (!in_array($v, array('L2R', 'R2L'))) {
474
+ break;
475
  }
476
  $o['info'][$k] = $v;
477
  break;
478
 
479
  case 'PrintScaling':
480
  if (!in_array($v, array('None', 'AppDefault'))) {
481
+ break;
482
  }
483
  $o['info'][$k] = $v;
484
  break;
485
 
486
  case 'Duplex':
487
  if (!in_array($v, array('None', 'AppDefault'))) {
488
+ break;
489
  }
490
  $o['info'][$k] = $v;
491
  break;
4801
  imagesavealpha($img, false);
4802
 
4803
  // create temp alpha file
4804
+ $tempfile_alpha = @tempnam($this->tmp, "cpdf_img_");
4805
  @unlink($tempfile_alpha);
4806
  $tempfile_alpha = "$tempfile_alpha.png";
4807
 
4808
  // create temp plain file
4809
+ $tempfile_plain = @tempnam($this->tmp, "cpdf_img_");
4810
  @unlink($tempfile_plain);
4811
  $tempfile_plain = "$tempfile_plain.png";
4812
 
vendor/dompdf/dompdf/lib/fonts/OpenSans-Bold.ufm CHANGED
@@ -19,7 +19,7 @@ Weight Bold
19
  ItalicAngle 0
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
- UnderlinePosition -500
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
19
  ItalicAngle 0
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
+ UnderlinePosition -75
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
vendor/dompdf/dompdf/lib/fonts/OpenSans-Bold.ufm.php CHANGED
@@ -586,7 +586,7 @@
586
  'ItalicAngle' => '0',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
- 'UnderlinePosition' => '-500',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
586
  'ItalicAngle' => '0',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
+ 'UnderlinePosition' => '-75',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
vendor/dompdf/dompdf/lib/fonts/OpenSans-BoldItalic.ufm CHANGED
@@ -19,7 +19,7 @@ Weight Bold
19
  ItalicAngle -12
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
- UnderlinePosition -500
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
19
  ItalicAngle -12
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
+ UnderlinePosition -75
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
vendor/dompdf/dompdf/lib/fonts/OpenSans-BoldItalic.ufm.php CHANGED
@@ -586,7 +586,7 @@
586
  'ItalicAngle' => '-12',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
- 'UnderlinePosition' => '-500',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
586
  'ItalicAngle' => '-12',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
+ 'UnderlinePosition' => '-75',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
vendor/dompdf/dompdf/lib/fonts/OpenSans-Italic.ufm CHANGED
@@ -19,7 +19,7 @@ Weight Medium
19
  ItalicAngle -12
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
- UnderlinePosition -500
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
19
  ItalicAngle -12
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
+ UnderlinePosition -75
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
vendor/dompdf/dompdf/lib/fonts/OpenSans-Italic.ufm.php CHANGED
@@ -586,7 +586,7 @@
586
  'ItalicAngle' => '-12',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
- 'UnderlinePosition' => '-500',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
586
  'ItalicAngle' => '-12',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
+ 'UnderlinePosition' => '-75',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
vendor/dompdf/dompdf/lib/fonts/OpenSans-Normal.ufm CHANGED
@@ -19,7 +19,7 @@ Weight Medium
19
  ItalicAngle 0
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
- UnderlinePosition -500
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
19
  ItalicAngle 0
20
  IsFixedPitch false
21
  UnderlineThickness 50
22
+ UnderlinePosition -75
23
  FontHeightOffset 0
24
  Ascender 1069
25
  Descender -293
vendor/dompdf/dompdf/lib/fonts/OpenSans-Normal.ufm.php CHANGED
@@ -586,7 +586,7 @@
586
  'ItalicAngle' => '0',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
- 'UnderlinePosition' => '-500',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
586
  'ItalicAngle' => '0',
587
  'IsFixedPitch' => 'false',
588
  'UnderlineThickness' => '50',
589
+ 'UnderlinePosition' => '-75',
590
  'FontHeightOffset' => '0',
591
  'Ascender' => '1069',
592
  'Descender' => '-293',
vendor/dompdf/dompdf/lib/res/broken_image.svg ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <svg width="64" height="64" xmlns="http://www.w3.org/2000/svg">
3
+ <g>
4
+ <rect stroke="#666666" id="svg_1" height="60.499994" width="60.166667" y="1.666669" x="1.999998" stroke-width="1.5" fill="none"/>
5
+ <line stroke-linecap="null" stroke-linejoin="null" id="svg_3" y2="59.333253" x2="59.749916" y1="4.333415" x1="4.250079" stroke-width="1.5" stroke="#999999" fill="none"/>
6
+ <line stroke-linecap="null" stroke-linejoin="null" id="svg_4" y2="59.999665" x2="4.062838" y1="3.750342" x1="60.062164" stroke-width="1.5" stroke="#999999" fill="none"/>
7
+ </g>
8
+ </svg>
vendor/dompdf/dompdf/src/Adapter/CPDF.php CHANGED
@@ -152,7 +152,7 @@ class CPDF implements Canvas
152
  private $_page_text;
153
 
154
  /**
155
- * Array of pages for accesing after rendering is initially complete
156
  *
157
  * @var array
158
  */
@@ -275,7 +275,7 @@ class CPDF implements Canvas
275
  /**
276
  * Opens a new 'object'
277
  *
278
- * While an object is open, all drawing actions are recored in the object,
279
  * as opposed to being drawn on the current page. Objects can be added
280
  * later to a specific page or to several pages.
281
  *
@@ -561,6 +561,25 @@ class CPDF implements Canvas
561
  $this->_set_line_transparency("Normal", $this->_current_opacity);
562
  }
563
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
564
  /**
565
  * @param float $x
566
  * @param float $y
@@ -608,7 +627,7 @@ class CPDF implements Canvas
608
  imageinterlace($im, false);
609
 
610
  $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
611
- $tmp_name = tempnam($tmp_dir, "{$type}dompdf_img_");
612
  @unlink($tmp_name);
613
  $filename = "$tmp_name.png";
614
  $this->_image_cache[] = $filename;
@@ -1092,6 +1111,10 @@ class CPDF implements Canvas
1092
  }
1093
  $eval->evaluate($code, array('PAGE_NUM' => $page_number, 'PAGE_COUNT' => $this->_page_count));
1094
  break;
 
 
 
 
1095
  }
1096
  }
1097
 
152
  private $_page_text;
153
 
154
  /**
155
+ * Array of pages for accessing after rendering is initially complete
156
  *
157
  * @var array
158
  */
275
  /**
276
  * Opens a new 'object'
277
  *
278
+ * While an object is open, all drawing actions are recorded in the object,
279
  * as opposed to being drawn on the current page. Objects can be added
280
  * later to a specific page or to several pages.
281
  *
561
  $this->_set_line_transparency("Normal", $this->_current_opacity);
562
  }
563
 
564
+ /**
565
+ * Draw line at the specified coordinates on every page.
566
+ *
567
+ * See {@link Style::munge_color()} for the format of the colour array.
568
+ *
569
+ * @param float $x1
570
+ * @param float $y1
571
+ * @param float $x2
572
+ * @param float $y2
573
+ * @param array $color
574
+ * @param float $width
575
+ * @param array $style optional
576
+ */
577
+ public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = array())
578
+ {
579
+ $_t = 'line';
580
+ $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 'width', 'style');
581
+ }
582
+
583
  /**
584
  * @param float $x
585
  * @param float $y
627
  imageinterlace($im, false);
628
 
629
  $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
630
+ $tmp_name = @tempnam($tmp_dir, "{$type}dompdf_img_");
631
  @unlink($tmp_name);
632
  $filename = "$tmp_name.png";
633
  $this->_image_cache[] = $filename;
1111
  }
1112
  $eval->evaluate($code, array('PAGE_NUM' => $page_number, 'PAGE_COUNT' => $this->_page_count));
1113
  break;
1114
+
1115
+ case 'line':
1116
+ $this->line( $x1, $y1, $x2, $y2, $color, $width, $style );
1117
+ break;
1118
  }
1119
  }
1120
 
vendor/dompdf/dompdf/src/Adapter/GD.php CHANGED
@@ -729,7 +729,7 @@ class GD implements Canvas
729
  $func_name = "imagecreatefrom$img_type";
730
  if (!function_exists($func_name)) {
731
  if (!method_exists("Dompdf\Helpers", $func_name)) {
732
- throw new \Exception("Function $func_name() not found. Cannot convert $type image: $img_url. Please install the image PHP extension.");
733
  }
734
  $func_name = "\\Dompdf\\Helpers::" . $func_name;
735
  }
@@ -978,6 +978,11 @@ class GD implements Canvas
978
  // N/A
979
  }
980
 
 
 
 
 
 
981
  /**
982
  * Streams the image to the client.
983
  *
729
  $func_name = "imagecreatefrom$img_type";
730
  if (!function_exists($func_name)) {
731
  if (!method_exists("Dompdf\Helpers", $func_name)) {
732
+ throw new \Exception("Function $func_name() not found. Cannot convert $img_type image: $img_url. Please install the image PHP extension.");
733
  }
734
  $func_name = "\\Dompdf\\Helpers::" . $func_name;
735
  }
978
  // N/A
979
  }
980
 
981
+ public function page_line()
982
+ {
983
+ // N/A
984
+ }
985
+
986
  /**
987
  * Streams the image to the client.
988
  *
vendor/dompdf/dompdf/src/Adapter/PDFLib.php CHANGED
@@ -49,14 +49,46 @@ class PDFLib implements Canvas
49
  static $IN_MEMORY = true;
50
 
51
  /**
52
- * @var Dompdf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  */
54
  private $_dompdf;
55
 
56
  /**
57
  * Instance of PDFLib class
58
  *
59
- * @var \PDFlib
60
  */
61
  private $_pdf;
62
 
@@ -116,6 +148,13 @@ class PDFLib implements Canvas
116
  */
117
  private $_fonts;
118
 
 
 
 
 
 
 
 
119
  /**
120
  * List of objects (templates) to add to multiple pages
121
  *
@@ -161,7 +200,7 @@ class PDFLib implements Canvas
161
  /**
162
  * Class constructor
163
  *
164
- * @param mixed $paper The size of paper to use either a string (see {@link Dompdf\Adapter\CPDF::$PAPER_SIZES}) or
165
  * an array(xmin,ymin,xmax,ymax)
166
  * @param string $orientation The orientation of the document (either 'landscape' or 'portrait')
167
  * @param Dompdf $dompdf
@@ -170,7 +209,7 @@ class PDFLib implements Canvas
170
  {
171
  if (is_array($paper)) {
172
  $size = $paper;
173
- } else if (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
174
  $size = self::$PAPER_SIZES[mb_strtolower($paper)];
175
  } else {
176
  $size = self::$PAPER_SIZES["letter"];
@@ -189,14 +228,25 @@ class PDFLib implements Canvas
189
 
190
  $license = $dompdf->getOptions()->getPdflibLicense();
191
  if (strlen($license) > 0) {
192
- $this->_pdf->set_parameter("license", $license);
 
 
 
 
 
 
 
 
 
193
  }
194
 
195
- $this->_pdf->set_parameter("textformat", "utf8");
196
- $this->_pdf->set_parameter("fontwarning", "false");
 
 
197
 
198
- // TODO: fetch PDFLib version information for the producer field
199
- $this->_pdf->set_info("Producer Addendum", sprintf("%s + PDFLib", $dompdf->version));
200
 
201
  // Silence pedantic warnings about missing TZ settings
202
  $tz = @date_default_timezone_get();
@@ -208,7 +258,7 @@ class PDFLib implements Canvas
208
  $this->_pdf->begin_document("", "");
209
  } else {
210
  $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
211
- $tmp_name = tempnam($tmp_dir, "libdompdf_pdf_");
212
  @unlink($tmp_name);
213
  $this->_file = "$tmp_name.pdf";
214
  $this->_pdf->begin_document($this->_file, "");
@@ -291,6 +341,7 @@ class PDFLib implements Canvas
291
  $ret = $this->_pdf->begin_template($this->_width, $this->_height);
292
  $this->_pdf->save();
293
  $this->_objs[$ret] = array("start_page" => $this->_page_number);
 
294
  return $ret;
295
  }
296
 
@@ -332,7 +383,7 @@ class PDFLib implements Canvas
332
  * - 'nextodd' add to all odd numbered pages from the next one
333
  * - 'nexteven' add to all even numbered pages from the next one
334
  *
335
- * @param int $object the object handle returned by open_object()
336
  * @param string $where
337
  */
338
  public function add_object($object, $where = 'all')
@@ -453,10 +504,10 @@ class PDFLib implements Canvas
453
  /**
454
  * Sets the line style
455
  *
456
- * @param float $width
457
  * @param $cap
458
  * @param string $join
459
- * @param array $dash
460
  *
461
  * @return void
462
  */
@@ -466,23 +517,43 @@ class PDFLib implements Canvas
466
  $dash[] = $dash[0];
467
  }
468
 
469
- if (count($dash) > 1) {
470
- $this->_pdf->setdashpattern("dasharray={" . implode(" ", $dash) . "}");
 
 
 
 
471
  } else {
472
- $this->_pdf->setdash(0, 0);
 
 
 
 
473
  }
474
 
475
  switch ($join) {
476
  case "miter":
477
- $this->_pdf->setlinejoin(0);
 
 
 
 
478
  break;
479
 
480
  case "round":
481
- $this->_pdf->setlinejoin(1);
 
 
 
 
482
  break;
483
 
484
  case "bevel":
485
- $this->_pdf->setlinejoin(2);
 
 
 
 
486
  break;
487
 
488
  default:
@@ -491,15 +562,27 @@ class PDFLib implements Canvas
491
 
492
  switch ($cap) {
493
  case "butt":
494
- $this->_pdf->setlinecap(0);
 
 
 
 
495
  break;
496
 
497
  case "round":
498
- $this->_pdf->setlinecap(1);
 
 
 
 
499
  break;
500
 
501
  case "square":
502
- $this->_pdf->setlinecap(2);
 
 
 
 
503
  break;
504
 
505
  default:
@@ -583,7 +666,7 @@ class PDFLib implements Canvas
583
  */
584
  public function _set_fill_opacity($opacity, $mode = "Normal")
585
  {
586
- if ($mode === "Normal") {
587
  $this->_set_gstate("opacityfill=$opacity");
588
  }
589
  }
@@ -596,7 +679,7 @@ class PDFLib implements Canvas
596
  */
597
  public function _set_stroke_opacity($opacity, $mode = "Normal")
598
  {
599
- if ($mode === "Normal") {
600
  $this->_set_gstate("opacitystroke=$opacity");
601
  }
602
  }
@@ -609,7 +692,7 @@ class PDFLib implements Canvas
609
  */
610
  public function set_opacity($opacity, $mode = "Normal")
611
  {
612
- if ($mode === "Normal") {
613
  $this->_set_gstate("opacityfill=$opacity opacitystroke=$opacity");
614
  $this->_current_opacity = $opacity;
615
  }
@@ -627,6 +710,7 @@ class PDFLib implements Canvas
627
  $gstate = $this->_pdf->create_gstate($gstate_options);
628
  $this->_gstates[$gstate] = $gstate_options;
629
  }
 
630
  return $this->_pdf->set_gstate($gstate);
631
  }
632
 
@@ -644,7 +728,7 @@ class PDFLib implements Canvas
644
  * fitwindow Fit the complete page to the window.
645
  * fixed
646
  */
647
- //$this->_pdf->set_parameter("openaction", $view);
648
  }
649
 
650
  /**
@@ -658,28 +742,69 @@ class PDFLib implements Canvas
658
  */
659
  protected function _load_font($font, $encoding = null, $options = "")
660
  {
661
- // Set up font paths
662
- if ($this->_pdf->get_parameter("FontOutline", 1) === "") {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
663
  $families = $this->_dompdf->getFontMetrics()->getFontFamilies();
664
  foreach ($families as $files) {
665
  foreach ($files as $file) {
666
  $face = basename($file);
667
  $afm = null;
668
 
 
 
 
 
669
  // Prefer ttfs to afms
670
  if (file_exists("$file.ttf")) {
671
  $outline = "$file.ttf";
672
-
673
- } else if (file_exists("$file.TTF")) {
674
  $outline = "$file.TTF";
675
-
676
- } else if (file_exists("$file.pfb")) {
677
  $outline = "$file.pfb";
678
  if (file_exists("$file.afm")) {
679
  $afm = "$file.afm";
680
  }
681
-
682
- } else if (file_exists("$file.PFB")) {
683
  $outline = "$file.PFB";
684
  if (file_exists("$file.AFM")) {
685
  $afm = "$file.AFM";
@@ -688,43 +813,29 @@ class PDFLib implements Canvas
688
  continue;
689
  }
690
 
691
- $this->_pdf->set_parameter("FontOutline", "\{$face\}=\{$outline\}");
692
 
693
- if (!is_null($afm)) {
694
- $this->_pdf->set_parameter("FontAFM", "\{$face\}=\{$afm\}");
 
 
695
  }
696
- }
697
- }
698
- }
699
 
700
- // Check if the font is a native PDF font
701
- // Embed non-native fonts
702
- $test = strtolower(basename($font));
703
- if (in_array($test, DOMPDF::$nativeFonts)) {
704
- $font = basename($font);
705
- } else {
706
- // Embed non-native fonts
707
- $options .= " embedding=true";
708
- }
709
-
710
- if (is_null($encoding)) {
711
- // Unicode encoding is only available for the commerical
712
- // version of PDFlib and not PDFlib-Lite
713
- if (strlen($this->_dompdf->getOptions()->getPdflibLicense()) > 0) {
714
- $encoding = "unicode";
715
- } else {
716
- $encoding = "auto";
717
  }
718
  }
719
 
720
- $key = "$font:$encoding:$options";
721
 
722
- if (isset($this->_fonts[$key])) {
723
- return $this->_fonts[$key];
724
- } else {
725
- $this->_fonts[$key] = $this->_pdf->load_font($font, $encoding, $options);
726
- return $this->_fonts[$key];
727
- }
728
  }
729
 
730
  /**
@@ -759,7 +870,26 @@ class PDFLib implements Canvas
759
  $this->_pdf->lineto($x2, $y2);
760
  $this->_pdf->stroke();
761
 
762
- $this->_set_line_transparency("Normal", $this->_current_opacity);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
763
  }
764
 
765
  /**
@@ -783,7 +913,7 @@ class PDFLib implements Canvas
783
  $this->_pdf->arc($x1, $y1, $r1, $astart, $aend);
784
  $this->_pdf->stroke();
785
 
786
- $this->_set_line_transparency("Normal", $this->_current_opacity);
787
  }
788
 
789
  /**
@@ -793,7 +923,7 @@ class PDFLib implements Canvas
793
  * @param float $h
794
  * @param array $color
795
  * @param float $width
796
- * @param null $style
797
  */
798
  public function rectangle($x1, $y1, $w, $h, $color, $width, $style = null)
799
  {
@@ -805,7 +935,7 @@ class PDFLib implements Canvas
805
  $this->_pdf->rect($x1, $y1, $w, $h);
806
  $this->_pdf->stroke();
807
 
808
- $this->_set_line_transparency("Normal", $this->_current_opacity);
809
  }
810
 
811
  /**
@@ -824,7 +954,7 @@ class PDFLib implements Canvas
824
  $this->_pdf->rect(floatval($x1), floatval($y1), floatval($w), floatval($h));
825
  $this->_pdf->fill();
826
 
827
- $this->_set_fill_transparency("Normal", $this->_current_opacity);
828
  }
829
 
830
  /**
@@ -855,7 +985,6 @@ class PDFLib implements Canvas
855
  */
856
  public function clipping_roundrectangle($x1, $y1, $w, $h, $rTL, $rTR, $rBR, $rBL)
857
  {
858
- // @todo
859
  $this->clipping_rectangle($x1, $y1, $w, $h);
860
  }
861
 
@@ -946,9 +1075,9 @@ class PDFLib implements Canvas
946
  /**
947
  * @param array $points
948
  * @param array $color
949
- * @param null $width
950
- * @param null $style
951
- * @param bool $fill
952
  */
953
  public function polygon($points, $color, $width = null, $style = null, $fill = false)
954
  {
@@ -975,8 +1104,8 @@ class PDFLib implements Canvas
975
  $this->_pdf->closepath_stroke();
976
  }
977
 
978
- $this->_set_fill_transparency("Normal", $this->_current_opacity);
979
- $this->_set_line_transparency("Normal", $this->_current_opacity);
980
  }
981
 
982
  /**
@@ -984,9 +1113,9 @@ class PDFLib implements Canvas
984
  * @param float $y
985
  * @param float $r
986
  * @param array $color
987
- * @param null $width
988
- * @param null $style
989
- * @param bool $fill
990
  */
991
  public function circle($x, $y, $r, $color, $width = null, $style = null, $fill = false)
992
  {
@@ -1007,16 +1136,16 @@ class PDFLib implements Canvas
1007
  $this->_pdf->stroke();
1008
  }
1009
 
1010
- $this->_set_fill_transparency("Normal", $this->_current_opacity);
1011
- $this->_set_line_transparency("Normal", $this->_current_opacity);
1012
  }
1013
 
1014
  /**
1015
  * @param string $img_url
1016
- * @param float $x
1017
- * @param float $y
1018
- * @param int $w
1019
- * @param int $h
1020
  * @param string $resolution
1021
  */
1022
  public function image($img_url, $x, $y, $w, $h, $resolution = "normal")
@@ -1037,15 +1166,15 @@ class PDFLib implements Canvas
1037
  }
1038
 
1039
  /**
1040
- * @param float $x
1041
- * @param float $y
1042
  * @param string $text
1043
  * @param string $font
1044
- * @param float $size
1045
- * @param array $color
1046
- * @param int $word_spacing
1047
- * @param int $char_spacing
1048
- * @param int $angle
1049
  */
1050
  public function text($x, $y, $text, $font, $size, $color = array(0, 0, 0), $word_spacing = 0, $char_spacing = 0, $angle = 0)
1051
  {
@@ -1062,7 +1191,7 @@ class PDFLib implements Canvas
1062
 
1063
  $this->_pdf->fit_textline($text, $x, $y, "rotate=$angle wordspacing=$word_spacing charspacing=$char_spacing ");
1064
 
1065
- $this->_set_fill_transparency("Normal", $this->_current_opacity);
1066
  }
1067
 
1068
  /**
@@ -1088,11 +1217,11 @@ class PDFLib implements Canvas
1088
  /**
1089
  * Add a link to the pdf
1090
  *
1091
- * @param string $url The url to link to
1092
- * @param float $x The x position of the link
1093
- * @param float $y The y position of the link
1094
- * @param float $width The width of the link
1095
- * @param float $height The height of the link
1096
  */
1097
  public function add_link($url, $x, $y, $width, $height)
1098
  {
@@ -1121,9 +1250,9 @@ class PDFLib implements Canvas
1121
  /**
1122
  * @param string $text
1123
  * @param string $font
1124
- * @param float $size
1125
- * @param int $word_spacing
1126
- * @param int $letter_spacing
1127
  * @return mixed
1128
  */
1129
  public function get_text_width($text, $font, $size, $word_spacing = 0, $letter_spacing = 0)
@@ -1144,7 +1273,7 @@ class PDFLib implements Canvas
1144
 
1145
  /**
1146
  * @param string $font
1147
- * @param float $size
1148
  * @return float
1149
  */
1150
  public function get_font_height($font, $size)
@@ -1158,17 +1287,19 @@ class PDFLib implements Canvas
1158
 
1159
  // $desc is usually < 0,
1160
  $ratio = $this->_dompdf->getOptions()->getFontHeightRatio();
 
1161
  return $size * ($asc - $desc) * $ratio;
1162
  }
1163
 
1164
  /**
1165
  * @param string $font
1166
- * @param float $size
1167
  * @return float
1168
  */
1169
  public function get_font_baseline($font, $size)
1170
  {
1171
  $ratio = $this->_dompdf->getOptions()->getFontHeightRatio();
 
1172
  return $this->get_font_height($font, $size) / $ratio * 1.1;
1173
  }
1174
 
@@ -1180,15 +1311,15 @@ class PDFLib implements Canvas
1180
  *
1181
  * See {@link Style::munge_color()} for the format of the color array.
1182
  *
1183
- * @param float $x
1184
- * @param float $y
1185
- * @param string $text the text to write
1186
- * @param string $font the font file to use
1187
- * @param float $size the font size, in points
1188
- * @param array $color
1189
- * @param float $word_space word spacing adjustment
1190
- * @param float $char_space char spacing adjustment
1191
- * @param float $angle angle to write the text at, measured CW starting from the x-axis
1192
  */
1193
  public function page_text($x, $y, $text, $font, $size, $color = array(0, 0, 0), $word_space = 0.0, $char_space = 0.0, $angle = 0.0)
1194
  {
@@ -1259,6 +1390,11 @@ class PDFLib implements Canvas
1259
  }
1260
  $eval->evaluate($code, array('PAGE_NUM' => $p, 'PAGE_COUNT' => $this->_page_count));
1261
  break;
 
 
 
 
 
1262
  }
1263
  }
1264
 
@@ -1272,7 +1408,7 @@ class PDFLib implements Canvas
1272
  * Streams the PDF to the client.
1273
  *
1274
  * @param string $filename The filename to present to the client.
1275
- * @param array $options Associative array: 'compress' => 1 or 0 (default 1); 'Attachment' => 1 or 0 (default 1).
1276
  * @throws Exception
1277
  */
1278
  public function stream($filename = "document.pdf", $options = array())
@@ -1281,15 +1417,19 @@ class PDFLib implements Canvas
1281
  die("Unable to stream pdf: headers already sent");
1282
  }
1283
 
1284
- if (!isset($options["compress"])) $options["compress"] = true;
1285
- if (!isset($options["Attachment"])) $options["Attachment"] = true;
 
 
 
 
1286
 
1287
  $this->_add_page_text();
1288
 
1289
  if ($options["compress"]) {
1290
- $this->_pdf->set_value("compress", 6);
1291
  } else {
1292
- $this->_pdf->set_value("compress", 0);
1293
  }
1294
 
1295
  $this->_close();
@@ -1348,14 +1488,16 @@ class PDFLib implements Canvas
1348
  */
1349
  public function output($options = array())
1350
  {
1351
- if (!isset($options["compress"])) $options["compress"] = true;
 
 
1352
 
1353
  $this->_add_page_text();
1354
 
1355
  if ($options["compress"]) {
1356
- $this->_pdf->set_value("compress", 6);
1357
  } else {
1358
- $this->_pdf->set_value("compress", 0);
1359
  }
1360
 
1361
  $this->_close();
@@ -1378,6 +1520,78 @@ class PDFLib implements Canvas
1378
 
1379
  return $data;
1380
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1381
  }
1382
 
1383
  // Workaround for idiotic limitation on statics...
49
  static $IN_MEMORY = true;
50
 
51
  /**
52
+ * Saves the major version of PDFLib for compatibility requests
53
+ *
54
+ * @var null|int
55
+ */
56
+ static private $MAJOR_VERSION = null;
57
+
58
+
59
+ /**
60
+ * Transforms the list of native fonts into PDFLib compatible names (casesensitive)
61
+ *
62
+ * @var array
63
+ */
64
+ static public $nativeFontsTpPDFLib = array(
65
+ "courier" => "Courier",
66
+ "courier-bold" => "Courier-Bold",
67
+ "courier-oblique" => "Courier-Oblique",
68
+ "courier-boldoblique" => "Courier-BoldOblique",
69
+ "helvetica" => "Helvetica",
70
+ "helvetica-bold" => "Helvetica-Bold",
71
+ "helvetica-oblique" => "Helvetica-Oblique",
72
+ "helvetica-boldoblique" => "Helvetica-BoldOblique",
73
+ "times" => "Times-Roman",
74
+ "times-roman" => "Times-Roman",
75
+ "times-bold" => "Times-Bold",
76
+ "times-italic" => "Times-Italic",
77
+ "times-bolditalic" => "Times-BoldItalic",
78
+ "symbol" => "Symbol",
79
+ "zapfdinbats" => "ZapfDingbats",
80
+ "zapfdingbats" => "ZapfDingbats",
81
+ );
82
+
83
+ /**
84
+ * @var \Dompdf\Dompdf
85
  */
86
  private $_dompdf;
87
 
88
  /**
89
  * Instance of PDFLib class
90
  *
91
+ * @var \PDFLib
92
  */
93
  private $_pdf;
94
 
148
  */
149
  private $_fonts;
150
 
151
+ /**
152
+ * Cache of fontFile checks
153
+ *
154
+ * @var array
155
+ */
156
+ private $_fontsFiles;
157
+
158
  /**
159
  * List of objects (templates) to add to multiple pages
160
  *
200
  /**
201
  * Class constructor
202
  *
203
+ * @param string|array $paper The size of paper to use either a string (see {@link Dompdf\Adapter\CPDF::$PAPER_SIZES}) or
204
  * an array(xmin,ymin,xmax,ymax)
205
  * @param string $orientation The orientation of the document (either 'landscape' or 'portrait')
206
  * @param Dompdf $dompdf
209
  {
210
  if (is_array($paper)) {
211
  $size = $paper;
212
+ } elseif (isset(self::$PAPER_SIZES[mb_strtolower($paper)])) {
213
  $size = self::$PAPER_SIZES[mb_strtolower($paper)];
214
  } else {
215
  $size = self::$PAPER_SIZES["letter"];
228
 
229
  $license = $dompdf->getOptions()->getPdflibLicense();
230
  if (strlen($license) > 0) {
231
+ $this->setPDFLibParameter("license", $license);
232
+ }
233
+
234
+ $this->setPDFLibParameter("textformat", "utf8");
235
+ if ($this->getPDFLibMajorVersion() >= 7) {
236
+ $this->setPDFLibParameter("errorpolicy", "return");
237
+ // $this->_pdf->set_option('logging={filename=' . \APP_PATH . '/logs/pdflib.log classes={api=1 warning=2}}');
238
+ // $this->_pdf->set_option('errorpolicy=exception');
239
+ } else {
240
+ $this->setPDFLibParameter("fontwarning", "false");
241
  }
242
 
243
+ $searchPath = $this->_dompdf->getOptions()->getFontDir();
244
+ if (empty($searchPath) === false) {
245
+ $this->_pdf->set_option('searchpath={' . $searchPath . '}');
246
+ }
247
 
248
+ // fetch PDFLib version information for the producer field
249
+ $this->_pdf->set_info("Producer Addendum", sprintf("%s + PDFLib %s", $dompdf->version, $this->getPDFLibMajorVersion()));
250
 
251
  // Silence pedantic warnings about missing TZ settings
252
  $tz = @date_default_timezone_get();
258
  $this->_pdf->begin_document("", "");
259
  } else {
260
  $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
261
+ $tmp_name = @tempnam($tmp_dir, "libdompdf_pdf_");
262
  @unlink($tmp_name);
263
  $this->_file = "$tmp_name.pdf";
264
  $this->_pdf->begin_document($this->_file, "");
341
  $ret = $this->_pdf->begin_template($this->_width, $this->_height);
342
  $this->_pdf->save();
343
  $this->_objs[$ret] = array("start_page" => $this->_page_number);
344
+
345
  return $ret;
346
  }
347
 
383
  * - 'nextodd' add to all odd numbered pages from the next one
384
  * - 'nexteven' add to all even numbered pages from the next one
385
  *
386
+ * @param int $object the object handle returned by open_object()
387
  * @param string $where
388
  */
389
  public function add_object($object, $where = 'all')
504
  /**
505
  * Sets the line style
506
  *
507
+ * @param float $width
508
  * @param $cap
509
  * @param string $join
510
+ * @param array $dash
511
  *
512
  * @return void
513
  */
517
  $dash[] = $dash[0];
518
  }
519
 
520
+ if ($this->getPDFLibMajorVersion() >= 9) {
521
+ if (count($dash) > 1) {
522
+ $this->_pdf->set_graphics_option("dasharray={" . implode(" ", $dash) . "}");
523
+ } else {
524
+ $this->_pdf->set_graphics_option("dasharray=none");
525
+ }
526
  } else {
527
+ if (count($dash) > 1) {
528
+ $this->_pdf->setdashpattern("dasharray={" . implode(" ", $dash) . "}");
529
+ } else {
530
+ $this->_pdf->setdash(0, 0);
531
+ }
532
  }
533
 
534
  switch ($join) {
535
  case "miter":
536
+ if ($this->getPDFLibMajorVersion() >= 9) {
537
+ $this->_pdf->set_graphics_option('linejoin=0');
538
+ } else {
539
+ $this->_pdf->setlinejoin(0);
540
+ }
541
  break;
542
 
543
  case "round":
544
+ if ($this->getPDFLibMajorVersion() >= 9) {
545
+ $this->_pdf->set_graphics_option('linejoin=1');
546
+ } else {
547
+ $this->_pdf->setlinejoin(1);
548
+ }
549
  break;
550
 
551
  case "bevel":
552
+ if ($this->getPDFLibMajorVersion() >= 9) {
553
+ $this->_pdf->set_graphics_option('linejoin=2');
554
+ } else {
555
+ $this->_pdf->setlinejoin(2);
556
+ }
557
  break;
558
 
559
  default:
562
 
563
  switch ($cap) {
564
  case "butt":
565
+ if ($this->getPDFLibMajorVersion() >= 9) {
566
+ $this->_pdf->set_graphics_option('linecap=0');
567
+ } else {
568
+ $this->_pdf->setlinecap(0);
569
+ }
570
  break;
571
 
572
  case "round":
573
+ if ($this->getPDFLibMajorVersion() >= 9) {
574
+ $this->_pdf->set_graphics_option('linecap=1');
575
+ } else {
576
+ $this->_pdf->setlinecap(1);
577
+ }
578
  break;
579
 
580
  case "square":
581
+ if ($this->getPDFLibMajorVersion() >= 9) {
582
+ $this->_pdf->set_graphics_option('linecap=2');
583
+ } else {
584
+ $this->_pdf->setlinecap(2);
585
+ }
586
  break;
587
 
588
  default:
666
  */
667
  public function _set_fill_opacity($opacity, $mode = "Normal")
668
  {
669
+ if ($mode === "Normal" && is_null($opacity) === false) {
670
  $this->_set_gstate("opacityfill=$opacity");
671
  }
672
  }
679
  */
680
  public function _set_stroke_opacity($opacity, $mode = "Normal")
681
  {
682
+ if ($mode === "Normal" && is_null($opacity) === false) {
683
  $this->_set_gstate("opacitystroke=$opacity");
684
  }
685
  }
692
  */
693
  public function set_opacity($opacity, $mode = "Normal")
694
  {
695
+ if ($mode === "Normal" && is_null($opacity) === false) {
696
  $this->_set_gstate("opacityfill=$opacity opacitystroke=$opacity");
697
  $this->_current_opacity = $opacity;
698
  }
710
  $gstate = $this->_pdf->create_gstate($gstate_options);
711
  $this->_gstates[$gstate] = $gstate_options;
712
  }
713
+
714
  return $this->_pdf->set_gstate($gstate);
715
  }
716
 
728
  * fitwindow Fit the complete page to the window.
729
  * fixed
730
  */
731
+ //$this->setPDFLibParameter("openaction", $view);
732
  }
733
 
734
  /**
742
  */
743
  protected function _load_font($font, $encoding = null, $options = "")
744
  {
745
+ // Fix for PDFLibs case-sensitive font names
746
+ $baseFont = basename($font);
747
+ $isNativeFont = false;
748
+ if (isset(self::$nativeFontsTpPDFLib[$baseFont])) {
749
+ $font = self::$nativeFontsTpPDFLib[$baseFont];
750
+ $isNativeFont = true;
751
+ }
752
+
753
+ // Check if the font is a native PDF font
754
+ // Embed non-native fonts
755
+ $test = strtolower($baseFont);
756
+ if (in_array($test, DOMPDF::$nativeFonts)) {
757
+ $font = basename($font);
758
+ } else {
759
+ // Embed non-native fonts
760
+ $options .= " embedding=true";
761
+ }
762
+
763
+ if (is_null($encoding)) {
764
+ // Unicode encoding is only available for the commerical
765
+ // version of PDFlib and not PDFlib-Lite
766
+ if (strlen($this->_dompdf->getOptions()->getPdflibLicense()) > 0) {
767
+ $encoding = "unicode";
768
+ } else {
769
+ $encoding = "auto";
770
+ }
771
+ }
772
+
773
+ $key = "$font:$encoding:$options";
774
+ if (isset($this->_fonts[$key])) {
775
+ return $this->_fonts[$key];
776
+ }
777
+
778
+ // Native fonts are build in, just load it
779
+ if ($isNativeFont) {
780
+ $this->_fonts[$key] = $this->_pdf->load_font($font, $encoding, $options);
781
+
782
+ return $this->_fonts[$key];
783
+ }
784
+
785
+ $fontOutline = $this->getPDFLibParameter("FontOutline", 1);
786
+ if ($fontOutline === "" || $fontOutline <= 0) {
787
  $families = $this->_dompdf->getFontMetrics()->getFontFamilies();
788
  foreach ($families as $files) {
789
  foreach ($files as $file) {
790
  $face = basename($file);
791
  $afm = null;
792
 
793
+ if (isset($this->_fontsFiles[$face])) {
794
+ continue;
795
+ }
796
+
797
  // Prefer ttfs to afms
798
  if (file_exists("$file.ttf")) {
799
  $outline = "$file.ttf";
800
+ } elseif (file_exists("$file.TTF")) {
 
801
  $outline = "$file.TTF";
802
+ } elseif (file_exists("$file.pfb")) {
 
803
  $outline = "$file.pfb";
804
  if (file_exists("$file.afm")) {
805
  $afm = "$file.afm";
806
  }
807
+ } elseif (file_exists("$file.PFB")) {
 
808
  $outline = "$file.PFB";
809
  if (file_exists("$file.AFM")) {
810
  $afm = "$file.AFM";
813
  continue;
814
  }
815
 
816
+ $this->_fontsFiles[$face] = true;
817
 
818
+ if ($this->getPDFLibMajorVersion() >= 9) {
819
+ $this->setPDFLibParameter("FontOutline", '{' . "$face=$outline" . '}');
820
+ } else {
821
+ $this->setPDFLibParameter("FontOutline", "\{$face\}=\{$outline\}");
822
  }
 
 
 
823
 
824
+ if (is_null($afm)) {
825
+ continue;
826
+ }
827
+ if ($this->getPDFLibMajorVersion() >= 9) {
828
+ $this->setPDFLibParameter("FontAFM", '{' . "$face=$afm" . '}');
829
+ } else {
830
+ $this->setPDFLibParameter("FontAFM", "\{$face\}=\{$afm\}");
831
+ }
832
+ }
 
 
 
 
 
 
 
 
833
  }
834
  }
835
 
836
+ $this->_fonts[$key] = $this->_pdf->load_font($font, $encoding, $options);
837
 
838
+ return $this->_fonts[$key];
 
 
 
 
 
839
  }
840
 
841
  /**
870
  $this->_pdf->lineto($x2, $y2);
871
  $this->_pdf->stroke();
872
 
873
+ $this->_set_stroke_opacity($this->_current_opacity, "Normal");
874
+ }
875
+
876
+ /**
877
+ * Draw line at the specified coordinates on every page.
878
+ *
879
+ * See {@link Style::munge_color()} for the format of the colour array.
880
+ *
881
+ * @param float $x1
882
+ * @param float $y1
883
+ * @param float $x2
884
+ * @param float $y2
885
+ * @param array $color
886
+ * @param float $width
887
+ * @param array $style optional
888
+ */
889
+ public function page_line($x1, $y1, $x2, $y2, $color, $width, $style = array())
890
+ {
891
+ $_t = 'line';
892
+ $this->_page_text[] = compact('_t', 'x1', 'y1', 'x2', 'y2', 'color', 'width', 'style');
893
  }
894
 
895
  /**
913
  $this->_pdf->arc($x1, $y1, $r1, $astart, $aend);
914
  $this->_pdf->stroke();
915
 
916
+ $this->_set_stroke_opacity($this->_current_opacity, "Normal");
917
  }
918
 
919
  /**
923
  * @param float $h
924
  * @param array $color
925
  * @param float $width
926
+ * @param null $style
927
  */
928
  public function rectangle($x1, $y1, $w, $h, $color, $width, $style = null)
929
  {
935
  $this->_pdf->rect($x1, $y1, $w, $h);
936
  $this->_pdf->stroke();
937
 
938
+ $this->_set_stroke_opacity($this->_current_opacity, "Normal");
939
  }
940
 
941
  /**
954
  $this->_pdf->rect(floatval($x1), floatval($y1), floatval($w), floatval($h));
955
  $this->_pdf->fill();
956
 
957
+ $this->_set_fill_opacity($this->_current_opacity, "Normal");
958
  }
959
 
960
  /**
985
  */
986
  public function clipping_roundrectangle($x1, $y1, $w, $h, $rTL, $rTR, $rBR, $rBL)
987
  {
 
988
  $this->clipping_rectangle($x1, $y1, $w, $h);
989
  }
990
 
1075
  /**
1076
  * @param array $points
1077
  * @param array $color
1078
+ * @param null $width
1079
+ * @param null $style
1080
+ * @param bool $fill
1081
  */
1082
  public function polygon($points, $color, $width = null, $style = null, $fill = false)
1083
  {
1104
  $this->_pdf->closepath_stroke();
1105
  }
1106
 
1107
+ $this->_set_fill_opacity($this->_current_opacity, "Normal");
1108
+ $this->_set_stroke_opacity($this->_current_opacity, "Normal");
1109
  }
1110
 
1111
  /**
1113
  * @param float $y
1114
  * @param float $r
1115
  * @param array $color
1116
+ * @param null $width
1117
+ * @param null $style
1118
+ * @param bool $fill
1119
  */
1120
  public function circle($x, $y, $r, $color, $width = null, $style = null, $fill = false)
1121
  {
1136
  $this->_pdf->stroke();
1137
  }
1138
 
1139
+ $this->_set_fill_opacity($this->_current_opacity, "Normal");
1140
+ $this->_set_stroke_opacity($this->_current_opacity, "Normal");
1141
  }
1142
 
1143
  /**
1144
  * @param string $img_url
1145
+ * @param float $x
1146
+ * @param float $y
1147
+ * @param int $w
1148
+ * @param int $h
1149
  * @param string $resolution
1150
  */
1151
  public function image($img_url, $x, $y, $w, $h, $resolution = "normal")
1166
  }
1167
 
1168
  /**
1169
+ * @param float $x
1170
+ * @param float $y
1171
  * @param string $text
1172
  * @param string $font
1173
+ * @param float $size
1174
+ * @param array $color
1175
+ * @param int $word_spacing
1176
+ * @param int $char_spacing
1177
+ * @param int $angle
1178
  */
1179
  public function text($x, $y, $text, $font, $size, $color = array(0, 0, 0), $word_spacing = 0, $char_spacing = 0, $angle = 0)
1180
  {
1191
 
1192
  $this->_pdf->fit_textline($text, $x, $y, "rotate=$angle wordspacing=$word_spacing charspacing=$char_spacing ");
1193
 
1194
+ $this->_set_fill_opacity($this->_current_opacity, "Normal");
1195
  }
1196
 
1197
  /**
1217
  /**
1218
  * Add a link to the pdf
1219
  *
1220
+ * @param string $url The url to link to
1221
+ * @param float $x The x position of the link
1222
+ * @param float $y The y position of the link
1223
+ * @param float $width The width of the link
1224
+ * @param float $height The height of the link
1225
  */
1226
  public function add_link($url, $x, $y, $width, $height)
1227
  {
1250
  /**
1251
  * @param string $text
1252
  * @param string $font
1253
+ * @param float $size
1254
+ * @param int $word_spacing
1255
+ * @param int $letter_spacing
1256
  * @return mixed
1257
  */
1258
  public function get_text_width($text, $font, $size, $word_spacing = 0, $letter_spacing = 0)
1273
 
1274
  /**
1275
  * @param string $font
1276
+ * @param float $size
1277
  * @return float
1278
  */
1279
  public function get_font_height($font, $size)
1287
 
1288
  // $desc is usually < 0,
1289
  $ratio = $this->_dompdf->getOptions()->getFontHeightRatio();
1290
+
1291
  return $size * ($asc - $desc) * $ratio;
1292
  }
1293
 
1294
  /**
1295
  * @param string $font
1296
+ * @param float $size
1297
  * @return float
1298
  */
1299
  public function get_font_baseline($font, $size)
1300
  {
1301
  $ratio = $this->_dompdf->getOptions()->getFontHeightRatio();
1302
+
1303
  return $this->get_font_height($font, $size) / $ratio * 1.1;
1304
  }
1305
 
1311
  *
1312
  * See {@link Style::munge_color()} for the format of the color array.
1313
  *
1314
+ * @param float $x
1315
+ * @param float $y
1316
+ * @param string $text the text to write
1317
+ * @param string $font the font file to use
1318
+ * @param float $size the font size, in points
1319
+ * @param array $color
1320
+ * @param float $word_space word spacing adjustment
1321
+ * @param float $char_space char spacing adjustment
1322
+ * @param float $angle angle to write the text at, measured CW starting from the x-axis
1323
  */
1324
  public function page_text($x, $y, $text, $font, $size, $color = array(0, 0, 0), $word_space = 0.0, $char_space = 0.0, $angle = 0.0)
1325
  {
1390
  }
1391
  $eval->evaluate($code, array('PAGE_NUM' => $p, 'PAGE_COUNT' => $this->_page_count));
1392
  break;
1393
+
1394
+ case 'line':
1395
+ $this->line( $x1, $y1, $x2, $y2, $color, $width, $style );
1396
+ break;
1397
+
1398
  }
1399
  }
1400
 
1408
  * Streams the PDF to the client.
1409
  *
1410
  * @param string $filename The filename to present to the client.
1411
+ * @param array $options Associative array: 'compress' => 1 or 0 (default 1); 'Attachment' => 1 or 0 (default 1).
1412
  * @throws Exception
1413
  */
1414
  public function stream($filename = "document.pdf", $options = array())
1417
  die("Unable to stream pdf: headers already sent");
1418
  }
1419
 
1420
+ if (!isset($options["compress"])) {
1421
+ $options["compress"] = true;
1422
+ }
1423
+ if (!isset($options["Attachment"])) {
1424
+ $options["Attachment"] = true;
1425
+ }
1426
 
1427
  $this->_add_page_text();
1428
 
1429
  if ($options["compress"]) {
1430
+ $this->setPDFLibValue("compress", 6);
1431
  } else {
1432
+ $this->setPDFLibValue("compress", 0);
1433
  }
1434
 
1435
  $this->_close();
1488
  */
1489
  public function output($options = array())
1490
  {
1491
+ if (!isset($options["compress"])) {
1492
+ $options["compress"] = true;
1493
+ }
1494
 
1495
  $this->_add_page_text();
1496
 
1497
  if ($options["compress"]) {
1498
+ $this->setPDFLibValue("compress", 6);
1499
  } else {
1500
+ $this->setPDFLibValue("compress", 0);
1501
  }
1502
 
1503
  $this->_close();
1520
 
1521
  return $data;
1522
  }
1523
+
1524
+ /**
1525
+ * @param string $keyword
1526
+ * @param string $optlist
1527
+ * @return mixed
1528
+ */
1529
+ protected function getPDFLibParameter($keyword, $optlist = "")
1530
+ {
1531
+ if ($this->getPDFLibMajorVersion() >= 9) {
1532
+ return $this->_pdf->get_option($keyword, "");
1533
+ }
1534
+
1535
+ return $this->_pdf->get_parameter($keyword, $optlist);
1536
+ }
1537
+
1538
+ /**
1539
+ * @param string $keyword
1540
+ * @param string $value
1541
+ * @return mixed
1542
+ */
1543
+ protected function setPDFLibParameter($keyword, $value)
1544
+ {
1545
+ if ($this->getPDFLibMajorVersion() >= 9) {
1546
+ return $this->_pdf->set_option($keyword . "=" . $value);
1547
+ }
1548
+
1549
+ return $this->_pdf->set_parameter($keyword, $value);
1550
+ }
1551
+
1552
+ /**
1553
+ * @param string $keyword
1554
+ * @param string $optlist
1555
+ * @return mixed
1556
+ */
1557
+ protected function getPDFLibValue($keyword, $optlist = "")
1558
+ {
1559
+ if ($this->getPDFLibMajorVersion() >= 9) {
1560
+ return $this->getPDFLibParameter($keyword, $optlist);
1561
+ }
1562
+
1563
+ return $this->_pdf->get_value($keyword);
1564
+ }
1565
+
1566
+ /**
1567
+ * @param string $keyword
1568
+ * @param string $value
1569
+ * @return mixed
1570
+ */
1571
+ protected function setPDFLibValue($keyword, $value)
1572
+ {
1573
+ if ($this->getPDFLibMajorVersion() >= 9) {
1574
+ return $this->setPDFLibParameter($keyword, $value);
1575
+ }
1576
+
1577
+ return $this->_pdf->set_value($keyword, $value);
1578
+ }
1579
+
1580
+ /**
1581
+ * @return int
1582
+ */
1583
+ private function getPDFLibMajorVersion()
1584
+ {
1585
+ if (is_null(self::$MAJOR_VERSION)) {
1586
+ if (method_exists($this->_pdf, "get_option")) {
1587
+ self::$MAJOR_VERSION = abs(intval($this->_pdf->get_option("major", "")));
1588
+ } else {
1589
+ self::$MAJOR_VERSION = abs(intval($this->_pdf->get_value("major", "")));
1590
+ }
1591
+ }
1592
+
1593
+ return self::$MAJOR_VERSION;
1594
+ }
1595
  }
1596
 
1597
  // Workaround for idiotic limitation on statics...
vendor/dompdf/dompdf/src/CanvasFactory.php CHANGED
@@ -46,7 +46,7 @@ class CanvasFactory
46
  }
47
 
48
  else {
49
- if ($backend === "gd") {
50
  $class = "Dompdf\\Adapter\\GD";
51
  } else {
52
  $class = "Dompdf\\Adapter\\CPDF";
46
  }
47
 
48
  else {
49
+ if ($backend === "gd" && extension_loaded('gd')) {
50
  $class = "Dompdf\\Adapter\\GD";
51
  } else {
52
  $class = "Dompdf\\Adapter\\CPDF";
vendor/dompdf/dompdf/src/Css/Style.php CHANGED
@@ -776,7 +776,7 @@ class Style
776
  * For easier finding all assignments, attempted to allowing only explicite assignment:
777
  * Very many uses, e.g. AbstractFrameReflower.php -> for now leave as it is
778
  * function __set($prop, $val) {
779
- * throw new Exception("Implicite replacement of assignment by __set. Not good.");
780
  * }
781
  * function props_set($prop, $val) { ... }
782
  *
@@ -1590,7 +1590,7 @@ class Style
1590
  Only for combined attributes extra treatment needed. See below.
1591
 
1592
  div { border: 1px red; }
1593
- div { border: solid; } // Not combined! Only one occurence of same style per context
1594
  //
1595
  div { border: 1px red; }
1596
  div a { border: solid; } // Adding to border style ok by inheritance
@@ -1608,13 +1608,13 @@ class Style
1608
  At individual property like border-top-width need to check whether overriding value is also !important.
1609
  Also store the !important condition for later overrides.
1610
  Since not known who is initiating the override, need to get passed !important as parameter.
1611
- !important Paramter taken as in the original style in the css file.
1612
  When property border !important given, do not mark subsets like border_style as important. Only
1613
  individual properties.
1614
 
1615
  Note:
1616
  Setting individual property directly from css with e.g. set_border_top_style() is not needed, because
1617
- missing set funcions handled by a generic handler __set(), including the !important.
1618
  Setting individual property of as sub-property is handled below.
1619
 
1620
  Implementation see at _set_style_side_type()
@@ -1969,7 +1969,7 @@ class Style
1969
  *
1970
  * Other than with border and list, existing partial attributes should
1971
  * reset when starting here, even when not mentioned.
1972
- * If individual attribute is !important and explicite or implicite replacement is not,
1973
  * keep individual attribute
1974
  *
1975
  * require whitespace as delimiters for single value attributes
@@ -1978,7 +1978,7 @@ class Style
1978
  * font-style, font-variant, font-weight, font-size, line-height, font-family
1979
  *
1980
  * missing font-size and font-family might be not allowed, but accept it here and
1981
- * use default (medium size, enpty font name)
1982
  *
1983
  * @link http://www.w3.org/TR/CSS21/generate.html#propdef-list-style
1984
  * @param $val
@@ -2172,7 +2172,7 @@ class Style
2172
 
2173
  // FIXME: handle partial values
2174
 
2175
- //For consistency of individal and combined properties, and with ie8 and firefox3
2176
  //reset all attributes, even if only partially given
2177
  $this->_set_style_side_type('border', $side, '_style', self::$_defaults['border_' . $side . '_style'], $important);
2178
  $this->_set_style_side_type('border', $side, '_width', self::$_defaults['border_' . $side . '_width'], $important);
@@ -2544,7 +2544,7 @@ class Style
2544
 
2545
  //On setting or merging or inheriting list_style_image as well as list_style_type,
2546
  //and url exists, then url has precedence, otherwise fall back to list_style_type
2547
- //Firefox is wrong here (list_style_image gets overwritten on explicite list_style_type)
2548
  //Internet Explorer 7/8 and dompdf is right.
2549
 
2550
  if (mb_substr($value, 0, 3) === "url") {
776
  * For easier finding all assignments, attempted to allowing only explicite assignment:
777
  * Very many uses, e.g. AbstractFrameReflower.php -> for now leave as it is
778
  * function __set($prop, $val) {
779
+ * throw new Exception("Implicit replacement of assignment by __set. Not good.");
780
  * }
781
  * function props_set($prop, $val) { ... }
782
  *
1590
  Only for combined attributes extra treatment needed. See below.
1591
 
1592
  div { border: 1px red; }
1593
+ div { border: solid; } // Not combined! Only one occurrence of same style per context
1594
  //
1595
  div { border: 1px red; }
1596
  div a { border: solid; } // Adding to border style ok by inheritance
1608
  At individual property like border-top-width need to check whether overriding value is also !important.
1609
  Also store the !important condition for later overrides.
1610
  Since not known who is initiating the override, need to get passed !important as parameter.
1611
+ !important Parameter taken as in the original style in the css file.
1612
  When property border !important given, do not mark subsets like border_style as important. Only
1613
  individual properties.
1614
 
1615
  Note:
1616
  Setting individual property directly from css with e.g. set_border_top_style() is not needed, because
1617
+ missing set functions handled by a generic handler __set(), including the !important.
1618
  Setting individual property of as sub-property is handled below.
1619
 
1620
  Implementation see at _set_style_side_type()
1969
  *
1970
  * Other than with border and list, existing partial attributes should
1971
  * reset when starting here, even when not mentioned.
1972
+ * If individual attribute is !important and explicit or implicit replacement is not,
1973
  * keep individual attribute
1974
  *
1975
  * require whitespace as delimiters for single value attributes
1978
  * font-style, font-variant, font-weight, font-size, line-height, font-family
1979
  *
1980
  * missing font-size and font-family might be not allowed, but accept it here and
1981
+ * use default (medium size, empty font name)
1982
  *
1983
  * @link http://www.w3.org/TR/CSS21/generate.html#propdef-list-style
1984
  * @param $val
2172
 
2173
  // FIXME: handle partial values
2174
 
2175
+ //For consistency of individual and combined properties, and with ie8 and firefox3
2176
  //reset all attributes, even if only partially given
2177
  $this->_set_style_side_type('border', $side, '_style', self::$_defaults['border_' . $side . '_style'], $important);
2178
  $this->_set_style_side_type('border', $side, '_width', self::$_defaults['border_' . $side . '_width'], $important);
2544
 
2545
  //On setting or merging or inheriting list_style_image as well as list_style_type,
2546
  //and url exists, then url has precedence, otherwise fall back to list_style_type
2547
+ //Firefox is wrong here (list_style_image gets overwritten on explicit list_style_type)
2548
  //Internet Explorer 7/8 and dompdf is right.
2549
 
2550
  if (mb_substr($value, 0, 3) === "url") {
vendor/dompdf/dompdf/src/Css/Stylesheet.php CHANGED
@@ -172,8 +172,12 @@ class Stylesheet
172
  $this->setFontMetrics($dompdf->getFontMetrics());
173
  $this->_styles = array();
174
  $this->_loaded_files = array();
175
- list($this->_protocol, $this->_base_host, $this->_base_path) = Helpers::explode_url($_SERVER["SCRIPT_FILENAME"]);
176
- $this->_page_styles = array("base" => null);
 
 
 
 
177
  }
178
 
179
  /**
@@ -281,7 +285,7 @@ class Stylesheet
281
  }
282
 
283
  /**
284
- * lookup a specifc Style collection
285
  *
286
  * lookup() returns the Style collection specified by $key, or null if the Style is
287
  * not found.
@@ -441,7 +445,7 @@ class Stylesheet
441
  * @param bool $first_pass
442
  *
443
  * @throws Exception
444
- * @return string
445
  */
446
  private function _css_selector_to_xpath($selector, $first_pass = false)
447
  {
@@ -566,7 +570,7 @@ class Stylesheet
566
  break;
567
 
568
  case "+":
569
- // All sibling elements that folow the current token
570
  if (mb_substr($query, -1, 1) !== "/") {
571
  $query .= "/";
572
  }
@@ -1261,7 +1265,7 @@ class Stylesheet
1261
  throw new Exception("Error parsing css file: preg_match_all() failed.");
1262
  }
1263
 
1264
- // After matching, the array indicies are set as follows:
1265
  //
1266
  // [0] => complete text of match
1267
  // [1] => contains '@import ...;' or '@media {' if applicable
@@ -1357,7 +1361,7 @@ class Stylesheet
1357
  $key = $page_selector;
1358
 
1359
  default:
1360
- continue;
1361
  }
1362
 
1363
  // Store the style for later...
@@ -1556,7 +1560,7 @@ class Stylesheet
1556
 
1557
  foreach ($properties as $prop) {
1558
  // If the $prop contains an url, the regex may be wrong
1559
- // @todo: fix the regex so that it works everytime
1560
  /*if (strpos($prop, "url(") === false) {
1561
  if (preg_match("/([a-z-]+)\s*:\s*[^:]+$/i", $prop, $m))
1562
  $prop = $m[0];
@@ -1726,4 +1730,4 @@ class Stylesheet
1726
 
1727
  return $str;
1728
  }
1729
- }
172
  $this->setFontMetrics($dompdf->getFontMetrics());
173
  $this->_styles = array();
174
  $this->_loaded_files = array();
175
+ $script = __FILE__;
176
+ if(isset($_SERVER["SCRIPT_FILENAME"])){
177
+ $script = $_SERVER["SCRIPT_FILENAME"];
178
+ }
179
+ list($this->_protocol, $this->_base_host, $this->_base_path) = Helpers::explode_url($script);
180
+ $this->_page_styles = array("base" => new Style($this));
181
  }
182
 
183
  /**
285
  }
286
 
287
  /**
288
+ * lookup a specific Style collection
289
  *
290
  * lookup() returns the Style collection specified by $key, or null if the Style is
291
  * not found.
445
  * @param bool $first_pass
446
  *
447
  * @throws Exception
448
+ * @return array
449
  */
450
  private function _css_selector_to_xpath($selector, $first_pass = false)
451
  {
570
  break;
571
 
572
  case "+":
573
+ // All sibling elements that follow the current token
574
  if (mb_substr($query, -1, 1) !== "/") {
575
  $query .= "/";
576
  }
1265
  throw new Exception("Error parsing css file: preg_match_all() failed.");
1266
  }
1267
 
1268
+ // After matching, the array indices are set as follows:
1269
  //
1270
  // [0] => complete text of match
1271
  // [1] => contains '@import ...;' or '@media {' if applicable
1361
  $key = $page_selector;
1362
 
1363
  default:
1364
+ break 2;
1365
  }
1366
 
1367
  // Store the style for later...
1560
 
1561
  foreach ($properties as $prop) {
1562
  // If the $prop contains an url, the regex may be wrong
1563
+ // @todo: fix the regex so that it works every time
1564
  /*if (strpos($prop, "url(") === false) {
1565
  if (preg_match("/([a-z-]+)\s*:\s*[^:]+$/i", $prop, $m))
1566
  $prop = $m[0];
1730
 
1731
  return $str;
1732
  }
1733
+ }
vendor/dompdf/dompdf/src/Dompdf.php CHANGED
@@ -107,7 +107,7 @@ class Dompdf
107
  /**
108
  * Desired paper size ('letter', 'legal', 'A4', etc.)
109
  *
110
- * @var string
111
  */
112
  private $paperSize;
113
 
@@ -273,6 +273,11 @@ class Dompdf
273
  {
274
  mb_internal_encoding('UTF-8');
275
 
 
 
 
 
 
276
  if (isset($options) && $options instanceof Options) {
277
  $this->setOptions($options);
278
  } elseif (is_array($options)) {
@@ -368,7 +373,7 @@ class Dompdf
368
 
369
  $ext = strtolower(pathinfo($realfile, PATHINFO_EXTENSION));
370
  if (!in_array($ext, $this->allowedLocalFileExtensions)) {
371
- throw new Exception("Permission denied on $file.");
372
  }
373
 
374
  if (!$realfile) {
@@ -397,8 +402,8 @@ class Dompdf
397
  }
398
 
399
  /**
400
- * @param $str
401
- * @param null $encoding
402
  * @deprecated
403
  */
404
  public function load_html($str, $encoding = 'UTF-8')
@@ -607,7 +612,7 @@ class Dompdf
607
  if (!$accept) {
608
  //found at least one mediatype, but none of the accepted ones
609
  //Skip this css file.
610
- continue;
611
  }
612
  }
613
 
@@ -628,7 +633,7 @@ class Dompdf
628
  ($media = $tag->getAttribute("media")) &&
629
  !in_array($media, $acceptedmedia)
630
  ) {
631
- continue;
632
  }
633
 
634
  $css = "";
@@ -945,7 +950,7 @@ class Dompdf
945
  *
946
  * @param array $options options (see above)
947
  *
948
- * @return string
949
  */
950
  public function output($options = array())
951
  {
@@ -1030,7 +1035,7 @@ class Dompdf
1030
  /**
1031
  * Sets the paper size & orientation
1032
  *
1033
- * @param string $size 'letter', 'legal', 'A4', etc. {@link Dompdf\Adapter\CPDF::$PAPER_SIZES}
1034
  * @param string $orientation 'portrait' or 'landscape'
1035
  * @return $this
1036
  */
107
  /**
108
  * Desired paper size ('letter', 'legal', 'A4', etc.)
109
  *
110
+ * @var string|array
111
  */
112
  private $paperSize;
113
 
273
  {
274
  mb_internal_encoding('UTF-8');
275
 
276
+ if (version_compare(PHP_VERSION, '7.0.0') >= 0)
277
+ {
278
+ ini_set('pcre.jit', 0);
279
+ }
280
+
281
  if (isset($options) && $options instanceof Options) {
282
  $this->setOptions($options);
283
  } elseif (is_array($options)) {
373
 
374
  $ext = strtolower(pathinfo($realfile, PATHINFO_EXTENSION));
375
  if (!in_array($ext, $this->allowedLocalFileExtensions)) {
376
+ throw new Exception("Permission denied on $file. This file extension is forbidden");
377
  }
378
 
379
  if (!$realfile) {
402
  }
403
 
404
  /**
405
+ * @param string $str
406
+ * @param string $encoding
407
  * @deprecated
408
  */
409
  public function load_html($str, $encoding = 'UTF-8')
612
  if (!$accept) {
613
  //found at least one mediatype, but none of the accepted ones
614
  //Skip this css file.
615
+ break;
616
  }
617
  }
618
 
633
  ($media = $tag->getAttribute("media")) &&
634
  !in_array($media, $acceptedmedia)
635
  ) {
636
+ break;
637
  }
638
 
639
  $css = "";
950
  *
951
  * @param array $options options (see above)
952
  *
953
+ * @return string|null
954
  */
955
  public function output($options = array())
956
  {
1035
  /**
1036
  * Sets the paper size & orientation
1037
  *
1038
+ * @param string|array $size 'letter', 'legal', 'A4', etc. {@link Dompdf\Adapter\CPDF::$PAPER_SIZES}
1039
  * @param string $orientation 'portrait' or 'landscape'
1040
  * @return $this
1041
  */
vendor/dompdf/dompdf/src/FontMetrics.php CHANGED
@@ -125,7 +125,7 @@ class FontMetrics
125
  $fontDir = $this->getOptions()->getFontDir();
126
  $rootDir = $this->getOptions()->getRootDir();
127
 
128
- // FIXME: tempoarary define constants for cache files <= v0.6.2
129
  if (!defined("DOMPDF_DIR")) { define("DOMPDF_DIR", $rootDir); }
130
  if (!defined("DOMPDF_FONT_DIR")) { define("DOMPDF_FONT_DIR", $fontDir); }
131
 
@@ -186,7 +186,6 @@ class FontMetrics
186
  $fontDir = $this->getOptions()->getFontDir();
187
  $remoteHash = md5($remoteFile);
188
  $localFile = $fontDir . DIRECTORY_SEPARATOR . $remoteHash;
189
- $localTempFile = tempnam($this->options->get("tempDir"), "dompdf-font-");
190
 
191
  $cacheEntry = $localFile;
192
  $localFile .= ".".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH),PATHINFO_EXTENSION));
@@ -198,6 +197,8 @@ class FontMetrics
198
  if (false === $remoteFileContent) {
199
  return false;
200
  }
 
 
201
  file_put_contents($localTempFile, $remoteFileContent);
202
 
203
  $font = Font::load($localTempFile);
125
  $fontDir = $this->getOptions()->getFontDir();
126
  $rootDir = $this->getOptions()->getRootDir();
127
 
128
+ // FIXME: temporarily define constants for cache files <= v0.6.2
129
  if (!defined("DOMPDF_DIR")) { define("DOMPDF_DIR", $rootDir); }
130
  if (!defined("DOMPDF_FONT_DIR")) { define("DOMPDF_FONT_DIR", $fontDir); }
131
 
186
  $fontDir = $this->getOptions()->getFontDir();
187
  $remoteHash = md5($remoteFile);
188
  $localFile = $fontDir . DIRECTORY_SEPARATOR . $remoteHash;
 
189
 
190
  $cacheEntry = $localFile;
191
  $localFile .= ".".strtolower(pathinfo(parse_url($remoteFile, PHP_URL_PATH),PATHINFO_EXTENSION));
197
  if (false === $remoteFileContent) {
198
  return false;
199
  }
200
+
201
+ $localTempFile = @tempnam($this->options->get("tempDir"), "dompdf-font-");
202
  file_put_contents($localTempFile, $remoteFileContent);
203
 
204
  $font = Font::load($localTempFile);
vendor/dompdf/dompdf/src/Frame.php CHANGED
@@ -148,7 +148,7 @@ class Frame
148
  protected $_is_cache = array();
149
 
150
  /**
151
- * Tells wether the frame was already pushed to the next page
152
  *
153
  * @var bool
154
  */
@@ -160,7 +160,7 @@ class Frame
160
  public $_float_next_line = false;
161
 
162
  /**
163
- * Tells wether the frame was split
164
  *
165
  * @var bool
166
  */
148
  protected $_is_cache = array();
149
 
150
  /**
151
+ * Tells whether the frame was already pushed to the next page
152
  *
153
  * @var bool
154
  */
160
  public $_float_next_line = false;
161
 
162
  /**
163
+ * Tells whether the frame was split
164
  *
165
  * @var bool
166
  */
vendor/dompdf/dompdf/src/Frame/FrameTree.php CHANGED
@@ -22,7 +22,7 @@ use Dompdf\Frame;
22
  *
23
  * The FrameTree consists of {@link Frame} objects each tied to specific
24
  * DOMNode objects in a specific DomDocument. The FrameTree has the same
25
- * structure as the DomDocument, but adds additional capabalities for
26
  * styling and layout.
27
  *
28
  * @package dompdf
@@ -90,7 +90,7 @@ class FrameTree
90
  }
91
 
92
  /**
93
- * Returns the DOMDocument object representing the curent html document
94
  *
95
  * @return DOMDocument
96
  */
22
  *
23
  * The FrameTree consists of {@link Frame} objects each tied to specific
24
  * DOMNode objects in a specific DomDocument. The FrameTree has the same
25
+ * structure as the DomDocument, but adds additional capabilities for
26
  * styling and layout.
27
  *
28
  * @package dompdf
90
  }
91
 
92
  /**
93
+ * Returns the DOMDocument object representing the current html document
94
  *
95
  * @return DOMDocument
96
  */
vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php CHANGED
@@ -83,7 +83,7 @@ abstract class AbstractFrameDecorator extends Frame
83
  private $_positionned_parent;
84
 
85
  /**
86
- * Cache for the get_parent wehile loop results
87
  *
88
  * @var Frame
89
  */
@@ -438,6 +438,7 @@ abstract class AbstractFrameDecorator extends Frame
438
  }
439
 
440
  /**
 
441
  * @return AbstractFrameDecorator
442
  */
443
  function get_parent($use_cache = true)
83
  private $_positionned_parent;
84
 
85
  /**
86
+ * Cache for the get_parent while loop results
87
  *
88
  * @var Frame
89
  */
438
  }
439
 
440
  /**
441
+ * @param bool $use_cache
442
  * @return AbstractFrameDecorator
443
  */
444
  function get_parent($use_cache = true)
vendor/dompdf/dompdf/src/FrameDecorator/ListBullet.php CHANGED
@@ -48,7 +48,7 @@ class ListBullet extends AbstractFrameDecorator
48
  return 0;
49
  }
50
 
51
- return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING;
52
  }
53
 
54
  /**
@@ -64,7 +64,7 @@ class ListBullet extends AbstractFrameDecorator
64
  return 0;
65
  }
66
 
67
- return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING;
68
  }
69
 
70
  /**
48
  return 0;
49
  }
50
 
51
+ return $style->font_size * self::BULLET_SIZE + 2 * self::BULLET_PADDING;
52
  }
53
 
54
  /**
64
  return 0;
65
  }
66
 
67
+ return $style->font_size * self::BULLET_SIZE + 2 * self::BULLET_PADDING;
68
  }
69
 
70
  /**
vendor/dompdf/dompdf/src/FrameDecorator/Page.php CHANGED
@@ -169,7 +169,6 @@ class Page extends AbstractFrameDecorator
169
  */
170
  function check_forced_page_break(Frame $frame)
171
  {
172
-
173
  // Skip check if page is already split
174
  if ($this->_page_full) {
175
  return null;
@@ -195,9 +194,10 @@ class Page extends AbstractFrameDecorator
195
  // Prevent cascading splits
196
  $frame->split(null, true);
197
  // We have to grab the style again here because split() resets
198
- // $frame->style to the frame's orignal style.
199
  $frame->get_style()->page_break_before = "auto";
200
  $this->_page_full = true;
 
201
 
202
  return true;
203
  }
@@ -207,6 +207,7 @@ class Page extends AbstractFrameDecorator
207
  $frame->split(null, true);
208
  $prev->get_style()->page_break_after = "auto";
209
  $this->_page_full = true;
 
210
 
211
  return true;
212
  }
@@ -217,6 +218,7 @@ class Page extends AbstractFrameDecorator
217
  $frame->split(null, true);
218
  $prev_last_child->get_style()->page_break_after = "auto";
219
  $this->_page_full = true;
 
220
 
221
  return true;
222
  }
@@ -235,6 +237,10 @@ class Page extends AbstractFrameDecorator
235
  * break occurs here, the used values of the relevant
236
  * 'margin-top' and 'margin-bottom' properties are set to '0'.
237
  * 2. Between line boxes inside a block box.
 
 
 
 
238
  *
239
  * These breaks are subject to the following rules:
240
  *
@@ -284,7 +290,7 @@ class Page extends AbstractFrameDecorator
284
  if (in_array($display, $block_types)) {
285
 
286
  // Avoid breaks within table-cells
287
- if ($this->_in_table) {
288
  Helpers::dompdf_debug("page-break", "In table: " . $this->_in_table);
289
 
290
  return false;
@@ -330,10 +336,14 @@ class Page extends AbstractFrameDecorator
330
  return false;
331
  }
332
 
333
- // If the frame is the first block-level frame, use the value from
334
- // $frame's parent instead.
 
335
  if (!$prev && $parent) {
336
- return $this->_page_break_allowed($parent);
 
 
 
337
  }
338
 
339
  Helpers::dompdf_debug("page-break", "block: break allowed");
@@ -414,7 +424,7 @@ class Page extends AbstractFrameDecorator
414
  $p = $p->find_block_parent();
415
  }
416
 
417
- // Avoid breaking after the first row of a table
418
  if ($table && $table->get_first_child() === $frame || $table->get_first_child()->get_first_child() === $frame) {
419
  Helpers::dompdf_debug("page-break", "table: first-row");
420
 
@@ -459,27 +469,10 @@ class Page extends AbstractFrameDecorator
459
  */
460
  function check_page_break(Frame $frame)
461
  {
462
- //FIXME: should not need to do this since we're tracking table status in `$this->_in_table`
463
- $p = $frame;
464
- $in_table = false;
465
- while ($p) {
466
- if ($p->is_table()) { $in_table = true; break; }
467
- $p = $p->get_parent();
468
- }
469
- // Do not split if we have already or if the frame was already
470
- // pushed to the next page (prevents infinite loops)
471
- if ($in_table) {
472
- if ($this->_page_full && $frame->_already_pushed) {
473
- return false;
474
- }
475
- } elseif ($this->_page_full || $frame->_already_pushed) {
476
  return false;
477
  }
478
 
479
- //FIXME: work-around for infinite loop due to tables
480
- if ($in_table && $frame->_already_pushed) {
481
- return false;
482
- }
483
  $p = $frame;
484
  do {
485
  $display = $p->get_style()->display;
@@ -488,22 +481,12 @@ class Page extends AbstractFrameDecorator
488
  }
489
  } while ($p = $p->get_parent());
490
 
491
- // If the frame is absolute of fixed it shouldn't break
492
  $p = $frame;
493
  do {
494
  if ($p->is_absolute()) {
495
  return false;
496
  }
497
-
498
- // FIXME If the row is taller than the page and
499
- // if it the first of the page, we don't break
500
- $display = $p->get_style()->display;
501
- if ($display === "table-row"
502
- && !$p->get_prev_sibling()
503
- && $p->get_margin_height() > $this->get_margin_height()
504
- ) {
505
- return false;
506
- }
507
  } while ($p = $p->get_parent());
508
 
509
  $margin_height = $frame->get_margin_height();
@@ -515,11 +498,10 @@ class Page extends AbstractFrameDecorator
515
  // parents of $frame must fit on the page as well:
516
  $p = $frame->get_parent();
517
  while ($p) {
518
- $max_y += $p->get_style()->computed_bottom_spacing();
519
  $p = $p->get_parent();
520
  }
521
 
522
-
523
  // Check if $frame flows off the page
524
  if ($max_y <= $this->_bottom_page_margin) {
525
  // no: do nothing
@@ -532,6 +514,7 @@ class Page extends AbstractFrameDecorator
532
  // yes: determine page break location
533
  $iter = $frame;
534
  $flg = false;
 
535
 
536
  $in_table = $this->_in_table;
537
 
@@ -544,11 +527,14 @@ class Page extends AbstractFrameDecorator
544
  break;
545
  }
546
 
547
- if ($this->_page_break_allowed($iter)) {
 
 
548
  Helpers::dompdf_debug("page-break", "break allowed, splitting.");
549
  $iter->split(null, true);
550
  $this->_page_full = true;
551
  $this->_in_table = $in_table;
 
552
  $frame->_already_pushed = true;
553
 
554
  return true;
@@ -562,9 +548,15 @@ class Page extends AbstractFrameDecorator
562
  }
563
 
564
  $iter = $next;
 
565
  continue;
566
  }
567
 
 
 
 
 
 
568
  if ($next = $iter->get_prev_sibling()) {
569
  Helpers::dompdf_debug("page-break", "following prev sibling.");
570
 
@@ -608,6 +600,7 @@ class Page extends AbstractFrameDecorator
608
 
609
  if ($iter) {
610
  $iter->split(null, true);
 
611
  } else {
612
  return false;
613
  }
169
  */
170
  function check_forced_page_break(Frame $frame)
171
  {
 
172
  // Skip check if page is already split
173
  if ($this->_page_full) {
174
  return null;
194
  // Prevent cascading splits
195
  $frame->split(null, true);
196
  // We have to grab the style again here because split() resets
197
+ // $frame->style to the frame's original style.
198
  $frame->get_style()->page_break_before = "auto";
199
  $this->_page_full = true;
200
+ $frame->_already_pushed = true;
201
 
202
  return true;
203
  }
207
  $frame->split(null, true);
208
  $prev->get_style()->page_break_after = "auto";
209
  $this->_page_full = true;
210
+ $frame->_already_pushed = true;
211
 
212
  return true;
213
  }
218
  $frame->split(null, true);
219
  $prev_last_child->get_style()->page_break_after = "auto";
220
  $this->_page_full = true;
221
+ $frame->_already_pushed = true;
222
 
223
  return true;
224
  }
237
  * break occurs here, the used values of the relevant
238
  * 'margin-top' and 'margin-bottom' properties are set to '0'.
239
  * 2. Between line boxes inside a block box.
240
+ * 3. Between the content edge of a block container box and the
241
+ * outer edges of its child content (margin edges of block-level
242
+ * children or line box edges for inline-level children) if there
243
+ * is a (non-zero) gap between them.
244
  *
245
  * These breaks are subject to the following rules:
246
  *
290
  if (in_array($display, $block_types)) {
291
 
292
  // Avoid breaks within table-cells
293
+ if ($this->_in_table > ($display === "table" ? 1 : 0)) {
294
  Helpers::dompdf_debug("page-break", "In table: " . $this->_in_table);
295
 
296
  return false;
336
  return false;
337
  }
338
 
339
+ // If the frame is the first block-level frame, only allow a page
340
+ // break if there is a (non-zero) gap between the frame and its
341
+ // parent
342
  if (!$prev && $parent) {
343
+ Helpers::dompdf_debug("page-break", "First block level frame, checking gap");
344
+
345
+ return $frame->get_style()->length_in_pt($frame->get_style()->margin_top) != 0
346
+ || $parent->get_style()->length_in_pt($parent->get_style()->padding_top) != 0;
347
  }
348
 
349
  Helpers::dompdf_debug("page-break", "block: break allowed");
424
  $p = $p->find_block_parent();
425
  }
426
 
427
+ // Avoid breaking before the first row of a table
428
  if ($table && $table->get_first_child() === $frame || $table->get_first_child()->get_first_child() === $frame) {
429
  Helpers::dompdf_debug("page-break", "table: first-row");
430
 
469
  */
470
  function check_page_break(Frame $frame)
471
  {
472
+ if ($this->_page_full || $frame->_already_pushed) {
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  return false;
474
  }
475
 
 
 
 
 
476
  $p = $frame;
477
  do {
478
  $display = $p->get_style()->display;
481
  }
482
  } while ($p = $p->get_parent());
483
 
484
+ // If the frame is absolute or fixed it shouldn't break
485
  $p = $frame;
486
  do {
487
  if ($p->is_absolute()) {
488
  return false;
489
  }
 
 
 
 
 
 
 
 
 
 
490
  } while ($p = $p->get_parent());
491
 
492
  $margin_height = $frame->get_margin_height();
498
  // parents of $frame must fit on the page as well:
499
  $p = $frame->get_parent();
500
  while ($p) {
501
+ $max_y += (float) $p->get_style()->computed_bottom_spacing();
502
  $p = $p->get_parent();
503
  }
504
 
 
505
  // Check if $frame flows off the page
506
  if ($max_y <= $this->_bottom_page_margin) {
507
  // no: do nothing
514
  // yes: determine page break location
515
  $iter = $frame;
516
  $flg = false;
517
+ $pushed_flg = false;
518
 
519
  $in_table = $this->_in_table;
520
 
527
  break;
528
  }
529
 
530
+ if ($iter->_already_pushed) {
531
+ $pushed_flg = true;
532
+ } elseif ($this->_page_break_allowed($iter)) {
533
  Helpers::dompdf_debug("page-break", "break allowed, splitting.");
534
  $iter->split(null, true);
535
  $this->_page_full = true;
536
  $this->_in_table = $in_table;
537
+ $iter->_already_pushed = true;
538
  $frame->_already_pushed = true;
539
 
540
  return true;
548
  }
549
 
550
  $iter = $next;
551
+ $pushed_flg = false;
552
  continue;
553
  }
554
 
555
+ if ($pushed_flg) {
556
+ // The frame was already pushed, avoid breaking on a previous page
557
+ break;
558
+ }
559
+
560
  if ($next = $iter->get_prev_sibling()) {
561
  Helpers::dompdf_debug("page-break", "following prev sibling.");
562
 
600
 
601
  if ($iter) {
602
  $iter->split(null, true);
603
+ $iter->_already_pushed = true;
604
  } else {
605
  return false;
606
  }
vendor/dompdf/dompdf/src/FrameReflower/AbstractFrameReflower.php CHANGED
@@ -116,7 +116,7 @@ abstract class AbstractFrameReflower
116
  }
117
 
118
  // Collapse our first child's margin, if there is no border or padding
119
- if ($style->get_border_top_width() == 0 && $style->length_in_pt($style->padding_top) == 0) {
120
  $f = $this->_frame->get_first_child();
121
  if ( $f && !$f->is_block() && !$f->is_table() ) {
122
  while ( $f = $f->get_next_sibling() ) {
@@ -143,7 +143,7 @@ abstract class AbstractFrameReflower
143
  }
144
 
145
  // Collapse our last child's margin, if there is no border or padding
146
- if ($style->get_border_bottom_width() == 0 && $style->length_in_pt($style->padding_bottom) == 0) {
147
  $l = $this->_frame->get_last_child();
148
  if ( $l && !$l->is_block() && !$l->is_table() ) {
149
  while ( $l = $l->get_prev_sibling() ) {
@@ -398,7 +398,7 @@ abstract class AbstractFrameReflower
398
  continue;
399
  }
400
 
401
- preg_match('/(counters?)(^\()*?\(\s*([^\s,]+)\s*(,\s*["\']?([^"\'\)]+)["\']?\s*(,\s*([^\s)]+)\s*)?)?\)/i', $match[1], $args);
402
  $counter_id = $args[3];
403
  if (strtolower($args[1]) == 'counter') {
404
  // counter(name [,style])
116
  }
117
 
118
  // Collapse our first child's margin, if there is no border or padding
119
+ if ($style->border_top_width == 0 && $style->length_in_pt($style->padding_top) == 0) {
120
  $f = $this->_frame->get_first_child();
121
  if ( $f && !$f->is_block() && !$f->is_table() ) {
122
  while ( $f = $f->get_next_sibling() ) {
143
  }
144
 
145
  // Collapse our last child's margin, if there is no border or padding
146
+ if ($style->border_bottom_width == 0 && $style->length_in_pt($style->padding_bottom) == 0) {
147
  $l = $this->_frame->get_last_child();
148
  if ( $l && !$l->is_block() && !$l->is_table() ) {
149
  while ( $l = $l->get_prev_sibling() ) {
398
  continue;
399
  }
400
 
401
+ preg_match('/(counters?)(^\()*?\(\s*([^\s,]+)\s*(,\s*["\']?([^"\'\)]*)["\']?\s*(,\s*([^\s)]+)\s*)?)?\)/i', $match[1], $args);
402
  $counter_id = $args[3];
403
  if (strtolower($args[1]) == 'counter') {
404
  // counter(name [,style])
vendor/dompdf/dompdf/src/FrameReflower/Block.php CHANGED
@@ -604,7 +604,7 @@ class Block extends AbstractFrameReflower
604
  break;
605
 
606
  case "text-top": // FIXME: this should be the height of the frame minus the height of the text
607
- $y_offset = $height - (float)$style->length_in_pt($style->get_line_height(), $style->font_size);
608
  break;
609
 
610
  case "top":
604
  break;
605
 
606
  case "text-top": // FIXME: this should be the height of the frame minus the height of the text
607
+ $y_offset = $height - (float)$style->length_in_pt($style->line_height, $style->font_size);
608
  break;
609
 
610
  case "top":
vendor/dompdf/dompdf/src/FrameReflower/Table.php CHANGED
@@ -447,7 +447,7 @@ class Table extends AbstractFrameReflower
447
  $style->margin_right = sprintf("%Fpt", $right);;
448
  } else {
449
  if ($left === "auto") {
450
- $left = (float)$style->length_in_pt($cb["w"] - $right - $width, $cb["w"]);
451
  }
452
  if ($right === "auto") {
453
  $left = (float)$style->length_in_pt($left, $cb["w"]);
447
  $style->margin_right = sprintf("%Fpt", $right);;
448
  } else {
449
  if ($left === "auto") {
450
+ $left = (float)$style->length_in_pt($cb["w"], $cb["w"]) - (float)$style->length_in_pt($right, $cb["w"]) - (float)$style->length_in_pt($width, $cb["w"]);
451
  }
452
  if ($right === "auto") {
453
  $left = (float)$style->length_in_pt($left, $cb["w"]);
vendor/dompdf/dompdf/src/FrameReflower/Text.php CHANGED
@@ -467,9 +467,18 @@ class Text extends AbstractFrameReflower
467
  $style->border_right_width,
468
  $style->margin_right), $line_width);
469
  $min += $delta;
 
470
  $max += $delta;
471
 
472
- return $this->_min_max_cache = array($min, $max, "min" => $min, "max" => $max);
 
 
 
 
 
 
 
 
473
  }
474
 
475
  /**
467
  $style->border_right_width,
468
  $style->margin_right), $line_width);
469
  $min += $delta;
470
+ $min_word = $min;
471
  $max += $delta;
472
 
473
+ if ($style->word_wrap === 'break-word') {
474
+ // If it is allowed to break words, the min width is the widest character.
475
+ // But for performance reasons, we only check the first character.
476
+ $char = mb_substr($str, 0, 1);
477
+ $min_char = $this->getFontMetrics()->getTextWidth($char, $font, $size, $word_spacing, $char_spacing);
478
+ $min = $delta + $min_char;
479
+ }
480
+
481
+ return $this->_min_max_cache = array($min, $max, $min_word, "min" => $min, "max" => $max, 'min_word' => $min_word);
482
  }
483
 
484
  /**
vendor/dompdf/dompdf/src/Helpers.php CHANGED
@@ -63,7 +63,7 @@ class Helpers
63
  }
64
 
65
  // Is the url already fully qualified, a Data URI, or a reference to a named anchor?
66
- if (mb_strpos($url, "://") !== false || mb_substr($url, 0, 1) === "#" || mb_strpos($url, "data:") === 0 || mb_strpos($url, "mailto:") === 0) {
67
  return $url;
68
  }
69
 
@@ -583,6 +583,7 @@ class Helpers
583
  * getimagesize doesn't give a good size for 32bit BMP image v5
584
  *
585
  * @param string $filename
 
586
  * @return array The same format as getimagesize($filename)
587
  */
588
  public static function dompdf_getimagesize($filename, $context = null)
63
  }
64
 
65
  // Is the url already fully qualified, a Data URI, or a reference to a named anchor?
66
+ if (mb_strpos($url, "://") !== false || mb_substr($url, 0, 1) === "#" || mb_strpos($url, "data:") === 0 || mb_strpos($url, "mailto:") === 0 || mb_strpos($url, "tel:") === 0) {
67
  return $url;
68
  }
69
 
583
  * getimagesize doesn't give a good size for 32bit BMP image v5
584
  *
585
  * @param string $filename
586
+ * @param resource $context
587
  * @return array The same format as getimagesize($filename)
588
  */
589
  public static function dompdf_getimagesize($filename, $context = null)
vendor/dompdf/dompdf/src/Image/Cache.php CHANGED
@@ -34,7 +34,7 @@ class Cache
34
  *
35
  * @var string
36
  */
37
- public static $broken_image = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAA3NCSVQICAjb4U/gAAAAHlBMVEWZmZn////g4OCkpKS1tbXv7++9vb2tra3m5ub5+fkFnN6oAAAACXBIWXMAAAsSAAALEgHS3X78AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M0BrLToAAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNC8xMi8xMRPnI58AAAGZSURBVEiJhZbPasMwDMbTw2DHKhDQcbDQPsEge4BAjg0Mxh5gkBcY7Niwkpx32PvOjv9JspX60It/+fxJsqxW1b11gN11rA7N3v6vAd5nfR9fDYCTDiyzAeA6qgKd9QDNoAtsAKyKCxzAAfhdBuyHGwC3oovNvQOaxxJwnSNg3ZQFAlBy4ax7AG6ZBLrgA5Cn038SAPgREiaJHJASwXYEhEQQIACyikTTCWCBJJoANBfpPAKQdBLHFMBYkctcBKIE9lAGggt6gRjgA2GV44CL7m1WgS08fAAdsPHxyyMAIyHujgRwEldHArCKy5cBz90+gNOyf8TTyKOUQN2LPEmgnWWPcKD+sr+rnuqTK1avAcHfRSv3afTgVAbqmCPiggLtGM8aSkBNOidVjADrmIDYebT1PoGsWJEE8Oc0b96aZoe4iMBZPiADB6RAzEUA2vwRmyiAL3Lfv6MBSEmUEg7ALt/3LhxwLgj4QNw4UCbKEsaBNpPsyRbgVRASFig78BIGyJNIJQyQTwIi0RvgT98H+Mi6W67j3X8H/427u5bfpQGVAAAAAElFTkSuQmCC";
38
 
39
  public static $error_message = "Image not found or type unknown";
40
 
@@ -88,7 +88,7 @@ class Cache
88
  } // From remote
89
  else {
90
  $tmp_dir = $dompdf->getOptions()->getTempDir();
91
- $resolved_url = tempnam($tmp_dir, "ca_dompdf_img_");
92
  $image = "";
93
 
94
  if ($data_uri) {
@@ -181,6 +181,6 @@ class Cache
181
  }
182
  }
183
 
184
- if (file_exists(realpath(__DIR__ . "/../../lib/res/broken_image.png"))) {
185
- Cache::$broken_image = realpath(__DIR__ . "/../../lib/res/broken_image.png");
186
  }
34
  *
35
  * @var string
36
  */
37
+ public static $broken_image = "data:image/svg+xml;charset=utf8,%3C?xml version='1.0'?%3E%3Csvg width='64' height='64' xmlns='http://www.w3.org/2000/svg'%3E%3Cg%3E%3Crect stroke='%23666666' id='svg_1' height='60.499994' width='60.166667' y='1.666669' x='1.999998' stroke-width='1.5' fill='none'/%3E%3Cline stroke-linecap='null' stroke-linejoin='null' id='svg_3' y2='59.333253' x2='59.749916' y1='4.333415' x1='4.250079' stroke-width='1.5' stroke='%23999999' fill='none'/%3E%3Cline stroke-linecap='null' stroke-linejoin='null' id='svg_4' y2='59.999665' x2='4.062838' y1='3.750342' x1='60.062164' stroke-width='1.5' stroke='%23999999' fill='none'/%3E%3C/g%3E%3C/svg%3E";
38
 
39
  public static $error_message = "Image not found or type unknown";
40
 
88
  } // From remote
89
  else {
90
  $tmp_dir = $dompdf->getOptions()->getTempDir();
91
+ $resolved_url = @tempnam($tmp_dir, "ca_dompdf_img_");
92
  $image = "";
93
 
94
  if ($data_uri) {
181
  }
182
  }
183
 
184
+ if (file_exists(realpath(__DIR__ . "/../../lib/res/broken_image.svg"))) {
185
+ Cache::$broken_image = realpath(__DIR__ . "/../../lib/res/broken_image.svg");
186
  }
vendor/dompdf/dompdf/src/Options.php CHANGED
@@ -13,7 +13,7 @@ class Options
13
  /**
14
  * The location of a temporary directory.
15
  *
16
- * The directory specified must be writeable by the webserver process.
17
  * The temporary directory is required to download remote images and when
18
  * using the PFDLib back end.
19
  *
@@ -112,7 +112,7 @@ class Options
112
  * Image DPI setting
113
  *
114
  * This setting determines the default DPI setting for images and fonts. The
115
- * DPI may be overridden for inline images by explictly setting the
116
  * image's width & height style attributes (i.e. if the image's native
117
  * width is 600 pixels and you specify the image's width as 72 points,
118
  * the image will have a DPI of 600 in the rendered PDF. The DPI of
@@ -267,7 +267,7 @@ class Options
267
  *
268
  * @link http://www.pdflib.com
269
  *
270
- * If pdflib present in web server and auto or selected explicitely above,
271
  * a real license code must exist!
272
  *
273
  * @var string
13
  /**
14
  * The location of a temporary directory.
15
  *
16
+ * The directory specified must be writable by the webserver process.
17
  * The temporary directory is required to download remote images and when
18
  * using the PFDLib back end.
19
  *
112
  * Image DPI setting
113
  *
114
  * This setting determines the default DPI setting for images and fonts. The
115
+ * DPI may be overridden for inline images by explicitly setting the
116
  * image's width & height style attributes (i.e. if the image's native
117
  * width is 600 pixels and you specify the image's width as 72 points,
118
  * the image will have a DPI of 600 in the rendered PDF. The DPI of
267
  *
268
  * @link http://www.pdflib.com
269
  *
270
+ * If pdflib present in web server and auto or selected explicitly above,
271
  * a real license code must exist!
272
  *
273
  * @var string
vendor/dompdf/dompdf/src/Positioner/ListBullet.php CHANGED
@@ -41,7 +41,7 @@ class ListBullet extends AbstractPositioner
41
  $n = $frame->get_next_sibling();
42
  if ($n) {
43
  $style = $n->get_style();
44
- $line_height = $style->length_in_pt($style->line_height, $style->get_font_size());
45
  $offset = (float)$style->length_in_pt($line_height, $n->get_containing_block("h")) - $frame->get_height();
46
  $y += $offset / 2;
47
  }
@@ -66,7 +66,7 @@ class ListBullet extends AbstractPositioner
66
  // For now give up on the above. Use Guesswork with font y-pos in the middle of the line spacing
67
 
68
  /*$style = $p->get_style();
69
- $font_size = $style->get_font_size();
70
  $line_height = (float)$style->length_in_pt($style->line_height, $font_size);
71
  $y += ($line_height - $font_size) / 2; */
72
 
41
  $n = $frame->get_next_sibling();
42
  if ($n) {
43
  $style = $n->get_style();
44
+ $line_height = $style->length_in_pt($style->line_height, $style->font_size);
45
  $offset = (float)$style->length_in_pt($line_height, $n->get_containing_block("h")) - $frame->get_height();
46
  $y += $offset / 2;
47
  }
66
  // For now give up on the above. Use Guesswork with font y-pos in the middle of the line spacing
67
 
68
  /*$style = $p->get_style();
69
+ $font_size = $style->font_size;
70
  $line_height = (float)$style->length_in_pt($style->line_height, $font_size);
71
  $y += ($line_height - $font_size) / 2; */
72
 
vendor/dompdf/dompdf/src/Renderer/AbstractRenderer.php CHANGED
@@ -401,7 +401,7 @@ abstract class AbstractRenderer
401
  $this->_canvas->get_cpdf()->addImagePng($filedummy, $x, $this->_canvas->get_height() - $y - $height, $width, $height, $bg);
402
  } else {
403
  $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
404
- $tmp_name = tempnam($tmp_dir, "bg_dompdf_img_");
405
  @unlink($tmp_name);
406
  $tmp_file = "$tmp_name.png";
407
 
401
  $this->_canvas->get_cpdf()->addImagePng($filedummy, $x, $this->_canvas->get_height() - $y - $height, $width, $height, $bg);
402
  } else {
403
  $tmp_dir = $this->_dompdf->getOptions()->getTempDir();
404
+ $tmp_name = @tempnam($tmp_dir, "bg_dompdf_img_");
405
  @unlink($tmp_name);
406
  $tmp_file = "$tmp_name.png";
407
 
vendor/dompdf/dompdf/src/Renderer/ListBullet.php CHANGED
@@ -134,7 +134,7 @@ class ListBullet extends AbstractRenderer
134
  function render(Frame $frame)
135
  {
136
  $style = $frame->get_style();
137
- $font_size = $style->get_font_size();
138
  $line_height = (float)$style->length_in_pt($style->line_height, $frame->get_containing_block("h"));
139
 
140
  $this->_set_opacity($frame->get_opacity($style->opacity));
134
  function render(Frame $frame)
135
  {
136
  $style = $frame->get_style();
137
+ $font_size = $style->font_size;
138
  $line_height = (float)$style->length_in_pt($style->line_height, $frame->get_containing_block("h"));
139
 
140
  $this->_set_opacity($frame->get_opacity($style->opacity));
vendor/dompdf/dompdf/src/Renderer/Text.php CHANGED
@@ -69,7 +69,8 @@ class Text extends AbstractRenderer
69
  $x += (float)$style->length_in_pt(array($ml, $pl, $bl), $cb["w"]);
70
 
71
  $font = $style->font_family;
72
- $size = $frame_font_size = $style->font_size;
 
73
  $word_spacing = $frame->get_text_spacing() + (float)$style->length_in_pt($style->word_spacing);
74
  $char_spacing = (float)$style->length_in_pt($style->letter_spacing);
75
  $width = $style->width;
@@ -113,7 +114,7 @@ class Text extends AbstractRenderer
113
  }
114
 
115
  $descent = $size * $underline_position;
116
- $base = $size;
117
 
118
  // Handle text decoration:
119
  // http://www.w3.org/TR/CSS21/text.html#propdef-text-decoration
@@ -137,7 +138,7 @@ class Text extends AbstractRenderer
137
 
138
  switch ($text_deco) {
139
  default:
140
- continue;
141
 
142
  case "underline":
143
  $deco_y += $base - $descent + $underline_offset + $line_thickness / 2;
@@ -159,7 +160,7 @@ class Text extends AbstractRenderer
159
  }
160
 
161
  if ($this->_dompdf->getOptions()->getDebugLayout() && $this->_dompdf->getOptions()->getDebugLayoutLines()) {
162
- $text_width = $this->_dompdf->getFontMetrics()->getTextWidth($text, $font, $frame_font_size);
163
  $this->_debug_layout(array($x, $y, $text_width + ($line->wc - 1) * $word_spacing, $frame_font_size), "orange", array(0.5, 0.5));
164
  }
165
  }
69
  $x += (float)$style->length_in_pt(array($ml, $pl, $bl), $cb["w"]);
70
 
71
  $font = $style->font_family;
72
+ $size = $style->font_size;
73
+ $frame_font_size = $frame->get_dompdf()->getFontMetrics()->getFontHeight($font, $size);
74
  $word_spacing = $frame->get_text_spacing() + (float)$style->length_in_pt($style->word_spacing);
75
  $char_spacing = (float)$style->length_in_pt($style->letter_spacing);
76
  $width = $style->width;
114
  }
115
 
116
  $descent = $size * $underline_position;
117
+ $base = $frame_font_size;
118
 
119
  // Handle text decoration:
120
  // http://www.w3.org/TR/CSS21/text.html#propdef-text-decoration
138
 
139
  switch ($text_deco) {
140
  default:
141
+ continue 2;
142
 
143
  case "underline":
144
  $deco_y += $base - $descent + $underline_offset + $line_thickness / 2;
160
  }
161
 
162
  if ($this->_dompdf->getOptions()->getDebugLayout() && $this->_dompdf->getOptions()->getDebugLayoutLines()) {
163
+ $text_width = $this->_dompdf->getFontMetrics()->getTextWidth($text, $font, $size);
164
  $this->_debug_layout(array($x, $y, $text_width + ($line->wc - 1) * $word_spacing, $frame_font_size), "orange", array(0.5, 0.5));
165
  }
166
  }
vendor/phenx/php-svg-lib/.travis.yml CHANGED
@@ -1,12 +1,10 @@
1
  language: php
2
 
3
  php:
4
- - 5.3
5
- - 5.4
6
- - 5.5
7
  - 5.6
8
  - 7.0
9
- - hhvm
 
10
 
11
  before_script:
12
  - composer self-update
@@ -16,6 +14,5 @@ script: phpunit
16
 
17
  matrix:
18
  allow_failures:
19
- - php: 7.0
20
- - php: hhvm
21
- fast_finish: true
1
  language: php
2
 
3
  php:
 
 
 
4
  - 5.6
5
  - 7.0
6
+ - 7.1
7
+ - 7.2
8
 
9
  before_script:
10
  - composer self-update
14
 
15
  matrix:
16
  allow_failures:
17
+ - php: 5.6
18
+ fast_finish: true
 
vendor/phenx/php-svg-lib/COPYING ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
vendor/phenx/php-svg-lib/COPYING.GPL ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <https://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
vendor/phenx/php-svg-lib/src/Svg/DefaultStyle.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg;
vendor/phenx/php-svg-lib/src/Svg/Document.php CHANGED
@@ -2,8 +2,8 @@
2
  /**
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
- * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg;
@@ -333,6 +333,9 @@ class Document extends AbstractTag
333
  case 'text':
334
  $tag = new Text($this, $name);
335
  break;
 
 
 
336
  }
337
 
338
  if ($tag) {
@@ -350,8 +353,6 @@ class Document extends AbstractTag
350
  $this->stack[] = $tag;
351
 
352
  $tag->handle($attributes);
353
- } else {
354
- echo "Unknown: '$name'\n";
355
  }
356
  }
357
 
@@ -400,4 +401,4 @@ class Document extends AbstractTag
400
  $tag->handleEnd();
401
  }
402
  }
403
- }
2
  /**
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
+ * @author Fabien Ménager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg;
333
  case 'text':
334
  $tag = new Text($this, $name);
335
  break;
336
+
337
+ case 'desc':
338
+ return;
339
  }
340
 
341
  if ($tag) {
353
  $this->stack[] = $tag;
354
 
355
  $tag->handle($attributes);
 
 
356
  }
357
  }
358
 
401
  $tag->handleEnd();
402
  }
403
  }
404
+ }
vendor/phenx/php-svg-lib/src/Svg/Gradient/Stop.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Gradient;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Gradient;
vendor/phenx/php-svg-lib/src/Svg/Style.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg;
vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Surface;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Surface;
vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceGmagick.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Surface;
@@ -202,7 +202,7 @@ class SurfaceGmagick implements SurfaceInterface
202
  $this->fill();
203
  }
204
 
205
- public function rect($x, $y, $w, $h)
206
  {
207
  if (self::DEBUG) echo __FUNCTION__ . "\n";
208
  $this->canvas->rect($x, $y, $w, $h);
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Surface;
202
  $this->fill();
203
  }
204
 
205
+ public function rect($x, $y, $w, $h, $rx = 0, $ry = 0)
206
  {
207
  if (self::DEBUG) echo __FUNCTION__ . "\n";
208
  $this->canvas->rect($x, $y, $w, $h);
vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceInterface.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Surface;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Surface;
vendor/phenx/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Surface;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Surface;
vendor/phenx/php-svg-lib/src/Svg/Tag/AbstractTag.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
@@ -21,7 +21,7 @@ abstract class AbstractTag
21
  /** @var Style */
22
  protected $style;
23
 
24
- protected $attributes;
25
 
26
  protected $hasShape = true;
27
 
@@ -180,4 +180,4 @@ abstract class AbstractTag
180
  }
181
  }
182
  }
183
- }
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
21
  /** @var Style */
22
  protected $style;
23
 
24
+ protected $attributes = array();
25
 
26
  protected $hasShape = true;
27
 
180
  }
181
  }
182
  }
183
+ }
vendor/phenx/php-svg-lib/src/Svg/Tag/Anchor.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Circle.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/ClipPath.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Group.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Line.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/LinearGradient.php CHANGED
@@ -3,13 +3,13 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
10
 
11
 
12
- use Svg\Gradient\Stop;
13
  use Svg\Style;
14
 
15
  class LinearGradient extends AbstractTag
@@ -19,7 +19,7 @@ class LinearGradient extends AbstractTag
19
  protected $x2;
20
  protected $y2;
21
 
22
- /** @var Stop[] */
23
  protected $stops = array();
24
 
25
  public function start($attributes)
@@ -47,7 +47,7 @@ class LinearGradient extends AbstractTag
47
  continue;
48
  }
49
 
50
- $_stop = new Stop();
51
  $_attributes = $_child->attributes;
52
 
53
  // Style
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
10
 
11
 
12
+ use Svg\Gradient;
13
  use Svg\Style;
14
 
15
  class LinearGradient extends AbstractTag
19
  protected $x2;
20
  protected $y2;
21
 
22
+ /** @var Gradient\Stop[] */
23
  protected $stops = array();
24
 
25
  public function start($attributes)
47
  continue;
48
  }
49
 
50
+ $_stop = new Gradient\Stop();
51
  $_attributes = $_child->attributes;
52
 
53
  // Style
vendor/phenx/php-svg-lib/src/Svg/Tag/Path.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Polygon.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Polyline.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/RadialGradient.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Rect.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Shape.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien Ménager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien Ménager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Stop.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/StyleTag.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/Text.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien Ménager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien Ménager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  namespace Svg\Tag;
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien M�nager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  namespace Svg\Tag;
vendor/phenx/php-svg-lib/src/autoload.php CHANGED
@@ -3,7 +3,7 @@
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien Ménager <fabien.menager@gmail.com>
6
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
 
9
  spl_autoload_register(function($class) {
3
  * @package php-svg-lib
4
  * @link http://github.com/PhenX/php-svg-lib
5
  * @author Fabien Ménager <fabien.menager@gmail.com>
6
+ * @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
7
  */
8
 
9
  spl_autoload_register(function($class) {
vendor/phenx/php-svg-lib/tests/Svg/StyleTest.php CHANGED
@@ -12,7 +12,7 @@ include_once __DIR__ . "/../../src/autoload.php";
12
 
13
  use Svg\Style;
14
 
15
- class StyleTest extends \PHPUnit_Framework_TestCase
16
  {
17
 
18
  public function test_parseColor()
@@ -57,4 +57,4 @@ class StyleTest extends \PHPUnit_Framework_TestCase
57
  }
58
 
59
  }
60
-
12
 
13
  use Svg\Style;
14
 
15
+ class StyleTest extends \PHPUnit\Framework\TestCase
16
  {
17
 
18
  public function test_parseColor()
57
  }
58
 
59
  }
60
+
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: http://www.wpovernight.com
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
- * Version: 2.2.5
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '2.2.5';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
 
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: http://www.wpovernight.com
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
+ * Version: 2.2.6
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.2.6';
25
  public $plugin_basename;
26
  public $legacy_mode;
27