WooCommerce PDF Invoices & Packing Slips - Version 3.2.0

Version Description

(2022-09-26) = * New: setting to display the Invoice date column in the WooCommerce orders list * New: updated Dompdf to version 2.0.1, which fixes a security vulnerability. * New: filter 'wpo_wcpdf_document_link_additional_vars' to add additional query variables to the document link * Tweak: improved document settings data init/save * Tweak: improved wizard display settings * Tweak: improved styles and descriptions for the document 'Number format' settings * Tweak: new query variable for the shortcode document link

Download this release

Release Info

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

Code changes from version 3.1.1 to 3.2.0

Files changed (125) hide show
  1. assets/css/settings-styles.css +20 -2
  2. assets/css/settings-styles.min.css +1 -1
  3. assets/css/setup-wizard.css +4 -0
  4. assets/css/setup-wizard.min.css +1 -1
  5. assets/js/admin-script.js +9 -1
  6. assets/js/admin-script.min.js +1 -1
  7. composer.lock +23 -31
  8. includes/class-wcpdf-admin.php +126 -79
  9. includes/class-wcpdf-assets.php +2 -1
  10. includes/class-wcpdf-endpoint.php +2 -1
  11. includes/class-wcpdf-frontend.php +1 -1
  12. includes/class-wcpdf-install.php +2 -0
  13. includes/class-wcpdf-main.php +2 -2
  14. includes/class-wcpdf-settings-callbacks.php +19 -15
  15. includes/class-wcpdf-settings.php +27 -3
  16. includes/documents/abstract-wcpdf-order-document-methods.php +5 -0
  17. includes/documents/abstract-wcpdf-order-document.php +60 -33
  18. includes/documents/class-wcpdf-invoice.php +47 -31
  19. includes/legacy/class-wcpdf-legacy-settings.php +1 -0
  20. includes/views/setup-wizard/display-options.php +51 -15
  21. languages/woocommerce-pdf-invoices-packing-slips.pot +476 -334
  22. readme.txt +10 -1
  23. vendor/composer/installed.json +27 -35
  24. vendor/composer/installed.php +12 -12
  25. vendor/dompdf/dompdf/AUTHORS.md +24 -0
  26. vendor/dompdf/dompdf/README.md +2 -1
  27. vendor/dompdf/dompdf/VERSION +1 -1
  28. vendor/dompdf/dompdf/lib/Cpdf.php +4 -24
  29. vendor/dompdf/dompdf/lib/res/html.css +1 -4
  30. vendor/dompdf/dompdf/src/Adapter/CPDF.php +2 -10
  31. vendor/dompdf/dompdf/src/Adapter/GD.php +1 -3
  32. vendor/dompdf/dompdf/src/Adapter/PDFLib.php +1 -4
  33. vendor/dompdf/dompdf/src/Canvas.php +1 -4
  34. vendor/dompdf/dompdf/src/CanvasFactory.php +1 -2
  35. vendor/dompdf/dompdf/src/Cellmap.php +1 -2
  36. vendor/dompdf/dompdf/src/Css/AttributeTranslator.php +1 -3
  37. vendor/dompdf/dompdf/src/Css/Color.php +1 -4
  38. vendor/dompdf/dompdf/src/Css/Style.php +1 -5
  39. vendor/dompdf/dompdf/src/Css/Stylesheet.php +2 -5
  40. vendor/dompdf/dompdf/src/Dompdf.php +4 -9
  41. vendor/dompdf/dompdf/src/Exception.php +1 -3
  42. vendor/dompdf/dompdf/src/Exception/ImageException.php +1 -2
  43. vendor/dompdf/dompdf/src/FontMetrics.php +3 -5
  44. vendor/dompdf/dompdf/src/Frame.php +5 -8
  45. vendor/dompdf/dompdf/src/Frame/Factory.php +2 -5
  46. vendor/dompdf/dompdf/src/Frame/FrameListIterator.php +5 -1
  47. vendor/dompdf/dompdf/src/Frame/FrameTree.php +5 -8
  48. vendor/dompdf/dompdf/src/Frame/FrameTreeIterator.php +5 -1
  49. vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php +5 -8
  50. vendor/dompdf/dompdf/src/FrameDecorator/Block.php +1 -3
  51. vendor/dompdf/dompdf/src/FrameDecorator/Image.php +1 -3
  52. vendor/dompdf/dompdf/src/FrameDecorator/Inline.php +1 -4
  53. vendor/dompdf/dompdf/src/FrameDecorator/ListBullet.php +1 -3
  54. vendor/dompdf/dompdf/src/FrameDecorator/ListBulletImage.php +1 -3
  55. vendor/dompdf/dompdf/src/FrameDecorator/NullFrameDecorator.php +1 -2
  56. vendor/dompdf/dompdf/src/FrameDecorator/Page.php +1 -3
  57. vendor/dompdf/dompdf/src/FrameDecorator/Table.php +3 -3
  58. vendor/dompdf/dompdf/src/FrameDecorator/TableCell.php +1 -2
  59. vendor/dompdf/dompdf/src/FrameDecorator/TableRow.php +1 -2
  60. vendor/dompdf/dompdf/src/FrameDecorator/TableRowGroup.php +4 -3
  61. vendor/dompdf/dompdf/src/FrameDecorator/Text.php +1 -5
  62. vendor/dompdf/dompdf/src/FrameReflower/AbstractFrameReflower.php +1 -2
  63. vendor/dompdf/dompdf/src/FrameReflower/Block.php +8 -7
  64. vendor/dompdf/dompdf/src/FrameReflower/Image.php +1 -3
  65. vendor/dompdf/dompdf/src/FrameReflower/Inline.php +1 -2
  66. vendor/dompdf/dompdf/src/FrameReflower/ListBullet.php +1 -2
  67. vendor/dompdf/dompdf/src/FrameReflower/NullFrameReflower.php +1 -3
  68. vendor/dompdf/dompdf/src/FrameReflower/Page.php +9 -9
  69. vendor/dompdf/dompdf/src/FrameReflower/Table.php +1 -3
  70. vendor/dompdf/dompdf/src/FrameReflower/TableCell.php +6 -4
  71. vendor/dompdf/dompdf/src/FrameReflower/TableRow.php +1 -2
  72. vendor/dompdf/dompdf/src/FrameReflower/TableRowGroup.php +1 -2
  73. vendor/dompdf/dompdf/src/FrameReflower/Text.php +19 -18
  74. vendor/dompdf/dompdf/src/Helpers.php +5 -0
  75. vendor/dompdf/dompdf/src/Image/Cache.php +1 -4
  76. vendor/dompdf/dompdf/src/JavascriptEmbedder.php +1 -2
  77. vendor/dompdf/dompdf/src/LineBox.php +1 -2
  78. vendor/dompdf/dompdf/src/Options.php +5 -0
  79. vendor/dompdf/dompdf/src/PhpEvaluator.php +1 -2
  80. vendor/dompdf/dompdf/src/Positioner/Absolute.php +1 -3
  81. vendor/dompdf/dompdf/src/Positioner/AbstractPositioner.php +1 -4
  82. vendor/dompdf/dompdf/src/Positioner/Block.php +1 -4
  83. vendor/dompdf/dompdf/src/Positioner/Fixed.php +1 -4
  84. vendor/dompdf/dompdf/src/Positioner/Inline.php +1 -3
  85. vendor/dompdf/dompdf/src/Positioner/ListBullet.php +1 -4
  86. vendor/dompdf/dompdf/src/Positioner/NullPositioner.php +1 -3
  87. vendor/dompdf/dompdf/src/Positioner/TableCell.php +1 -3
  88. vendor/dompdf/dompdf/src/Positioner/TableRow.php +1 -3
  89. vendor/dompdf/dompdf/src/Renderer.php +1 -2
  90. vendor/dompdf/dompdf/src/Renderer/AbstractRenderer.php +1 -4
  91. vendor/dompdf/dompdf/src/Renderer/Block.php +5 -8
  92. vendor/dompdf/dompdf/src/Renderer/Image.php +1 -4
  93. vendor/dompdf/dompdf/src/Renderer/Inline.php +14 -12
  94. vendor/dompdf/dompdf/src/Renderer/ListBullet.php +3 -5
  95. vendor/dompdf/dompdf/src/Renderer/TableCell.php +1 -2
  96. vendor/dompdf/dompdf/src/Renderer/TableRowGroup.php +1 -2
  97. vendor/dompdf/dompdf/src/Renderer/Text.php +1 -4
  98. vendor/masterminds/html5/README.md +16 -0
  99. vendor/masterminds/html5/RELEASE.md +4 -0
  100. vendor/masterminds/html5/src/HTML5/Parser/Scanner.php +1 -1
  101. vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php +12 -6
  102. vendor/phenx/php-svg-lib/LICENSE +159 -668
  103. vendor/phenx/php-svg-lib/README.md +2 -3
  104. vendor/phenx/php-svg-lib/src/Svg/CssLength.php +135 -0
  105. vendor/phenx/php-svg-lib/src/Svg/DefaultStyle.php +2 -2
  106. vendor/phenx/php-svg-lib/src/Svg/Document.php +7 -2
  107. vendor/phenx/php-svg-lib/src/Svg/Style.php +56 -65
  108. vendor/phenx/php-svg-lib/src/Svg/Surface/CPdf.php +4 -4
  109. vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php +41 -40
  110. vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceInterface.php +2 -2
  111. vendor/phenx/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php +14 -6
  112. vendor/phenx/php-svg-lib/src/Svg/Tag/AbstractTag.php +57 -11
  113. vendor/phenx/php-svg-lib/src/Svg/Tag/Circle.php +8 -3
  114. vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php +9 -4
  115. vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php +13 -7
  116. vendor/phenx/php-svg-lib/src/Svg/Tag/Line.php +9 -4
  117. vendor/phenx/php-svg-lib/src/Svg/Tag/Path.php +17 -22
  118. vendor/phenx/php-svg-lib/src/Svg/Tag/Polygon.php +10 -1
  119. vendor/phenx/php-svg-lib/src/Svg/Tag/Polyline.php +10 -1
  120. vendor/phenx/php-svg-lib/src/Svg/Tag/Rect.php +9 -14
  121. vendor/phenx/php-svg-lib/src/Svg/Tag/Shape.php +2 -2
  122. vendor/phenx/php-svg-lib/src/Svg/Tag/Text.php +6 -4
  123. vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php +10 -4
  124. vendor/phenx/php-svg-lib/src/autoload.php +0 -17
  125. woocommerce-pdf-invoices-packingslips.php +3 -3
assets/css/settings-styles.css CHANGED
@@ -91,8 +91,11 @@ img.wpo-helper {
91
  }
92
 
93
  .multiple-text-input label {
94
- min-width: 120px;
95
- display: inline-block;
 
 
 
96
  }
97
 
98
  table.wcpdf_documents_settings_list {
@@ -921,4 +924,19 @@ body.woocommerce_page_wpo_wcpdf_options_page {
921
  #wpo-wcpdf-preview-wrapper .slider.slide-left:after {
922
  right: 0;
923
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924
  }
 
91
  }
92
 
93
  .multiple-text-input label {
94
+ padding-right: 1em;
95
+ }
96
+
97
+ table.multiple-text-input td {
98
+ padding: 0;
99
  }
100
 
101
  table.wcpdf_documents_settings_list {
924
  #wpo-wcpdf-preview-wrapper .slider.slide-left:after {
925
  right: 0;
926
  }
927
+ <<<<<<< HEAD
928
+ #wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(2),
929
+ #wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(3) {
930
+ float: left;
931
+ margin-bottom: 10px;
932
+ }
933
+
934
+ #wpo-wcpdf-preview-wrapper .multiple-text-input tr td .woocommerce-help-tip:after {
935
+ padding: 0.5em 0.8em;
936
+ font-size: 1.2em;
937
+ line-height: inherit;
938
+ }
939
+ }
940
+ =======
941
  }
942
+ >>>>>>> main
assets/css/settings-styles.min.css CHANGED
@@ -1 +1 @@
1
- span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad{position:relative;min-height:90px;border:1px solid #3d5c99;background-color:#ebf5ff;padding:15px;padding-left:100px;margin-top:15px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3{margin:0}.wcpdf-extensions-ad ul{margin:0;margin-left:1.5em}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{min-width:120px;display:inline-block}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf-settings-sections ul{height:3em}.wcpdf-settings-sections ul li{float:left;margin-right:10px}.wcpdf-settings-sections ul li a{text-decoration:none;display:inline-block;padding:.8em 1em;color:#50575e;border:1px solid #c3c4c7;box-sizing:border-box}.wcpdf-settings-sections ul li a.active{border:2px solid #51266b;padding:calc(.8em - 1px) calc(1em - 1px);color:#000}.wcpdf_document_settings_sections{margin-bottom:40px;position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #eaeaea}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #eaeaea;border-right:1px solid #eaeaea;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow,.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3{border-color:#51266b;background:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3:before{color:#51266b}body.woocommerce_page_wpo_wcpdf_options_page{background:#fff}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:#fff;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table{display:table}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody{display:table-row-group}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tr{display:table-row}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{display:table-cell;padding:15px 10px 15px 0;width:auto}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{width:300px!important}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-settings .notice-info.inline{border-left-color:#51266b}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:0 0 35px -8px rgba(0,0,0,.12);-webkit-box-shadow:0 0 35px -8px rgba(0,0,0,.12)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data-wrapper .save-settings{padding:1em 0 0 0;float:right;overflow:hidden;position:relative}.preview-document .preview-data-wrapper .save-settings p{padding:0;margin:0 0 0 2em;position:relative;margin-right:-200px;transition:margin-right .3s ease-out}.preview-document .preview-data-wrapper .save-settings p:after{content:'';display:block;pointer-events:none;position:absolute;box-sizing:border-box;border-radius:3px;right:0;top:0;background:0 0;width:100%;height:100%;z-index:10;border:0 solid #fff;animation:border-pulse 4s infinite}@keyframes border-pulse{0%{border-color:rgba(255,255,255,0);border-width:8px}50%{border-color:#fff;border-width:0}}.preview-document .preview-data-wrapper .save-settings p input:focus{outline-width:0;box-shadow:none}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .gutter-arrow{width:0;height:0;border-top:3px solid transparent;border-bottom:3px solid transparent;display:block}#wpo-wcpdf-preview-wrapper .arrow-left{border-right:7px solid #999;float:right}#wpo-wcpdf-preview-wrapper .arrow-right{border-left:7px solid #999}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-left{border-right:7px solid #222}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-right{border-left:7px solid #222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{content:'Preview';position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{content:'Settings';position:absolute;top:1.55em;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}}@media screen and (max-width:960px){.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block!important}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}}
1
+ span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad{position:relative;min-height:90px;border:1px solid #3d5c99;background-color:#ebf5ff;padding:15px;padding-left:100px;margin-top:15px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3{margin:0}.wcpdf-extensions-ad ul{margin:0;margin-left:1.5em}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{padding-right:1em}table.multiple-text-input td{padding:0}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf-settings-sections ul{height:3em}.wcpdf-settings-sections ul li{float:left;margin-right:10px}.wcpdf-settings-sections ul li a{text-decoration:none;display:inline-block;padding:.8em 1em;color:#50575e;border:1px solid #c3c4c7;box-sizing:border-box}.wcpdf-settings-sections ul li a.active{border:2px solid #51266b;padding:calc(.8em - 1px) calc(1em - 1px);color:#000}.wcpdf_document_settings_sections{margin-bottom:40px;position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #eaeaea}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #eaeaea;border-right:1px solid #eaeaea;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow,.wpo-wcpdf-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3{border-color:#51266b;background:#51266b}.wpo-wcpdf-pointer .wp-pointer-content h3:before{color:#51266b}body.woocommerce_page_wpo_wcpdf_options_page{background:#fff}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:#fff;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table{display:table}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody{display:table-row-group}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tr{display:table-row}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{display:table-cell;padding:15px 10px 15px 0;width:auto}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{width:300px!important}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-settings .notice-info.inline{border-left-color:#51266b}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:0 0 35px -8px rgba(0,0,0,.12);-webkit-box-shadow:0 0 35px -8px rgba(0,0,0,.12)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data-wrapper .save-settings{padding:1em 0 0 0;float:right;overflow:hidden;position:relative}.preview-document .preview-data-wrapper .save-settings p{padding:0;margin:0 0 0 2em;position:relative;margin-right:-200px;transition:margin-right .3s ease-out}.preview-document .preview-data-wrapper .save-settings p:after{content:'';display:block;pointer-events:none;position:absolute;box-sizing:border-box;border-radius:3px;right:0;top:0;background:0 0;width:100%;height:100%;z-index:10;border:0 solid #fff;animation:border-pulse 4s infinite}@keyframes border-pulse{0%{border-color:rgba(255,255,255,0);border-width:8px}50%{border-color:#fff;border-width:0}}.preview-document .preview-data-wrapper .save-settings p input:focus{outline-width:0;box-shadow:none}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .gutter-arrow{width:0;height:0;border-top:3px solid transparent;border-bottom:3px solid transparent;display:block}#wpo-wcpdf-preview-wrapper .arrow-left{border-right:7px solid #999;float:right}#wpo-wcpdf-preview-wrapper .arrow-right{border-left:7px solid #999}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-left{border-right:7px solid #222}#wpo-wcpdf-preview-wrapper .slider:hover>.arrow-right{border-left:7px solid #222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{content:'Preview';position:absolute;top:1.55em;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{content:'Settings';position:absolute;top:1.55em;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}}@media screen and (max-width:960px){.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block!important}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td:nth-child(3){float:left;margin-bottom:10px}#wpo-wcpdf-preview-wrapper .multiple-text-input tr td .woocommerce-help-tip:after{padding:.5em .8em;font-size:1.2em;line-height:inherit}}
assets/css/setup-wizard.css CHANGED
@@ -332,6 +332,10 @@ li.completed .wpo-progress-marker::before {
332
  padding: 0;
333
  }
334
 
 
 
 
 
335
  .wpo-setup-input label:hover {
336
  color: #666;
337
  }
332
  padding: 0;
333
  }
334
 
335
+ .wpo-setup-input table th label {
336
+ font-weight: normal;
337
+ }
338
+
339
  .wpo-setup-input label:hover {
340
  color: #666;
341
  }
assets/css/setup-wizard.min.css CHANGED
@@ -1 +1 @@
1
- html.wpo-wizard{margin:0;padding:0;width:100%;height:100%;background:0 0}body.wpo-wcpdf-setup{border:none;padding:0;margin:0;width:100%;height:100%;background-repeat:no-repeat;background-attachment:fixed!important;font-size:14px;line-height:22px;background:#771787;background:-webkit-linear-gradient(10deg,#3c105d,#771787);background:-o-linear-gradient(10deg,#3c105d,#771787);background:linear-gradient(100deg,#3c105d,#771787)}body.wpo-wcpdf-setup a:link,body.wpo-wcpdf-setup a:visited{color:#771787;text-decoration:none}body.wpo-wcpdf-setup a:hover{text-decoration:underline}body.wpo-wcpdf-setup input:focus,body.wpo-wcpdf-setup select:focus,body.wpo-wcpdf-setup textarea:focus{border-color:#239bb9!important;box-shadow:0 0 0 1px #239bb9!important;outline:2px solid transparent!important;color:#000!important}body.wpo-wcpdf-setup select:hover{color:#666!important}body.wpo-wcpdf-setup h1,body.wpo-wcpdf-setup h2{border:none;margin:0;color:#000}body.wpo-wcpdf-setup form{width:80%;max-width:900px;position:absolute;left:50%;transform:translate(-50%,0);padding:80px 15px 100px 15px}.wpo-setup-card{display:block;background-color:#fff;padding:0;overflow:hidden;box-shadow:0 20px 50px 20px rgba(0,0,0,.2)}.wpo-plugin-title{width:100%;padding:40px 0 30px 0;margin:0;text-align:center;display:block;font-weight:200}.wpo-progress-bar{width:100%;overflow:hidden;list-style:none;box-sizing:border-box;padding:0}.wpo-progress-bar li{width:12.5%;float:left;box-sizing:border-box;position:relative;padding:0;margin:0}.wpo-progress-bar li:first-child{width:calc((12.5% - (12.5% - 35px))/ 2 + 12.5%)}.wpo-progress-bar li::after{content:'';display:block;height:2px;width:100%;background-color:#eaeaea;position:absolute;top:calc(50% - 1px);right:0}.wpo-progress-bar li:first-child::after{display:none}.wpo-progress-bar li.active::after,.wpo-progress-bar li.completed::after{background-color:#771787}.wpo-progress-marker{height:35px;width:35px;background-color:#eaeaea;border:2px solid #eaeaea;border-radius:50%;position:relative;z-index:1;float:right;box-sizing:border-box}.wpo-progress-bar{counter-reset:section}.wpo-progress-marker::before{counter-increment:section;content:counter(section);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#999}li.active .wpo-progress-marker::before{color:#771787}li.completed .wpo-progress-marker::before{color:#fff}.wpo-progress-bar li.completed .wpo-progress-marker{background-color:#771787;border-color:#771787}.wpo-progress-bar li.active .wpo-progress-marker{border-color:#771787;background-color:#fff}.wpo-setup-content{float:left;width:100%;overflow:hidden}.wpo-step-description{width:50%;float:left;padding:50px;box-sizing:border-box}.wpo-step-description ul{padding-left:16px}.wpo-setup-input{width:50%;float:left;padding:50px 50px 50px 0;box-sizing:border-box;position:relative}.wpo-setup-input select{width:100%}.wpo-setup-buttons{width:100%;float:left;padding:0 50px 50px 50px;box-sizing:border-box}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-button-previous,.wpo-setup-card .wpo-setup-input span.button,.wpo-setup-card .wpo-skip-step{padding:.5em 1.2em;border-radius:3px;box-sizing:border-box;font-size:1em;text-decoration:none;cursor:pointer;font-size:1.2em;box-sizing:border-box}.wpo-setup-card .wpo-button-next{background-color:#1c6c8b;border:1px solid #1c6c8b;color:#fff!important}.wpo-setup-card .wpo-button-previous,.wpo-setup-input span.button{background-color:transparent;border:1px solid #1c6c8b;color:#1c6c8b}.wpo-setup-card .wpo-button-next:hover,.wpo-setup-card .wpo-button-previous:hover,.wpo-setup-input span.button:hover{background-color:#239bb9;color:#fff!important;text-decoration:none;border-color:#239bb9}.wpo-setup-card .wpo-button-next:focus,.wpo-setup-card .wpo-button-previous:focus,.wpo-setup-input span.button:focus{background-color:#239bb9;color:#fff!important;border-color:#239bb9}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-skip-step{float:right;margin-left:10px}.wpo-setup-card .wpo-button-previous{float:left;color:#1c6c8b!important}.wpo-setup-card .wpo-skip-step{background-color:transparent;color:#666!important;font-weight:200;border:2px solid transparent}.wpo-setup-card .wpo-skip-step:hover{color:#000!important;text-decoration:none}.wpo-setup-input .shop-name{width:100%;height:40px;padding:10px 15px;box-sizing:border-box;font-size:1.2em;margin-bottom:20px}.wpo-setup-input .shop-address{width:100%;height:200px;padding:15px 15px;font-size:1.2em;line-height:1.4em;box-sizing:border-box;border:1px solid #8c8f94;resize:none;float:left;margin:0;text-align:left!important}.wpo-setup-input #img-header_logo{width:100%;height:auto;background:0 0;margin-bottom:20px;padding:20px;box-sizing:border-box;position:relative;border:1px solid #8c8f94}.wpo-setup-input #logo-preview img{height:80%;position:absolute;left:50%;transform:translate(-50%,0)}.wpo-setup-card .wpo-setup-input span.button{font-size:.9em;padding:.2em .8em;margin:0 10px 10px 0}.attachment-resolution-warning p{font-size:.9em;line-height:1.4em;font-style:italic;color:#999;padding-bottom:10px}.wpo-setup-input table td,.wpo-setup-input table td label,.wpo-setup-input table th{vertical-align:top;padding:0}.wpo-setup-input label:hover{color:#666}.wpo-setup-input table td,.wpo-setup-input table th{padding-bottom:5px}.wpo-setup-input input[type=checkbox]{background-color:#fff;border:1px solid #cacece;border-radius:2px;vertical-align:text-bottom;margin-right:20px}.wpo-setup-input .checkbox{font-size:1.1em}.wpo-final{text-align:center;width:100%;padding:50px}.wpo-final h1{font-size:3em;line-height:1em}.wpo-final a:hover{text-decoration:underline}#confetti{width:100%;height:100%;position:absolute;left:0;top:0;z-index:-999}@media (min-width:768px) and (max-width:991px){body.wpo-wcpdf-setup form{width:90%}}@media (max-width:767px){body{background:#fff!important}body.wpo-wcpdf-setup form{width:100%;padding-top:30px}.wpo-setup-card{box-shadow:none}.wpo-progress-bar{padding:0 0 25px 0}.wpo-setup-buttons,.wpo-setup-input,.wpo-step-description{width:100%;padding:15px 25px}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-button-previous,.wpo-setup-card .wpo-skip-step{padding:.5em .8em}.wpo-progress-marker{height:28px;width:28px;font-size:.8em}#confetti{display:none}}
1
+ html.wpo-wizard{margin:0;padding:0;width:100%;height:100%;background:0 0}body.wpo-wcpdf-setup{border:none;padding:0;margin:0;width:100%;height:100%;background-repeat:no-repeat;background-attachment:fixed!important;font-size:14px;line-height:22px;background:#771787;background:-webkit-linear-gradient(10deg,#3c105d,#771787);background:-o-linear-gradient(10deg,#3c105d,#771787);background:linear-gradient(100deg,#3c105d,#771787)}body.wpo-wcpdf-setup a:link,body.wpo-wcpdf-setup a:visited{color:#771787;text-decoration:none}body.wpo-wcpdf-setup a:hover{text-decoration:underline}body.wpo-wcpdf-setup input:focus,body.wpo-wcpdf-setup select:focus,body.wpo-wcpdf-setup textarea:focus{border-color:#239bb9!important;box-shadow:0 0 0 1px #239bb9!important;outline:2px solid transparent!important;color:#000!important}body.wpo-wcpdf-setup select:hover{color:#666!important}body.wpo-wcpdf-setup h1,body.wpo-wcpdf-setup h2{border:none;margin:0;color:#000}body.wpo-wcpdf-setup form{width:80%;max-width:900px;position:absolute;left:50%;transform:translate(-50%,0);padding:80px 15px 100px 15px}.wpo-setup-card{display:block;background-color:#fff;padding:0;overflow:hidden;box-shadow:0 20px 50px 20px rgba(0,0,0,.2)}.wpo-plugin-title{width:100%;padding:40px 0 30px 0;margin:0;text-align:center;display:block;font-weight:200}.wpo-progress-bar{width:100%;overflow:hidden;list-style:none;box-sizing:border-box;padding:0}.wpo-progress-bar li{width:12.5%;float:left;box-sizing:border-box;position:relative;padding:0;margin:0}.wpo-progress-bar li:first-child{width:calc((12.5% - (12.5% - 35px))/ 2 + 12.5%)}.wpo-progress-bar li::after{content:'';display:block;height:2px;width:100%;background-color:#eaeaea;position:absolute;top:calc(50% - 1px);right:0}.wpo-progress-bar li:first-child::after{display:none}.wpo-progress-bar li.active::after,.wpo-progress-bar li.completed::after{background-color:#771787}.wpo-progress-marker{height:35px;width:35px;background-color:#eaeaea;border:2px solid #eaeaea;border-radius:50%;position:relative;z-index:1;float:right;box-sizing:border-box}.wpo-progress-bar{counter-reset:section}.wpo-progress-marker::before{counter-increment:section;content:counter(section);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#999}li.active .wpo-progress-marker::before{color:#771787}li.completed .wpo-progress-marker::before{color:#fff}.wpo-progress-bar li.completed .wpo-progress-marker{background-color:#771787;border-color:#771787}.wpo-progress-bar li.active .wpo-progress-marker{border-color:#771787;background-color:#fff}.wpo-setup-content{float:left;width:100%;overflow:hidden}.wpo-step-description{width:50%;float:left;padding:50px;box-sizing:border-box}.wpo-step-description ul{padding-left:16px}.wpo-setup-input{width:50%;float:left;padding:50px 50px 50px 0;box-sizing:border-box;position:relative}.wpo-setup-input select{width:100%}.wpo-setup-buttons{width:100%;float:left;padding:0 50px 50px 50px;box-sizing:border-box}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-button-previous,.wpo-setup-card .wpo-setup-input span.button,.wpo-setup-card .wpo-skip-step{padding:.5em 1.2em;border-radius:3px;box-sizing:border-box;font-size:1em;text-decoration:none;cursor:pointer;font-size:1.2em;box-sizing:border-box}.wpo-setup-card .wpo-button-next{background-color:#1c6c8b;border:1px solid #1c6c8b;color:#fff!important}.wpo-setup-card .wpo-button-previous,.wpo-setup-input span.button{background-color:transparent;border:1px solid #1c6c8b;color:#1c6c8b}.wpo-setup-card .wpo-button-next:hover,.wpo-setup-card .wpo-button-previous:hover,.wpo-setup-input span.button:hover{background-color:#239bb9;color:#fff!important;text-decoration:none;border-color:#239bb9}.wpo-setup-card .wpo-button-next:focus,.wpo-setup-card .wpo-button-previous:focus,.wpo-setup-input span.button:focus{background-color:#239bb9;color:#fff!important;border-color:#239bb9}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-skip-step{float:right;margin-left:10px}.wpo-setup-card .wpo-button-previous{float:left;color:#1c6c8b!important}.wpo-setup-card .wpo-skip-step{background-color:transparent;color:#666!important;font-weight:200;border:2px solid transparent}.wpo-setup-card .wpo-skip-step:hover{color:#000!important;text-decoration:none}.wpo-setup-input .shop-name{width:100%;height:40px;padding:10px 15px;box-sizing:border-box;font-size:1.2em;margin-bottom:20px}.wpo-setup-input .shop-address{width:100%;height:200px;padding:15px 15px;font-size:1.2em;line-height:1.4em;box-sizing:border-box;border:1px solid #8c8f94;resize:none;float:left;margin:0;text-align:left!important}.wpo-setup-input #img-header_logo{width:100%;height:auto;background:0 0;margin-bottom:20px;padding:20px;box-sizing:border-box;position:relative;border:1px solid #8c8f94}.wpo-setup-input #logo-preview img{height:80%;position:absolute;left:50%;transform:translate(-50%,0)}.wpo-setup-card .wpo-setup-input span.button{font-size:.9em;padding:.2em .8em;margin:0 10px 10px 0}.attachment-resolution-warning p{font-size:.9em;line-height:1.4em;font-style:italic;color:#999;padding-bottom:10px}.wpo-setup-input table td,.wpo-setup-input table td label,.wpo-setup-input table th{vertical-align:top;padding:0}.wpo-setup-input table th label{font-weight:400}.wpo-setup-input label:hover{color:#666}.wpo-setup-input table td,.wpo-setup-input table th{padding-bottom:5px}.wpo-setup-input input[type=checkbox]{background-color:#fff;border:1px solid #cacece;border-radius:2px;vertical-align:text-bottom;margin-right:20px}.wpo-setup-input .checkbox{font-size:1.1em}.wpo-final{text-align:center;width:100%;padding:50px}.wpo-final h1{font-size:3em;line-height:1em}.wpo-final a:hover{text-decoration:underline}#confetti{width:100%;height:100%;position:absolute;left:0;top:0;z-index:-999}@media (min-width:768px) and (max-width:991px){body.wpo-wcpdf-setup form{width:90%}}@media (max-width:767px){body{background:#fff!important}body.wpo-wcpdf-setup form{width:100%;padding-top:30px}.wpo-setup-card{box-shadow:none}.wpo-progress-bar{padding:0 0 25px 0}.wpo-setup-buttons,.wpo-setup-input,.wpo-step-description{width:100%;padding:15px 25px}.wpo-setup-card .wpo-button-next,.wpo-setup-card .wpo-button-previous,.wpo-setup-card .wpo-skip-step{padding:.5em .8em}.wpo-progress-marker{height:28px;width:28px;font-size:.8em}#confetti{display:none}}
assets/js/admin-script.js CHANGED
@@ -85,7 +85,15 @@ jQuery( function( $ ) {
85
  $( pointer.target ).pointer('open');
86
  }
87
 
88
- });
 
 
 
 
 
 
 
 
89
 
90
  //----------> Preview <----------//
91
 
85
  $( pointer.target ).pointer('open');
86
  }
87
 
88
+ });
89
+
90
+ // enable WooCommerce help tips
91
+ $( '.woocommerce-help-tip' ).tipTip( {
92
+ 'attribute': 'data-tip',
93
+ 'fadeIn': 50,
94
+ 'fadeOut': 50,
95
+ 'delay': 200
96
+ } );
97
 
98
  //----------> Preview <----------//
99
 
assets/js/admin-script.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function b(){n=w.val(),o=x.val(),p=y.val(),q=z.serialize()}function c(){x.val(x.data("default")).trigger("change")}function d(){w.val("").trigger("change")}function e(){!1==u.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200<t||a(this).width()==t)?"full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",2),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","")):(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",2),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","")):1200<a(this).width()&&(1200>=t||a(this).width()==t)&&("full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),u.addClass("static")):"closed"==u.attr("data-preview-state")&&a(this).width()!==t?(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",3),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state",""),u.removeClass("static")):(u.find(".preview-document, .sidebar").show(),u.find(".slide-left, .slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state",""),u.removeClass("static")))),t=a(this).width()}function f(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function g(b,c){h();let d=a(b.target);if(!j(d.attr("name"))){if(d.hasClass("remove-requirement")||"disable_for"==d.attr("id"))return;if(-1!==jQuery.inArray(b.type,["keyup","paste"])){if(d.is("input[type=\"checkbox\"], select"))return;c="keyup"==b.type?1e3:0}i(c)}}function h(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function i(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){k()},a)}function j(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function k(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:n,document_type:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),A=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=A&&A.abort()},success:function(d,e,f){d.data.error?(a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d.data.error+"</p></div>")):d.data.pdf_data&&(a("#"+c).remove(),v.append("<canvas id=\""+c+"\" style=\"width:100%;\"></canvas>"),l(b,c,d.data.pdf_data)),v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d+"</p></div>"),v.unblock()}}})}function l(a,b,c){c=window.atob(c);let d=window["pdfjs-dist/build/pdf"];d.GlobalWorkerOptions.workerSrc=a;let e=d.getDocument({data:c});e.promise.then(function(a){let c=1;a.getPage(1).then(function(a){let c=2,d=a.getViewport({scale:2}),e=document.getElementById(b),f=e.getContext("2d");e.height=d.height,e.width=d.width;let g={canvasContext:f,viewport:d},h=a.render(g);h.promise.then(function(){})})},function(a){console.error(a)})}function m(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f="wpo_wcpdf_preview_order_search",g={security:e,action:f,search:d,document_type:o};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:g,success:function(d){d.data&&(d.data.error?(c.append("<span class=\"error\">"+d.data.error+"</span>"),c.show()):a.each(d.data,function(a,b){let d="<a data-order_id=\""+a+"\"><span class=\"order-number\">#"+b.order_number+"</span> - "+b.billing_first_name+" "+b.billing_last_name;0<b.billing_company.length&&(d=d+", "+b.billing_company);let e="<br><span class=\"date\">"+b.date_created+"</span><span class=\"total\">"+b.total+"</span></a>";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(b){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(b){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(b){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let c={security:$input.data("nonce"),action:"wpo_wcpdf_set_next_number",store:$input.data("store"),number:$input.val()};xhr=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:c,success:function(a){$input.removeClass("ajax-waiting"),$input.siblings(".edit-next-number").show(),$input.prop("disabled","disabled"),$input.siblings(".save-next-number.button").hide()}})}),a("[name='wpo_wcpdf_documents_settings_invoice[display_number]']").on("change",function(b){"order_number"==a(this).val()?a(this).closest("td").find(".description").slideDown():a(this).closest("td").find(".description").hide()}).trigger("change"),a(".wcpdf_document_settings_sections > h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")}),a.each(wpo_wcpdf_admin.pointers,function(b,c){a(c.target).pointer({content:c.content,position:{edge:c.position.edge,align:c.position.align},pointerClass:c.pointer_class,pointerWidth:c.pointer_width,close:function(){jQuery.post(wpo_wcpdf_admin.ajaxurl,{pointer:b,action:"dismiss-wp-pointer"})}}),-1===a.inArray(b,wpo_wcpdf_admin.dismissed_pointers.split(","))&&a(c.target).pointer("open")});let n,o,p,q,r,s,t,u=a("#wpo-wcpdf-preview-wrapper"),v=a("#wpo-wcpdf-preview-wrapper .preview"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),x=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),y=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),z=a("#wpo-wcpdf-settings"),A=null;a(document).ready(function(){c(),d(),b(),t=a(window).width(),e()}),a(window).on("resize",e),a(".slide-left").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(u.find(".preview-document").show(),u.find(".slide-right").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","closed")):(u.find(".slide-left").hide(),u.find(".sidebar").delay(300).hide(0),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),f(u)):(u.find(".preview-document").show(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","closed"),f(u))}),a(".slide-right").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(u.find(".slide-left").delay(400).show(0),u.find(".sidebar").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","full")):(u.find(".preview-document").hide(300),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","sidebar")):(u.find(".preview-document").hide(300),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","full")),u.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),d(),i())}),a(document).ready(i()),a(document).on("wpo-wcpdf-settings-changed",function(a,b){h(),i(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){i(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),w.val(a(this).data("order_id")).change(),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),i()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",g),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||g(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",g),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",g),a(document).on("click",".wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement",g),a(document).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").click()}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),x.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),i()}}).trigger("change"),w.on("change",function(){i()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(s),s=setTimeout(function(){m(d)},e)})});
1
+ jQuery(function(a){function b(){n=w.val(),o=x.val(),p=y.val(),q=z.serialize()}function c(){x.val(x.data("default")).trigger("change")}function d(){w.val("").trigger("change")}function e(){!1==u.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200<t||a(this).width()==t)?"full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",2),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","")):(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",2),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","")):1200<a(this).width()&&(1200>=t||a(this).width()==t)&&("full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),u.addClass("static")):"closed"==u.attr("data-preview-state")&&a(this).width()!==t?(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",3),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state",""),u.removeClass("static")):(u.find(".preview-document, .sidebar").show(),u.find(".slide-left, .slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state",""),u.removeClass("static")))),t=a(this).width()}function f(a){window.scrollTo(0,0);let b=a;setTimeout(function(){b.addClass("static")},300)}function g(b,c){h();let d=a(b.target);if(!j(d.attr("name"))){if(d.hasClass("remove-requirement")||"disable_for"==d.attr("id"))return;if(-1!==jQuery.inArray(b.type,["keyup","paste"])){if(d.is("input[type=\"checkbox\"], select"))return;c="keyup"==b.type?1e3:0}i(c)}}function h(b){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function i(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){k()},a)}function j(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function k(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:n,document_type:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),A=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(a,b){null!=A&&A.abort()},success:function(d,e,f){d.data.error?(a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d.data.error+"</p></div>")):d.data.pdf_data&&(a("#"+c).remove(),v.append("<canvas id=\""+c+"\" style=\"width:100%;\"></canvas>"),l(b,c,d.data.pdf_data)),v.unblock()},error:function(b,d,e){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d+"</p></div>"),v.unblock()}}})}function l(a,b,c){c=window.atob(c);let d=window["pdfjs-dist/build/pdf"];d.GlobalWorkerOptions.workerSrc=a;let e=d.getDocument({data:c});e.promise.then(function(a){let c=1;a.getPage(1).then(function(a){let c=2,d=a.getViewport({scale:2}),e=document.getElementById(b),f=e.getContext("2d");e.height=d.height,e.width=d.width;let g={canvasContext:f,viewport:d},h=a.render(g);h.promise.then(function(){})})},function(a){console.error(a)})}function m(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f="wpo_wcpdf_preview_order_search",g={security:e,action:f,search:d,document_type:o};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:g,success:function(d){d.data&&(d.data.error?(c.append("<span class=\"error\">"+d.data.error+"</span>"),c.show()):a.each(d.data,function(a,b){let d="<a data-order_id=\""+a+"\"><span class=\"order-number\">#"+b.order_number+"</span> - "+b.billing_first_name+" "+b.billing_last_name;0<b.billing_company.length&&(d=d+", "+b.billing_company);let e="<br><span class=\"date\">"+b.date_created+"</span><span class=\"total\">"+b.total+"</span></a>";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(b){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(b){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(b){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let c={security:$input.data("nonce"),action:"wpo_wcpdf_set_next_number",store:$input.data("store"),number:$input.val()};xhr=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:c,success:function(a){$input.removeClass("ajax-waiting"),$input.siblings(".edit-next-number").show(),$input.prop("disabled","disabled"),$input.siblings(".save-next-number.button").hide()}})}),a("[name='wpo_wcpdf_documents_settings_invoice[display_number]']").on("change",function(b){"order_number"==a(this).val()?a(this).closest("td").find(".description").slideDown():a(this).closest("td").find(".description").hide()}).trigger("change"),a(".wcpdf_document_settings_sections > h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")}),a.each(wpo_wcpdf_admin.pointers,function(b,c){a(c.target).pointer({content:c.content,position:{edge:c.position.edge,align:c.position.align},pointerClass:c.pointer_class,pointerWidth:c.pointer_width,close:function(){jQuery.post(wpo_wcpdf_admin.ajaxurl,{pointer:b,action:"dismiss-wp-pointer"})}}),-1===a.inArray(b,wpo_wcpdf_admin.dismissed_pointers.split(","))&&a(c.target).pointer("open")}),a(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200});let n,o,p,q,r,s,t,u=a("#wpo-wcpdf-preview-wrapper"),v=a("#wpo-wcpdf-preview-wrapper .preview"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),x=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),y=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),z=a("#wpo-wcpdf-settings"),A=null;a(document).ready(function(){c(),d(),b(),t=a(window).width(),e()}),a(window).on("resize",e),a(".slide-left").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(u.find(".preview-document").show(),u.find(".slide-right").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","closed")):(u.find(".slide-left").hide(),u.find(".sidebar").delay(300).hide(0),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),f(u)):(u.find(".preview-document").show(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","closed"),f(u))}),a(".slide-right").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(u.find(".slide-left").delay(400).show(0),u.find(".sidebar").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","full")):(u.find(".preview-document").hide(300),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","sidebar")):(u.find(".preview-document").hide(300),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","full")),u.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),d(),i())}),a(document).ready(i()),a(document).on("wpo-wcpdf-settings-changed",function(a,b){h(),i(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){i(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),w.val(a(this).data("order_id")).change(),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),i()}),a(document).on("keyup paste","#wpo-wcpdf-settings input, #wpo-wcpdf-settings textarea",g),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"], #wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(a){a.isTrigger||g(a)}),a(document).on("select2:select select2:unselect","#wpo-wcpdf-settings select.wc-enhanced-select",g),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",g),a(document).on("click",".wpo_remove_image_button, #wpo-wcpdf-settings .remove-requirement",g),a(document).on("click",".preview-data-wrapper .save-settings p input",function(b){a("#wpo-wcpdf-settings input#submit").click()}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),x.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),i()}}).trigger("change"),w.on("change",function(){i()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(s),s=setTimeout(function(){m(d)},e)})});
composer.lock CHANGED
@@ -8,24 +8,24 @@
8
  "packages": [
9
  {
10
  "name": "dompdf/dompdf",
11
- "version": "v2.0.0",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/dompdf/dompdf.git",
15
- "reference": "79573d8b8a141ec8a17312515de8740eed014fa9"
16
  },
17
  "dist": {
18
  "type": "zip",
19
- "url": "https://api.github.com/repos/dompdf/dompdf/zipball/79573d8b8a141ec8a17312515de8740eed014fa9",
20
- "reference": "79573d8b8a141ec8a17312515de8740eed014fa9",
21
  "shasum": ""
22
  },
23
  "require": {
24
  "ext-dom": "*",
25
  "ext-mbstring": "*",
26
  "masterminds/html5": "^2.0",
27
- "phenx/php-font-lib": "^0.5.4",
28
- "phenx/php-svg-lib": "^0.3.3 || ^0.4.0",
29
  "php": "^7.1 || ^8.0"
30
  },
31
  "require-dev": {
@@ -56,38 +56,30 @@
56
  ],
57
  "authors": [
58
  {
59
- "name": "Fabien Ménager",
60
- "email": "fabien.menager@gmail.com"
61
- },
62
- {
63
- "name": "Brian Sweeney",
64
- "email": "eclecticgeek@gmail.com"
65
- },
66
- {
67
- "name": "Gabriel Bull",
68
- "email": "me@gabrielbull.com"
69
  }
70
  ],
71
  "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
72
  "homepage": "https://github.com/dompdf/dompdf",
73
  "support": {
74
  "issues": "https://github.com/dompdf/dompdf/issues",
75
- "source": "https://github.com/dompdf/dompdf/tree/v2.0.0"
76
  },
77
- "time": "2022-06-21T21:14:57+00:00"
78
  },
79
  {
80
  "name": "masterminds/html5",
81
- "version": "2.7.5",
82
  "source": {
83
  "type": "git",
84
  "url": "https://github.com/Masterminds/html5-php.git",
85
- "reference": "f640ac1bdddff06ea333a920c95bbad8872429ab"
86
  },
87
  "dist": {
88
  "type": "zip",
89
- "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f640ac1bdddff06ea333a920c95bbad8872429ab",
90
- "reference": "f640ac1bdddff06ea333a920c95bbad8872429ab",
91
  "shasum": ""
92
  },
93
  "require": {
@@ -141,9 +133,9 @@
141
  ],
142
  "support": {
143
  "issues": "https://github.com/Masterminds/html5-php/issues",
144
- "source": "https://github.com/Masterminds/html5-php/tree/2.7.5"
145
  },
146
- "time": "2021-07-01T14:25:37+00:00"
147
  },
148
  {
149
  "name": "phenx/php-font-lib",
@@ -191,21 +183,21 @@
191
  },
192
  {
193
  "name": "phenx/php-svg-lib",
194
- "version": "0.4.1",
195
  "source": {
196
  "type": "git",
197
  "url": "https://github.com/dompdf/php-svg-lib.git",
198
- "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02"
199
  },
200
  "dist": {
201
  "type": "zip",
202
- "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/4498b5df7b08e8469f0f8279651ea5de9626ed02",
203
- "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02",
204
  "shasum": ""
205
  },
206
  "require": {
207
  "ext-mbstring": "*",
208
- "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0",
209
  "sabberworm/php-css-parser": "^8.4"
210
  },
211
  "require-dev": {
@@ -231,9 +223,9 @@
231
  "homepage": "https://github.com/PhenX/php-svg-lib",
232
  "support": {
233
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
234
- "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.1"
235
  },
236
- "time": "2022-03-07T12:52:04+00:00"
237
  },
238
  {
239
  "name": "sabberworm/php-css-parser",
8
  "packages": [
9
  {
10
  "name": "dompdf/dompdf",
11
+ "version": "v2.0.1",
12
  "source": {
13
  "type": "git",
14
  "url": "https://github.com/dompdf/dompdf.git",
15
+ "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085"
16
  },
17
  "dist": {
18
  "type": "zip",
19
+ "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c5310df0e22c758c85ea5288175fc6cd777bc085",
20
+ "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085",
21
  "shasum": ""
22
  },
23
  "require": {
24
  "ext-dom": "*",
25
  "ext-mbstring": "*",
26
  "masterminds/html5": "^2.0",
27
+ "phenx/php-font-lib": ">=0.5.4 <1.0.0",
28
+ "phenx/php-svg-lib": ">=0.3.3 <1.0.0",
29
  "php": "^7.1 || ^8.0"
30
  },
31
  "require-dev": {
56
  ],
57
  "authors": [
58
  {
59
+ "name": "The Dompdf Community",
60
+ "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
 
 
 
 
 
 
 
 
61
  }
62
  ],
63
  "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
64
  "homepage": "https://github.com/dompdf/dompdf",
65
  "support": {
66
  "issues": "https://github.com/dompdf/dompdf/issues",
67
+ "source": "https://github.com/dompdf/dompdf/tree/v2.0.1"
68
  },
69
+ "time": "2022-09-22T13:43:41+00:00"
70
  },
71
  {
72
  "name": "masterminds/html5",
73
+ "version": "2.7.6",
74
  "source": {
75
  "type": "git",
76
  "url": "https://github.com/Masterminds/html5-php.git",
77
+ "reference": "897eb517a343a2281f11bc5556d6548db7d93947"
78
  },
79
  "dist": {
80
  "type": "zip",
81
+ "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947",
82
+ "reference": "897eb517a343a2281f11bc5556d6548db7d93947",
83
  "shasum": ""
84
  },
85
  "require": {
133
  ],
134
  "support": {
135
  "issues": "https://github.com/Masterminds/html5-php/issues",
136
+ "source": "https://github.com/Masterminds/html5-php/tree/2.7.6"
137
  },
138
+ "time": "2022-08-18T16:18:26+00:00"
139
  },
140
  {
141
  "name": "phenx/php-font-lib",
183
  },
184
  {
185
  "name": "phenx/php-svg-lib",
186
+ "version": "0.5.0",
187
  "source": {
188
  "type": "git",
189
  "url": "https://github.com/dompdf/php-svg-lib.git",
190
+ "reference": "76876c6cf3080bcb6f249d7d59705108166a6685"
191
  },
192
  "dist": {
193
  "type": "zip",
194
+ "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/76876c6cf3080bcb6f249d7d59705108166a6685",
195
+ "reference": "76876c6cf3080bcb6f249d7d59705108166a6685",
196
  "shasum": ""
197
  },
198
  "require": {
199
  "ext-mbstring": "*",
200
+ "php": "^7.1 || ^8.0",
201
  "sabberworm/php-css-parser": "^8.4"
202
  },
203
  "require-dev": {
223
  "homepage": "https://github.com/PhenX/php-svg-lib",
224
  "support": {
225
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
226
+ "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.0"
227
  },
228
+ "time": "2022-09-06T12:16:56+00:00"
229
  },
230
  {
231
  "name": "sabberworm/php-css-parser",
includes/class-wcpdf-admin.php CHANGED
@@ -14,8 +14,16 @@ if ( !class_exists( '\\WPO\\WC\\PDF_Invoices\\Admin' ) ) :
14
  class Admin {
15
  function __construct() {
16
  add_action( 'woocommerce_admin_order_actions_end', array( $this, 'add_listing_actions' ) );
17
- add_filter( 'manage_edit-shop_order_columns', array( $this, 'add_invoice_number_column' ), 999 );
18
- add_action( 'manage_shop_order_posts_custom_column', array( $this, 'invoice_number_column_data' ), 2 );
 
 
 
 
 
 
 
 
19
  add_action( 'add_meta_boxes_shop_order', array( $this, 'add_meta_boxes' ) );
20
  if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.3', '>=' ) ) {
21
  add_filter( 'bulk_actions-edit-shop_order', array( $this, 'bulk_actions' ), 20 );
@@ -38,14 +46,6 @@ class Admin {
38
 
39
  add_action( 'admin_bar_menu', array( $this, 'debug_enabled_warning' ), 999 );
40
 
41
-
42
- add_filter( 'manage_edit-shop_order_sortable_columns', array( $this, 'invoice_number_column_sortable' ) );
43
- if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.0', '>=' ) ) {
44
- add_filter( 'request', array( $this, 'request_query_sort_by_invoice_number' ) );
45
- } else {
46
- add_filter( 'pre_get_posts', array( $this, 'pre_get_posts_sort_by_invoice_number' ) );
47
- }
48
-
49
  // AJAX actions for deleting, regenerating and saving document data
50
  add_action( 'wp_ajax_wpo_wcpdf_delete_document', array( $this, 'ajax_crud_document' ) );
51
  add_action( 'wp_ajax_wpo_wcpdf_regenerate_document', array( $this, 'ajax_crud_document' ) );
@@ -215,46 +215,129 @@ class Admin {
215
  }
216
 
217
  /**
218
- * Create additional Shop Order column for Invoice Numbers
219
  * @param array $columns shop order columns
220
  */
221
- public function add_invoice_number_column( $columns ) {
222
  // get invoice settings
223
- $invoice = wcpdf_get_invoice( null );
224
  $invoice_settings = $invoice->get_settings();
225
- if ( !isset( $invoice_settings['invoice_number_column'] ) ) {
226
- return $columns;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  }
228
 
229
- // put the column after the Status column
230
- $new_columns = array_slice($columns, 0, 2, true) +
231
- array( 'pdf_invoice_number' => __( 'Invoice Number', 'woocommerce-pdf-invoices-packing-slips' ) ) +
232
- array_slice($columns, 2, count($columns) - 1, true) ;
233
- return $new_columns;
234
  }
235
 
236
  /**
237
- * Display Invoice Number in Shop Order column (if available)
238
  * @param string $column column slug
239
  */
240
- public function invoice_number_column_data( $column ) {
241
  global $post, $the_order;
242
 
243
- if ( $column == 'pdf_invoice_number' ) {
244
- $this->disable_storing_document_settings();
245
- if ( empty( $the_order ) || WCX_Order::get_id( $the_order ) != $post->ID ) {
246
- $order = WCX::get_order( $post->ID );
247
- if ( $invoice = wcpdf_get_invoice( $order ) ) {
248
- echo $invoice->get_number();
249
- }
 
 
 
 
 
 
 
 
 
 
 
250
  do_action( 'wcpdf_invoice_number_column_end', $order );
251
- } else {
252
- if ( $invoice = wcpdf_get_invoice( $the_order ) ) {
253
- echo $invoice->get_number();
 
254
  }
255
- do_action( 'wcpdf_invoice_number_column_end', $the_order );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  }
257
  }
 
 
258
  }
259
 
260
  /**
@@ -482,7 +565,14 @@ class Admin {
482
  <?php /* translators: document title */ ?>
483
  <?php
484
  if ( $this->user_can_manage_document( $document->get_type() ) ) {
485
- printf( '<span class="wpo-wcpdf-set-date-number button">%s</span>', sprintf( esc_html__( 'Set %s number & date', 'woocommerce-pdf-invoices-packing-slips' ), wp_kses_post( $document->get_title() ) ) );
 
 
 
 
 
 
 
486
  } else {
487
  printf( '<p>%s</p>', esc_html__( 'You do not have sufficient permissions to edit this document.', 'woocommerce-pdf-invoices-packing-slips' ) );
488
  }
@@ -644,7 +734,7 @@ class Admin {
644
  remove_filter( 'wpo_wcpdf_document_store_settings', array( $this, 'return_false' ), 9999 );
645
  }
646
 
647
- public function return_false(){
648
  return false;
649
  }
650
 
@@ -709,49 +799,6 @@ class Admin {
709
  }
710
  }
711
 
712
- /**
713
- * Add invoice number to order search scope
714
- */
715
- public function invoice_number_column_sortable( $columns ) {
716
- $columns['pdf_invoice_number'] = 'pdf_invoice_number';
717
- return $columns;
718
- }
719
-
720
-
721
- /**
722
- * Pre WC3.X sorting
723
- */
724
- public function pre_get_posts_sort_by_invoice_number( $query ) {
725
- if( ! is_admin() ) {
726
- return;
727
- }
728
- $orderby = $query->get( 'orderby');
729
- if( 'pdf_invoice_number' == $orderby ) {
730
- $query->set( 'meta_key', '_wcpdf_invoice_number' );
731
- $query->set( 'orderby', apply_filters( 'wpo_wcpdf_invoice_number_column_orderby', 'meta_value' ) );
732
- }
733
- }
734
-
735
- /**
736
- * WC3.X+ sorting
737
- */
738
- public function request_query_sort_by_invoice_number( $query_vars ) {
739
- global $typenow;
740
-
741
- if ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ), true ) ) {
742
- if ( isset( $query_vars['orderby'] ) ) {
743
- if ( 'pdf_invoice_number' === $query_vars['orderby'] ) {
744
- $query_vars = array_merge( $query_vars, array(
745
- 'meta_key' => '_wcpdf_invoice_number',
746
- 'orderby' => apply_filters( 'wpo_wcpdf_invoice_number_column_orderby', 'meta_value' ),
747
- ) );
748
- }
749
- }
750
- }
751
-
752
- return $query_vars;
753
- }
754
-
755
  public function user_can_manage_document( $document_type ) {
756
  return apply_filters( 'wpo_wcpdf_current_user_is_allowed', ( current_user_can( 'manage_woocommerce_orders' ) || current_user_can( 'edit_shop_orders' ) ), $document_type );
757
  }
@@ -799,7 +846,7 @@ class Admin {
799
  }
800
  }
801
  }
802
- $form_data = stripslashes_deep( $form_data );
803
 
804
  // notice messages
805
  $notice_messages = array(
14
  class Admin {
15
  function __construct() {
16
  add_action( 'woocommerce_admin_order_actions_end', array( $this, 'add_listing_actions' ) );
17
+
18
+ add_filter( 'manage_edit-shop_order_columns', array( $this, 'add_invoice_columns' ), 999 );
19
+ add_action( 'manage_shop_order_posts_custom_column', array( $this, 'invoice_columns_data' ), 2 );
20
+ add_filter( 'manage_edit-shop_order_sortable_columns', array( $this, 'invoice_columns_sortable' ) );
21
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.0', '>=' ) ) {
22
+ add_filter( 'request', array( $this, 'request_query_sort_by_column' ) );
23
+ } else {
24
+ add_filter( 'pre_get_posts', array( $this, 'pre_get_posts_sort_by_column' ) );
25
+ }
26
+
27
  add_action( 'add_meta_boxes_shop_order', array( $this, 'add_meta_boxes' ) );
28
  if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.3', '>=' ) ) {
29
  add_filter( 'bulk_actions-edit-shop_order', array( $this, 'bulk_actions' ), 20 );
46
 
47
  add_action( 'admin_bar_menu', array( $this, 'debug_enabled_warning' ), 999 );
48
 
 
 
 
 
 
 
 
 
49
  // AJAX actions for deleting, regenerating and saving document data
50
  add_action( 'wp_ajax_wpo_wcpdf_delete_document', array( $this, 'ajax_crud_document' ) );
51
  add_action( 'wp_ajax_wpo_wcpdf_regenerate_document', array( $this, 'ajax_crud_document' ) );
215
  }
216
 
217
  /**
218
+ * Create additional Shop Order column for Invoice Number/Date
219
  * @param array $columns shop order columns
220
  */
221
+ public function add_invoice_columns( $columns ) {
222
  // get invoice settings
223
+ $invoice = wcpdf_get_invoice( null );
224
  $invoice_settings = $invoice->get_settings();
225
+ $invoice_columns = array(
226
+ 'invoice_number_column' => __( 'Invoice Number', 'woocommerce-pdf-invoices-packing-slips' ),
227
+ 'invoice_date_column' => __( 'Invoice Date', 'woocommerce-pdf-invoices-packing-slips' ),
228
+ );
229
+
230
+ $offset = 2; // after order number column
231
+ foreach ( $invoice_columns as $slug => $name ) {
232
+ if ( ! isset( $invoice_settings[$slug] ) ) {
233
+ continue;
234
+ }
235
+
236
+ $columns = array_slice( $columns, 0, $offset, true ) +
237
+ array( $slug => $name ) +
238
+ array_slice( $columns, 2, count( $columns ) - 1, true ) ;
239
+
240
+ $offset++;
241
  }
242
 
243
+ return $columns;
 
 
 
 
244
  }
245
 
246
  /**
247
+ * Display Invoice Number/Date in Shop Order column (if available)
248
  * @param string $column column slug
249
  */
250
+ public function invoice_columns_data( $column ) {
251
  global $post, $the_order;
252
 
253
+ $this->disable_storing_document_settings();
254
+
255
+ $order = '';
256
+ if ( empty( $the_order ) || WCX_Order::get_id( $the_order ) != $post->ID ) {
257
+ $order = WCX::get_order( $post->ID );
258
+ } else {
259
+ $order = $the_order;
260
+ }
261
+
262
+ $invoice = wcpdf_get_invoice( $order );
263
+
264
+ if ( empty( $invoice ) ) {
265
+ return;
266
+ }
267
+
268
+ switch ( $column ) {
269
+ case 'invoice_number_column':
270
+ echo $invoice->get_number();
271
  do_action( 'wcpdf_invoice_number_column_end', $order );
272
+ break;
273
+ case 'invoice_date_column':
274
+ if ( ! empty( $date = $invoice->get_date() ) ) {
275
+ echo $date->date_i18n( wcpdf_date_format( $invoice, 'invoice_date_column' ) );
276
  }
277
+ do_action( 'wcpdf_invoice_date_column_end', $order );
278
+ break;
279
+ default:
280
+ return;
281
+ }
282
+ }
283
+
284
+ /**
285
+ * Makes invoice columns sortable
286
+ */
287
+ public function invoice_columns_sortable( $columns ) {
288
+ $columns['invoice_number_column'] = 'invoice_number_column';
289
+ $columns['invoice_date_column'] = 'invoice_date_column';
290
+ return $columns;
291
+ }
292
+
293
+ /**
294
+ * Pre WC3.X sorting
295
+ */
296
+ public function pre_get_posts_sort_by_column( $query ) {
297
+ if ( ! is_admin() ) {
298
+ return;
299
+ }
300
+
301
+ switch ( $query->get( 'orderby' ) ) {
302
+ case 'invoice_number_column':
303
+ $query->set( 'meta_key', '_wcpdf_invoice_number' );
304
+ $query->set( 'orderby', apply_filters( 'wpo_wcpdf_invoice_number_column_orderby', 'meta_value' ) );
305
+ break;
306
+ case 'invoice_date_column':
307
+ $query->set( 'meta_key', '_wcpdf_invoice_date' );
308
+ $query->set( 'orderby', apply_filters( 'wpo_wcpdf_invoice_date_column_orderby', 'meta_value' ) );
309
+ break;
310
+ default:
311
+ return;
312
+ }
313
+ }
314
+
315
+ /**
316
+ * WC3.X+ sorting
317
+ */
318
+ public function request_query_sort_by_column( $query_vars ) {
319
+ global $typenow;
320
+
321
+ if ( in_array( $typenow, wc_get_order_types( 'order-meta-boxes' ), true ) && ! empty( $query_vars['orderby'] ) ) {
322
+ switch ( $query_vars['orderby'] ) {
323
+ case 'invoice_number_column':
324
+ $query_vars = array_merge( $query_vars, array(
325
+ 'meta_key' => '_wcpdf_invoice_number',
326
+ 'orderby' => apply_filters( 'wpo_wcpdf_invoice_number_column_orderby', 'meta_value' ),
327
+ ) );
328
+ break;
329
+ case 'invoice_date_column':
330
+ $query_vars = array_merge( $query_vars, array(
331
+ 'meta_key' => '_wcpdf_invoice_date',
332
+ 'orderby' => apply_filters( 'wpo_wcpdf_invoice_date_column_orderby', 'meta_value' ),
333
+ ) );
334
+ break;
335
+ default:
336
+ return $query_vars;
337
  }
338
  }
339
+
340
+ return $query_vars;
341
  }
342
 
343
  /**
565
  <?php /* translators: document title */ ?>
566
  <?php
567
  if ( $this->user_can_manage_document( $document->get_type() ) ) {
568
+ printf(
569
+ '<span class="wpo-wcpdf-set-date-number button">%s</span>',
570
+ sprintf(
571
+ /* translators: document title */
572
+ esc_html__( 'Set %s number & date', 'woocommerce-pdf-invoices-packing-slips' ),
573
+ wp_kses_post( $document->get_title() )
574
+ )
575
+ );
576
  } else {
577
  printf( '<p>%s</p>', esc_html__( 'You do not have sufficient permissions to edit this document.', 'woocommerce-pdf-invoices-packing-slips' ) );
578
  }
734
  remove_filter( 'wpo_wcpdf_document_store_settings', array( $this, 'return_false' ), 9999 );
735
  }
736
 
737
+ public function return_false() {
738
  return false;
739
  }
740
 
799
  }
800
  }
801
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
802
  public function user_can_manage_document( $document_type ) {
803
  return apply_filters( 'wpo_wcpdf_current_user_is_allowed', ( current_user_can( 'manage_woocommerce_orders' ) || current_user_can( 'edit_shop_orders' ) ), $document_type );
804
  }
846
  }
847
  }
848
  }
849
+ $form_data = stripslashes_deep( $form_data );
850
 
851
  // notice messages
852
  $notice_messages = array(
includes/class-wcpdf-assets.php CHANGED
@@ -122,7 +122,7 @@ class Assets {
122
  wp_enqueue_script(
123
  'wpo-wcpdf-admin',
124
  WPO_WCPDF()->plugin_url() . '/assets/js/admin-script'.$suffix.'.js',
125
- array( 'jquery', 'wc-enhanced-select', 'jquery-blockui' ),
126
  WPO_WCPDF_VERSION
127
  );
128
  wp_localize_script(
@@ -145,6 +145,7 @@ class Assets {
145
  'reset_number_yearly',
146
  'my_account_buttons',
147
  'invoice_number_column',
 
148
  'disable_free',
149
  'use_latest_settings',
150
  ) ),
122
  wp_enqueue_script(
123
  'wpo-wcpdf-admin',
124
  WPO_WCPDF()->plugin_url() . '/assets/js/admin-script'.$suffix.'.js',
125
+ array( 'jquery', 'wc-enhanced-select', 'jquery-blockui', 'jquery-tiptip' ),
126
  WPO_WCPDF_VERSION
127
  );
128
  wp_localize_script(
145
  'reset_number_yearly',
146
  'my_account_buttons',
147
  'invoice_number_column',
148
+ 'invoice_date_column',
149
  'disable_free',
150
  'use_latest_settings',
151
  ) ),
includes/class-wcpdf-endpoint.php CHANGED
@@ -99,11 +99,12 @@ class Endpoint {
99
  }
100
 
101
  // handle additional query vars
 
102
  if ( ! empty( $additional_vars ) && is_array( $additional_vars ) ) {
103
  $document_link = add_query_arg( $additional_vars, $document_link );
104
  }
105
 
106
- return $document_link;
107
  }
108
 
109
  }
99
  }
100
 
101
  // handle additional query vars
102
+ $additional_vars = apply_filters( 'wpo_wcpdf_document_link_additional_vars', $additional_vars, $order, $document_type );
103
  if ( ! empty( $additional_vars ) && is_array( $additional_vars ) ) {
104
  $document_link = add_query_arg( $additional_vars, $document_link );
105
  }
106
 
107
+ return esc_url( $document_link );
108
  }
109
 
110
  }
includes/class-wcpdf-frontend.php CHANGED
@@ -150,7 +150,7 @@ class Frontend {
150
  $link_text = __( 'Download invoice (PDF)', 'woocommerce-pdf-invoices-packing-slips' );
151
  }
152
 
153
- $pdf_url = WPO_WCPDF()->endpoint->get_document_link( $order, 'invoice' );
154
 
155
  $text = sprintf( '<p><a href="%s" target="_blank">%s</a></p>', esc_url( $pdf_url ), esc_html( $link_text ) );
156
 
150
  $link_text = __( 'Download invoice (PDF)', 'woocommerce-pdf-invoices-packing-slips' );
151
  }
152
 
153
+ $pdf_url = WPO_WCPDF()->endpoint->get_document_link( $order, 'invoice', array( 'shortcode' => 'true' ) );
154
 
155
  $text = sprintf( '<p><a href="%s" target="_blank">%s</a></p>', esc_url( $pdf_url ), esc_html( $link_text ) );
156
 
includes/class-wcpdf-install.php CHANGED
@@ -166,6 +166,7 @@ class Install {
166
  // 'reset_number_yearly' => '',
167
  // 'my_account_buttons' => '',
168
  // 'invoice_number_column' => '',
 
169
  // 'disable_free' => '',
170
  ),
171
  'wpo_wcpdf_documents_settings_packing-slip' => array(
@@ -287,6 +288,7 @@ class Install {
287
  'reset_number_yearly' => array( 'wpo_wcpdf_template_settings' => 'yearly_reset_invoice_number' ),
288
  'my_account_buttons' => array( 'wpo_wcpdf_general_settings' => 'my_account_buttons' ),
289
  'invoice_number_column' => array( 'wpo_wcpdf_general_settings' => 'invoice_number_column' ),
 
290
  'disable_free' => array( 'wpo_wcpdf_general_settings' => 'disable_free' ),
291
  ),
292
  'wpo_wcpdf_documents_settings_packing-slip' => array(
166
  // 'reset_number_yearly' => '',
167
  // 'my_account_buttons' => '',
168
  // 'invoice_number_column' => '',
169
+ // 'invoice_date_column' => '',
170
  // 'disable_free' => '',
171
  ),
172
  'wpo_wcpdf_documents_settings_packing-slip' => array(
288
  'reset_number_yearly' => array( 'wpo_wcpdf_template_settings' => 'yearly_reset_invoice_number' ),
289
  'my_account_buttons' => array( 'wpo_wcpdf_general_settings' => 'my_account_buttons' ),
290
  'invoice_number_column' => array( 'wpo_wcpdf_general_settings' => 'invoice_number_column' ),
291
+ 'invoice_date_column' => array( 'wpo_wcpdf_general_settings' => 'invoice_date_column' ),
292
  'disable_free' => array( 'wpo_wcpdf_general_settings' => 'disable_free' ),
293
  ),
294
  'wpo_wcpdf_documents_settings_packing-slip' => array(
includes/class-wcpdf-main.php CHANGED
@@ -334,9 +334,9 @@ class Main {
334
  // Check the user privileges
335
  $full_permission = WPO_WCPDF()->admin->user_can_manage_document( $document_type );
336
  if ( ! $full_permission ) {
337
- if ( ! isset( $_GET['my-account'] ) ) {
338
  $allowed = false;
339
- } else { // User call from my-account page
340
  // Only for single orders!
341
  if ( count( $order_ids ) > 1 ) {
342
  $allowed = false;
334
  // Check the user privileges
335
  $full_permission = WPO_WCPDF()->admin->user_can_manage_document( $document_type );
336
  if ( ! $full_permission ) {
337
+ if ( ! isset( $_GET['my-account'] ) && ! isset( $_GET['shortcode'] ) ) {
338
  $allowed = false;
339
+ } else { // User call from my-account page or via shortcode
340
  // Only for single orders!
341
  if ( count( $order_ids ) > 1 ) {
342
  $allowed = false;
includes/class-wcpdf-settings-callbacks.php CHANGED
@@ -314,36 +314,40 @@ class Settings_Callbacks {
314
  $fields = isset( $fields_callback_args ) ? call_user_func_array( $fields_callback, $fields_callback_args ) : call_user_func( $fields_callback );
315
  }
316
 
 
317
  if ( ! empty( $header ) ) {
318
- echo wp_kses_post( "<p><strong>{$header}</strong>:</p>" );
319
  }
320
-
321
- printf('<p class="%s multiple-text-input">', esc_attr( $id ) );
322
  foreach ($fields as $name => $field) {
 
323
  $size = $field['size'];
324
  $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
325
 
326
- if ( isset( $field['label_width'] ) ) {
327
- $style = sprintf( 'style="display:inline-block; width:%1$s;"', $field['label_width'] );
328
- } else {
329
- $style = '';
330
- }
331
-
332
- $field_description = ! empty( $field['description'] ) ? '<span style="font-style:italic;">'.$field['description'].'</span>' : '';
333
 
334
  // output field label
335
  if ( isset( $field['label'] ) ) {
336
- printf( '<label for="%1$s_%2$s" %3$s>%4$s:</label>', esc_attr( $id ), esc_attr( $name ), esc_attr( $style ), esc_html( $field['label'] ) );
 
 
337
  }
338
 
339
  // output field
340
  $field_current = isset( $current[$name] ) ? $current[$name] : '';
341
  $type = isset( $field['type'] ) ? $field['type'] : 'text';
342
- printf( '<input type="%1$s" id="%2$s_%4$s" name="%3$s[%4$s]" value="%5$s" size="%6$s" placeholder="%7$s"/> %8$s<br/>', esc_attr( $type ), esc_attr( $id ), esc_attr( $setting_name ), esc_attr( $name ), esc_attr( $field_current ), esc_attr( $size ), esc_attr( $placeholder ), wp_kses_post( $field_description ) );
 
 
 
 
 
 
 
 
343
  }
344
- echo "</p>";
345
-
346
- // output description.
347
  if ( ! empty( $description ) ) {
348
  printf( '<p class="description">%s</p>', wp_kses_post( $description ) );
349
  }
314
  $fields = isset( $fields_callback_args ) ? call_user_func_array( $fields_callback, $fields_callback_args ) : call_user_func( $fields_callback );
315
  }
316
 
317
+ printf( '<table class="%s multiple-text-input">', esc_attr( $id ) );
318
  if ( ! empty( $header ) ) {
319
+ echo wp_kses_post( "<tr><td><strong>{$header}</strong>:</td></tr>" );
320
  }
 
 
321
  foreach ($fields as $name => $field) {
322
+ echo '<tr>';
323
  $size = $field['size'];
324
  $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
325
 
326
+ $field_description = ! empty( $field['description'] ) ? $field['description']: '';
 
 
 
 
 
 
327
 
328
  // output field label
329
  if ( isset( $field['label'] ) ) {
330
+ printf( '<td class="label"><label for="%1$s_%2$s">%3$s:</label></td>', esc_attr( $id ), esc_attr( $name ), esc_html( $field['label'] ) );
331
+ } else {
332
+ echo '<td></td>';
333
  }
334
 
335
  // output field
336
  $field_current = isset( $current[$name] ) ? $current[$name] : '';
337
  $type = isset( $field['type'] ) ? $field['type'] : 'text';
338
+ printf( '<td><input type="%1$s" id="%2$s_%4$s" name="%3$s[%4$s]" value="%5$s" size="%6$s" placeholder="%7$s"/></td>', esc_attr( $type ), esc_attr( $id ), esc_attr( $setting_name ), esc_attr( $name ), esc_attr( $field_current ), esc_attr( $size ), esc_attr( $placeholder ) );
339
+
340
+ // field description.
341
+ if ( ! empty( $field_description ) ) {
342
+ echo '<td>' . wc_help_tip( $field_description, true ) . '</td>';
343
+ } else {
344
+ echo '<td></td>';
345
+ }
346
+ echo '</tr>';
347
  }
348
+ echo "</table>";
349
+
350
+ // group description.
351
  if ( ! empty( $description ) ) {
352
  printf( '<p class="description">%s</p>', wp_kses_post( $description ) );
353
  }
includes/class-wcpdf-settings.php CHANGED
@@ -244,14 +244,30 @@ class Settings {
244
 
245
  wp_send_json_success( array( 'pdf_data' => base64_encode( $pdf_data ) ) );
246
  } else {
247
- wp_send_json_error( array( 'error' => sprintf( esc_html__( 'Document not available for order #%s, try selecting a different order.', 'woocommerce-pdf-invoices-packing-slips' ), $order_id ) ) );
 
 
 
 
 
 
 
 
248
  }
249
  } else {
250
  wp_send_json_error( array( 'error' => esc_html__( 'No WooCommerce orders found! Please consider adding your first order to see this preview.', 'woocommerce-pdf-invoices-packing-slips' ) ) );
251
  }
252
 
253
  } catch ( \Throwable $th ) {
254
- wp_send_json_error( array( 'error' => sprintf( esc_html__( 'Error trying to generate document: %s', 'woocommerce-pdf-invoices-packing-slips' ), $th->getMessage() ) ) );
 
 
 
 
 
 
 
 
255
  }
256
 
257
  wp_die();
@@ -335,7 +351,15 @@ class Settings {
335
  wp_send_json_error( array( 'error' => esc_html__( 'An error occurred when trying to process your request!', 'woocommerce-pdf-invoices-packing-slips' ) ) );
336
  }
337
  } catch ( \Throwable $th ) {
338
- wp_send_json_error( array( 'error' => sprintf( esc_html__( 'Error trying to get orders: %s', 'woocommerce-pdf-invoices-packing-slips' ), $th->getMessage() ) ) );
 
 
 
 
 
 
 
 
339
  }
340
 
341
  wp_die();
244
 
245
  wp_send_json_success( array( 'pdf_data' => base64_encode( $pdf_data ) ) );
246
  } else {
247
+ wp_send_json_error(
248
+ array(
249
+ 'error' => sprintf(
250
+ /* translators: order ID */
251
+ esc_html__( 'Document not available for order #%s, try selecting a different order.', 'woocommerce-pdf-invoices-packing-slips' ),
252
+ $order_id
253
+ )
254
+ )
255
+ );
256
  }
257
  } else {
258
  wp_send_json_error( array( 'error' => esc_html__( 'No WooCommerce orders found! Please consider adding your first order to see this preview.', 'woocommerce-pdf-invoices-packing-slips' ) ) );
259
  }
260
 
261
  } catch ( \Throwable $th ) {
262
+ wp_send_json_error(
263
+ array(
264
+ 'error' => sprintf(
265
+ /* translators: error message */
266
+ esc_html__( 'Error trying to generate document: %s', 'woocommerce-pdf-invoices-packing-slips' ),
267
+ $th->getMessage()
268
+ )
269
+ )
270
+ );
271
  }
272
 
273
  wp_die();
351
  wp_send_json_error( array( 'error' => esc_html__( 'An error occurred when trying to process your request!', 'woocommerce-pdf-invoices-packing-slips' ) ) );
352
  }
353
  } catch ( \Throwable $th ) {
354
+ wp_send_json_error(
355
+ array(
356
+ 'error' => sprintf(
357
+ /* translators: error message */
358
+ esc_html__( 'Error trying to get orders: %s', 'woocommerce-pdf-invoices-packing-slips' ),
359
+ $th->getMessage()
360
+ )
361
+ )
362
+ );
363
  }
364
 
365
  wp_die();
includes/documents/abstract-wcpdf-order-document-methods.php CHANGED
@@ -336,6 +336,11 @@ abstract class Order_Document_Methods extends Order_Document {
336
  'date_paid',
337
  'cart_hash',
338
  );
 
 
 
 
 
339
  return in_array($key, $order_props);
340
  }
341
 
336
  'date_paid',
337
  'cart_hash',
338
  );
339
+
340
+ if ( version_compare( WOOCOMMERCE_VERSION, '5.6', '>=' ) ) {
341
+ $order_props[] = 'shipping_phone';
342
+ }
343
+
344
  return in_array($key, $order_props);
345
  }
346
 
includes/documents/abstract-wcpdf-order-document.php CHANGED
@@ -67,6 +67,18 @@ abstract class Order_Document {
67
  */
68
  public $settings;
69
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  /**
71
  * TRUE if document is enabled.
72
  * @var bool
@@ -115,8 +127,8 @@ abstract class Order_Document {
115
  }
116
 
117
  // load settings
118
- $this->settings = $this->get_settings();
119
- $this->latest_settings = $this->get_settings( true );
120
  $this->enabled = $this->get_setting( 'enabled', false );
121
  }
122
 
@@ -124,35 +136,44 @@ abstract class Order_Document {
124
  return;
125
  }
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  public function get_settings( $latest = false ) {
128
  // get most current settings
129
- $common_settings = WPO_WCPDF()->settings->get_common_document_settings();
130
  $document_settings = get_option( 'wpo_wcpdf_documents_settings_'.$this->get_type() );
131
- $settings = (array) $document_settings + (array) $common_settings;
132
 
133
  if ( $latest != true ) {
134
  // get historical settings if enabled
135
  if ( ! empty( $this->order ) && $this->use_historical_settings() == true ) {
136
- $order_settings = WCX_Order::get_meta( $this->order, "_wcpdf_{$this->slug}_settings" );
137
- if ( ! empty( $order_settings ) && ! is_array( $order_settings ) ) {
138
- $order_settings = maybe_unserialize( $order_settings );
139
- }
140
- if ( ! empty( $order_settings ) && is_array( $order_settings ) ) {
141
  // ideally we should combine the order settings with the latest settings, so that new settings will
142
  // automatically be applied to existing orders too. However, doing this by combining arrays is not
143
  // possible because the way settings are currently stored means unchecked options are not included.
144
  // This means there is no way to tell whether an option didn't exist yet (in which case the new
145
  // option should be added) or whether the option was simly unchecked (in which case it should not
146
  // be overwritten). This can only be address by storing unchecked checkboxes too.
147
- $settings = (array) $order_settings + array_intersect_key( (array) $settings, array_flip( $this->get_non_historical_settings() ) );
148
  }
149
  }
150
- if ( $this->storing_settings_enabled() && empty( $order_settings ) && ! empty( $this->order ) ) {
151
- // this is either the first time the document is generated, or historical settings are disabled
152
- // in both cases, we store the document settings
153
- // exclude non historical settings from being saved in order meta
154
- WCX_Order::update_meta_data( $this->order, "_wcpdf_{$this->slug}_settings", array_diff_key( $settings, array_flip( $this->get_non_historical_settings() ) ) );
155
- }
156
  }
157
 
158
  // display date & display number were checkbox settings but now a select setting that could be set but empty - should behave as 'unchecked'
@@ -167,6 +188,21 @@ abstract class Order_Document {
167
  return $settings;
168
  }
169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  public function use_historical_settings() {
171
  return apply_filters( 'wpo_wcpdf_document_use_historical_settings', false, $this );
172
  }
@@ -184,6 +220,7 @@ abstract class Order_Document {
184
  'my_account_buttons',
185
  'my_account_restrict',
186
  'invoice_number_column',
 
187
  'paper_size',
188
  'font_subsetting',
189
  ), $this );
@@ -239,13 +276,9 @@ abstract class Order_Document {
239
  }
240
 
241
  public function init() {
242
- // store settings in order
243
- if ( $this->storing_settings_enabled() && !empty( $this->order ) ) {
244
- $common_settings = WPO_WCPDF()->settings->get_common_document_settings();
245
- $document_settings = get_option( 'wpo_wcpdf_documents_settings_'.$this->get_type() );
246
- $settings = (array) $document_settings + (array) $common_settings;
247
- WCX_Order::update_meta_data( $this->order, "_wcpdf_{$this->slug}_settings", $settings );
248
- }
249
 
250
  $this->set_date( current_time( 'timestamp', true ) );
251
  do_action( 'wpo_wcpdf_init_document', $this );
@@ -257,7 +290,7 @@ abstract class Order_Document {
257
  return; // nowhere to save to...
258
  }
259
 
260
- foreach ($this->data as $key => $value) {
261
  if ( empty( $value ) ) {
262
  WCX_Order::delete_meta_data( $order, "_wcpdf_{$this->slug}_{$key}" );
263
  if ( $key == 'date' ) {
@@ -321,15 +354,9 @@ abstract class Order_Document {
321
  $this->save();
322
  }
323
 
324
- //Get most current settings
325
- $common_settings = WPO_WCPDF()->settings->get_common_document_settings();
326
- $document_settings = get_option( 'wpo_wcpdf_documents_settings_'.$this->get_type() );
327
- $settings = (array) $document_settings + (array) $common_settings;
328
- //Update document settings in meta
329
- WCX_Order::update_meta_data( $this->order, "_wcpdf_{$this->slug}_settings", $settings );
330
-
331
- //Use most current settings from here on
332
- $this->settings = $this->get_settings( true );
333
 
334
  //Add order note
335
  $parent_order = $refund_id = false;
67
  */
68
  public $settings;
69
 
70
+ /**
71
+ * Document latest settings.
72
+ * @var array
73
+ */
74
+ public $latest_settings;
75
+
76
+ /**
77
+ * Order settings.
78
+ * @var array
79
+ */
80
+ public $order_settings;
81
+
82
  /**
83
  * TRUE if document is enabled.
84
  * @var bool
127
  }
128
 
129
  // load settings
130
+ $this->init_settings_data();
131
+ $this->save_settings();
132
  $this->enabled = $this->get_setting( 'enabled', false );
133
  }
134
 
136
  return;
137
  }
138
 
139
+ public function init_settings_data() {
140
+ $this->order_settings = $this->get_order_settings();
141
+ $this->settings = $this->get_settings();
142
+ $this->latest_settings = $this->get_settings( true );
143
+ }
144
+
145
+ public function get_order_settings() {
146
+ $order_settings = array();
147
+
148
+ if ( ! empty( $this->order ) ) {
149
+ $order_settings = WCX_Order::get_meta( $this->order, "_wcpdf_{$this->slug}_settings" );
150
+ if ( ! empty( $order_settings ) && ! is_array( $order_settings ) ) {
151
+ $order_settings = maybe_unserialize( $order_settings );
152
+ }
153
+ }
154
+
155
+ return $order_settings;
156
+ }
157
+
158
  public function get_settings( $latest = false ) {
159
  // get most current settings
160
+ $common_settings = WPO_WCPDF()->settings->get_common_document_settings();
161
  $document_settings = get_option( 'wpo_wcpdf_documents_settings_'.$this->get_type() );
162
+ $settings = (array) $document_settings + (array) $common_settings;
163
 
164
  if ( $latest != true ) {
165
  // get historical settings if enabled
166
  if ( ! empty( $this->order ) && $this->use_historical_settings() == true ) {
167
+ if ( ! empty( $this->order_settings ) && is_array( $this->order_settings ) ) {
 
 
 
 
168
  // ideally we should combine the order settings with the latest settings, so that new settings will
169
  // automatically be applied to existing orders too. However, doing this by combining arrays is not
170
  // possible because the way settings are currently stored means unchecked options are not included.
171
  // This means there is no way to tell whether an option didn't exist yet (in which case the new
172
  // option should be added) or whether the option was simly unchecked (in which case it should not
173
  // be overwritten). This can only be address by storing unchecked checkboxes too.
174
+ $settings = (array) $this->order_settings + array_intersect_key( (array) $settings, array_flip( $this->get_non_historical_settings() ) );
175
  }
176
  }
 
 
 
 
 
 
177
  }
178
 
179
  // display date & display number were checkbox settings but now a select setting that could be set but empty - should behave as 'unchecked'
188
  return $settings;
189
  }
190
 
191
+ public function save_settings( $latest = false ) {
192
+ if ( empty( $this->settings ) || empty( $this->latest_settings ) ) {
193
+ $this->init_settings_data();
194
+ }
195
+
196
+ $settings = ( $latest === true ) ? $this->latest_settings : $this->settings;
197
+
198
+ if ( $this->storing_settings_enabled() && ( empty( $this->order_settings ) || $latest ) && ! empty( $settings ) && ! empty( $this->order ) ) {
199
+ // this is either the first time the document is generated, or historical settings are disabled
200
+ // in both cases, we store the document settings
201
+ // exclude non historical settings from being saved in order meta
202
+ WCX_Order::update_meta_data( $this->order, "_wcpdf_{$this->slug}_settings", array_diff_key( $settings, array_flip( $this->get_non_historical_settings() ) ) );
203
+ }
204
+ }
205
+
206
  public function use_historical_settings() {
207
  return apply_filters( 'wpo_wcpdf_document_use_historical_settings', false, $this );
208
  }
220
  'my_account_buttons',
221
  'my_account_restrict',
222
  'invoice_number_column',
223
+ 'invoice_date_column',
224
  'paper_size',
225
  'font_subsetting',
226
  ), $this );
276
  }
277
 
278
  public function init() {
279
+ // init settings
280
+ $this->init_settings_data();
281
+ $this->save_settings();
 
 
 
 
282
 
283
  $this->set_date( current_time( 'timestamp', true ) );
284
  do_action( 'wpo_wcpdf_init_document', $this );
290
  return; // nowhere to save to...
291
  }
292
 
293
+ foreach ( $this->data as $key => $value ) {
294
  if ( empty( $value ) ) {
295
  WCX_Order::delete_meta_data( $order, "_wcpdf_{$this->slug}_{$key}" );
296
  if ( $key == 'date' ) {
354
  $this->save();
355
  }
356
 
357
+ // init settings
358
+ $this->init_settings_data();
359
+ $this->save_settings( true );
 
 
 
 
 
 
360
 
361
  //Add order note
362
  $parent_order = $refund_id = false;
includes/documents/class-wcpdf-invoice.php CHANGED
@@ -57,14 +57,9 @@ class Invoice extends Order_Document_Methods {
57
  }
58
 
59
  public function init() {
60
- // store settings in order
61
- if ( $this->storing_settings_enabled() && !empty( $this->order ) ) {
62
- $common_settings = WPO_WCPDF()->settings->get_common_document_settings();
63
- $document_settings = get_option( 'wpo_wcpdf_documents_settings_'.$this->get_type() );
64
- $settings = (array) $document_settings + (array) $common_settings;
65
- // exclude non historical settings from being saved in order meta
66
- WCX_Order::update_meta_data( $this->order, "_wcpdf_{$this->slug}_settings", array_diff_key( $settings, array_flip( $this->get_non_historical_settings() ) ) );
67
- }
68
 
69
  if ( isset( $this->settings['display_date'] ) && $this->settings['display_date'] == 'order_date' && !empty( $this->order ) ) {
70
  $this->set_date( WCX_Order::get_prop( $this->order, 'date_created' ) );
@@ -311,33 +306,43 @@ class Invoice extends Order_Document_Methods {
311
  )
312
  ),
313
  array(
314
- 'type' => 'setting',
315
- 'id' => 'number_format',
316
- 'title' => __( 'Number format', 'woocommerce-pdf-invoices-packing-slips' ),
317
- 'callback' => 'multiple_text_input',
318
- 'section' => 'invoice',
319
- 'args' => array(
320
- 'option_name' => $option_name,
321
- 'id' => 'number_format',
322
- 'fields' => array(
323
- 'prefix' => array(
324
- 'placeholder' => __( 'Prefix' , 'woocommerce-pdf-invoices-packing-slips' ),
325
- 'size' => 20,
326
- 'description' => __( 'to use the invoice year and/or month, use [invoice_year] or [invoice_month] respectively' , 'woocommerce-pdf-invoices-packing-slips' ),
 
 
 
 
327
  ),
328
- 'suffix' => array(
329
- 'placeholder' => __( 'Suffix' , 'woocommerce-pdf-invoices-packing-slips' ),
330
- 'size' => 20,
331
- 'description' => '',
 
 
 
 
332
  ),
333
- 'padding' => array(
334
- 'placeholder' => __( 'Padding' , 'woocommerce-pdf-invoices-packing-slips' ),
335
- 'size' => 20,
336
- 'type' => 'number',
337
- 'description' => __( 'enter the number of digits here - enter "6" to display 42 as 000042' , 'woocommerce-pdf-invoices-packing-slips' ),
 
338
  ),
339
  ),
340
- 'description' => __( 'note: if you have already created a custom invoice number format with a filter, the above settings will be ignored' , 'woocommerce-pdf-invoices-packing-slips' ),
 
341
  )
342
  ),
343
  array(
@@ -387,6 +392,17 @@ class Invoice extends Order_Document_Methods {
387
  'id' => 'invoice_number_column',
388
  )
389
  ),
 
 
 
 
 
 
 
 
 
 
 
390
  array(
391
  'type' => 'setting',
392
  'id' => 'disable_free',
57
  }
58
 
59
  public function init() {
60
+ // init settings
61
+ $this->init_settings_data();
62
+ $this->save_settings();
 
 
 
 
 
63
 
64
  if ( isset( $this->settings['display_date'] ) && $this->settings['display_date'] == 'order_date' && !empty( $this->order ) ) {
65
  $this->set_date( WCX_Order::get_prop( $this->order, 'date_created' ) );
306
  )
307
  ),
308
  array(
309
+ 'type' => 'setting',
310
+ 'id' => 'number_format',
311
+ 'title' => __( 'Number format', 'woocommerce-pdf-invoices-packing-slips' ),
312
+ 'callback' => 'multiple_text_input',
313
+ 'section' => 'invoice',
314
+ 'args' => array(
315
+ 'option_name' => $option_name,
316
+ 'id' => 'number_format',
317
+ 'fields' => array(
318
+ 'prefix' => array(
319
+ 'label' => __( 'Prefix' , 'woocommerce-pdf-invoices-packing-slips' ),
320
+ 'size' => 20,
321
+ 'description' => __( 'If set, this value will be used as number prefix.' , 'woocommerce-pdf-invoices-packing-slips' ) . ' ' . sprintf(
322
+ /* translators: 1. document type, 2-3 placeholders */
323
+ __( 'You can use the %1$s year and/or month with the %2$s or %3$s placeholders respectively.', 'woocommerce-pdf-invoices-packing-slips' ),
324
+ __( 'invoice', 'woocommerce-pdf-invoices-packing-slips' ), '<strong>[invoice_year]</strong>', '<strong>[invoice_month]</strong>'
325
+ ) . ' ' . __( 'Check the Docs article below to see all the available placeholders for prefix/suffix.', 'woocommerce-pdf-invoices-packing-slips' ),
326
  ),
327
+ 'suffix' => array(
328
+ 'label' => __( 'Suffix' , 'woocommerce-pdf-invoices-packing-slips' ),
329
+ 'size' => 20,
330
+ 'description' => __( 'If set, this value will be used as number suffix.' , 'woocommerce-pdf-invoices-packing-slips' ) . ' ' . sprintf(
331
+ /* translators: 1. document type, 2-3 placeholders */
332
+ __( 'You can use the %1$s year and/or month with the %2$s or %3$s placeholders respectively.', 'woocommerce-pdf-invoices-packing-slips' ),
333
+ __( 'invoice', 'woocommerce-pdf-invoices-packing-slips' ), '<strong>[invoice_year]</strong>', '<strong>[invoice_month]</strong>'
334
+ ) . ' ' . __( 'Check the Docs article below to see all the available placeholders for prefix/suffix.', 'woocommerce-pdf-invoices-packing-slips' ),
335
  ),
336
+ 'padding' => array(
337
+ 'label' => __( 'Padding' , 'woocommerce-pdf-invoices-packing-slips' ),
338
+ 'size' => 20,
339
+ 'type' => 'number',
340
+ /* translators: document type */
341
+ 'description' => sprintf( __( 'Enter the number of digits you want to use as padding. For instance, enter <code>6</code> to display the %s number <code>123</code> as <code>000123</code>, filling it with zeros until the number set as padding is reached.' , 'woocommerce-pdf-invoices-packing-slips' ), __( 'invoice', 'woocommerce-pdf-invoices-packing-slips' ) ),
342
  ),
343
  ),
344
+ /* translators: document type */
345
+ 'description' => __( 'For more information about setting up the number format and see the available placeholders for the prefix and suffix, check this article:', 'woocommerce-pdf-invoices-packing-slips' ) . sprintf( ' <a href="https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/number-format-explained/" target="_blank">%s</a>', __( 'Number format explained', 'woocommerce-pdf-invoices-packing-slips') ) . '.<br><br>'. sprintf( __( '<strong>Note</strong>: if you have already created a custom %s number format with a filter, the above settings will be ignored.', 'woocommerce-pdf-invoices-packing-slips' ), __( 'invoice', 'woocommerce-pdf-invoices-packing-slips' ) ),
346
  )
347
  ),
348
  array(
392
  'id' => 'invoice_number_column',
393
  )
394
  ),
395
+ array(
396
+ 'type' => 'setting',
397
+ 'id' => 'invoice_date_column',
398
+ 'title' => __( 'Enable invoice date column in the orders list', 'woocommerce-pdf-invoices-packing-slips' ),
399
+ 'callback' => 'checkbox',
400
+ 'section' => 'invoice',
401
+ 'args' => array(
402
+ 'option_name' => $option_name,
403
+ 'id' => 'invoice_date_column',
404
+ )
405
+ ),
406
  array(
407
  'type' => 'setting',
408
  'id' => 'disable_free',
includes/legacy/class-wcpdf-legacy-settings.php CHANGED
@@ -46,6 +46,7 @@ class Legacy_Settings {
46
  'reset_number_yearly' => array( 'wpo_wcpdf_template_settings' => 'yearly_reset_invoice_number' ),
47
  'my_account_buttons' => array( 'wpo_wcpdf_general_settings' => 'my_account_buttons' ),
48
  'invoice_number_column' => array( 'wpo_wcpdf_general_settings' => 'invoice_number_column' ),
 
49
  'disable_free' => array( 'wpo_wcpdf_general_settings' => 'disable_free' ),
50
  ),
51
  'wpo_wcpdf_documents_settings_packing-slip' => array(
46
  'reset_number_yearly' => array( 'wpo_wcpdf_template_settings' => 'yearly_reset_invoice_number' ),
47
  'my_account_buttons' => array( 'wpo_wcpdf_general_settings' => 'my_account_buttons' ),
48
  'invoice_number_column' => array( 'wpo_wcpdf_general_settings' => 'invoice_number_column' ),
49
+ 'invoice_date_column' => array( 'wpo_wcpdf_general_settings' => 'invoice_date_column' ),
50
  'disable_free' => array( 'wpo_wcpdf_general_settings' => 'disable_free' ),
51
  ),
52
  'wpo_wcpdf_documents_settings_packing-slip' => array(
includes/views/setup-wizard/display-options.php CHANGED
@@ -10,47 +10,83 @@
10
  ?>
11
  <tr>
12
  <th>
13
- <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]" value="">
14
- <input id="display-shipping-address" type="checkbox" <?php echo ! empty( $current_settings['display_shipping_address'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]" value="1">
15
  </th>
16
  <td>
17
- <label for="display-shipping-address" class="checkbox"><?php esc_html_e( 'Display shipping address', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  </td>
19
  </tr>
20
  <tr>
21
  <th>
22
- <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="">
23
- <input id="display-email" type="checkbox" <?php echo ! empty( $current_settings['display_email'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="1">
24
  </th>
25
  <td>
26
- <label for="display-email" class="checkbox"><?php esc_html_e( 'Display email address', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
27
  </td>
28
  </tr>
29
  <tr>
30
  <th>
31
- <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="">
32
- <input id="display-phone" type="checkbox" <?php echo ! empty( $current_settings['display_phone'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="1">
33
  </th>
34
  <td>
35
- <label for="display-phone" class="checkbox"><?php esc_html_e( 'Display phone number', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
36
  </td>
37
  </tr>
38
  <tr>
39
  <th>
40
- <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]" value="">
41
- <input id="display-date" type="checkbox" <?php echo ! empty( $current_settings['display_date'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]" value="invoice_date">
42
  </th>
43
  <td>
44
- <label for="display-date" class="checkbox"><?php esc_html_e( 'Display invoice date', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  </td>
46
  <tr>
47
  </tr>
48
  <th>
49
- <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]" value="">
50
- <input id="display-number" type="checkbox" <?php echo ! empty( $current_settings['display_number'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]" value="invoice_number">
51
  </th>
52
  <td>
53
- <label for="display-number" class="checkbox"><?php esc_html_e( 'Display invoice number', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  </td>
55
  </tr>
56
  </table>
10
  ?>
11
  <tr>
12
  <th>
13
+ <label for="display-shipping-address" class="checkbox"><?php esc_html_e( 'Shipping address', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
14
  </th>
15
  <td>
16
+ <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]" value="">
17
+ <select id="display-shipping-address" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_shipping_address]">
18
+ <?php
19
+ $options = array(
20
+ '' => __( 'No' , 'woocommerce-pdf-invoices-packing-slips' ),
21
+ 'when_different' => __( 'Only when different from billing address' , 'woocommerce-pdf-invoices-packing-slips' ),
22
+ 'always' => __( 'Always' , 'woocommerce-pdf-invoices-packing-slips' ),
23
+ );
24
+ foreach ( $options as $slug => $name ) {
25
+ $selected = ( ! empty( $current_settings['display_shipping_address'] ) && $current_settings['display_shipping_address'] == $slug ) ? 'selected' : '';
26
+ echo '<option value="'.$slug.'" '.$selected.'>'.$name.'</option>';
27
+ }
28
+ ?>
29
+ </select>
30
  </td>
31
  </tr>
32
  <tr>
33
  <th>
34
+ <label for="display-email" class="checkbox"><?php esc_html_e( 'Email address', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
35
  </th>
36
  <td>
37
+ <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="">
38
+ <input id="display-email" type="checkbox" <?php echo ! empty( $current_settings['display_email'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_email]" value="1">
39
  </td>
40
  </tr>
41
  <tr>
42
  <th>
43
+ <label for="display-phone" class="checkbox"><?php esc_html_e( 'Phone number', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
44
  </th>
45
  <td>
46
+ <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="">
47
+ <input id="display-phone" type="checkbox" <?php echo ! empty( $current_settings['display_phone'] ) ? 'checked' : ''; ?> name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_phone]" value="1">
48
  </td>
49
  </tr>
50
  <tr>
51
  <th>
52
+ <label for="display-date" class="checkbox"><?php esc_html_e( 'Invoice date', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
53
  </th>
54
  <td>
55
+ <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]" value="">
56
+ <select id="display-date" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_date]">
57
+ <?php
58
+ $options = array(
59
+ '' => __( 'No' , 'woocommerce-pdf-invoices-packing-slips' ),
60
+ 'invoice_date' => __( 'Invoice Date' , 'woocommerce-pdf-invoices-packing-slips' ),
61
+ 'order_date' => __( 'Order Date' , 'woocommerce-pdf-invoices-packing-slips' ),
62
+ );
63
+ foreach ( $options as $slug => $name ) {
64
+ $selected = ( ! empty( $current_settings['display_date'] ) && $current_settings['display_date'] == $slug ) ? 'selected' : '';
65
+ echo '<option value="'.$slug.'" '.$selected.'>'.$name.'</option>';
66
+ }
67
+ ?>
68
+ </select>
69
  </td>
70
  <tr>
71
  </tr>
72
  <th>
73
+ <label for="display-number" class="checkbox"><?php esc_html_e( 'Invoice number', 'woocommerce-pdf-invoices-packing-slips' ); ?></label>
 
74
  </th>
75
  <td>
76
+ <input type="hidden" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]" value="">
77
+ <select id="display-number" name="wcpdf_settings[wpo_wcpdf_documents_settings_invoice][display_number]">
78
+ <?php
79
+ $options = array(
80
+ '' => __( 'No' , 'woocommerce-pdf-invoices-packing-slips' ),
81
+ 'invoice_number' => __( 'Invoice Number' , 'woocommerce-pdf-invoices-packing-slips' ),
82
+ 'order_number' => __( 'Order Number' , 'woocommerce-pdf-invoices-packing-slips' ),
83
+ );
84
+ foreach ( $options as $slug => $name ) {
85
+ $selected = ( ! empty( $current_settings['display_number'] ) && $current_settings['display_number'] == $slug ) ? 'selected' : '';
86
+ echo '<option value="'.$slug.'" '.$selected.'>'.$name.'</option>';
87
+ }
88
+ ?>
89
+ </select>
90
  </td>
91
  </tr>
92
  </table>
languages/woocommerce-pdf-invoices-packing-slips.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2021 Ewout Fernhout
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce PDF Invoices & Packing Slips 2.10.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2021-11-10T10:38:33+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: woocommerce-pdf-invoices-packing-slips\n"
@@ -19,8 +19,7 @@ msgid "WooCommerce PDF Invoices & Packing Slips"
19
  msgstr ""
20
 
21
  #. Plugin URI of the plugin
22
- #. Author URI of the plugin
23
- msgid "http://www.wpovernight.com"
24
  msgstr ""
25
 
26
  #. Description of the plugin
@@ -28,7 +27,11 @@ msgid "Create, print & email PDF invoices & packing slips for WooCommerce orders
28
  msgstr ""
29
 
30
  #. Author of the plugin
31
- msgid "Ewout Fernhout"
 
 
 
 
32
  msgstr ""
33
 
34
  #. translators: rounded count
@@ -45,11 +48,11 @@ msgid "Yes you deserve it!"
45
  msgstr ""
46
 
47
  #: includes/class-wcpdf-admin.php:96
48
- #: includes/class-wcpdf-main.php:605
49
- #: includes/views/attachment-settings-hint.php:24
50
- #: includes/views/wcpdf-extensions.php:131
51
- #: woocommerce-pdf-invoices-packingslips.php:377
52
- #: woocommerce-pdf-invoices-packingslips.php:421
53
  msgid "Hide this message"
54
  msgstr ""
55
 
@@ -70,6 +73,7 @@ msgid "Jumpstart the plugin by following our wizard!"
70
  msgstr ""
71
 
72
  #: includes/class-wcpdf-admin.php:133
 
73
  msgid "Run the Setup Wizard"
74
  msgstr ""
75
 
@@ -77,127 +81,131 @@ msgstr ""
77
  msgid "I am the wizard"
78
  msgstr ""
79
 
80
- #: includes/class-wcpdf-admin.php:224
81
- #: includes/class-wcpdf-main.php:918
82
- #: includes/documents/class-wcpdf-invoice.php:302
83
  msgid "Invoice Number"
84
  msgstr ""
85
 
86
- #: includes/class-wcpdf-admin.php:261
87
  msgid "Send order email"
88
  msgstr ""
89
 
90
- #: includes/class-wcpdf-admin.php:272
91
  msgid "Create PDF"
92
  msgstr ""
93
 
94
- #: includes/class-wcpdf-admin.php:282
95
  msgid "PDF document data"
96
  msgstr ""
97
 
98
- #: includes/class-wcpdf-admin.php:304
99
  msgid "Choose an email to send&hellip;"
100
  msgstr ""
101
 
102
- #: includes/class-wcpdf-admin.php:320
103
  msgid "Save order & send email"
104
  msgstr ""
105
 
106
- #: includes/class-wcpdf-admin.php:322
107
  msgid "Send email"
108
  msgstr ""
109
 
110
- #: includes/class-wcpdf-admin.php:378
111
- #: includes/documents/class-wcpdf-invoice.php:460
112
  msgid "Invoice Number:"
113
  msgstr ""
114
 
115
- #: includes/class-wcpdf-admin.php:381
116
- #: includes/documents/class-wcpdf-invoice.php:468
117
  msgid "Invoice Date:"
118
  msgstr ""
119
 
120
- #: includes/class-wcpdf-admin.php:384
121
  msgid "Notes (printed in the invoice):"
122
  msgstr ""
123
 
124
  #. translators: document title
125
- #: includes/class-wcpdf-admin.php:469
126
  msgid "Set %s number & date"
127
  msgstr ""
128
 
129
- #: includes/class-wcpdf-admin.php:478
 
 
 
 
130
  msgid "unformatted!"
131
  msgstr ""
132
 
133
- #: includes/class-wcpdf-admin.php:518
134
  msgid "Save changes"
135
  msgstr ""
136
 
137
- #: includes/class-wcpdf-admin.php:519
138
  msgid "Cancel"
139
  msgstr ""
140
 
141
  #. translators: name/description of the context for document creation logs
142
- #: includes/class-wcpdf-admin.php:598
143
- #: includes/class-wcpdf-admin.php:832
144
  msgid "order details (number and/or date set manually)"
145
  msgstr ""
146
 
147
  #. translators: %s: email title
148
- #: includes/class-wcpdf-admin.php:647
149
  msgid "%s email notification manually sent."
150
  msgstr ""
151
 
152
- #: includes/class-wcpdf-admin.php:734
153
  msgid "Nonce expired!"
154
  msgstr ""
155
 
156
- #: includes/class-wcpdf-admin.php:740
157
  msgid "Bad action!"
158
  msgstr ""
159
 
160
- #: includes/class-wcpdf-admin.php:746
161
  msgid "Incomplete request!"
162
  msgstr ""
163
 
164
- #: includes/class-wcpdf-admin.php:752
165
  msgid "No permissions!"
166
  msgstr ""
167
 
168
- #: includes/class-wcpdf-admin.php:776
169
  msgid "Document data saved!"
170
  msgstr ""
171
 
172
- #: includes/class-wcpdf-admin.php:777
173
  msgid "An error occurred while saving the document data!"
174
  msgstr ""
175
 
176
- #: includes/class-wcpdf-admin.php:780
177
  msgid "Document regenerated!"
178
  msgstr ""
179
 
180
- #: includes/class-wcpdf-admin.php:781
181
  msgid "An error occurred while regenerating the document!"
182
  msgstr ""
183
 
184
- #: includes/class-wcpdf-admin.php:784
185
  msgid "Document deleted!"
186
  msgstr ""
187
 
188
- #: includes/class-wcpdf-admin.php:785
189
  msgid "An error occurred while deleting the document!"
190
  msgstr ""
191
 
192
- #: includes/class-wcpdf-admin.php:841
193
  msgid "Document does not exist."
194
  msgstr ""
195
 
196
- #: includes/class-wcpdf-admin.php:850
197
  msgid "Document is empty."
198
  msgstr ""
199
 
200
- #: includes/class-wcpdf-admin.php:881
201
  msgid "DEBUG output enabled"
202
  msgstr ""
203
 
@@ -209,70 +217,95 @@ msgstr ""
209
  msgid "Are you sure you want to regenerate this document? This will make the document reflect the most current settings (such as footer text, document name, etc.) rather than using historical settings."
210
  msgstr ""
211
 
212
- #: includes/class-wcpdf-frontend.php:129
 
 
 
 
 
 
 
 
213
  msgid "Download invoice (PDF)"
214
  msgstr ""
215
 
216
- #: includes/class-wcpdf-main.php:258
217
- #: includes/class-wcpdf-main.php:263
218
- #: includes/class-wcpdf-main.php:337
 
 
 
219
  msgid "You do not have sufficient permissions to access this page."
220
  msgstr ""
221
 
222
- #: includes/class-wcpdf-main.php:272
223
  msgid "You haven't selected any orders"
224
  msgstr ""
225
 
226
- #: includes/class-wcpdf-main.php:276
227
  msgid "Some of the export parameters are missing."
228
  msgstr ""
229
 
230
  #. translators: document type
231
- #: includes/class-wcpdf-main.php:378
232
  msgid "Document of type '%s' for the selected order(s) could not be generated"
233
  msgstr ""
234
 
235
  #. translators: 1. plugin name, 2. directory path
236
- #: includes/class-wcpdf-main.php:603
237
  msgid "The %1$s directory %2$s couldn't be created or is not writable!"
238
  msgstr ""
239
 
240
- #: includes/class-wcpdf-main.php:604
241
  msgid "Please check your directories write permissions or contact your hosting service provider."
242
  msgstr ""
243
 
244
- #: includes/class-wcpdf-main.php:919
245
- #: includes/documents/class-wcpdf-invoice.php:286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  msgid "Invoice Date"
247
  msgstr ""
248
 
249
  #. translators: name/description of the context for document creation logs
250
- #: includes/class-wcpdf-main.php:949
251
  msgid "bulk order action"
252
  msgstr ""
253
 
254
  #. translators: name/description of the context for document creation logs
255
- #: includes/class-wcpdf-main.php:957
256
  msgid "single order action"
257
  msgstr ""
258
 
259
  #. translators: name/description of the context for document creation logs
260
- #: includes/class-wcpdf-main.php:965
261
  msgid "my account"
262
  msgstr ""
263
 
264
  #. translators: name/description of the context for document creation logs
265
- #: includes/class-wcpdf-main.php:973
266
  msgid "email attachment"
267
  msgstr ""
268
 
269
  #. translators: 1. document title, 2. creation source
270
- #: includes/class-wcpdf-main.php:982
271
  msgid "PDF %1$s created via %2$s."
272
  msgstr ""
273
 
274
  #. translators: document title
275
- #: includes/class-wcpdf-main.php:1026
276
  msgid "Order %s Saved"
277
  msgstr ""
278
 
@@ -284,20 +317,20 @@ msgstr ""
284
  msgid "These are used for the (optional) footer columns in the <em>Modern (Premium)</em> template, but can also be used for other elements in your custom template"
285
  msgstr ""
286
 
287
- #: includes/class-wcpdf-settings-callbacks.php:386
288
  msgid "Image resolution"
289
  msgstr ""
290
 
291
- #: includes/class-wcpdf-settings-callbacks.php:394
292
  msgid "The image resolution exceeds the recommended maximum of 600dpi. This will unnecessarily increase the size of your PDF files and could negatively affect performance."
293
  msgstr ""
294
 
295
- #: includes/class-wcpdf-settings-callbacks.php:423
296
  msgid "Save"
297
  msgstr ""
298
 
299
  #: includes/class-wcpdf-settings-debug.php:45
300
- #: woocommerce-pdf-invoices-packingslips.php:376
301
  msgid "Generate random temporary folder name"
302
  msgstr ""
303
 
@@ -318,137 +351,117 @@ msgstr ""
318
  msgid "Remove temporary files"
319
  msgstr ""
320
 
321
- #: includes/class-wcpdf-settings-debug.php:109
322
- msgid "Unable to read temporary folder contents!"
323
- msgstr ""
324
-
325
- #. translators: 1,2. file count
326
- #: includes/class-wcpdf-settings-debug.php:127
327
- msgid "Unable to delete %1$d files! (deleted %2$d)"
328
- msgstr ""
329
-
330
- #. translators: file count
331
- #: includes/class-wcpdf-settings-debug.php:131
332
- msgid "Successfully deleted %d files!"
333
- msgstr ""
334
-
335
- #: includes/class-wcpdf-settings-debug.php:135
336
- msgid "Nothing to delete!"
337
- msgstr ""
338
-
339
- #: includes/class-wcpdf-settings-debug.php:146
340
  msgid "Delete legacy (1.X) settings"
341
  msgstr ""
342
 
343
- #: includes/class-wcpdf-settings-debug.php:162
344
  msgid "Legacy settings deleted!"
345
  msgstr ""
346
 
347
- #: includes/class-wcpdf-settings-debug.php:192
348
  msgid "Debug settings"
349
  msgstr ""
350
 
351
- #: includes/class-wcpdf-settings-debug.php:198
352
  msgid "Legacy mode"
353
  msgstr ""
354
 
355
- #: includes/class-wcpdf-settings-debug.php:204
356
  msgid "Legacy mode ensures compatibility with templates and filters from previous versions."
357
  msgstr ""
358
 
359
- #: includes/class-wcpdf-settings-debug.php:210
360
  msgid "Legacy textdomain fallback"
361
  msgstr ""
362
 
363
- #: includes/class-wcpdf-settings-debug.php:216
364
  msgid "Legacy textdomain fallback ensures compatibility with translation files from versions prior to 2017-05-15."
365
  msgstr ""
366
 
367
- #: includes/class-wcpdf-settings-debug.php:222
368
  msgid "Allow guest access"
369
  msgstr ""
370
 
371
- #: includes/class-wcpdf-settings-debug.php:228
372
  msgid "Enable this to allow customers that purchase without an account to access their PDF with a unique key"
373
  msgstr ""
374
 
375
- #: includes/class-wcpdf-settings-debug.php:234
 
 
 
 
 
 
 
 
376
  msgid "Calculate document numbers (slow)"
377
  msgstr ""
378
 
379
- #: includes/class-wcpdf-settings-debug.php:240
380
  msgid "Document numbers (such as invoice numbers) are generated using AUTO_INCREMENT by default. Use this setting if your database auto increments with more than 1."
381
  msgstr ""
382
 
383
- #: includes/class-wcpdf-settings-debug.php:246
384
  msgid "Enable debug output"
385
  msgstr ""
386
 
387
- #: includes/class-wcpdf-settings-debug.php:252
388
  msgid "Enable this option to output plugin errors if you're getting a blank page or other PDF generation issues"
389
  msgstr ""
390
 
391
- #: includes/class-wcpdf-settings-debug.php:253
392
  msgid "<b>Caution!</b> This setting may reveal errors (from other plugins) in other places on your site too, therefor this is not recommended to leave it enabled on live sites."
393
  msgstr ""
394
 
395
- #: includes/class-wcpdf-settings-debug.php:254
396
  msgid "You can also add <code>&debug=true</code> to the URL to apply this on a per-order basis."
397
  msgstr ""
398
 
399
- #: includes/class-wcpdf-settings-debug.php:260
400
  msgid "Enable automatic cleanup"
401
  msgstr ""
402
 
403
  #. translators: number of days
404
- #: includes/class-wcpdf-settings-debug.php:268
405
  msgid "every %s days"
406
  msgstr ""
407
 
408
- #: includes/class-wcpdf-settings-debug.php:273
409
  msgid "Automatically clean up PDF files stored in the temporary folder (used for email attachments)"
410
  msgstr ""
411
 
412
- #: includes/class-wcpdf-settings-debug.php:274
413
- msgid "<b>Disabled:</b> The PHP functions glob and filemtime are required for automatic cleanup but not enabled on your server."
414
- msgstr ""
415
-
416
- #: includes/class-wcpdf-settings-debug.php:280
417
  msgid "Output to HTML"
418
  msgstr ""
419
 
420
- #: includes/class-wcpdf-settings-debug.php:286
421
  msgid "Send the template output as HTML to the browser instead of creating a PDF."
422
  msgstr ""
423
 
424
- #: includes/class-wcpdf-settings-debug.php:287
425
  msgid "You can also add <code>&output=html</code> to the URL to apply this on a per-order basis."
426
  msgstr ""
427
 
428
- #: includes/class-wcpdf-settings-debug.php:293
429
- msgid "Use alternative HTML5 parser to parse HTML"
430
- msgstr ""
431
-
432
- #: includes/class-wcpdf-settings-debug.php:304
433
  msgid "Log to order notes"
434
  msgstr ""
435
 
436
- #: includes/class-wcpdf-settings-debug.php:310
437
  msgid "Log PDF document creation to order notes."
438
  msgstr ""
439
 
440
- #: includes/class-wcpdf-settings-documents.php:30
441
- #: includes/class-wcpdf-settings.php:107
442
- msgid "Documents"
443
  msgstr ""
444
 
445
- #: includes/class-wcpdf-settings-documents.php:36
446
- #: includes/class-wcpdf-settings-documents.php:57
447
- msgid "untitled"
448
  msgstr ""
449
 
450
- #: includes/class-wcpdf-settings-documents.php:50
451
- msgid "All available documents are listed below. Click on a document to configure it."
452
  msgstr ""
453
 
454
  #: includes/class-wcpdf-settings-general.php:40
@@ -481,12 +494,12 @@ msgid "Paper size"
481
  msgstr ""
482
 
483
  #: includes/class-wcpdf-settings-general.php:82
484
- #: includes/views/setup-wizard/paper-format.php:12
485
  msgid "A4"
486
  msgstr ""
487
 
488
  #: includes/class-wcpdf-settings-general.php:83
489
- #: includes/views/setup-wizard/paper-format.php:13
490
  msgid "Letter"
491
  msgstr ""
492
 
@@ -523,17 +536,17 @@ msgid "Shop header/logo"
523
  msgstr ""
524
 
525
  #: includes/class-wcpdf-settings-general.php:132
526
- #: includes/views/setup-wizard/logo.php:20
527
  msgid "Select or upload your invoice header/logo"
528
  msgstr ""
529
 
530
  #: includes/class-wcpdf-settings-general.php:133
531
- #: includes/views/setup-wizard/logo.php:20
532
  msgid "Set image"
533
  msgstr ""
534
 
535
  #: includes/class-wcpdf-settings-general.php:134
536
- #: includes/views/setup-wizard/logo.php:20
537
  msgid "Remove image"
538
  msgstr ""
539
 
@@ -550,76 +563,119 @@ msgstr ""
550
  msgid "Shop Name"
551
  msgstr ""
552
 
553
- #: includes/class-wcpdf-settings-general.php:168
554
  msgid "Shop Address"
555
  msgstr ""
556
 
557
- #: includes/class-wcpdf-settings-general.php:183
558
  msgid "Footer: terms & conditions, policies, etc."
559
  msgstr ""
560
 
561
- #: includes/class-wcpdf-settings-general.php:198
562
  msgid "Extra template fields"
563
  msgstr ""
564
 
565
- #: includes/class-wcpdf-settings-general.php:204
566
  msgid "Extra field 1"
567
  msgstr ""
568
 
569
- #: includes/class-wcpdf-settings-general.php:212
570
  msgid "This is footer column 1 in the <i>Modern (Premium)</i> template"
571
  msgstr ""
572
 
573
- #: includes/class-wcpdf-settings-general.php:219
574
  msgid "Extra field 2"
575
  msgstr ""
576
 
577
- #: includes/class-wcpdf-settings-general.php:227
578
  msgid "This is footer column 2 in the <i>Modern (Premium)</i> template"
579
  msgstr ""
580
 
581
- #: includes/class-wcpdf-settings-general.php:234
582
  msgid "Extra field 3"
583
  msgstr ""
584
 
585
- #: includes/class-wcpdf-settings-general.php:242
586
  msgid "This is footer column 3 in the <i>Modern (Premium)</i> template"
587
  msgstr ""
588
 
589
- #: includes/class-wcpdf-settings-general.php:290
590
  msgid "Custom"
591
  msgstr ""
592
 
593
- #: includes/class-wcpdf-settings.php:58
594
- #: includes/class-wcpdf-settings.php:59
595
  msgid "PDF Invoices"
596
  msgstr ""
597
 
598
- #: includes/class-wcpdf-settings.php:84
599
  msgid "Documentation"
600
  msgstr ""
601
 
602
- #: includes/class-wcpdf-settings.php:85
603
  msgid "Support Forum"
604
  msgstr ""
605
 
606
  #. translators: database row value
607
- #: includes/class-wcpdf-settings.php:98
608
- msgid "<strong>Warning!</strong> Your database has an AUTO_INCREMENT step size of %s, your invoice numbers may not be sequential. Enable the 'Calculate document numbers (slow)' setting in the Status tab to use an alternate method."
609
  msgstr ""
610
 
611
- #: includes/class-wcpdf-settings.php:106
612
  msgid "General"
613
  msgstr ""
614
 
615
- #: includes/class-wcpdf-settings.php:112
616
- #: includes/views/dompdf-status.php:188
 
 
 
 
617
  msgid "Status"
618
  msgstr ""
619
 
620
- #. translators: 1. path, 2. template ID
621
- #: includes/class-wcpdf-settings.php:399
622
- msgid "Template setting migrated from %1$s to %2$s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
623
  msgstr ""
624
 
625
  #: includes/class-wcpdf-setup-wizard.php:53
@@ -650,23 +706,27 @@ msgstr ""
650
  msgid "Ready!"
651
  msgstr ""
652
 
653
- #: includes/class-wcpdf-setup-wizard.php:135
654
  msgid "WooCommerce PDF Invoices & Packing Slips &rsaquo; Setup Wizard"
655
  msgstr ""
656
 
657
- #: includes/class-wcpdf-setup-wizard.php:187
 
 
 
 
658
  msgid "Previous"
659
  msgstr ""
660
 
661
- #: includes/class-wcpdf-setup-wizard.php:192
662
  msgid "Next"
663
  msgstr ""
664
 
665
- #: includes/class-wcpdf-setup-wizard.php:193
666
  msgid "Skip this step"
667
  msgstr ""
668
 
669
- #: includes/class-wcpdf-setup-wizard.php:195
670
  msgid "Finish"
671
  msgstr ""
672
 
@@ -675,260 +735,291 @@ msgstr ""
675
  msgid "N/A"
676
  msgstr ""
677
 
678
- #: includes/documents/abstract-wcpdf-order-document-methods.php:469
679
  msgid "Payment method"
680
  msgstr ""
681
 
682
- #: includes/documents/abstract-wcpdf-order-document-methods.php:490
683
  msgid "Shipping method"
684
  msgstr ""
685
 
686
- #: includes/documents/abstract-wcpdf-order-document-methods.php:972
687
  msgid "Subtotal"
688
  msgstr ""
689
 
690
- #: includes/documents/abstract-wcpdf-order-document-methods.php:997
691
  msgid "Shipping"
692
  msgstr ""
693
 
694
- #: includes/documents/abstract-wcpdf-order-document-methods.php:1060
695
  msgid "Discount"
696
  msgstr ""
697
 
698
- #: includes/documents/abstract-wcpdf-order-document-methods.php:1101
699
  msgid "VAT"
700
  msgstr ""
701
 
702
- #: includes/documents/abstract-wcpdf-order-document-methods.php:1102
703
  msgid "Tax rate"
704
  msgstr ""
705
 
706
- #: includes/documents/abstract-wcpdf-order-document-methods.php:1146
707
  msgid "Total ex. VAT"
708
  msgstr ""
709
 
710
- #: includes/documents/abstract-wcpdf-order-document-methods.php:1149
711
- msgid "Total"
712
- msgstr ""
713
-
714
  #. translators: 1. credit note title, 2. refund id
715
- #: includes/documents/abstract-wcpdf-order-document.php:336
716
  msgid "%1$s (refund #%2$s) was regenerated."
717
  msgstr ""
718
 
719
  #. translators: 1. credit note title, 2. refund id
720
- #: includes/documents/abstract-wcpdf-order-document.php:336
721
  msgid "%s was regenerated"
722
  msgstr ""
723
 
724
  #. translators: %s: document name
725
- #: includes/documents/abstract-wcpdf-order-document.php:422
726
  msgid "%s Number:"
727
  msgstr ""
728
 
729
  #. translators: %s: document name
730
- #: includes/documents/abstract-wcpdf-order-document.php:428
731
  msgid "%s Date:"
732
  msgstr ""
733
 
734
- #: includes/documents/abstract-wcpdf-order-document.php:904
735
  msgid "Admin email"
736
  msgstr ""
737
 
738
- #: includes/documents/abstract-wcpdf-order-document.php:907
739
  msgid "Manual email"
740
  msgstr ""
741
 
742
  #: includes/documents/class-wcpdf-invoice.php:32
743
  #: includes/documents/class-wcpdf-invoice.php:56
744
  #: includes/legacy/class-wcpdf-legacy-functions.php:22
 
745
  msgid "Invoice"
746
  msgstr ""
747
 
748
- #: includes/documents/class-wcpdf-invoice.php:131
 
 
 
 
 
749
  msgid "invoice"
750
  msgid_plural "invoices"
751
  msgstr[0] ""
752
  msgstr[1] ""
753
 
754
- #: includes/documents/class-wcpdf-invoice.php:186
755
  #: includes/documents/class-wcpdf-packing-slip.php:88
756
  msgid "Enable"
757
  msgstr ""
758
 
759
- #: includes/documents/class-wcpdf-invoice.php:197
 
760
  msgid "Attach to:"
761
  msgstr ""
762
 
763
  #. translators: directory path
764
- #: includes/documents/class-wcpdf-invoice.php:205
765
  msgid "It looks like the temp folder (<code>%s</code>) is not writable, check the permissions for this folder! Without having write access to this folder, the plugin will not be able to email invoices."
766
  msgstr ""
767
 
768
- #: includes/documents/class-wcpdf-invoice.php:211
769
  msgid "Disable for:"
770
  msgstr ""
771
 
772
- #: includes/documents/class-wcpdf-invoice.php:220
773
  msgid "Select one or more statuses"
774
  msgstr ""
775
 
776
- #: includes/documents/class-wcpdf-invoice.php:226
777
  #: includes/views/setup-wizard/display-options.php:17
778
  msgid "Display shipping address"
779
  msgstr ""
780
 
781
- #: includes/documents/class-wcpdf-invoice.php:233
782
- #: includes/documents/class-wcpdf-invoice.php:285
783
- #: includes/documents/class-wcpdf-invoice.php:301
784
  #: includes/documents/class-wcpdf-packing-slip.php:106
 
785
  msgid "No"
786
  msgstr ""
787
 
788
- #: includes/documents/class-wcpdf-invoice.php:234
789
  msgid "Only when different from billing address"
790
  msgstr ""
791
 
792
- #: includes/documents/class-wcpdf-invoice.php:235
793
- #: includes/documents/class-wcpdf-invoice.php:378
794
  #: includes/documents/class-wcpdf-packing-slip.php:108
795
  msgid "Always"
796
  msgstr ""
797
 
798
- #: includes/documents/class-wcpdf-invoice.php:243
799
  #: includes/documents/class-wcpdf-packing-slip.php:116
800
  #: includes/views/setup-wizard/display-options.php:26
801
  msgid "Display email address"
802
  msgstr ""
803
 
804
- #: includes/documents/class-wcpdf-invoice.php:254
805
  #: includes/documents/class-wcpdf-packing-slip.php:127
806
  #: includes/views/setup-wizard/display-options.php:35
807
  msgid "Display phone number"
808
  msgstr ""
809
 
810
- #: includes/documents/class-wcpdf-invoice.php:265
811
  #: includes/documents/class-wcpdf-packing-slip.php:138
812
  msgid "Display customer notes"
813
  msgstr ""
814
 
815
- #: includes/documents/class-wcpdf-invoice.php:278
816
  #: includes/views/setup-wizard/display-options.php:44
817
  msgid "Display invoice date"
818
  msgstr ""
819
 
820
- #: includes/documents/class-wcpdf-invoice.php:287
821
  msgid "Order Date"
822
  msgstr ""
823
 
824
- #: includes/documents/class-wcpdf-invoice.php:294
825
  #: includes/views/setup-wizard/display-options.php:53
826
  msgid "Display invoice number"
827
  msgstr ""
828
 
829
- #: includes/documents/class-wcpdf-invoice.php:303
830
  msgid "Order Number"
831
  msgstr ""
832
 
833
- #: includes/documents/class-wcpdf-invoice.php:307
834
  msgid "Warning!"
835
  msgstr ""
836
 
837
- #: includes/documents/class-wcpdf-invoice.php:308
838
  msgid "Using the Order Number as invoice number is not recommended as this may lead to gaps in the invoice number sequence (even when order numbers are sequential)."
839
  msgstr ""
840
 
841
- #: includes/documents/class-wcpdf-invoice.php:309
842
  msgid "More information"
843
  msgstr ""
844
 
845
- #: includes/documents/class-wcpdf-invoice.php:316
846
  msgid "Next invoice number (without prefix/suffix etc.)"
847
  msgstr ""
848
 
849
- #: includes/documents/class-wcpdf-invoice.php:322
850
  msgid "This is the number that will be used for the next document. By default, numbering starts from 1 and increases for every new document. Note that if you override this and set it lower than the current/highest number, this could create duplicate numbers!"
851
  msgstr ""
852
 
853
- #: includes/documents/class-wcpdf-invoice.php:328
854
  msgid "Number format"
855
  msgstr ""
856
 
857
- #: includes/documents/class-wcpdf-invoice.php:336
858
  msgid "Prefix"
859
  msgstr ""
860
 
861
- #: includes/documents/class-wcpdf-invoice.php:338
862
- msgid "to use the invoice year and/or month, use [invoice_year] or [invoice_month] respectively"
 
 
 
 
 
 
 
 
 
 
 
863
  msgstr ""
864
 
865
- #: includes/documents/class-wcpdf-invoice.php:341
866
  msgid "Suffix"
867
  msgstr ""
868
 
869
- #: includes/documents/class-wcpdf-invoice.php:346
 
 
 
 
870
  msgid "Padding"
871
  msgstr ""
872
 
873
- #: includes/documents/class-wcpdf-invoice.php:349
874
- msgid "enter the number of digits here - enter \"6\" to display 42 as 000042"
 
 
 
 
 
 
875
  msgstr ""
876
 
877
- #: includes/documents/class-wcpdf-invoice.php:352
878
- msgid "note: if you have already created a custom invoice number format with a filter, the above settings will be ignored"
 
879
  msgstr ""
880
 
881
- #: includes/documents/class-wcpdf-invoice.php:358
 
 
 
 
 
882
  msgid "Reset invoice number yearly"
883
  msgstr ""
884
 
885
- #: includes/documents/class-wcpdf-invoice.php:369
886
  msgid "Allow My Account invoice download"
887
  msgstr ""
888
 
889
- #: includes/documents/class-wcpdf-invoice.php:376
890
  msgid "Only when an invoice is already created/emailed"
891
  msgstr ""
892
 
893
- #: includes/documents/class-wcpdf-invoice.php:377
894
  msgid "Only for specific order statuses (define below)"
895
  msgstr ""
896
 
897
- #: includes/documents/class-wcpdf-invoice.php:379
898
  msgid "Never"
899
  msgstr ""
900
 
901
- #: includes/documents/class-wcpdf-invoice.php:394
902
  msgid "Enable invoice number column in the orders list"
903
  msgstr ""
904
 
905
- #: includes/documents/class-wcpdf-invoice.php:405
906
  msgid "Disable for free orders"
907
  msgstr ""
908
 
909
  #. translators: zero number
910
- #: includes/documents/class-wcpdf-invoice.php:412
911
  msgid "Disable document when the order total is %s"
912
  msgstr ""
913
 
914
- #: includes/documents/class-wcpdf-invoice.php:418
915
  msgid "Always use most current settings"
916
  msgstr ""
917
 
918
- #: includes/documents/class-wcpdf-invoice.php:424
919
  msgid "When enabled, the document will always reflect the most current settings (such as footer text, document name, etc.) rather than using historical settings."
920
  msgstr ""
921
 
922
- #: includes/documents/class-wcpdf-invoice.php:426
923
  msgid "<strong>Caution:</strong> enabling this will also mean that if you change your company name or address in the future, previously generated documents will also be affected."
924
  msgstr ""
925
 
926
- #: includes/documents/class-wcpdf-invoice.php:439
927
  msgid "Invoice numbers are created by a third-party extension."
928
  msgstr ""
929
 
930
  #. translators: link
931
- #: includes/documents/class-wcpdf-invoice.php:442
932
  msgid "Configure it <a href=\"%s\">here</a>."
933
  msgstr ""
934
 
@@ -952,11 +1043,15 @@ msgstr ""
952
  msgid "Only when different from shipping address"
953
  msgstr ""
954
 
955
- #: includes/documents/class-wcpdf-packing-slip.php:162
 
 
 
 
956
  msgid "Packing Slip Number:"
957
  msgstr ""
958
 
959
- #: includes/documents/class-wcpdf-packing-slip.php:170
960
  msgid "Packing Slip Date:"
961
  msgstr ""
962
 
@@ -977,7 +1072,7 @@ msgid "The following function was called"
977
  msgstr ""
978
 
979
  #. translators: <a> tags
980
- #: includes/views/attachment-settings-hint.php:23
981
  msgid "It looks like you haven't setup any email attachments yet, check the settings under <b>%1$sDocuments > Invoice%2$s</b>"
982
  msgstr ""
983
 
@@ -993,123 +1088,136 @@ msgstr ""
993
  msgid "Required if you have images in your documents"
994
  msgstr ""
995
 
996
- #: includes/views/dompdf-status.php:39
 
 
 
 
 
 
 
 
997
  msgid "To compress PDF documents"
998
  msgstr ""
999
 
1000
- #: includes/views/dompdf-status.php:42
1001
  msgid "Recommended to compress PDF documents"
1002
  msgstr ""
1003
 
1004
- #: includes/views/dompdf-status.php:45
1005
  msgid "For better performances"
1006
  msgstr ""
1007
 
1008
- #: includes/views/dompdf-status.php:48
1009
  #: includes/views/dompdf-status.php:54
 
1010
  msgid "Recommended for better performances"
1011
  msgstr ""
1012
 
1013
- #: includes/views/dompdf-status.php:51
1014
  msgid "Better with transparent PNG images"
1015
  msgstr ""
1016
 
1017
- #: includes/views/dompdf-status.php:57
1018
  msgid "Required to detect custom templates and to clear the temp folder periodically"
1019
  msgstr ""
1020
 
1021
- #: includes/views/dompdf-status.php:60
1022
  msgid "Check PHP disable_functions"
1023
  msgstr ""
1024
 
1025
  #. translators: <a> tags
1026
- #: includes/views/dompdf-status.php:64
1027
  msgid "Recommended: 128MB (more for plugin-heavy setups<br/>See: %1$sIncreasing the WordPress Memory Limit%2$s"
1028
  msgstr ""
1029
 
1030
- #: includes/views/dompdf-status.php:69
1031
  msgid "Allow remote stylesheets and images"
1032
  msgstr ""
1033
 
1034
- #: includes/views/dompdf-status.php:72
1035
  msgid "allow_url_fopen disabled"
1036
  msgstr ""
1037
 
1038
- #: includes/views/dompdf-status.php:75
1039
  msgid "To compress and decompress font data"
1040
  msgstr ""
1041
 
1042
- #: includes/views/dompdf-status.php:78
1043
  msgid "base64_decode disabled"
1044
  msgstr ""
1045
 
1046
  #. translators: <a> tags
1047
- #: includes/views/dompdf-status.php:98
1048
- msgid "<br/>Download %1$sthis addon%2$s to enable backwards compatibility."
1049
  msgstr ""
1050
 
1051
- #: includes/views/dompdf-status.php:103
1052
  msgid "System Configuration"
1053
  msgstr ""
1054
 
1055
- #: includes/views/dompdf-status.php:108
1056
  msgid "Required"
1057
  msgstr ""
1058
 
1059
- #: includes/views/dompdf-status.php:109
1060
  msgid "Present"
1061
  msgstr ""
1062
 
1063
- #: includes/views/dompdf-status.php:148
 
 
 
 
 
1064
  msgid "Writable"
1065
  msgstr ""
1066
 
1067
- #: includes/views/dompdf-status.php:149
1068
  msgid "Not writable"
1069
  msgstr ""
1070
 
1071
- #: includes/views/dompdf-status.php:154
1072
  msgid "Central temporary plugin folder"
1073
  msgstr ""
1074
 
1075
- #: includes/views/dompdf-status.php:160
1076
  msgid "Temporary attachments folder"
1077
  msgstr ""
1078
 
1079
- #: includes/views/dompdf-status.php:166
1080
  msgid "Temporary DOMPDF folder"
1081
  msgstr ""
1082
 
1083
- #: includes/views/dompdf-status.php:172
1084
  msgid "DOMPDF fonts folder (needs to be writable for custom/remote fonts)"
1085
  msgstr ""
1086
 
1087
- #: includes/views/dompdf-status.php:183
1088
  msgid "Write Permissions"
1089
  msgstr ""
1090
 
1091
- #: includes/views/dompdf-status.php:186
1092
- #: templates/Simple/invoice.php:105
1093
- #: templates/Simple/packing-slip.php:92
1094
  msgid "Description"
1095
  msgstr ""
1096
 
1097
- #: includes/views/dompdf-status.php:187
1098
  msgid "Value"
1099
  msgstr ""
1100
 
1101
  #. translators: 1,2. directory paths, 3. UPLOADS, 4. wpo_wcpdf_tmp_path, 5. attachments, 6. dompdf, 7. fonts
1102
- #: includes/views/dompdf-status.php:213
1103
  msgid "The central temp folder is %1$s. By default, this folder is created in the WordPress uploads folder (%2$s), which can be defined by setting %3$s in wp-config.php. Alternatively, you can control the specific folder for PDF invoices by using the %4$s filter. Make sure this folder is writable and that the subfolders %5$s, %6$s and %7$s are present (these will be created by the plugin if the central temp folder is writable)."
1104
  msgstr ""
1105
 
1106
  #. translators: directory path
1107
- #: includes/views/dompdf-status.php:226
1108
  msgid "If the temporary folders were not automatically created by the plugin, verify that all the font files (from %s) are copied to the fonts folder. Normally, this is fully automated, but if your server has strict security settings, this automated copying may have been prohibited. In that case, you also need to make sure these folders get synchronized on plugin updates!"
1109
  msgstr ""
1110
 
1111
  #: includes/views/setup-wizard/attach-to.php:3
1112
- msgid "Attach too..."
1113
  msgstr ""
1114
 
1115
  #: includes/views/setup-wizard/attach-to.php:4
@@ -1152,6 +1260,14 @@ msgstr ""
1152
  msgid "Lets quickly setup your invoice. Please enter the name and address of your shop in the fields on the right."
1153
  msgstr ""
1154
 
 
 
 
 
 
 
 
 
1155
  #: includes/views/setup-wizard/show-action-buttons.php:4
1156
  msgid "Would you like to display the action buttons in your WooCommerce order list? The action buttons allow you to manually create a PDF."
1157
  msgstr ""
@@ -1164,267 +1280,293 @@ msgstr ""
1164
  msgid "Show action buttons"
1165
  msgstr ""
1166
 
1167
- #: includes/views/wcpdf-extensions.php:16
1168
  msgid "Check out these premium extensions!"
1169
  msgstr ""
1170
 
1171
- #: includes/views/wcpdf-extensions.php:17
1172
  msgid "click items to read more"
1173
  msgstr ""
1174
 
1175
- #: includes/views/wcpdf-extensions.php:22
1176
  msgid "Premium PDF Invoice bundle: Everything you need for a perfect invoicing system"
1177
  msgstr ""
1178
 
1179
- #: includes/views/wcpdf-extensions.php:24
1180
  msgid "Supercharge WooCommerce PDF Invoices & Packing Slips with the all our premium extensions:"
1181
  msgstr ""
1182
 
1183
- #: includes/views/wcpdf-extensions.php:25
1184
  msgid "Professional features:"
1185
  msgstr ""
1186
 
1187
- #: includes/views/wcpdf-extensions.php:27
1188
- #: includes/views/wcpdf-extensions.php:57
1189
  msgid "Email/print/download <b>PDF Credit Notes & Proforma invoices</b>"
1190
  msgstr ""
1191
 
1192
- #: includes/views/wcpdf-extensions.php:28
1193
- #: includes/views/wcpdf-extensions.php:58
1194
  msgid "Send out a separate <b>notification email</b> with (or without) PDF invoices/packing slips, for example to a drop-shipper or a supplier."
1195
  msgstr ""
1196
 
1197
- #: includes/views/wcpdf-extensions.php:29
1198
- #: includes/views/wcpdf-extensions.php:59
1199
  msgid "Attach <b>up to 3 static files</b> (for example a terms & conditions document) to the WooCommerce emails of your choice."
1200
  msgstr ""
1201
 
1202
- #: includes/views/wcpdf-extensions.php:30
1203
- #: includes/views/wcpdf-extensions.php:60
1204
  msgid "Use <b>separate numbering systems</b> and/or format for proforma invoices and credit notes or utilize the main invoice numbering system"
1205
  msgstr ""
1206
 
1207
- #: includes/views/wcpdf-extensions.php:31
1208
- #: includes/views/wcpdf-extensions.php:61
1209
  msgid "<b>Customize</b> the <b>shipping & billing address</b> format to include additional custom fields, font sizes etc. without the need to create a custom template."
1210
  msgstr ""
1211
 
1212
- #: includes/views/wcpdf-extensions.php:32
1213
- #: includes/views/wcpdf-extensions.php:62
1214
  msgid "Use the plugin in multilingual <b>WPML</b> setups"
1215
  msgstr ""
1216
 
1217
- #: includes/views/wcpdf-extensions.php:34
1218
- #: includes/views/wcpdf-extensions.php:114
1219
  msgid "Advanced, customizable templates"
1220
  msgstr ""
1221
 
1222
- #: includes/views/wcpdf-extensions.php:36
1223
- #: includes/views/wcpdf-extensions.php:117
1224
  msgid "Completely customize the invoice contents (prices, taxes, thumbnails) to your needs with a drag & drop customizer"
1225
  msgstr ""
1226
 
1227
- #: includes/views/wcpdf-extensions.php:37
1228
- #: includes/views/wcpdf-extensions.php:118
1229
  msgid "Two extra stylish premade templates (Modern & Business)"
1230
  msgstr ""
1231
 
1232
- #: includes/views/wcpdf-extensions.php:39
1233
- #: includes/views/wcpdf-extensions.php:63
1234
  msgid "Upload automatically to dropbox"
1235
  msgstr ""
1236
 
1237
- #: includes/views/wcpdf-extensions.php:41
1238
  msgid "This extension conveniently uploads all the invoices (and other pdf documents from the professional extension) that are emailed to your customers to Dropbox. The best way to keep your invoice administration up to date!"
1239
  msgstr ""
1240
 
1241
- #: includes/views/wcpdf-extensions.php:44
1242
  msgid "Get WooCommerce PDF Invoices & Packing Slips Bundle"
1243
  msgstr ""
1244
 
1245
- #: includes/views/wcpdf-extensions.php:53
1246
  msgid "Go Pro: Proforma invoices, credit notes (=refunds) & more!"
1247
  msgstr ""
1248
 
1249
- #: includes/views/wcpdf-extensions.php:55
1250
  msgid "Supercharge WooCommerce PDF Invoices & Packing Slips with the following features:"
1251
  msgstr ""
1252
 
1253
- #: includes/views/wcpdf-extensions.php:65
1254
  msgid "Get WooCommerce PDF Invoices & Packing Slips Professional!"
1255
  msgstr ""
1256
 
1257
- #: includes/views/wcpdf-extensions.php:73
1258
  msgid "Automatically send payment reminders to your customers"
1259
  msgstr ""
1260
 
1261
- #: includes/views/wcpdf-extensions.php:75
1262
  msgid "WooCommerce Smart Reminder emails"
1263
  msgstr ""
1264
 
1265
- #: includes/views/wcpdf-extensions.php:77
1266
  msgid "<b>Completely automatic</b> scheduled emails"
1267
  msgstr ""
1268
 
1269
- #: includes/views/wcpdf-extensions.php:78
1270
  msgid "<b>Rich text editor</b> for the email text, including placeholders for data from the order (name, order total, etc)"
1271
  msgstr ""
1272
 
1273
- #: includes/views/wcpdf-extensions.php:79
1274
  msgid "Configure the exact requirements for sending an email (time after order, order status, payment method)"
1275
  msgstr ""
1276
 
1277
- #: includes/views/wcpdf-extensions.php:80
1278
  msgid "Fully <b>WPML Compatible</b> – emails will be automatically sent in the order language."
1279
  msgstr ""
1280
 
1281
- #: includes/views/wcpdf-extensions.php:81
1282
  msgid "<b>Super versatile!</b> Can be used for any kind of reminder email (review reminders, repeat purchases)"
1283
  msgstr ""
1284
 
1285
- #: includes/views/wcpdf-extensions.php:82
1286
  msgid "Integrates seamlessly with the PDF Invoices & Packing Slips plugin"
1287
  msgstr ""
1288
 
1289
- #: includes/views/wcpdf-extensions.php:84
1290
  msgid "Get WooCommerce Smart Reminder Emails"
1291
  msgstr ""
1292
 
1293
- #: includes/views/wcpdf-extensions.php:93
1294
  msgid "Automatically send new orders or packing slips to your printer, as soon as the customer orders!"
1295
  msgstr ""
1296
 
1297
- #: includes/views/wcpdf-extensions.php:99
1298
  msgid "Check out the WooCommerce Automatic Order Printing extension from our partners at Simba Hosting"
1299
  msgstr ""
1300
 
1301
- #: includes/views/wcpdf-extensions.php:100
1302
  msgid "WooCommerce Automatic Order Printing"
1303
  msgstr ""
1304
 
1305
  #. translators: Premium Templates link
1306
- #: includes/views/wcpdf-extensions.php:120
1307
  msgid "Check out the Premium PDF Invoice & Packing Slips templates at %s."
1308
  msgstr ""
1309
 
1310
  #. translators: email link
1311
- #: includes/views/wcpdf-extensions.php:122
1312
  msgid "For custom templates, contact us at %s."
1313
  msgstr ""
1314
 
1315
- #: includes/views/wcpdf-settings-page.php:9
 
 
 
 
 
1316
  msgid "WooCommerce PDF Invoices"
1317
  msgstr ""
1318
 
1319
- #: includes/wcpdf-functions.php:209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1320
  msgid "Error creating PDF, please contact the site owner."
1321
  msgstr ""
1322
 
1323
- #: templates/Simple/invoice.php:36
1324
- #: templates/Simple/packing-slip.php:49
1325
  msgid "Billing Address:"
1326
  msgstr ""
1327
 
1328
- #: templates/Simple/invoice.php:49
1329
  msgid "Ship To:"
1330
  msgstr ""
1331
 
1332
- #: templates/Simple/invoice.php:74
1333
- #: templates/Simple/packing-slip.php:62
1334
  msgid "Order Number:"
1335
  msgstr ""
1336
 
1337
- #: templates/Simple/invoice.php:78
1338
- #: templates/Simple/packing-slip.php:66
1339
  msgid "Order Date:"
1340
  msgstr ""
1341
 
1342
- #: templates/Simple/invoice.php:82
1343
  msgid "Payment Method:"
1344
  msgstr ""
1345
 
1346
- #: templates/Simple/invoice.php:96
1347
- #: templates/Simple/packing-slip.php:84
1348
  msgid "Product"
1349
  msgstr ""
1350
 
1351
- #: templates/Simple/invoice.php:97
1352
- #: templates/Simple/packing-slip.php:85
1353
  msgid "Quantity"
1354
  msgstr ""
1355
 
1356
- #: templates/Simple/invoice.php:98
1357
  msgid "Price"
1358
  msgstr ""
1359
 
1360
- #: templates/Simple/invoice.php:110
1361
- #: templates/Simple/packing-slip.php:97
1362
  msgid "SKU"
1363
  msgstr ""
1364
 
1365
- #: templates/Simple/invoice.php:111
1366
- #: templates/Simple/packing-slip.php:98
1367
  msgid "SKU:"
1368
  msgstr ""
1369
 
1370
- #: templates/Simple/invoice.php:112
1371
- #: templates/Simple/packing-slip.php:99
1372
  msgid "Weight:"
1373
  msgstr ""
1374
 
1375
- #: templates/Simple/invoice.php:127
1376
  msgid "Notes"
1377
  msgstr ""
1378
 
1379
- #: templates/Simple/invoice.php:135
1380
- #: templates/Simple/packing-slip.php:117
1381
  msgid "Customer Notes"
1382
  msgstr ""
1383
 
1384
- #: templates/Simple/packing-slip.php:36
1385
  msgid "Shipping Address:"
1386
  msgstr ""
1387
 
1388
- #: templates/Simple/packing-slip.php:70
1389
  msgid "Shipping Method:"
1390
  msgstr ""
1391
 
1392
  #. translators: <a> tags
1393
- #: woocommerce-pdf-invoices-packingslips.php:271
1394
  msgid "WooCommerce PDF Invoices & Packing Slips requires %1$sWooCommerce%2$s to be installed & activated!"
1395
  msgstr ""
1396
 
1397
- #: woocommerce-pdf-invoices-packingslips.php:282
1398
  msgid "WooCommerce PDF Invoices & Packing Slips requires PHP 7.1 (7.4 or higher recommended)."
1399
  msgstr ""
1400
 
1401
  #. translators: <a> tags
1402
- #: woocommerce-pdf-invoices-packingslips.php:284
1403
  msgid "We strongly recommend to %1$supdate your PHP version%2$s."
1404
  msgstr ""
1405
 
1406
  #. translators: <a> tags
1407
- #: woocommerce-pdf-invoices-packingslips.php:286
1408
  msgid "If you cannot upgrade your PHP version, you can download %1$sthis addon%2$s to enable backwards compatibility with PHP5.6."
1409
  msgstr ""
1410
 
1411
  #. translators: directory path
1412
- #: woocommerce-pdf-invoices-packingslips.php:374
1413
  msgid "The PDF files in %s are not currently protected due to your site running on <strong>NGINX</strong>."
1414
  msgstr ""
1415
 
1416
- #: woocommerce-pdf-invoices-packingslips.php:375
1417
  msgid "To protect them, you must click the button below."
1418
  msgstr ""
1419
 
1420
- #: woocommerce-pdf-invoices-packingslips.php:418
1421
  msgid "When sending emails with MailPoet 3 and the active sending method is <strong>MailPoet Sending Service</strong> or <strong>Your web host / web server</strong>, MailPoet does not include the <strong>WooCommerce PDF Invoices & Packing Slips</strong> attachments in the emails."
1422
  msgstr ""
1423
 
1424
- #: woocommerce-pdf-invoices-packingslips.php:419
1425
  msgid "To fix this you should select <strong>The default WordPress sending method (default)</strong> on the <strong>Advanced tab</strong>."
1426
  msgstr ""
1427
 
1428
- #: woocommerce-pdf-invoices-packingslips.php:420
1429
  msgid "Change MailPoet sending method to WordPress (default)"
1430
  msgstr ""
1
+ # Copyright (C) 2022 WP Overnight
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce PDF Invoices & Packing Slips 3.1.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-09-23T15:24:29+02:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0\n"
15
  "X-Domain: woocommerce-pdf-invoices-packing-slips\n"
19
  msgstr ""
20
 
21
  #. Plugin URI of the plugin
22
+ msgid "https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/"
 
23
  msgstr ""
24
 
25
  #. Description of the plugin
27
  msgstr ""
28
 
29
  #. Author of the plugin
30
+ msgid "WP Overnight"
31
+ msgstr ""
32
+
33
+ #. Author URI of the plugin
34
+ msgid "https://www.wpovernight.com"
35
  msgstr ""
36
 
37
  #. translators: rounded count
48
  msgstr ""
49
 
50
  #: includes/class-wcpdf-admin.php:96
51
+ #: includes/class-wcpdf-main.php:624
52
+ #: includes/views/attachment-settings-hint.php:12
53
+ #: includes/views/wcpdf-extensions.php:121
54
+ #: woocommerce-pdf-invoices-packingslips.php:376
55
+ #: woocommerce-pdf-invoices-packingslips.php:420
56
  msgid "Hide this message"
57
  msgstr ""
58
 
73
  msgstr ""
74
 
75
  #: includes/class-wcpdf-admin.php:133
76
+ #: includes/class-wcpdf-settings-debug.php:139
77
  msgid "Run the Setup Wizard"
78
  msgstr ""
79
 
81
  msgid "I am the wizard"
82
  msgstr ""
83
 
84
+ #: includes/class-wcpdf-admin.php:231
85
+ #: includes/class-wcpdf-main.php:981
86
+ #: includes/documents/class-wcpdf-invoice.php:290
87
  msgid "Invoice Number"
88
  msgstr ""
89
 
90
+ #: includes/class-wcpdf-admin.php:268
91
  msgid "Send order email"
92
  msgstr ""
93
 
94
+ #: includes/class-wcpdf-admin.php:279
95
  msgid "Create PDF"
96
  msgstr ""
97
 
98
+ #: includes/class-wcpdf-admin.php:289
99
  msgid "PDF document data"
100
  msgstr ""
101
 
102
+ #: includes/class-wcpdf-admin.php:311
103
  msgid "Choose an email to send&hellip;"
104
  msgstr ""
105
 
106
+ #: includes/class-wcpdf-admin.php:327
107
  msgid "Save order & send email"
108
  msgstr ""
109
 
110
+ #: includes/class-wcpdf-admin.php:329
111
  msgid "Send email"
112
  msgstr ""
113
 
114
+ #: includes/class-wcpdf-admin.php:392
115
+ #: includes/documents/class-wcpdf-invoice.php:458
116
  msgid "Invoice Number:"
117
  msgstr ""
118
 
119
+ #: includes/class-wcpdf-admin.php:395
120
+ #: includes/documents/class-wcpdf-invoice.php:466
121
  msgid "Invoice Date:"
122
  msgstr ""
123
 
124
+ #: includes/class-wcpdf-admin.php:398
125
  msgid "Notes (printed in the invoice):"
126
  msgstr ""
127
 
128
  #. translators: document title
129
+ #: includes/class-wcpdf-admin.php:489
130
  msgid "Set %s number & date"
131
  msgstr ""
132
 
133
+ #: includes/class-wcpdf-admin.php:494
134
+ msgid "You do not have sufficient permissions to edit this document."
135
+ msgstr ""
136
+
137
+ #: includes/class-wcpdf-admin.php:506
138
  msgid "unformatted!"
139
  msgstr ""
140
 
141
+ #: includes/class-wcpdf-admin.php:548
142
  msgid "Save changes"
143
  msgstr ""
144
 
145
+ #: includes/class-wcpdf-admin.php:549
146
  msgid "Cancel"
147
  msgstr ""
148
 
149
  #. translators: name/description of the context for document creation logs
150
+ #: includes/class-wcpdf-admin.php:632
151
+ #: includes/class-wcpdf-admin.php:870
152
  msgid "order details (number and/or date set manually)"
153
  msgstr ""
154
 
155
  #. translators: %s: email title
156
+ #: includes/class-wcpdf-admin.php:681
157
  msgid "%s email notification manually sent."
158
  msgstr ""
159
 
160
+ #: includes/class-wcpdf-admin.php:772
161
  msgid "Nonce expired!"
162
  msgstr ""
163
 
164
+ #: includes/class-wcpdf-admin.php:778
165
  msgid "Bad action!"
166
  msgstr ""
167
 
168
+ #: includes/class-wcpdf-admin.php:784
169
  msgid "Incomplete request!"
170
  msgstr ""
171
 
172
+ #: includes/class-wcpdf-admin.php:790
173
  msgid "No permissions!"
174
  msgstr ""
175
 
176
+ #: includes/class-wcpdf-admin.php:814
177
  msgid "Document data saved!"
178
  msgstr ""
179
 
180
+ #: includes/class-wcpdf-admin.php:815
181
  msgid "An error occurred while saving the document data!"
182
  msgstr ""
183
 
184
+ #: includes/class-wcpdf-admin.php:818
185
  msgid "Document regenerated!"
186
  msgstr ""
187
 
188
+ #: includes/class-wcpdf-admin.php:819
189
  msgid "An error occurred while regenerating the document!"
190
  msgstr ""
191
 
192
+ #: includes/class-wcpdf-admin.php:822
193
  msgid "Document deleted!"
194
  msgstr ""
195
 
196
+ #: includes/class-wcpdf-admin.php:823
197
  msgid "An error occurred while deleting the document!"
198
  msgstr ""
199
 
200
+ #: includes/class-wcpdf-admin.php:879
201
  msgid "Document does not exist."
202
  msgstr ""
203
 
204
+ #: includes/class-wcpdf-admin.php:893
205
  msgid "Document is empty."
206
  msgstr ""
207
 
208
+ #: includes/class-wcpdf-admin.php:924
209
  msgid "DEBUG output enabled"
210
  msgstr ""
211
 
217
  msgid "Are you sure you want to regenerate this document? This will make the document reflect the most current settings (such as footer text, document name, etc.) rather than using historical settings."
218
  msgstr ""
219
 
220
+ #: includes/class-wcpdf-assets.php:156
221
+ msgid "Document settings"
222
+ msgstr ""
223
+
224
+ #: includes/class-wcpdf-assets.php:157
225
+ msgid "Select a document in the dropdown menu above to edit its settings."
226
+ msgstr ""
227
+
228
+ #: includes/class-wcpdf-frontend.php:150
229
  msgid "Download invoice (PDF)"
230
  msgstr ""
231
 
232
+ #: includes/class-wcpdf-main.php:261
233
+ #: includes/class-wcpdf-main.php:277
234
+ #: includes/class-wcpdf-main.php:282
235
+ #: includes/class-wcpdf-main.php:356
236
+ #: includes/class-wcpdf-settings.php:162
237
+ #: includes/class-wcpdf-settings.php:282
238
  msgid "You do not have sufficient permissions to access this page."
239
  msgstr ""
240
 
241
+ #: includes/class-wcpdf-main.php:291
242
  msgid "You haven't selected any orders"
243
  msgstr ""
244
 
245
+ #: includes/class-wcpdf-main.php:295
246
  msgid "Some of the export parameters are missing."
247
  msgstr ""
248
 
249
  #. translators: document type
250
+ #: includes/class-wcpdf-main.php:397
251
  msgid "Document of type '%s' for the selected order(s) could not be generated"
252
  msgstr ""
253
 
254
  #. translators: 1. plugin name, 2. directory path
255
+ #: includes/class-wcpdf-main.php:622
256
  msgid "The %1$s directory %2$s couldn't be created or is not writable!"
257
  msgstr ""
258
 
259
+ #: includes/class-wcpdf-main.php:623
260
  msgid "Please check your directories write permissions or contact your hosting service provider."
261
  msgstr ""
262
 
263
+ #. translators: 1,2. file count
264
+ #: includes/class-wcpdf-main.php:934
265
+ msgid "Unable to delete %1$d files! (deleted %2$d)"
266
+ msgstr ""
267
+
268
+ #. translators: file count
269
+ #: includes/class-wcpdf-main.php:938
270
+ msgid "Successfully deleted %d files!"
271
+ msgstr ""
272
+
273
+ #: includes/class-wcpdf-main.php:942
274
+ msgid "Nothing to delete!"
275
+ msgstr ""
276
+
277
+ #: includes/class-wcpdf-main.php:982
278
+ #: includes/documents/class-wcpdf-invoice.php:274
279
  msgid "Invoice Date"
280
  msgstr ""
281
 
282
  #. translators: name/description of the context for document creation logs
283
+ #: includes/class-wcpdf-main.php:1012
284
  msgid "bulk order action"
285
  msgstr ""
286
 
287
  #. translators: name/description of the context for document creation logs
288
+ #: includes/class-wcpdf-main.php:1020
289
  msgid "single order action"
290
  msgstr ""
291
 
292
  #. translators: name/description of the context for document creation logs
293
+ #: includes/class-wcpdf-main.php:1028
294
  msgid "my account"
295
  msgstr ""
296
 
297
  #. translators: name/description of the context for document creation logs
298
+ #: includes/class-wcpdf-main.php:1036
299
  msgid "email attachment"
300
  msgstr ""
301
 
302
  #. translators: 1. document title, 2. creation source
303
+ #: includes/class-wcpdf-main.php:1045
304
  msgid "PDF %1$s created via %2$s."
305
  msgstr ""
306
 
307
  #. translators: document title
308
+ #: includes/class-wcpdf-main.php:1089
309
  msgid "Order %s Saved"
310
  msgstr ""
311
 
317
  msgid "These are used for the (optional) footer columns in the <em>Modern (Premium)</em> template, but can also be used for other elements in your custom template"
318
  msgstr ""
319
 
320
+ #: includes/class-wcpdf-settings-callbacks.php:426
321
  msgid "Image resolution"
322
  msgstr ""
323
 
324
+ #: includes/class-wcpdf-settings-callbacks.php:434
325
  msgid "The image resolution exceeds the recommended maximum of 600dpi. This will unnecessarily increase the size of your PDF files and could negatively affect performance."
326
  msgstr ""
327
 
328
+ #: includes/class-wcpdf-settings-callbacks.php:482
329
  msgid "Save"
330
  msgstr ""
331
 
332
  #: includes/class-wcpdf-settings-debug.php:45
333
+ #: woocommerce-pdf-invoices-packingslips.php:375
334
  msgid "Generate random temporary folder name"
335
  msgstr ""
336
 
351
  msgid "Remove temporary files"
352
  msgstr ""
353
 
354
+ #: includes/class-wcpdf-settings-debug.php:117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  msgid "Delete legacy (1.X) settings"
356
  msgstr ""
357
 
358
+ #: includes/class-wcpdf-settings-debug.php:133
359
  msgid "Legacy settings deleted!"
360
  msgstr ""
361
 
362
+ #: includes/class-wcpdf-settings-debug.php:166
363
  msgid "Debug settings"
364
  msgstr ""
365
 
366
+ #: includes/class-wcpdf-settings-debug.php:172
367
  msgid "Legacy mode"
368
  msgstr ""
369
 
370
+ #: includes/class-wcpdf-settings-debug.php:178
371
  msgid "Legacy mode ensures compatibility with templates and filters from previous versions."
372
  msgstr ""
373
 
374
+ #: includes/class-wcpdf-settings-debug.php:184
375
  msgid "Legacy textdomain fallback"
376
  msgstr ""
377
 
378
+ #: includes/class-wcpdf-settings-debug.php:190
379
  msgid "Legacy textdomain fallback ensures compatibility with translation files from versions prior to 2017-05-15."
380
  msgstr ""
381
 
382
+ #: includes/class-wcpdf-settings-debug.php:196
383
  msgid "Allow guest access"
384
  msgstr ""
385
 
386
+ #: includes/class-wcpdf-settings-debug.php:202
387
  msgid "Enable this to allow customers that purchase without an account to access their PDF with a unique key"
388
  msgstr ""
389
 
390
+ #: includes/class-wcpdf-settings-debug.php:208
391
+ msgid "Pretty document links"
392
+ msgstr ""
393
+
394
+ #: includes/class-wcpdf-settings-debug.php:214
395
+ msgid "Changes the document links to a prettier URL scheme."
396
+ msgstr ""
397
+
398
+ #: includes/class-wcpdf-settings-debug.php:220
399
  msgid "Calculate document numbers (slow)"
400
  msgstr ""
401
 
402
+ #: includes/class-wcpdf-settings-debug.php:226
403
  msgid "Document numbers (such as invoice numbers) are generated using AUTO_INCREMENT by default. Use this setting if your database auto increments with more than 1."
404
  msgstr ""
405
 
406
+ #: includes/class-wcpdf-settings-debug.php:232
407
  msgid "Enable debug output"
408
  msgstr ""
409
 
410
+ #: includes/class-wcpdf-settings-debug.php:238
411
  msgid "Enable this option to output plugin errors if you're getting a blank page or other PDF generation issues"
412
  msgstr ""
413
 
414
+ #: includes/class-wcpdf-settings-debug.php:239
415
  msgid "<b>Caution!</b> This setting may reveal errors (from other plugins) in other places on your site too, therefor this is not recommended to leave it enabled on live sites."
416
  msgstr ""
417
 
418
+ #: includes/class-wcpdf-settings-debug.php:240
419
  msgid "You can also add <code>&debug=true</code> to the URL to apply this on a per-order basis."
420
  msgstr ""
421
 
422
+ #: includes/class-wcpdf-settings-debug.php:246
423
  msgid "Enable automatic cleanup"
424
  msgstr ""
425
 
426
  #. translators: number of days
427
+ #: includes/class-wcpdf-settings-debug.php:253
428
  msgid "every %s days"
429
  msgstr ""
430
 
431
+ #: includes/class-wcpdf-settings-debug.php:257
432
  msgid "Automatically clean up PDF files stored in the temporary folder (used for email attachments)"
433
  msgstr ""
434
 
435
+ #: includes/class-wcpdf-settings-debug.php:263
 
 
 
 
436
  msgid "Output to HTML"
437
  msgstr ""
438
 
439
+ #: includes/class-wcpdf-settings-debug.php:269
440
  msgid "Send the template output as HTML to the browser instead of creating a PDF."
441
  msgstr ""
442
 
443
+ #: includes/class-wcpdf-settings-debug.php:270
444
  msgid "You can also add <code>&output=html</code> to the URL to apply this on a per-order basis."
445
  msgstr ""
446
 
447
+ #: includes/class-wcpdf-settings-debug.php:276
 
 
 
 
448
  msgid "Log to order notes"
449
  msgstr ""
450
 
451
+ #: includes/class-wcpdf-settings-debug.php:282
452
  msgid "Log PDF document creation to order notes."
453
  msgstr ""
454
 
455
+ #: includes/class-wcpdf-settings-debug.php:288
456
+ msgid "Disable document preview"
 
457
  msgstr ""
458
 
459
+ #: includes/class-wcpdf-settings-debug.php:294
460
+ msgid "Disables the document preview on the plugin settings pages."
 
461
  msgstr ""
462
 
463
+ #: includes/class-wcpdf-settings-documents.php:44
464
+ msgid "untitled"
465
  msgstr ""
466
 
467
  #: includes/class-wcpdf-settings-general.php:40
494
  msgstr ""
495
 
496
  #: includes/class-wcpdf-settings-general.php:82
497
+ #: includes/views/setup-wizard/paper-format.php:13
498
  msgid "A4"
499
  msgstr ""
500
 
501
  #: includes/class-wcpdf-settings-general.php:83
502
+ #: includes/views/setup-wizard/paper-format.php:14
503
  msgid "Letter"
504
  msgstr ""
505
 
536
  msgstr ""
537
 
538
  #: includes/class-wcpdf-settings-general.php:132
539
+ #: includes/views/setup-wizard/logo.php:13
540
  msgid "Select or upload your invoice header/logo"
541
  msgstr ""
542
 
543
  #: includes/class-wcpdf-settings-general.php:133
544
+ #: includes/views/setup-wizard/logo.php:14
545
  msgid "Set image"
546
  msgstr ""
547
 
548
  #: includes/class-wcpdf-settings-general.php:134
549
+ #: includes/views/setup-wizard/logo.php:15
550
  msgid "Remove image"
551
  msgstr ""
552
 
563
  msgid "Shop Name"
564
  msgstr ""
565
 
566
+ #: includes/class-wcpdf-settings-general.php:167
567
  msgid "Shop Address"
568
  msgstr ""
569
 
570
+ #: includes/class-wcpdf-settings-general.php:182
571
  msgid "Footer: terms & conditions, policies, etc."
572
  msgstr ""
573
 
574
+ #: includes/class-wcpdf-settings-general.php:197
575
  msgid "Extra template fields"
576
  msgstr ""
577
 
578
+ #: includes/class-wcpdf-settings-general.php:203
579
  msgid "Extra field 1"
580
  msgstr ""
581
 
582
+ #: includes/class-wcpdf-settings-general.php:211
583
  msgid "This is footer column 1 in the <i>Modern (Premium)</i> template"
584
  msgstr ""
585
 
586
+ #: includes/class-wcpdf-settings-general.php:218
587
  msgid "Extra field 2"
588
  msgstr ""
589
 
590
+ #: includes/class-wcpdf-settings-general.php:226
591
  msgid "This is footer column 2 in the <i>Modern (Premium)</i> template"
592
  msgstr ""
593
 
594
+ #: includes/class-wcpdf-settings-general.php:233
595
  msgid "Extra field 3"
596
  msgstr ""
597
 
598
+ #: includes/class-wcpdf-settings-general.php:241
599
  msgid "This is footer column 3 in the <i>Modern (Premium)</i> template"
600
  msgstr ""
601
 
602
+ #: includes/class-wcpdf-settings-general.php:289
603
  msgid "Custom"
604
  msgstr ""
605
 
606
+ #: includes/class-wcpdf-settings.php:66
607
+ #: includes/class-wcpdf-settings.php:67
608
  msgid "PDF Invoices"
609
  msgstr ""
610
 
611
+ #: includes/class-wcpdf-settings.php:92
612
  msgid "Documentation"
613
  msgstr ""
614
 
615
+ #: includes/class-wcpdf-settings.php:93
616
  msgid "Support Forum"
617
  msgstr ""
618
 
619
  #. translators: database row value
620
+ #: includes/class-wcpdf-settings.php:106
621
+ msgid "<strong>Warning!</strong> Your database has an AUTO_INCREMENT step size of %d, your invoice numbers may not be sequential. Enable the 'Calculate document numbers (slow)' setting in the Status tab to use an alternate method."
622
  msgstr ""
623
 
624
+ #: includes/class-wcpdf-settings.php:118
625
  msgid "General"
626
  msgstr ""
627
 
628
+ #: includes/class-wcpdf-settings.php:122
629
+ msgid "Documents"
630
+ msgstr ""
631
+
632
+ #: includes/class-wcpdf-settings.php:129
633
+ #: includes/views/dompdf-status.php:194
634
  msgid "Status"
635
  msgstr ""
636
 
637
+ #: includes/class-wcpdf-settings.php:190
638
+ msgid "Order not found!"
639
+ msgstr ""
640
+
641
+ #: includes/class-wcpdf-settings.php:193
642
+ msgid "Object found is not an order!"
643
+ msgstr ""
644
+
645
+ #. translators: order ID
646
+ #: includes/class-wcpdf-settings.php:251
647
+ msgid "Document not available for order #%s, try selecting a different order."
648
+ msgstr ""
649
+
650
+ #: includes/class-wcpdf-settings.php:258
651
+ msgid "No WooCommerce orders found! Please consider adding your first order to see this preview."
652
+ msgstr ""
653
+
654
+ #. translators: error message
655
+ #: includes/class-wcpdf-settings.php:266
656
+ msgid "Error trying to generate document: %s"
657
+ msgstr ""
658
+
659
+ #: includes/class-wcpdf-settings.php:340
660
+ msgid "Date"
661
+ msgstr ""
662
+
663
+ #: includes/class-wcpdf-settings.php:341
664
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:1165
665
+ msgid "Total"
666
+ msgstr ""
667
+
668
+ #: includes/class-wcpdf-settings.php:348
669
+ msgid "No order(s) found!"
670
+ msgstr ""
671
+
672
+ #: includes/class-wcpdf-settings.php:351
673
+ msgid "An error occurred when trying to process your request!"
674
+ msgstr ""
675
+
676
+ #. translators: error message
677
+ #: includes/class-wcpdf-settings.php:358
678
+ msgid "Error trying to get orders: %s"
679
  msgstr ""
680
 
681
  #: includes/class-wcpdf-setup-wizard.php:53
706
  msgid "Ready!"
707
  msgstr ""
708
 
709
+ #: includes/class-wcpdf-setup-wizard.php:134
710
  msgid "WooCommerce PDF Invoices & Packing Slips &rsaquo; Setup Wizard"
711
  msgstr ""
712
 
713
+ #: includes/class-wcpdf-setup-wizard.php:154
714
+ msgid "PDF Invoices & Packing Slips"
715
+ msgstr ""
716
+
717
+ #: includes/class-wcpdf-setup-wizard.php:186
718
  msgid "Previous"
719
  msgstr ""
720
 
721
+ #: includes/class-wcpdf-setup-wizard.php:191
722
  msgid "Next"
723
  msgstr ""
724
 
725
+ #: includes/class-wcpdf-setup-wizard.php:192
726
  msgid "Skip this step"
727
  msgstr ""
728
 
729
+ #: includes/class-wcpdf-setup-wizard.php:194
730
  msgid "Finish"
731
  msgstr ""
732
 
735
  msgid "N/A"
736
  msgstr ""
737
 
738
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:474
739
  msgid "Payment method"
740
  msgstr ""
741
 
742
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:495
743
  msgid "Shipping method"
744
  msgstr ""
745
 
746
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:988
747
  msgid "Subtotal"
748
  msgstr ""
749
 
750
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:1013
751
  msgid "Shipping"
752
  msgstr ""
753
 
754
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:1076
755
  msgid "Discount"
756
  msgstr ""
757
 
758
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:1117
759
  msgid "VAT"
760
  msgstr ""
761
 
762
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:1118
763
  msgid "Tax rate"
764
  msgstr ""
765
 
766
+ #: includes/documents/abstract-wcpdf-order-document-methods.php:1162
767
  msgid "Total ex. VAT"
768
  msgstr ""
769
 
 
 
 
 
770
  #. translators: 1. credit note title, 2. refund id
771
+ #: includes/documents/abstract-wcpdf-order-document.php:341
772
  msgid "%1$s (refund #%2$s) was regenerated."
773
  msgstr ""
774
 
775
  #. translators: 1. credit note title, 2. refund id
776
+ #: includes/documents/abstract-wcpdf-order-document.php:341
777
  msgid "%s was regenerated"
778
  msgstr ""
779
 
780
  #. translators: %s: document name
781
+ #: includes/documents/abstract-wcpdf-order-document.php:428
782
  msgid "%s Number:"
783
  msgstr ""
784
 
785
  #. translators: %s: document name
786
+ #: includes/documents/abstract-wcpdf-order-document.php:434
787
  msgid "%s Date:"
788
  msgstr ""
789
 
790
+ #: includes/documents/abstract-wcpdf-order-document.php:942
791
  msgid "Admin email"
792
  msgstr ""
793
 
794
+ #: includes/documents/abstract-wcpdf-order-document.php:945
795
  msgid "Manual email"
796
  msgstr ""
797
 
798
  #: includes/documents/class-wcpdf-invoice.php:32
799
  #: includes/documents/class-wcpdf-invoice.php:56
800
  #: includes/legacy/class-wcpdf-legacy-functions.php:22
801
+ #: includes/views/wcpdf-settings-page.php:106
802
  msgid "Invoice"
803
  msgstr ""
804
 
805
+ #. translators: document type
806
+ #: includes/documents/class-wcpdf-invoice.php:119
807
+ #: includes/documents/class-wcpdf-invoice.php:329
808
+ #: includes/documents/class-wcpdf-invoice.php:338
809
+ #: includes/documents/class-wcpdf-invoice.php:346
810
+ #: includes/documents/class-wcpdf-invoice.php:350
811
  msgid "invoice"
812
  msgid_plural "invoices"
813
  msgstr[0] ""
814
  msgstr[1] ""
815
 
816
+ #: includes/documents/class-wcpdf-invoice.php:174
817
  #: includes/documents/class-wcpdf-packing-slip.php:88
818
  msgid "Enable"
819
  msgstr ""
820
 
821
+ #: includes/documents/class-wcpdf-invoice.php:185
822
+ #: includes/documents/class-wcpdf-packing-slip.php:163
823
  msgid "Attach to:"
824
  msgstr ""
825
 
826
  #. translators: directory path
827
+ #: includes/documents/class-wcpdf-invoice.php:193
828
  msgid "It looks like the temp folder (<code>%s</code>) is not writable, check the permissions for this folder! Without having write access to this folder, the plugin will not be able to email invoices."
829
  msgstr ""
830
 
831
+ #: includes/documents/class-wcpdf-invoice.php:199
832
  msgid "Disable for:"
833
  msgstr ""
834
 
835
+ #: includes/documents/class-wcpdf-invoice.php:208
836
  msgid "Select one or more statuses"
837
  msgstr ""
838
 
839
+ #: includes/documents/class-wcpdf-invoice.php:214
840
  #: includes/views/setup-wizard/display-options.php:17
841
  msgid "Display shipping address"
842
  msgstr ""
843
 
844
+ #: includes/documents/class-wcpdf-invoice.php:221
845
+ #: includes/documents/class-wcpdf-invoice.php:273
846
+ #: includes/documents/class-wcpdf-invoice.php:289
847
  #: includes/documents/class-wcpdf-packing-slip.php:106
848
+ #: includes/views/dompdf-status.php:139
849
  msgid "No"
850
  msgstr ""
851
 
852
+ #: includes/documents/class-wcpdf-invoice.php:222
853
  msgid "Only when different from billing address"
854
  msgstr ""
855
 
856
+ #: includes/documents/class-wcpdf-invoice.php:223
857
+ #: includes/documents/class-wcpdf-invoice.php:376
858
  #: includes/documents/class-wcpdf-packing-slip.php:108
859
  msgid "Always"
860
  msgstr ""
861
 
862
+ #: includes/documents/class-wcpdf-invoice.php:231
863
  #: includes/documents/class-wcpdf-packing-slip.php:116
864
  #: includes/views/setup-wizard/display-options.php:26
865
  msgid "Display email address"
866
  msgstr ""
867
 
868
+ #: includes/documents/class-wcpdf-invoice.php:242
869
  #: includes/documents/class-wcpdf-packing-slip.php:127
870
  #: includes/views/setup-wizard/display-options.php:35
871
  msgid "Display phone number"
872
  msgstr ""
873
 
874
+ #: includes/documents/class-wcpdf-invoice.php:253
875
  #: includes/documents/class-wcpdf-packing-slip.php:138
876
  msgid "Display customer notes"
877
  msgstr ""
878
 
879
+ #: includes/documents/class-wcpdf-invoice.php:266
880
  #: includes/views/setup-wizard/display-options.php:44
881
  msgid "Display invoice date"
882
  msgstr ""
883
 
884
+ #: includes/documents/class-wcpdf-invoice.php:275
885
  msgid "Order Date"
886
  msgstr ""
887
 
888
+ #: includes/documents/class-wcpdf-invoice.php:282
889
  #: includes/views/setup-wizard/display-options.php:53
890
  msgid "Display invoice number"
891
  msgstr ""
892
 
893
+ #: includes/documents/class-wcpdf-invoice.php:291
894
  msgid "Order Number"
895
  msgstr ""
896
 
897
+ #: includes/documents/class-wcpdf-invoice.php:295
898
  msgid "Warning!"
899
  msgstr ""
900
 
901
+ #: includes/documents/class-wcpdf-invoice.php:296
902
  msgid "Using the Order Number as invoice number is not recommended as this may lead to gaps in the invoice number sequence (even when order numbers are sequential)."
903
  msgstr ""
904
 
905
+ #: includes/documents/class-wcpdf-invoice.php:297
906
  msgid "More information"
907
  msgstr ""
908
 
909
+ #: includes/documents/class-wcpdf-invoice.php:304
910
  msgid "Next invoice number (without prefix/suffix etc.)"
911
  msgstr ""
912
 
913
+ #: includes/documents/class-wcpdf-invoice.php:310
914
  msgid "This is the number that will be used for the next document. By default, numbering starts from 1 and increases for every new document. Note that if you override this and set it lower than the current/highest number, this could create duplicate numbers!"
915
  msgstr ""
916
 
917
+ #: includes/documents/class-wcpdf-invoice.php:316
918
  msgid "Number format"
919
  msgstr ""
920
 
921
+ #: includes/documents/class-wcpdf-invoice.php:324
922
  msgid "Prefix"
923
  msgstr ""
924
 
925
+ #: includes/documents/class-wcpdf-invoice.php:326
926
+ msgid "If set, this value will be used as number prefix."
927
+ msgstr ""
928
+
929
+ #. translators: 1. document type, 2-3 placeholders
930
+ #: includes/documents/class-wcpdf-invoice.php:328
931
+ #: includes/documents/class-wcpdf-invoice.php:337
932
+ msgid "You can use the %1$s year and/or month with the %2$s or %3$s placeholders respectively."
933
+ msgstr ""
934
+
935
+ #: includes/documents/class-wcpdf-invoice.php:330
936
+ #: includes/documents/class-wcpdf-invoice.php:339
937
+ msgid "Check the Docs article below to see all the available placeholders for prefix/suffix."
938
  msgstr ""
939
 
940
+ #: includes/documents/class-wcpdf-invoice.php:333
941
  msgid "Suffix"
942
  msgstr ""
943
 
944
+ #: includes/documents/class-wcpdf-invoice.php:335
945
+ msgid "If set, this value will be used as number suffix."
946
+ msgstr ""
947
+
948
+ #: includes/documents/class-wcpdf-invoice.php:342
949
  msgid "Padding"
950
  msgstr ""
951
 
952
+ #. translators: document type
953
+ #: includes/documents/class-wcpdf-invoice.php:346
954
+ msgid "Enter the number of digits you want to use as padding. For instance, enter <code>6</code> to display the %s number <code>123</code> as <code>000123</code>, filling it with zeros until the number set as padding is reached."
955
+ msgstr ""
956
+
957
+ #. translators: document type
958
+ #: includes/documents/class-wcpdf-invoice.php:350
959
+ msgid "For more information about setting up the number format and see the available placeholders for the prefix and suffix, check this article:"
960
  msgstr ""
961
 
962
+ #. translators: document type
963
+ #: includes/documents/class-wcpdf-invoice.php:350
964
+ msgid "Number format explained"
965
  msgstr ""
966
 
967
+ #. translators: document type
968
+ #: includes/documents/class-wcpdf-invoice.php:350
969
+ msgid "<strong>Note</strong>: if you have already created a custom %s number format with a filter, the above settings will be ignored."
970
+ msgstr ""
971
+
972
+ #: includes/documents/class-wcpdf-invoice.php:356
973
  msgid "Reset invoice number yearly"
974
  msgstr ""
975
 
976
+ #: includes/documents/class-wcpdf-invoice.php:367
977
  msgid "Allow My Account invoice download"
978
  msgstr ""
979
 
980
+ #: includes/documents/class-wcpdf-invoice.php:374
981
  msgid "Only when an invoice is already created/emailed"
982
  msgstr ""
983
 
984
+ #: includes/documents/class-wcpdf-invoice.php:375
985
  msgid "Only for specific order statuses (define below)"
986
  msgstr ""
987
 
988
+ #: includes/documents/class-wcpdf-invoice.php:377
989
  msgid "Never"
990
  msgstr ""
991
 
992
+ #: includes/documents/class-wcpdf-invoice.php:392
993
  msgid "Enable invoice number column in the orders list"
994
  msgstr ""
995
 
996
+ #: includes/documents/class-wcpdf-invoice.php:403
997
  msgid "Disable for free orders"
998
  msgstr ""
999
 
1000
  #. translators: zero number
1001
+ #: includes/documents/class-wcpdf-invoice.php:410
1002
  msgid "Disable document when the order total is %s"
1003
  msgstr ""
1004
 
1005
+ #: includes/documents/class-wcpdf-invoice.php:416
1006
  msgid "Always use most current settings"
1007
  msgstr ""
1008
 
1009
+ #: includes/documents/class-wcpdf-invoice.php:422
1010
  msgid "When enabled, the document will always reflect the most current settings (such as footer text, document name, etc.) rather than using historical settings."
1011
  msgstr ""
1012
 
1013
+ #: includes/documents/class-wcpdf-invoice.php:424
1014
  msgid "<strong>Caution:</strong> enabling this will also mean that if you change your company name or address in the future, previously generated documents will also be affected."
1015
  msgstr ""
1016
 
1017
+ #: includes/documents/class-wcpdf-invoice.php:437
1018
  msgid "Invoice numbers are created by a third-party extension."
1019
  msgstr ""
1020
 
1021
  #. translators: link
1022
+ #: includes/documents/class-wcpdf-invoice.php:440
1023
  msgid "Configure it <a href=\"%s\">here</a>."
1024
  msgstr ""
1025
 
1043
  msgid "Only when different from shipping address"
1044
  msgstr ""
1045
 
1046
+ #: includes/documents/class-wcpdf-packing-slip.php:154
1047
+ msgid "Upgrade to our Professional extension to attach packing slips to any email!"
1048
+ msgstr ""
1049
+
1050
+ #: includes/documents/class-wcpdf-packing-slip.php:187
1051
  msgid "Packing Slip Number:"
1052
  msgstr ""
1053
 
1054
+ #: includes/documents/class-wcpdf-packing-slip.php:195
1055
  msgid "Packing Slip Date:"
1056
  msgstr ""
1057
 
1072
  msgstr ""
1073
 
1074
  #. translators: <a> tags
1075
+ #: includes/views/attachment-settings-hint.php:11
1076
  msgid "It looks like you haven't setup any email attachments yet, check the settings under <b>%1$sDocuments > Invoice%2$s</b>"
1077
  msgstr ""
1078
 
1088
  msgid "Required if you have images in your documents"
1089
  msgstr ""
1090
 
1091
+ #: includes/views/dompdf-status.php:33
1092
+ msgid "Required when using .webp images"
1093
+ msgstr ""
1094
+
1095
+ #: includes/views/dompdf-status.php:36
1096
+ msgid "Required if you have .webp images in your documents"
1097
+ msgstr ""
1098
+
1099
+ #: includes/views/dompdf-status.php:45
1100
  msgid "To compress PDF documents"
1101
  msgstr ""
1102
 
1103
+ #: includes/views/dompdf-status.php:48
1104
  msgid "Recommended to compress PDF documents"
1105
  msgstr ""
1106
 
1107
+ #: includes/views/dompdf-status.php:51
1108
  msgid "For better performances"
1109
  msgstr ""
1110
 
 
1111
  #: includes/views/dompdf-status.php:54
1112
+ #: includes/views/dompdf-status.php:60
1113
  msgid "Recommended for better performances"
1114
  msgstr ""
1115
 
1116
+ #: includes/views/dompdf-status.php:57
1117
  msgid "Better with transparent PNG images"
1118
  msgstr ""
1119
 
1120
+ #: includes/views/dompdf-status.php:63
1121
  msgid "Required to detect custom templates and to clear the temp folder periodically"
1122
  msgstr ""
1123
 
1124
+ #: includes/views/dompdf-status.php:66
1125
  msgid "Check PHP disable_functions"
1126
  msgstr ""
1127
 
1128
  #. translators: <a> tags
1129
+ #: includes/views/dompdf-status.php:70
1130
  msgid "Recommended: 128MB (more for plugin-heavy setups<br/>See: %1$sIncreasing the WordPress Memory Limit%2$s"
1131
  msgstr ""
1132
 
1133
+ #: includes/views/dompdf-status.php:75
1134
  msgid "Allow remote stylesheets and images"
1135
  msgstr ""
1136
 
1137
+ #: includes/views/dompdf-status.php:78
1138
  msgid "allow_url_fopen disabled"
1139
  msgstr ""
1140
 
1141
+ #: includes/views/dompdf-status.php:81
1142
  msgid "To compress and decompress font data"
1143
  msgstr ""
1144
 
1145
+ #: includes/views/dompdf-status.php:84
1146
  msgid "base64_decode disabled"
1147
  msgstr ""
1148
 
1149
  #. translators: <a> tags
1150
+ #: includes/views/dompdf-status.php:104
1151
+ msgid "Download %1$sthis addon%2$s to enable backwards compatibility."
1152
  msgstr ""
1153
 
1154
+ #: includes/views/dompdf-status.php:109
1155
  msgid "System Configuration"
1156
  msgstr ""
1157
 
1158
+ #: includes/views/dompdf-status.php:114
1159
  msgid "Required"
1160
  msgstr ""
1161
 
1162
+ #: includes/views/dompdf-status.php:115
1163
  msgid "Present"
1164
  msgstr ""
1165
 
1166
+ #: includes/views/dompdf-status.php:132
1167
+ #: includes/views/dompdf-status.php:136
1168
+ msgid "Yes"
1169
+ msgstr ""
1170
+
1171
+ #: includes/views/dompdf-status.php:154
1172
  msgid "Writable"
1173
  msgstr ""
1174
 
1175
+ #: includes/views/dompdf-status.php:155
1176
  msgid "Not writable"
1177
  msgstr ""
1178
 
1179
+ #: includes/views/dompdf-status.php:160
1180
  msgid "Central temporary plugin folder"
1181
  msgstr ""
1182
 
1183
+ #: includes/views/dompdf-status.php:166
1184
  msgid "Temporary attachments folder"
1185
  msgstr ""
1186
 
1187
+ #: includes/views/dompdf-status.php:172
1188
  msgid "Temporary DOMPDF folder"
1189
  msgstr ""
1190
 
1191
+ #: includes/views/dompdf-status.php:178
1192
  msgid "DOMPDF fonts folder (needs to be writable for custom/remote fonts)"
1193
  msgstr ""
1194
 
1195
+ #: includes/views/dompdf-status.php:189
1196
  msgid "Write Permissions"
1197
  msgstr ""
1198
 
1199
+ #: includes/views/dompdf-status.php:192
1200
+ #: templates/Simple/invoice.php:111
1201
+ #: templates/Simple/packing-slip.php:98
1202
  msgid "Description"
1203
  msgstr ""
1204
 
1205
+ #: includes/views/dompdf-status.php:193
1206
  msgid "Value"
1207
  msgstr ""
1208
 
1209
  #. translators: 1,2. directory paths, 3. UPLOADS, 4. wpo_wcpdf_tmp_path, 5. attachments, 6. dompdf, 7. fonts
1210
+ #: includes/views/dompdf-status.php:219
1211
  msgid "The central temp folder is %1$s. By default, this folder is created in the WordPress uploads folder (%2$s), which can be defined by setting %3$s in wp-config.php. Alternatively, you can control the specific folder for PDF invoices by using the %4$s filter. Make sure this folder is writable and that the subfolders %5$s, %6$s and %7$s are present (these will be created by the plugin if the central temp folder is writable)."
1212
  msgstr ""
1213
 
1214
  #. translators: directory path
1215
+ #: includes/views/dompdf-status.php:232
1216
  msgid "If the temporary folders were not automatically created by the plugin, verify that all the font files (from %s) are copied to the fonts folder. Normally, this is fully automated, but if your server has strict security settings, this automated copying may have been prohibited. In that case, you also need to make sure these folders get synchronized on plugin updates!"
1217
  msgstr ""
1218
 
1219
  #: includes/views/setup-wizard/attach-to.php:3
1220
+ msgid "Attach to..."
1221
  msgstr ""
1222
 
1223
  #: includes/views/setup-wizard/attach-to.php:4
1260
  msgid "Lets quickly setup your invoice. Please enter the name and address of your shop in the fields on the right."
1261
  msgstr ""
1262
 
1263
+ #: includes/views/setup-wizard/shop-name.php:13
1264
+ msgid "Shop name"
1265
+ msgstr ""
1266
+
1267
+ #: includes/views/setup-wizard/shop-name.php:14
1268
+ msgid "Shop address"
1269
+ msgstr ""
1270
+
1271
  #: includes/views/setup-wizard/show-action-buttons.php:4
1272
  msgid "Would you like to display the action buttons in your WooCommerce order list? The action buttons allow you to manually create a PDF."
1273
  msgstr ""
1280
  msgid "Show action buttons"
1281
  msgstr ""
1282
 
1283
+ #: includes/views/wcpdf-extensions.php:6
1284
  msgid "Check out these premium extensions!"
1285
  msgstr ""
1286
 
1287
+ #: includes/views/wcpdf-extensions.php:7
1288
  msgid "click items to read more"
1289
  msgstr ""
1290
 
1291
+ #: includes/views/wcpdf-extensions.php:12
1292
  msgid "Premium PDF Invoice bundle: Everything you need for a perfect invoicing system"
1293
  msgstr ""
1294
 
1295
+ #: includes/views/wcpdf-extensions.php:14
1296
  msgid "Supercharge WooCommerce PDF Invoices & Packing Slips with the all our premium extensions:"
1297
  msgstr ""
1298
 
1299
+ #: includes/views/wcpdf-extensions.php:15
1300
  msgid "Professional features:"
1301
  msgstr ""
1302
 
1303
+ #: includes/views/wcpdf-extensions.php:17
1304
+ #: includes/views/wcpdf-extensions.php:47
1305
  msgid "Email/print/download <b>PDF Credit Notes & Proforma invoices</b>"
1306
  msgstr ""
1307
 
1308
+ #: includes/views/wcpdf-extensions.php:18
1309
+ #: includes/views/wcpdf-extensions.php:48
1310
  msgid "Send out a separate <b>notification email</b> with (or without) PDF invoices/packing slips, for example to a drop-shipper or a supplier."
1311
  msgstr ""
1312
 
1313
+ #: includes/views/wcpdf-extensions.php:19
1314
+ #: includes/views/wcpdf-extensions.php:49
1315
  msgid "Attach <b>up to 3 static files</b> (for example a terms & conditions document) to the WooCommerce emails of your choice."
1316
  msgstr ""
1317
 
1318
+ #: includes/views/wcpdf-extensions.php:20
1319
+ #: includes/views/wcpdf-extensions.php:50
1320
  msgid "Use <b>separate numbering systems</b> and/or format for proforma invoices and credit notes or utilize the main invoice numbering system"
1321
  msgstr ""
1322
 
1323
+ #: includes/views/wcpdf-extensions.php:21
1324
+ #: includes/views/wcpdf-extensions.php:51
1325
  msgid "<b>Customize</b> the <b>shipping & billing address</b> format to include additional custom fields, font sizes etc. without the need to create a custom template."
1326
  msgstr ""
1327
 
1328
+ #: includes/views/wcpdf-extensions.php:22
1329
+ #: includes/views/wcpdf-extensions.php:52
1330
  msgid "Use the plugin in multilingual <b>WPML</b> setups"
1331
  msgstr ""
1332
 
1333
+ #: includes/views/wcpdf-extensions.php:24
1334
+ #: includes/views/wcpdf-extensions.php:104
1335
  msgid "Advanced, customizable templates"
1336
  msgstr ""
1337
 
1338
+ #: includes/views/wcpdf-extensions.php:26
1339
+ #: includes/views/wcpdf-extensions.php:107
1340
  msgid "Completely customize the invoice contents (prices, taxes, thumbnails) to your needs with a drag & drop customizer"
1341
  msgstr ""
1342
 
1343
+ #: includes/views/wcpdf-extensions.php:27
1344
+ #: includes/views/wcpdf-extensions.php:108
1345
  msgid "Two extra stylish premade templates (Modern & Business)"
1346
  msgstr ""
1347
 
1348
+ #: includes/views/wcpdf-extensions.php:29
1349
+ #: includes/views/wcpdf-extensions.php:53
1350
  msgid "Upload automatically to dropbox"
1351
  msgstr ""
1352
 
1353
+ #: includes/views/wcpdf-extensions.php:31
1354
  msgid "This extension conveniently uploads all the invoices (and other pdf documents from the professional extension) that are emailed to your customers to Dropbox. The best way to keep your invoice administration up to date!"
1355
  msgstr ""
1356
 
1357
+ #: includes/views/wcpdf-extensions.php:34
1358
  msgid "Get WooCommerce PDF Invoices & Packing Slips Bundle"
1359
  msgstr ""
1360
 
1361
+ #: includes/views/wcpdf-extensions.php:43
1362
  msgid "Go Pro: Proforma invoices, credit notes (=refunds) & more!"
1363
  msgstr ""
1364
 
1365
+ #: includes/views/wcpdf-extensions.php:45
1366
  msgid "Supercharge WooCommerce PDF Invoices & Packing Slips with the following features:"
1367
  msgstr ""
1368
 
1369
+ #: includes/views/wcpdf-extensions.php:55
1370
  msgid "Get WooCommerce PDF Invoices & Packing Slips Professional!"
1371
  msgstr ""
1372
 
1373
+ #: includes/views/wcpdf-extensions.php:63
1374
  msgid "Automatically send payment reminders to your customers"
1375
  msgstr ""
1376
 
1377
+ #: includes/views/wcpdf-extensions.php:65
1378
  msgid "WooCommerce Smart Reminder emails"
1379
  msgstr ""
1380
 
1381
+ #: includes/views/wcpdf-extensions.php:67
1382
  msgid "<b>Completely automatic</b> scheduled emails"
1383
  msgstr ""
1384
 
1385
+ #: includes/views/wcpdf-extensions.php:68
1386
  msgid "<b>Rich text editor</b> for the email text, including placeholders for data from the order (name, order total, etc)"
1387
  msgstr ""
1388
 
1389
+ #: includes/views/wcpdf-extensions.php:69
1390
  msgid "Configure the exact requirements for sending an email (time after order, order status, payment method)"
1391
  msgstr ""
1392
 
1393
+ #: includes/views/wcpdf-extensions.php:70
1394
  msgid "Fully <b>WPML Compatible</b> – emails will be automatically sent in the order language."
1395
  msgstr ""
1396
 
1397
+ #: includes/views/wcpdf-extensions.php:71
1398
  msgid "<b>Super versatile!</b> Can be used for any kind of reminder email (review reminders, repeat purchases)"
1399
  msgstr ""
1400
 
1401
+ #: includes/views/wcpdf-extensions.php:72
1402
  msgid "Integrates seamlessly with the PDF Invoices & Packing Slips plugin"
1403
  msgstr ""
1404
 
1405
+ #: includes/views/wcpdf-extensions.php:74
1406
  msgid "Get WooCommerce Smart Reminder Emails"
1407
  msgstr ""
1408
 
1409
+ #: includes/views/wcpdf-extensions.php:83
1410
  msgid "Automatically send new orders or packing slips to your printer, as soon as the customer orders!"
1411
  msgstr ""
1412
 
1413
+ #: includes/views/wcpdf-extensions.php:89
1414
  msgid "Check out the WooCommerce Automatic Order Printing extension from our partners at Simba Hosting"
1415
  msgstr ""
1416
 
1417
+ #: includes/views/wcpdf-extensions.php:90
1418
  msgid "WooCommerce Automatic Order Printing"
1419
  msgstr ""
1420
 
1421
  #. translators: Premium Templates link
1422
+ #: includes/views/wcpdf-extensions.php:110
1423
  msgid "Check out the Premium PDF Invoice & Packing Slips templates at %s."
1424
  msgstr ""
1425
 
1426
  #. translators: email link
1427
+ #: includes/views/wcpdf-extensions.php:112
1428
  msgid "For custom templates, contact us at %s."
1429
  msgstr ""
1430
 
1431
+ #. translators: ★★★★★ (5-star)
1432
+ #: includes/views/wcpdf-settings-page.php:7
1433
+ msgid "If you like <strong>WooCommerce PDF Invoices & Packing Slips</strong> please leave us a %s rating. A huge thank you in advance!"
1434
+ msgstr ""
1435
+
1436
+ #: includes/views/wcpdf-settings-page.php:18
1437
  msgid "WooCommerce PDF Invoices"
1438
  msgstr ""
1439
 
1440
+ #: includes/views/wcpdf-settings-page.php:88
1441
+ msgid "ID, email or name"
1442
+ msgstr ""
1443
+
1444
+ #: includes/views/wcpdf-settings-page.php:89
1445
+ msgid "Clear search text"
1446
+ msgstr ""
1447
+
1448
+ #: includes/views/wcpdf-settings-page.php:91
1449
+ msgid "Currently showing last order"
1450
+ msgstr ""
1451
+
1452
+ #: includes/views/wcpdf-settings-page.php:92
1453
+ #: includes/views/wcpdf-settings-page.php:95
1454
+ msgid "Search for an order"
1455
+ msgstr ""
1456
+
1457
+ #: includes/views/wcpdf-settings-page.php:94
1458
+ msgid "Show last order"
1459
+ msgstr ""
1460
+
1461
+ #: includes/wcpdf-functions.php:226
1462
  msgid "Error creating PDF, please contact the site owner."
1463
  msgstr ""
1464
 
1465
+ #: templates/Simple/invoice.php:40
1466
+ #: templates/Simple/packing-slip.php:53
1467
  msgid "Billing Address:"
1468
  msgstr ""
1469
 
1470
+ #: templates/Simple/invoice.php:53
1471
  msgid "Ship To:"
1472
  msgstr ""
1473
 
1474
+ #: templates/Simple/invoice.php:78
1475
+ #: templates/Simple/packing-slip.php:66
1476
  msgid "Order Number:"
1477
  msgstr ""
1478
 
1479
+ #: templates/Simple/invoice.php:82
1480
+ #: templates/Simple/packing-slip.php:70
1481
  msgid "Order Date:"
1482
  msgstr ""
1483
 
1484
+ #: templates/Simple/invoice.php:87
1485
  msgid "Payment Method:"
1486
  msgstr ""
1487
 
1488
+ #: templates/Simple/invoice.php:102
1489
+ #: templates/Simple/packing-slip.php:90
1490
  msgid "Product"
1491
  msgstr ""
1492
 
1493
+ #: templates/Simple/invoice.php:103
1494
+ #: templates/Simple/packing-slip.php:91
1495
  msgid "Quantity"
1496
  msgstr ""
1497
 
1498
+ #: templates/Simple/invoice.php:104
1499
  msgid "Price"
1500
  msgstr ""
1501
 
1502
+ #: templates/Simple/invoice.php:116
1503
+ #: templates/Simple/packing-slip.php:103
1504
  msgid "SKU"
1505
  msgstr ""
1506
 
1507
+ #: templates/Simple/invoice.php:117
1508
+ #: templates/Simple/packing-slip.php:104
1509
  msgid "SKU:"
1510
  msgstr ""
1511
 
1512
+ #: templates/Simple/invoice.php:118
1513
+ #: templates/Simple/packing-slip.php:105
1514
  msgid "Weight:"
1515
  msgstr ""
1516
 
1517
+ #: templates/Simple/invoice.php:133
1518
  msgid "Notes"
1519
  msgstr ""
1520
 
1521
+ #: templates/Simple/invoice.php:141
1522
+ #: templates/Simple/packing-slip.php:123
1523
  msgid "Customer Notes"
1524
  msgstr ""
1525
 
1526
+ #: templates/Simple/packing-slip.php:40
1527
  msgid "Shipping Address:"
1528
  msgstr ""
1529
 
1530
+ #: templates/Simple/packing-slip.php:75
1531
  msgid "Shipping Method:"
1532
  msgstr ""
1533
 
1534
  #. translators: <a> tags
1535
+ #: woocommerce-pdf-invoices-packingslips.php:270
1536
  msgid "WooCommerce PDF Invoices & Packing Slips requires %1$sWooCommerce%2$s to be installed & activated!"
1537
  msgstr ""
1538
 
1539
+ #: woocommerce-pdf-invoices-packingslips.php:281
1540
  msgid "WooCommerce PDF Invoices & Packing Slips requires PHP 7.1 (7.4 or higher recommended)."
1541
  msgstr ""
1542
 
1543
  #. translators: <a> tags
1544
+ #: woocommerce-pdf-invoices-packingslips.php:283
1545
  msgid "We strongly recommend to %1$supdate your PHP version%2$s."
1546
  msgstr ""
1547
 
1548
  #. translators: <a> tags
1549
+ #: woocommerce-pdf-invoices-packingslips.php:285
1550
  msgid "If you cannot upgrade your PHP version, you can download %1$sthis addon%2$s to enable backwards compatibility with PHP5.6."
1551
  msgstr ""
1552
 
1553
  #. translators: directory path
1554
+ #: woocommerce-pdf-invoices-packingslips.php:373
1555
  msgid "The PDF files in %s are not currently protected due to your site running on <strong>NGINX</strong>."
1556
  msgstr ""
1557
 
1558
+ #: woocommerce-pdf-invoices-packingslips.php:374
1559
  msgid "To protect them, you must click the button below."
1560
  msgstr ""
1561
 
1562
+ #: woocommerce-pdf-invoices-packingslips.php:417
1563
  msgid "When sending emails with MailPoet 3 and the active sending method is <strong>MailPoet Sending Service</strong> or <strong>Your web host / web server</strong>, MailPoet does not include the <strong>WooCommerce PDF Invoices & Packing Slips</strong> attachments in the emails."
1564
  msgstr ""
1565
 
1566
+ #: woocommerce-pdf-invoices-packingslips.php:418
1567
  msgid "To fix this you should select <strong>The default WordPress sending method (default)</strong> on the <strong>Advanced tab</strong>."
1568
  msgstr ""
1569
 
1570
+ #: woocommerce-pdf-invoices-packingslips.php:419
1571
  msgid "Change MailPoet sending method to WordPress (default)"
1572
  msgstr ""
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: 6.0
7
  Requires PHP: 7.1
8
- Stable tag: 3.1.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,15 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
 
 
 
105
  = 3.1.1 (2022-09-13) =
106
  * Fix: fatal error caused by list_files() function missing
107
 
5
  Requires at least: 3.5
6
  Tested up to: 6.0
7
  Requires PHP: 7.1
8
+ Stable tag: 3.2.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
  == Changelog ==
104
 
105
+ = 3.2.0 (2022-09-26) =
106
+ * New: setting to display the Invoice date column in the WooCommerce orders list
107
+ * New: updated Dompdf to version 2.0.1, which fixes a security vulnerability.
108
+ * New: filter 'wpo_wcpdf_document_link_additional_vars' to add additional query variables to the document link
109
+ * Tweak: improved document settings data init/save
110
+ * Tweak: improved wizard display settings
111
+ * Tweak: improved styles and descriptions for the document 'Number format' settings
112
+ * Tweak: new query variable for the shortcode document link
113
+
114
  = 3.1.1 (2022-09-13) =
115
  * Fix: fatal error caused by list_files() function missing
116
 
vendor/composer/installed.json CHANGED
@@ -2,25 +2,25 @@
2
  "packages": [
3
  {
4
  "name": "dompdf/dompdf",
5
- "version": "v2.0.0",
6
- "version_normalized": "2.0.0.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/dompdf/dompdf.git",
10
- "reference": "79573d8b8a141ec8a17312515de8740eed014fa9"
11
  },
12
  "dist": {
13
  "type": "zip",
14
- "url": "https://api.github.com/repos/dompdf/dompdf/zipball/79573d8b8a141ec8a17312515de8740eed014fa9",
15
- "reference": "79573d8b8a141ec8a17312515de8740eed014fa9",
16
  "shasum": ""
17
  },
18
  "require": {
19
  "ext-dom": "*",
20
  "ext-mbstring": "*",
21
  "masterminds/html5": "^2.0",
22
- "phenx/php-font-lib": "^0.5.4",
23
- "phenx/php-svg-lib": "^0.3.3 || ^0.4.0",
24
  "php": "^7.1 || ^8.0"
25
  },
26
  "require-dev": {
@@ -36,7 +36,7 @@
36
  "ext-imagick": "Improves image processing performance",
37
  "ext-zlib": "Needed for pdf stream compression"
38
  },
39
- "time": "2022-06-21T21:14:57+00:00",
40
  "type": "library",
41
  "installation-source": "dist",
42
  "autoload": {
@@ -53,39 +53,31 @@
53
  ],
54
  "authors": [
55
  {
56
- "name": "Fabien Ménager",
57
- "email": "fabien.menager@gmail.com"
58
- },
59
- {
60
- "name": "Brian Sweeney",
61
- "email": "eclecticgeek@gmail.com"
62
- },
63
- {
64
- "name": "Gabriel Bull",
65
- "email": "me@gabrielbull.com"
66
  }
67
  ],
68
  "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
69
  "homepage": "https://github.com/dompdf/dompdf",
70
  "support": {
71
  "issues": "https://github.com/dompdf/dompdf/issues",
72
- "source": "https://github.com/dompdf/dompdf/tree/v2.0.0"
73
  },
74
  "install-path": "../dompdf/dompdf"
75
  },
76
  {
77
  "name": "masterminds/html5",
78
- "version": "2.7.5",
79
- "version_normalized": "2.7.5.0",
80
  "source": {
81
  "type": "git",
82
  "url": "https://github.com/Masterminds/html5-php.git",
83
- "reference": "f640ac1bdddff06ea333a920c95bbad8872429ab"
84
  },
85
  "dist": {
86
  "type": "zip",
87
- "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f640ac1bdddff06ea333a920c95bbad8872429ab",
88
- "reference": "f640ac1bdddff06ea333a920c95bbad8872429ab",
89
  "shasum": ""
90
  },
91
  "require": {
@@ -97,7 +89,7 @@
97
  "require-dev": {
98
  "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7"
99
  },
100
- "time": "2021-07-01T14:25:37+00:00",
101
  "type": "library",
102
  "extra": {
103
  "branch-alias": {
@@ -141,7 +133,7 @@
141
  ],
142
  "support": {
143
  "issues": "https://github.com/Masterminds/html5-php/issues",
144
- "source": "https://github.com/Masterminds/html5-php/tree/2.7.5"
145
  },
146
  "install-path": "../masterminds/html5"
147
  },
@@ -194,28 +186,28 @@
194
  },
195
  {
196
  "name": "phenx/php-svg-lib",
197
- "version": "0.4.1",
198
- "version_normalized": "0.4.1.0",
199
  "source": {
200
  "type": "git",
201
  "url": "https://github.com/dompdf/php-svg-lib.git",
202
- "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02"
203
  },
204
  "dist": {
205
  "type": "zip",
206
- "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/4498b5df7b08e8469f0f8279651ea5de9626ed02",
207
- "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02",
208
  "shasum": ""
209
  },
210
  "require": {
211
  "ext-mbstring": "*",
212
- "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0",
213
  "sabberworm/php-css-parser": "^8.4"
214
  },
215
  "require-dev": {
216
  "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
217
  },
218
- "time": "2022-03-07T12:52:04+00:00",
219
  "type": "library",
220
  "installation-source": "dist",
221
  "autoload": {
@@ -237,7 +229,7 @@
237
  "homepage": "https://github.com/PhenX/php-svg-lib",
238
  "support": {
239
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
240
- "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.1"
241
  },
242
  "install-path": "../phenx/php-svg-lib"
243
  },
@@ -464,6 +456,6 @@
464
  "install-path": "../symfony/polyfill-mbstring"
465
  }
466
  ],
467
- "dev": true,
468
  "dev-package-names": []
469
  }
2
  "packages": [
3
  {
4
  "name": "dompdf/dompdf",
5
+ "version": "v2.0.1",
6
+ "version_normalized": "2.0.1.0",
7
  "source": {
8
  "type": "git",
9
  "url": "https://github.com/dompdf/dompdf.git",
10
+ "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085"
11
  },
12
  "dist": {
13
  "type": "zip",
14
+ "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c5310df0e22c758c85ea5288175fc6cd777bc085",
15
+ "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085",
16
  "shasum": ""
17
  },
18
  "require": {
19
  "ext-dom": "*",
20
  "ext-mbstring": "*",
21
  "masterminds/html5": "^2.0",
22
+ "phenx/php-font-lib": ">=0.5.4 <1.0.0",
23
+ "phenx/php-svg-lib": ">=0.3.3 <1.0.0",
24
  "php": "^7.1 || ^8.0"
25
  },
26
  "require-dev": {
36
  "ext-imagick": "Improves image processing performance",
37
  "ext-zlib": "Needed for pdf stream compression"
38
  },
39
+ "time": "2022-09-22T13:43:41+00:00",
40
  "type": "library",
41
  "installation-source": "dist",
42
  "autoload": {
53
  ],
54
  "authors": [
55
  {
56
+ "name": "The Dompdf Community",
57
+ "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md"
 
 
 
 
 
 
 
 
58
  }
59
  ],
60
  "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
61
  "homepage": "https://github.com/dompdf/dompdf",
62
  "support": {
63
  "issues": "https://github.com/dompdf/dompdf/issues",
64
+ "source": "https://github.com/dompdf/dompdf/tree/v2.0.1"
65
  },
66
  "install-path": "../dompdf/dompdf"
67
  },
68
  {
69
  "name": "masterminds/html5",
70
+ "version": "2.7.6",
71
+ "version_normalized": "2.7.6.0",
72
  "source": {
73
  "type": "git",
74
  "url": "https://github.com/Masterminds/html5-php.git",
75
+ "reference": "897eb517a343a2281f11bc5556d6548db7d93947"
76
  },
77
  "dist": {
78
  "type": "zip",
79
+ "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947",
80
+ "reference": "897eb517a343a2281f11bc5556d6548db7d93947",
81
  "shasum": ""
82
  },
83
  "require": {
89
  "require-dev": {
90
  "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7"
91
  },
92
+ "time": "2022-08-18T16:18:26+00:00",
93
  "type": "library",
94
  "extra": {
95
  "branch-alias": {
133
  ],
134
  "support": {
135
  "issues": "https://github.com/Masterminds/html5-php/issues",
136
+ "source": "https://github.com/Masterminds/html5-php/tree/2.7.6"
137
  },
138
  "install-path": "../masterminds/html5"
139
  },
186
  },
187
  {
188
  "name": "phenx/php-svg-lib",
189
+ "version": "0.5.0",
190
+ "version_normalized": "0.5.0.0",
191
  "source": {
192
  "type": "git",
193
  "url": "https://github.com/dompdf/php-svg-lib.git",
194
+ "reference": "76876c6cf3080bcb6f249d7d59705108166a6685"
195
  },
196
  "dist": {
197
  "type": "zip",
198
+ "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/76876c6cf3080bcb6f249d7d59705108166a6685",
199
+ "reference": "76876c6cf3080bcb6f249d7d59705108166a6685",
200
  "shasum": ""
201
  },
202
  "require": {
203
  "ext-mbstring": "*",
204
+ "php": "^7.1 || ^8.0",
205
  "sabberworm/php-css-parser": "^8.4"
206
  },
207
  "require-dev": {
208
  "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5"
209
  },
210
+ "time": "2022-09-06T12:16:56+00:00",
211
  "type": "library",
212
  "installation-source": "dist",
213
  "autoload": {
229
  "homepage": "https://github.com/PhenX/php-svg-lib",
230
  "support": {
231
  "issues": "https://github.com/dompdf/php-svg-lib/issues",
232
+ "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.0"
233
  },
234
  "install-path": "../phenx/php-svg-lib"
235
  },
456
  "install-path": "../symfony/polyfill-mbstring"
457
  }
458
  ],
459
+ "dev": false,
460
  "dev-package-names": []
461
  }
vendor/composer/installed.php CHANGED
@@ -5,9 +5,9 @@
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
- 'reference' => 'de3f055345804a78a51fa043ba01333e0a00fd50',
9
  'name' => '__root__',
10
- 'dev' => true,
11
  ),
12
  'versions' => array(
13
  '__root__' => array(
@@ -16,25 +16,25 @@
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
- 'reference' => 'de3f055345804a78a51fa043ba01333e0a00fd50',
20
  'dev_requirement' => false,
21
  ),
22
  'dompdf/dompdf' => array(
23
- 'pretty_version' => 'v2.0.0',
24
- 'version' => '2.0.0.0',
25
  'type' => 'library',
26
  'install_path' => __DIR__ . '/../dompdf/dompdf',
27
  'aliases' => array(),
28
- 'reference' => '79573d8b8a141ec8a17312515de8740eed014fa9',
29
  'dev_requirement' => false,
30
  ),
31
  'masterminds/html5' => array(
32
- 'pretty_version' => '2.7.5',
33
- 'version' => '2.7.5.0',
34
  'type' => 'library',
35
  'install_path' => __DIR__ . '/../masterminds/html5',
36
  'aliases' => array(),
37
- 'reference' => 'f640ac1bdddff06ea333a920c95bbad8872429ab',
38
  'dev_requirement' => false,
39
  ),
40
  'phenx/php-font-lib' => array(
@@ -47,12 +47,12 @@
47
  'dev_requirement' => false,
48
  ),
49
  'phenx/php-svg-lib' => array(
50
- 'pretty_version' => '0.4.1',
51
- 'version' => '0.4.1.0',
52
  'type' => 'library',
53
  'install_path' => __DIR__ . '/../phenx/php-svg-lib',
54
  'aliases' => array(),
55
- 'reference' => '4498b5df7b08e8469f0f8279651ea5de9626ed02',
56
  'dev_requirement' => false,
57
  ),
58
  'sabberworm/php-css-parser' => array(
5
  'type' => 'library',
6
  'install_path' => __DIR__ . '/../../',
7
  'aliases' => array(),
8
+ 'reference' => '3f2d2ca3e91b1f04365739ee9247db9593b8a22d',
9
  'name' => '__root__',
10
+ 'dev' => false,
11
  ),
12
  'versions' => array(
13
  '__root__' => array(
16
  'type' => 'library',
17
  'install_path' => __DIR__ . '/../../',
18
  'aliases' => array(),
19
+ 'reference' => '3f2d2ca3e91b1f04365739ee9247db9593b8a22d',
20
  'dev_requirement' => false,
21
  ),
22
  'dompdf/dompdf' => array(
23
+ 'pretty_version' => 'v2.0.1',
24
+ 'version' => '2.0.1.0',
25
  'type' => 'library',
26
  'install_path' => __DIR__ . '/../dompdf/dompdf',
27
  'aliases' => array(),
28
+ 'reference' => 'c5310df0e22c758c85ea5288175fc6cd777bc085',
29
  'dev_requirement' => false,
30
  ),
31
  'masterminds/html5' => array(
32
+ 'pretty_version' => '2.7.6',
33
+ 'version' => '2.7.6.0',
34
  'type' => 'library',
35
  'install_path' => __DIR__ . '/../masterminds/html5',
36
  'aliases' => array(),
37
+ 'reference' => '897eb517a343a2281f11bc5556d6548db7d93947',
38
  'dev_requirement' => false,
39
  ),
40
  'phenx/php-font-lib' => array(
47
  'dev_requirement' => false,
48
  ),
49
  'phenx/php-svg-lib' => array(
50
+ 'pretty_version' => '0.5.0',
51
+ 'version' => '0.5.0.0',
52
  'type' => 'library',
53
  'install_path' => __DIR__ . '/../phenx/php-svg-lib',
54
  'aliases' => array(),
55
+ 'reference' => '76876c6cf3080bcb6f249d7d59705108166a6685',
56
  'dev_requirement' => false,
57
  ),
58
  'sabberworm/php-css-parser' => array(
vendor/dompdf/dompdf/AUTHORS.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Dompdf was designed and developed by Benj Carson.
2
+
3
+ ### Current Team
4
+
5
+ * **Brian Sweeney** (maintainer)
6
+ * **Till Berger**
7
+
8
+ ### Alumni
9
+
10
+ * **Benj Carson** (creator)
11
+ * **Fabien Ménager**
12
+ * **Simon Berger**
13
+ * **Orion Richardson**
14
+
15
+ ### Contributors
16
+ * **Gabriel Bull**
17
+ * **Barry vd. Heuvel**
18
+ * **Ryan H. Masten**
19
+ * **Helmut Tischer**
20
+ * [and many more...](https://github.com/dompdf/dompdf/graphs/contributors)
21
+
22
+ ### Thanks
23
+
24
+ Dompdf would not have been possible without strong community support.
vendor/dompdf/dompdf/README.md CHANGED
@@ -222,7 +222,8 @@ Files accessed through the local file system have the following requirement:
222
  $html = '<img src="data:image/svg+xml;base64,' . base64_encode($svg) . '" ...>';
223
  ```
224
  Watch https://github.com/dompdf/dompdf/issues/320 for progress
225
-
 
226
  ---
227
 
228
  [![Donate button](https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif)](http://goo.gl/DSvWf)
222
  $html = '<img src="data:image/svg+xml;base64,' . base64_encode($svg) . '" ...>';
223
  ```
224
  Watch https://github.com/dompdf/dompdf/issues/320 for progress
225
+ * Does not support CSS flexbox.
226
+ * Does not support CSS Grid.
227
  ---
228
 
229
  [![Donate button](https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif)](http://goo.gl/DSvWf)
vendor/dompdf/dompdf/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
vendor/dompdf/dompdf/lib/Cpdf.php CHANGED
@@ -3,19 +3,10 @@
3
  * A PHP class to provide the basic functionality to create a pdf document without
4
  * any requirement for additional modules.
5
  *
6
- * Extended by Orion Richardson to support Unicode / UTF-8 characters using
7
- * TCPDF and others as a guide.
8
- *
9
- * @author Wayne Munro <pdf@ros.co.nz>
10
- * @author Orion Richardson <orionr@yahoo.com>
11
- * @author Helmut Tischer <htischer@weihenstephan.org>
12
- * @author Ryan H. Masten <ryan.masten@gmail.com>
13
- * @author Brian Sweeney <eclecticgeek@gmail.com>
14
- * @author Fabien Ménager <fabien.menager@gmail.com>
15
- * @license Public Domain http://creativecommons.org/licenses/publicdomain/
16
  * @package Cpdf
17
  */
18
-
19
  namespace Dompdf;
20
 
21
  use FontLib\Exception\FontNotFoundException;
@@ -4832,8 +4823,6 @@ EOT;
4832
  * filter the text, this is applied to all text just before being inserted into the pdf document
4833
  * it escapes the various things that need to be escaped, and so on
4834
  *
4835
- * @access private
4836
- *
4837
  * @param $text
4838
  * @param bool $bom
4839
  * @param bool $convert_encoding
@@ -4868,12 +4857,7 @@ EOT;
4868
  * based on the excellent TCPDF code by Nicola Asuni and the
4869
  * RFC for UTF-8 at http://www.faqs.org/rfcs/rfc3629.html
4870
  *
4871
- * @access private
4872
- * @author Orion Richardson
4873
- * @since January 5, 2008
4874
- *
4875
  * @param string $text UTF-8 string to process
4876
- *
4877
  * @return array UTF-8 codepoints array for the string
4878
  */
4879
  function utf8toCodePointsArray(&$text)
@@ -4943,13 +4927,8 @@ EOT;
4943
  * based on the excellent TCPDF code by Nicola Asuni and the
4944
  * RFC for UTF-8 at http://www.faqs.org/rfcs/rfc3629.html
4945
  *
4946
- * @access private
4947
- * @author Orion Richardson
4948
- * @since January 5, 2008
4949
- *
4950
  * @param string $text UTF-8 string to process
4951
  * @param boolean $bom whether to add the byte order marker
4952
- *
4953
  * @return string UTF-16 result string
4954
  */
4955
  function utf8toUtf16BE(&$text, $bom = true)
@@ -5034,7 +5013,8 @@ EOT;
5034
  }
5035
 
5036
  if (!isset($this->stringSubsets[$font])) {
5037
- $this->stringSubsets[$font] = [];
 
5038
  }
5039
 
5040
  $this->stringSubsets[$font] = array_unique(
3
  * A PHP class to provide the basic functionality to create a pdf document without
4
  * any requirement for additional modules.
5
  *
6
+ * @author Wayne Munro
7
+ * @license http://creativecommons.org/licenses/publicdomain/ Public Domain
 
 
 
 
 
 
 
 
8
  * @package Cpdf
9
  */
 
10
  namespace Dompdf;
11
 
12
  use FontLib\Exception\FontNotFoundException;
4823
  * filter the text, this is applied to all text just before being inserted into the pdf document
4824
  * it escapes the various things that need to be escaped, and so on
4825
  *
 
 
4826
  * @param $text
4827
  * @param bool $bom
4828
  * @param bool $convert_encoding
4857
  * based on the excellent TCPDF code by Nicola Asuni and the
4858
  * RFC for UTF-8 at http://www.faqs.org/rfcs/rfc3629.html
4859
  *
 
 
 
 
4860
  * @param string $text UTF-8 string to process
 
4861
  * @return array UTF-8 codepoints array for the string
4862
  */
4863
  function utf8toCodePointsArray(&$text)
4927
  * based on the excellent TCPDF code by Nicola Asuni and the
4928
  * RFC for UTF-8 at http://www.faqs.org/rfcs/rfc3629.html
4929
  *
 
 
 
 
4930
  * @param string $text UTF-8 string to process
4931
  * @param boolean $bom whether to add the byte order marker
 
4932
  * @return string UTF-16 result string
4933
  */
4934
  function utf8toUtf16BE(&$text, $bom = true)
5013
  }
5014
 
5015
  if (!isset($this->stringSubsets[$font])) {
5016
+ $base_subset = "\u{fffd}\u{fffe}\u{ffff}";
5017
+ $this->stringSubsets[$font] = $this->utf8toCodePointsArray($base_subset);
5018
  }
5019
 
5020
  $this->stringSubsets[$font] = array_unique(
vendor/dompdf/dompdf/lib/res/html.css CHANGED
@@ -2,10 +2,7 @@
2
  * dompdf default stylesheet.
3
  *
4
  * @package dompdf
5
- * @link http://dompdf.github.com/
6
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
7
- * @author Blake Ross <BlakeR1234@aol.com>
8
- * @author Fabien Ménager <fabien.menager@gmail.com>
9
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
10
  *
11
  * Portions from Mozilla
2
  * dompdf default stylesheet.
3
  *
4
  * @package dompdf
5
+ * @link https://github.com/dompdf/dompdf
 
 
 
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  *
8
  * Portions from Mozilla
vendor/dompdf/dompdf/src/Adapter/CPDF.php CHANGED
@@ -1,11 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Orion Richardson <orionr@yahoo.com>
7
- * @author Helmut Tischer <htischer@weihenstephan.org>
8
- * @author Fabien Ménager <fabien.menager@gmail.com>
9
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
10
  */
11
 
@@ -299,17 +295,13 @@ class CPDF implements Canvas
299
  }
300
 
301
  /**
302
- * @access private
303
  */
304
  public function serialize_object($id)
305
  {
306
- // Serialize the pdf object's current state for retrieval later
307
  return $this->_pdf->serializeObject($id);
308
  }
309
 
310
- /**
311
- * @access private
312
- */
313
  public function reopen_serialized_object($obj)
314
  {
315
  return $this->_pdf->restoreSerializedObject($obj);
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
 
295
  }
296
 
297
  /**
298
+ * Serialize the pdf object's current state for retrieval later
299
  */
300
  public function serialize_object($id)
301
  {
 
302
  return $this->_pdf->serializeObject($id);
303
  }
304
 
 
 
 
305
  public function reopen_serialized_object($obj)
306
  {
307
  return $this->_pdf->restoreSerializedObject($obj);
vendor/dompdf/dompdf/src/Adapter/GD.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\Adapter;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Adapter;
vendor/dompdf/dompdf/src/Adapter/PDFLib.php CHANGED
@@ -1,12 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
-
10
  namespace Dompdf\Adapter;
11
 
12
  use Dompdf\Canvas;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Adapter;
8
 
9
  use Dompdf\Canvas;
vendor/dompdf/dompdf/src/Canvas.php CHANGED
@@ -1,12 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
-
10
  namespace Dompdf;
11
 
12
  /**
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf;
8
 
9
  /**
vendor/dompdf/dompdf/src/CanvasFactory.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf;
vendor/dompdf/dompdf/src/Cellmap.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf;
vendor/dompdf/dompdf/src/Css/AttributeTranslator.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\Css;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Css;
vendor/dompdf/dompdf/src/Css/Color.php CHANGED
@@ -2,12 +2,9 @@
2
 
3
  /**
4
  * @package dompdf
5
- * @link http://dompdf.github.com/
6
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
-
11
  namespace Dompdf\Css;
12
 
13
  use Dompdf\Helpers;
2
 
3
  /**
4
  * @package dompdf
5
+ * @link https://github.com/dompdf/dompdf
 
 
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
 
8
  namespace Dompdf\Css;
9
 
10
  use Dompdf\Helpers;
vendor/dompdf/dompdf/src/Css/Style.php CHANGED
@@ -1,13 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
-
11
  namespace Dompdf\Css;
12
 
13
  use Dompdf\Adapter\CPDF;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Css;
8
 
9
  use Dompdf\Adapter\CPDF;
vendor/dompdf/dompdf/src/Css/Stylesheet.php CHANGED
@@ -1,10 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
  namespace Dompdf\Css;
@@ -1481,7 +1478,7 @@ class Stylesheet
1481
  {
1482
  $descriptors = $this->_parse_properties($str);
1483
 
1484
- preg_match_all("/(url|local)\s*\([\"\']?([^\"\'\)]+)[\"\']?\)\s*(format\s*\([\"\']?([^\"\'\)]+)[\"\']?\))?/i", $descriptors->src, $src);
1485
 
1486
  $valid_sources = [];
1487
  foreach ($src[0] as $i => $value) {
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Css;
1478
  {
1479
  $descriptors = $this->_parse_properties($str);
1480
 
1481
+ preg_match_all("/(url|local)\s*\(\s*[\"\']?([^\"\'\)]+)[\"\']?\s*\)\s*(format\s*\(\s*[\"\']?([^\"\'\)]+)[\"\']?\s*\))?/i", $descriptors->src, $src);
1482
 
1483
  $valid_sources = [];
1484
  foreach ($src[0] as $i => $value) {
vendor/dompdf/dompdf/src/Dompdf.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf;
@@ -723,16 +721,13 @@ class Dompdf
723
  }
724
 
725
  $canvas = $this->canvas;
726
- $root = null;
727
 
 
 
728
  foreach ($this->tree as $frame) {
729
- // Set up the root frame
730
- if (is_null($root)) {
731
- $root = Factory::decorate_root($this->tree->get_root(), $this);
732
  continue;
733
  }
734
-
735
- // Create the appropriate decorators, reflowers & positioners.
736
  Factory::decorate_frame($frame, $this, $root);
737
  }
738
 
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf;
721
  }
722
 
723
  $canvas = $this->canvas;
 
724
 
725
+ $root_frame = $this->tree->get_root();
726
+ $root = Factory::decorate_root($root_frame, $this);
727
  foreach ($this->tree as $frame) {
728
+ if ($frame === $root_frame) {
 
 
729
  continue;
730
  }
 
 
731
  Factory::decorate_frame($frame, $this, $root);
732
  }
733
 
vendor/dompdf/dompdf/src/Exception.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf;
10
 
11
  /**
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf;
8
 
9
  /**
vendor/dompdf/dompdf/src/Exception/ImageException.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\Exception;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Exception;
vendor/dompdf/dompdf/src/FontMetrics.php CHANGED
@@ -1,13 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
-
11
  namespace Dompdf;
12
 
13
  use FontLib\Font;
@@ -217,12 +213,14 @@ class FontMetrics
217
  $allowed_protocols = $this->options->getAllowedProtocols();
218
  if (!array_key_exists($protocol, $allowed_protocols)) {
219
  Helpers::record_warnings(E_USER_WARNING, "Permission denied on $remoteFile. The communication protocol is not supported.", __FILE__, __LINE__);
 
220
  }
221
 
222
  foreach ($allowed_protocols[$protocol]["rules"] as $rule) {
223
  [$result, $message] = $rule($remoteFile);
224
  if ($result !== true) {
225
  Helpers::record_warnings(E_USER_WARNING, "Error loading $remoteFile: $message", __FILE__, __LINE__);
 
226
  }
227
  }
228
 
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf;
8
 
9
  use FontLib\Font;
213
  $allowed_protocols = $this->options->getAllowedProtocols();
214
  if (!array_key_exists($protocol, $allowed_protocols)) {
215
  Helpers::record_warnings(E_USER_WARNING, "Permission denied on $remoteFile. The communication protocol is not supported.", __FILE__, __LINE__);
216
+ return false;
217
  }
218
 
219
  foreach ($allowed_protocols[$protocol]["rules"] as $rule) {
220
  [$result, $message] = $rule($remoteFile);
221
  if ($result !== true) {
222
  Helpers::record_warnings(E_USER_WARNING, "Error loading $remoteFile: $message", __FILE__, __LINE__);
223
+ return false;
224
  }
225
  }
226
 
vendor/dompdf/dompdf/src/Frame.php CHANGED
@@ -1,16 +1,13 @@
1
  <?php
2
-
3
- namespace Dompdf;
4
-
5
- use Dompdf\Css\Style;
6
- use Dompdf\Frame\FrameListIterator;
7
-
8
  /**
9
  * @package dompdf
10
- * @link http://dompdf.github.com/
11
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
12
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
13
  */
 
 
 
 
14
 
15
  /**
16
  * The main Frame class
1
  <?php
 
 
 
 
 
 
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
+ namespace Dompdf;
8
+
9
+ use Dompdf\Css\Style;
10
+ use Dompdf\Frame\FrameListIterator;
11
 
12
  /**
13
  * The main Frame class
vendor/dompdf/dompdf/src/Frame/Factory.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\Frame;
@@ -24,7 +23,6 @@ use Dompdf\Positioner\AbstractPositioner;
24
  * objects. This is determined primarily by the Frame's display type, but
25
  * also by the Frame's node's type (e.g. DomElement vs. #text)
26
  *
27
- * @access private
28
  * @package dompdf
29
  */
30
  class Factory
@@ -216,8 +214,7 @@ class Factory
216
 
217
  $node = $frame->get_node();
218
  $parent_node = $node->parentNode;
219
-
220
- if ($parent_node) {
221
  if (!$parent_node->hasAttribute("dompdf-children-count")) {
222
  $xpath = new DOMXPath($xml);
223
  $count = $xpath->query("li", $parent_node)->length;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Frame;
23
  * objects. This is determined primarily by the Frame's display type, but
24
  * also by the Frame's node's type (e.g. DomElement vs. #text)
25
  *
 
26
  * @package dompdf
27
  */
28
  class Factory
214
 
215
  $node = $frame->get_node();
216
  $parent_node = $node->parentNode;
217
+ if ($parent_node && $parent_node instanceof \DOMElement) {
 
218
  if (!$parent_node->hasAttribute("dompdf-children-count")) {
219
  $xpath = new DOMXPath($xml);
220
  $count = $xpath->query("li", $parent_node)->length;
vendor/dompdf/dompdf/src/Frame/FrameListIterator.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  namespace Dompdf\Frame;
3
 
4
  use Iterator;
@@ -10,7 +15,6 @@ use Dompdf\Frame;
10
  * Returns children in order and allows for the list to change during iteration,
11
  * provided the changes occur to or after the current element.
12
  *
13
- * @access private
14
  * @package dompdf
15
  */
16
  class FrameListIterator implements Iterator
1
  <?php
2
+ /**
3
+ * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
5
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
+ */
7
  namespace Dompdf\Frame;
8
 
9
  use Iterator;
15
  * Returns children in order and allows for the list to change during iteration,
16
  * provided the changes occur to or after the current element.
17
  *
 
18
  * @package dompdf
19
  */
20
  class FrameListIterator implements Iterator
vendor/dompdf/dompdf/src/Frame/FrameTree.php CHANGED
@@ -1,5 +1,9 @@
1
  <?php
2
-
 
 
 
 
3
  namespace Dompdf\Frame;
4
 
5
  use DOMDocument;
@@ -11,13 +15,6 @@ use Dompdf\Exception;
11
  use Dompdf\Frame;
12
  use IteratorAggregate;
13
 
14
- /**
15
- * @package dompdf
16
- * @link http://dompdf.github.com/
17
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
18
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
19
- */
20
-
21
  /**
22
  * Represents an entire document as a tree of frames
23
  *
1
  <?php
2
+ /**
3
+ * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
5
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
+ */
7
  namespace Dompdf\Frame;
8
 
9
  use DOMDocument;
15
  use Dompdf\Frame;
16
  use IteratorAggregate;
17
 
 
 
 
 
 
 
 
18
  /**
19
  * Represents an entire document as a tree of frames
20
  *
vendor/dompdf/dompdf/src/Frame/FrameTreeIterator.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  namespace Dompdf\Frame;
3
 
4
  use Iterator;
@@ -9,7 +14,6 @@ use Dompdf\Frame;
9
  *
10
  * Returns frames in preorder traversal order (parent then children)
11
  *
12
- * @access private
13
  * @package dompdf
14
  */
15
  class FrameTreeIterator implements Iterator
1
  <?php
2
+ /**
3
+ * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
5
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
+ */
7
  namespace Dompdf\Frame;
8
 
9
  use Iterator;
14
  *
15
  * Returns frames in preorder traversal order (parent then children)
16
  *
 
17
  * @package dompdf
18
  */
19
  class FrameTreeIterator implements Iterator
vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php CHANGED
@@ -1,5 +1,9 @@
1
  <?php
2
-
 
 
 
 
3
  namespace Dompdf\FrameDecorator;
4
 
5
  use DOMElement;
@@ -15,13 +19,6 @@ use Dompdf\FrameReflower\AbstractFrameReflower;
15
  use Dompdf\Css\Style;
16
  use Dompdf\Positioner\AbstractPositioner;
17
 
18
- /**
19
- * @package dompdf
20
- * @link http://dompdf.github.com/
21
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
22
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
23
- */
24
-
25
  /**
26
  * Base AbstractFrameDecorator class
27
  *
1
  <?php
2
+ /**
3
+ * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
5
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
+ */
7
  namespace Dompdf\FrameDecorator;
8
 
9
  use DOMElement;
19
  use Dompdf\Css\Style;
20
  use Dompdf\Positioner\AbstractPositioner;
21
 
 
 
 
 
 
 
 
22
  /**
23
  * Base AbstractFrameDecorator class
24
  *
vendor/dompdf/dompdf/src/FrameDecorator/Block.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameDecorator;
@@ -14,7 +13,6 @@ use Dompdf\LineBox;
14
  /**
15
  * Decorates frames for block layout
16
  *
17
- * @access private
18
  * @package dompdf
19
  */
20
  class Block extends AbstractFrameDecorator
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
13
  /**
14
  * Decorates frames for block layout
15
  *
 
16
  * @package dompdf
17
  */
18
  class Block extends AbstractFrameDecorator
vendor/dompdf/dompdf/src/FrameDecorator/Image.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
vendor/dompdf/dompdf/src/FrameDecorator/Inline.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameDecorator;
@@ -15,7 +13,6 @@ use Dompdf\Exception;
15
  /**
16
  * Decorates frames for inline layout
17
  *
18
- * @access private
19
  * @package dompdf
20
  */
21
  class Inline extends AbstractFrameDecorator
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
13
  /**
14
  * Decorates frames for inline layout
15
  *
 
16
  * @package dompdf
17
  */
18
  class Inline extends AbstractFrameDecorator
vendor/dompdf/dompdf/src/FrameDecorator/ListBullet.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
vendor/dompdf/dompdf/src/FrameDecorator/ListBulletImage.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
vendor/dompdf/dompdf/src/FrameDecorator/NullFrameDecorator.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
vendor/dompdf/dompdf/src/FrameDecorator/Page.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameDecorator;
@@ -15,7 +14,6 @@ use Dompdf\Renderer;
15
  /**
16
  * Decorates frames for page layout
17
  *
18
- * @access private
19
  * @package dompdf
20
  */
21
  class Page extends AbstractFrameDecorator
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
14
  /**
15
  * Decorates frames for page layout
16
  *
 
17
  * @package dompdf
18
  */
19
  class Page extends AbstractFrameDecorator
vendor/dompdf/dompdf/src/FrameDecorator/Table.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameDecorator;
@@ -196,7 +195,8 @@ class Table extends AbstractFrameDecorator
196
  || in_array($frame->get_style()->display, self::VALID_CHILDREN, true);
197
  };
198
 
199
- return $frame->is_text_node() && !$frame->is_pre()
 
200
  && preg_match($wsPattern, $frame->get_text())
201
  && $validChildOrNull($frame->get_prev_sibling())
202
  && $validChildOrNull($frame->get_next_sibling());
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
195
  || in_array($frame->get_style()->display, self::VALID_CHILDREN, true);
196
  };
197
 
198
+ return $frame instanceof Text
199
+ && !$frame->is_pre()
200
  && preg_match($wsPattern, $frame->get_text())
201
  && $validChildOrNull($frame->get_prev_sibling())
202
  && $validChildOrNull($frame->get_next_sibling());
vendor/dompdf/dompdf/src/FrameDecorator/TableCell.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
vendor/dompdf/dompdf/src/FrameDecorator/TableRow.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
vendor/dompdf/dompdf/src/FrameDecorator/TableRowGroup.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameDecorator;
@@ -43,7 +42,9 @@ class TableRowGroup extends AbstractFrameDecorator
43
  }
44
 
45
  // Remove child & all subsequent rows from the cellmap
46
- $cellmap = $this->get_parent()->get_cellmap();
 
 
47
  $iter = $child;
48
 
49
  while ($iter) {
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
42
  }
43
 
44
  // Remove child & all subsequent rows from the cellmap
45
+ /** @var Table $parent */
46
+ $parent = $this->get_parent();
47
+ $cellmap = $parent->get_cellmap();
48
  $iter = $child;
49
 
50
  while ($iter) {
vendor/dompdf/dompdf/src/FrameDecorator/Text.php CHANGED
@@ -1,10 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Brian Sweeney <eclecticgeek@gmail.com>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
  namespace Dompdf\FrameDecorator;
@@ -16,7 +13,6 @@ use Dompdf\Exception;
16
  /**
17
  * Decorates Frame objects for text layout
18
  *
19
- * @access private
20
  * @package dompdf
21
  */
22
  class Text extends AbstractFrameDecorator
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameDecorator;
13
  /**
14
  * Decorates Frame objects for text layout
15
  *
 
16
  * @package dompdf
17
  */
18
  class Text extends AbstractFrameDecorator
vendor/dompdf/dompdf/src/FrameReflower/AbstractFrameReflower.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameReflower;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
vendor/dompdf/dompdf/src/FrameReflower/Block.php CHANGED
@@ -1,14 +1,13 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameReflower;
10
 
11
  use Dompdf\Frame;
 
12
  use Dompdf\FrameDecorator\Block as BlockFrameDecorator;
13
  use Dompdf\FrameDecorator\TableCell as TableCellFrameDecorator;
14
  use Dompdf\FrameDecorator\Text as TextFrameDecorator;
@@ -27,6 +26,8 @@ class Block extends AbstractFrameReflower
27
  const MIN_JUSTIFY_WIDTH = 0.80;
28
 
29
  /**
 
 
30
  * @var BlockFrameDecorator
31
  */
32
  protected $_frame;
@@ -685,9 +686,9 @@ class Block extends AbstractFrameReflower
685
  }
686
 
687
  /**
688
- * @param Frame $child
689
  */
690
- function process_clear(Frame $child)
691
  {
692
  $child_style = $child->get_style();
693
  $root = $this->_frame->get_root();
@@ -719,11 +720,11 @@ class Block extends AbstractFrameReflower
719
  }
720
 
721
  /**
722
- * @param Frame $child
723
  * @param float $cb_x
724
  * @param float $cb_w
725
  */
726
- function process_float(Frame $child, $cb_x, $cb_w)
727
  {
728
  $child_style = $child->get_style();
729
  $root = $this->_frame->get_root();
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
8
 
9
  use Dompdf\Frame;
10
+ use Dompdf\FrameDecorator\AbstractFrameDecorator;
11
  use Dompdf\FrameDecorator\Block as BlockFrameDecorator;
12
  use Dompdf\FrameDecorator\TableCell as TableCellFrameDecorator;
13
  use Dompdf\FrameDecorator\Text as TextFrameDecorator;
26
  const MIN_JUSTIFY_WIDTH = 0.80;
27
 
28
  /**
29
+ * Frame for this reflower
30
+ *
31
  * @var BlockFrameDecorator
32
  */
33
  protected $_frame;
686
  }
687
 
688
  /**
689
+ * @param AbstractFrameDecorator $child
690
  */
691
+ function process_clear(AbstractFrameDecorator $child)
692
  {
693
  $child_style = $child->get_style();
694
  $root = $this->_frame->get_root();
720
  }
721
 
722
  /**
723
+ * @param AbstractFrameDecorator $child
724
  * @param float $cb_x
725
  * @param float $cb_w
726
  */
727
+ function process_float(AbstractFrameDecorator $child, $cb_x, $cb_w)
728
  {
729
  $child_style = $child->get_style();
730
  $root = $this->_frame->get_root();
vendor/dompdf/dompdf/src/FrameReflower/Image.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameReflower;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
vendor/dompdf/dompdf/src/FrameReflower/Inline.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameReflower;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
vendor/dompdf/dompdf/src/FrameReflower/ListBullet.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameReflower;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
vendor/dompdf/dompdf/src/FrameReflower/NullFrameReflower.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\FrameReflower;
10
 
11
  use Dompdf\Frame;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\FrameReflower;
8
 
9
  use Dompdf\Frame;
vendor/dompdf/dompdf/src/FrameReflower/Page.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameReflower;
@@ -95,18 +93,20 @@ class Page extends AbstractFrameReflower
95
  */
96
  function reflow(BlockFrameDecorator $block = null)
97
  {
 
 
 
98
  $fixed_children = [];
99
  $prev_child = null;
100
- $child = $this->_frame->get_first_child();
101
  $current_page = 0;
102
 
103
  while ($child) {
104
- $this->apply_page_style($this->_frame, $current_page + 1);
105
 
106
- $style = $this->_frame->get_style();
107
 
108
  // Pages are only concerned with margins
109
- $cb = $this->_frame->get_containing_block();
110
  $left = (float)$style->length_in_pt($style->margin_left, $cb["w"]);
111
  $right = (float)$style->length_in_pt($style->margin_right, $cb["w"]);
112
  $top = (float)$style->length_in_pt($style->margin_top, $cb["h"]);
@@ -146,13 +146,13 @@ class Page extends AbstractFrameReflower
146
  $this->_check_callbacks("begin_page_render", $child);
147
 
148
  // Render the page
149
- $this->_frame->get_renderer()->render($child);
150
 
151
  // Check for end render callback
152
  $this->_check_callbacks("end_page_render", $child);
153
 
154
  if ($next_child) {
155
- $this->_frame->next_page();
156
  }
157
 
158
  // Wait to dispose of all frames on the previous page
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
93
  */
94
  function reflow(BlockFrameDecorator $block = null)
95
  {
96
+ /** @var PageFrameDecorator $frame */
97
+ $frame = $this->_frame;
98
+ $child = $frame->get_first_child();
99
  $fixed_children = [];
100
  $prev_child = null;
 
101
  $current_page = 0;
102
 
103
  while ($child) {
104
+ $this->apply_page_style($frame, $current_page + 1);
105
 
106
+ $style = $frame->get_style();
107
 
108
  // Pages are only concerned with margins
109
+ $cb = $frame->get_containing_block();
110
  $left = (float)$style->length_in_pt($style->margin_left, $cb["w"]);
111
  $right = (float)$style->length_in_pt($style->margin_right, $cb["w"]);
112
  $top = (float)$style->length_in_pt($style->margin_top, $cb["h"]);
146
  $this->_check_callbacks("begin_page_render", $child);
147
 
148
  // Render the page
149
+ $frame->get_renderer()->render($child);
150
 
151
  // Check for end render callback
152
  $this->_check_callbacks("end_page_render", $child);
153
 
154
  if ($next_child) {
155
+ $frame->next_page();
156
  }
157
 
158
  // Wait to dispose of all frames on the previous page
vendor/dompdf/dompdf/src/FrameReflower/Table.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameReflower;
@@ -14,7 +13,6 @@ use Dompdf\Helpers;
14
  /**
15
  * Reflows tables
16
  *
17
- * @access private
18
  * @package dompdf
19
  */
20
  class Table extends AbstractFrameReflower
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
13
  /**
14
  * Reflows tables
15
  *
 
16
  * @package dompdf
17
  */
18
  class Table extends AbstractFrameReflower
vendor/dompdf/dompdf/src/FrameReflower/TableCell.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameReflower;
@@ -104,9 +103,12 @@ class TableCell extends Block
104
  // Determine our height
105
  $style_height = (float)$style->length_in_pt($style->height, $h);
106
 
107
- $this->_frame->set_content_height($this->_calculate_content_height());
 
108
 
109
- $height = max($style_height, (float)$this->_frame->get_content_height());
 
 
110
 
111
  // Let the cellmap know our height
112
  $cell_height = $height / count($cells["rows"]);
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
103
  // Determine our height
104
  $style_height = (float)$style->length_in_pt($style->height, $h);
105
 
106
+ /** @var FrameDecorator\TableCell */
107
+ $frame = $this->_frame;
108
 
109
+ $frame->set_content_height($this->_calculate_content_height());
110
+
111
+ $height = max($style_height, (float)$frame->get_content_height());
112
 
113
  // Let the cellmap know our height
114
  $cell_height = $height / count($cells["rows"]);
vendor/dompdf/dompdf/src/FrameReflower/TableRow.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameReflower;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
vendor/dompdf/dompdf/src/FrameReflower/TableRowGroup.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\FrameReflower;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
vendor/dompdf/dompdf/src/FrameReflower/Text.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\FrameReflower;
@@ -45,6 +43,8 @@ class Text extends AbstractFrameReflower
45
  public static $_wordbreak_pattern = '/([^\S\xA0\x{202F}\x{2007}\n]+|\R|\-+|\xAD+)/u';
46
 
47
  /**
 
 
48
  * @var TextFrameDecorator
49
  */
50
  protected $_frame;
@@ -123,11 +123,13 @@ class Text extends AbstractFrameReflower
123
  }
124
 
125
  /**
126
- * @param string $text
127
  * @param BlockFrameDecorator $block
 
 
128
  * @return bool|int
129
  */
130
- protected function line_break(string $text, BlockFrameDecorator $block)
131
  {
132
  $fontMetrics = $this->getFontMetrics();
133
  $frame = $this->_frame;
@@ -160,12 +162,16 @@ class Text extends AbstractFrameReflower
160
  return false;
161
  }
162
 
 
 
 
 
163
  // Split the text into words
164
  $words = preg_split(self::$_wordbreak_pattern, $text, -1, PREG_SPLIT_DELIM_CAPTURE);
165
  $wc = count($words);
166
 
167
  // Determine the split point
168
- $width = 0;
169
  $str = "";
170
 
171
  $space_width = $fontMetrics->getTextWidth(" ", $font, $size, $word_spacing, $letter_spacing);
@@ -208,7 +214,7 @@ class Text extends AbstractFrameReflower
208
 
209
  // The first word has overflowed. Force it onto the line, or as many
210
  // characters as fit if breaking words is allowed
211
- if ($current_line_width == 0 && $width == 0) {
212
  if ($sep === " ") {
213
  $word .= $sep;
214
  }
@@ -282,30 +288,25 @@ class Text extends AbstractFrameReflower
282
 
283
  // Determine the next line break
284
  // http://www.w3.org/TR/CSS21/text.html#propdef-white-space
285
- switch ($style->white_space) {
 
 
 
286
  default:
287
  case "normal":
288
- $split = $this->line_break($text, $block);
289
- $add_line = false;
290
- break;
291
-
292
  case "nowrap":
293
- $split = false;
294
  $add_line = false;
295
  break;
296
 
297
  case "pre":
298
- $split = $this->newline_break($text);
299
- $add_line = $split !== false;
300
- break;
301
-
302
  case "pre-line":
303
  case "pre-wrap":
304
  $hard_split = $this->newline_break($text);
305
  $first_line = $hard_split !== false
306
  ? mb_substr($text, 0, $hard_split)
307
  : $text;
308
- $soft_split = $this->line_break($first_line, $block);
309
 
310
  $split = $soft_split !== false ? $soft_split : $hard_split;
311
  $add_line = $hard_split !== false;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\FrameReflower;
43
  public static $_wordbreak_pattern = '/([^\S\xA0\x{202F}\x{2007}\n]+|\R|\-+|\xAD+)/u';
44
 
45
  /**
46
+ * Frame for this reflower
47
+ *
48
  * @var TextFrameDecorator
49
  */
50
  protected $_frame;
123
  }
124
 
125
  /**
126
+ * @param string $text
127
  * @param BlockFrameDecorator $block
128
+ * @param bool $nowrap
129
+ *
130
  * @return bool|int
131
  */
132
+ protected function line_break(string $text, BlockFrameDecorator $block, bool $nowrap = false)
133
  {
134
  $fontMetrics = $this->getFontMetrics();
135
  $frame = $this->_frame;
162
  return false;
163
  }
164
 
165
+ if ($nowrap) {
166
+ return $current_line_width == 0 ? false : 0;
167
+ }
168
+
169
  // Split the text into words
170
  $words = preg_split(self::$_wordbreak_pattern, $text, -1, PREG_SPLIT_DELIM_CAPTURE);
171
  $wc = count($words);
172
 
173
  // Determine the split point
174
+ $width = 0.0;
175
  $str = "";
176
 
177
  $space_width = $fontMetrics->getTextWidth(" ", $font, $size, $word_spacing, $letter_spacing);
214
 
215
  // The first word has overflowed. Force it onto the line, or as many
216
  // characters as fit if breaking words is allowed
217
+ if ($current_line_width == 0 && $width === 0.0) {
218
  if ($sep === " ") {
219
  $word .= $sep;
220
  }
288
 
289
  // Determine the next line break
290
  // http://www.w3.org/TR/CSS21/text.html#propdef-white-space
291
+ $white_space = $style->white_space;
292
+ $nowrap = $white_space === "nowrap" || $white_space === "pre";
293
+
294
+ switch ($white_space) {
295
  default:
296
  case "normal":
 
 
 
 
297
  case "nowrap":
298
+ $split = $this->line_break($text, $block, $nowrap);
299
  $add_line = false;
300
  break;
301
 
302
  case "pre":
 
 
 
 
303
  case "pre-line":
304
  case "pre-wrap":
305
  $hard_split = $this->newline_break($text);
306
  $first_line = $hard_split !== false
307
  ? mb_substr($text, 0, $hard_split)
308
  : $text;
309
+ $soft_split = $this->line_break($first_line, $block, $nowrap);
310
 
311
  $split = $soft_split !== false ? $soft_split : $hard_split;
312
  $add_line = $hard_split !== false;
vendor/dompdf/dompdf/src/Helpers.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  namespace Dompdf;
3
 
4
  class Helpers
1
  <?php
2
+ /**
3
+ * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
5
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
+ */
7
  namespace Dompdf;
8
 
9
  class Helpers
vendor/dompdf/dompdf/src/Image/Cache.php CHANGED
@@ -1,10 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
  namespace Dompdf\Image;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Image;
vendor/dompdf/dompdf/src/JavascriptEmbedder.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
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
  namespace Dompdf;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf;
vendor/dompdf/dompdf/src/LineBox.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
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
  namespace Dompdf;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf;
vendor/dompdf/dompdf/src/Options.php CHANGED
@@ -1,4 +1,9 @@
1
  <?php
 
 
 
 
 
2
  namespace Dompdf;
3
 
4
  class Options
1
  <?php
2
+ /**
3
+ * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
5
+ * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
+ */
7
  namespace Dompdf;
8
 
9
  class Options
vendor/dompdf/dompdf/src/PhpEvaluator.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf;
vendor/dompdf/dompdf/src/Positioner/Absolute.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\Positioner;
10
 
11
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
vendor/dompdf/dompdf/src/Positioner/AbstractPositioner.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\Positioner;
10
 
11
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
@@ -15,7 +13,6 @@ use Dompdf\FrameDecorator\AbstractFrameDecorator;
15
  *
16
  * Defines positioner interface
17
  *
18
- * @access private
19
  * @package dompdf
20
  */
21
  abstract class AbstractPositioner
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
13
  *
14
  * Defines positioner interface
15
  *
 
16
  * @package dompdf
17
  */
18
  abstract class AbstractPositioner
vendor/dompdf/dompdf/src/Positioner/Block.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\Positioner;
10
 
11
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
@@ -13,7 +11,6 @@ use Dompdf\FrameDecorator\AbstractFrameDecorator;
13
  /**
14
  * Positions block frames
15
  *
16
- * @access private
17
  * @package dompdf
18
  */
19
  class Block extends AbstractPositioner
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
11
  /**
12
  * Positions block frames
13
  *
 
14
  * @package dompdf
15
  */
16
  class Block extends AbstractPositioner
vendor/dompdf/dompdf/src/Positioner/Fixed.php CHANGED
@@ -1,12 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
-
10
  namespace Dompdf\Positioner;
11
 
12
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
vendor/dompdf/dompdf/src/Positioner/Inline.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\Positioner;
10
 
11
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
vendor/dompdf/dompdf/src/Positioner/ListBullet.php CHANGED
@@ -1,12 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
-
10
  namespace Dompdf\Positioner;
11
 
12
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
vendor/dompdf/dompdf/src/Positioner/NullPositioner.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\Positioner;
10
 
11
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
vendor/dompdf/dompdf/src/Positioner/TableCell.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\Positioner;
10
 
11
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
vendor/dompdf/dompdf/src/Positioner/TableRow.php CHANGED
@@ -1,11 +1,9 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
-
9
  namespace Dompdf\Positioner;
10
 
11
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
 
7
  namespace Dompdf\Positioner;
8
 
9
  use Dompdf\FrameDecorator\AbstractFrameDecorator;
vendor/dompdf/dompdf/src/Renderer.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf;
vendor/dompdf/dompdf/src/Renderer/AbstractRenderer.php CHANGED
@@ -1,10 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
  namespace Dompdf\Renderer;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
vendor/dompdf/dompdf/src/Renderer/Block.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\Renderer;
@@ -33,12 +32,10 @@ class Block extends AbstractRenderer
33
  [$x, $y, $w, $h] = $frame->get_border_box();
34
 
35
  if ($node->nodeName === "body") {
36
- $h = $frame->get_containing_block("h") - (float)$style->length_in_pt([
37
- $style->margin_top,
38
- $style->border_top_width,
39
- $style->border_bottom_width,
40
- $style->margin_bottom],
41
- (float)$style->length_in_pt($style->width));
42
  }
43
 
44
  $border_box = [$x, $y, $w, $h];
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
32
  [$x, $y, $w, $h] = $frame->get_border_box();
33
 
34
  if ($node->nodeName === "body") {
35
+ // Margins should be fully resolved at this point
36
+ $mt = $style->margin_top;
37
+ $mb = $style->margin_bottom;
38
+ $h = $frame->get_containing_block("h") - $mt - $mb;
 
 
39
  }
40
 
41
  $border_box = [$x, $y, $w, $h];
vendor/dompdf/dompdf/src/Renderer/Image.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Fabien Ménager <fabien.menager@gmail.com>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\Renderer;
@@ -15,7 +13,6 @@ use Dompdf\Image\Cache;
15
  /**
16
  * Image renderer
17
  *
18
- * @access private
19
  * @package dompdf
20
  */
21
  class Image extends Block
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
13
  /**
14
  * Image renderer
15
  *
 
16
  * @package dompdf
17
  */
18
  class Image extends Block
vendor/dompdf/dompdf/src/Renderer/Inline.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\Renderer;
@@ -13,7 +12,6 @@ use Dompdf\Helpers;
13
  /**
14
  * Renders inline frames
15
  *
16
- * @access private
17
  * @package dompdf
18
  */
19
  class Inline extends AbstractRenderer
@@ -95,20 +93,24 @@ class Inline extends AbstractRenderer
95
  }
96
 
97
  $style = $child->get_style();
98
- list(, , $child_w, $child_h) = $child->get_padding_box();
 
 
99
 
100
- $child_h2 = 0.0;
 
101
 
102
- if ($style->width === "auto") {
103
- list($child_w, $child_h2) = $this->get_child_size($child, $do_debug_layout_line);
104
- }
105
-
106
- if ($style->height === "auto") {
107
- list(, $child_h2) = $this->get_child_size($child, $do_debug_layout_line);
 
108
  }
109
 
110
  $w += $child_w;
111
- $h = max($h, $child_h, $child_h2);
112
 
113
  if ($do_debug_layout_line) {
114
  $this->_debug_layout($child->get_border_box(), "blue");
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
12
  /**
13
  * Renders inline frames
14
  *
 
15
  * @package dompdf
16
  */
17
  class Inline extends AbstractRenderer
93
  }
94
 
95
  $style = $child->get_style();
96
+ $auto_width = $style->width === "auto";
97
+ $auto_height = $style->height === "auto";
98
+ [, , $child_w, $child_h] = $child->get_padding_box();
99
 
100
+ if ($auto_width || $auto_height) {
101
+ [$child_w2, $child_h2] = $this->get_child_size($child, $do_debug_layout_line);
102
 
103
+ if ($auto_width) {
104
+ $child_w = $child_w2;
105
+ }
106
+
107
+ if ($auto_height) {
108
+ $child_h = $child_h2;
109
+ }
110
  }
111
 
112
  $w += $child_w;
113
+ $h = max($h, $child_h);
114
 
115
  if ($do_debug_layout_line) {
116
  $this->_debug_layout($child->get_border_box(), "blue");
vendor/dompdf/dompdf/src/Renderer/ListBullet.php CHANGED
@@ -1,9 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
8
  */
9
  namespace Dompdf\Renderer;
@@ -11,12 +9,12 @@ namespace Dompdf\Renderer;
11
  use Dompdf\Helpers;
12
  use Dompdf\Frame;
13
  use Dompdf\FrameDecorator\ListBullet as ListBulletFrameDecorator;
 
14
  use Dompdf\Image\Cache;
15
 
16
  /**
17
  * Renders list bullets
18
  *
19
- * @access private
20
  * @package dompdf
21
  */
22
  class ListBullet extends AbstractRenderer
@@ -149,7 +147,7 @@ class ListBullet extends AbstractRenderer
149
 
150
  // Handle list-style-image
151
  // If list style image is requested but missing, fall back to predefined types
152
- if ($style->list_style_image !== "none" && !Cache::is_broken($img = $frame->get_image_url())) {
153
  [$x, $y] = $frame->get_position();
154
  $w = $frame->get_width();
155
  $h = $frame->get_height();
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
9
  use Dompdf\Helpers;
10
  use Dompdf\Frame;
11
  use Dompdf\FrameDecorator\ListBullet as ListBulletFrameDecorator;
12
+ use Dompdf\FrameDecorator\ListBulletImage;
13
  use Dompdf\Image\Cache;
14
 
15
  /**
16
  * Renders list bullets
17
  *
 
18
  * @package dompdf
19
  */
20
  class ListBullet extends AbstractRenderer
147
 
148
  // Handle list-style-image
149
  // If list style image is requested but missing, fall back to predefined types
150
+ if ($frame instanceof ListBulletImage && !Cache::is_broken($img = $frame->get_image_url())) {
151
  [$x, $y] = $frame->get_position();
152
  $w = $frame->get_width();
153
  $h = $frame->get_height();
vendor/dompdf/dompdf/src/Renderer/TableCell.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\Renderer;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
vendor/dompdf/dompdf/src/Renderer/TableRowGroup.php CHANGED
@@ -1,8 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
7
  */
8
  namespace Dompdf\Renderer;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
vendor/dompdf/dompdf/src/Renderer/Text.php CHANGED
@@ -1,10 +1,7 @@
1
  <?php
2
  /**
3
  * @package dompdf
4
- * @link http://dompdf.github.com/
5
- * @author Benj Carson <benjcarson@digitaljunkies.ca>
6
- * @author Helmut Tischer <htischer@weihenstephan.org>
7
- * @author Fabien Ménager <fabien.menager@gmail.com>
8
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
9
  */
10
  namespace Dompdf\Renderer;
1
  <?php
2
  /**
3
  * @package dompdf
4
+ * @link https://github.com/dompdf/dompdf
 
 
 
5
  * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
6
  */
7
  namespace Dompdf\Renderer;
vendor/masterminds/html5/README.md CHANGED
@@ -1,3 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # HTML5-PHP
2
 
3
  HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP.
1
+ > # UKRAINE NEEDS YOUR HELP NOW!
2
+ >
3
+ > On 24 February 2022, Russian [President Vladimir Putin ordered an invasion of Ukraine by Russian Armed Forces](https://www.bbc.com/news/world-europe-60504334).
4
+ >
5
+ > Your support is urgently needed.
6
+ >
7
+ > - Donate to the volunteers. Here is the volunteer fund helping the Ukrainian army to provide all the necessary equipment:
8
+ > https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-spetsrahunok-dlya-zboru-koshtiv-na-potrebi-armiyi or https://savelife.in.ua/en/donate/
9
+ > - Triple-check social media sources. Russian disinformation is attempting to coverup and distort the reality in Ukraine.
10
+ > - Help Ukrainian refugees who are fleeing Russian attacks and shellings: https://www.globalcitizen.org/en/content/ways-to-help-ukraine-conflict/
11
+ > - Put pressure on your political representatives to provide help to Ukraine.
12
+ > - Believe in the Ukrainian people, they will not surrender, they don't have another Ukraine.
13
+ >
14
+ > THANK YOU!
15
+ ----
16
+
17
  # HTML5-PHP
18
 
19
  HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP.
vendor/masterminds/html5/RELEASE.md CHANGED
@@ -1,5 +1,9 @@
1
  # Release Notes
2
 
 
 
 
 
3
  2.7.5 (2021-07-01)
4
 
5
  - #204: Travis: Enable tests on PHP 8.0
1
  # Release Notes
2
 
3
+ 2.7.6 (2021-08-18)
4
+
5
+ - #218: Address comment handling issues
6
+
7
  2.7.5 (2021-07-01)
8
 
9
  - #204: Travis: Enable tests on PHP 8.0
vendor/masterminds/html5/src/HTML5/Parser/Scanner.php CHANGED
@@ -104,7 +104,7 @@ class Scanner
104
  */
105
  public function peek()
106
  {
107
- if (($this->char + 1) <= $this->EOF) {
108
  return $this->data[$this->char + 1];
109
  }
110
 
104
  */
105
  public function peek()
106
  {
107
+ if (($this->char + 1) < $this->EOF) {
108
  return $this->data[$this->char + 1];
109
  }
110
 
vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php CHANGED
@@ -712,18 +712,24 @@ class Tokenizer
712
  return true;
713
  }
714
 
715
- // If it doesn't start with -, not the end.
716
- if ('-' != $tok) {
717
  return false;
718
  }
719
 
720
- // Advance one, and test for '->'
721
- if ('-' == $this->scanner->next() && '>' == $this->scanner->peek()) {
 
 
 
 
 
 
722
  $this->scanner->consume(); // Consume the last '>'
723
  return true;
724
  }
725
- // Unread '-';
726
- $this->scanner->unconsume(1);
727
 
728
  return false;
729
  }
712
  return true;
713
  }
714
 
715
+ // If next two tokens are not '--', not the end.
716
+ if ('-' != $tok || '-' != $this->scanner->peek()) {
717
  return false;
718
  }
719
 
720
+ $this->scanner->consume(2); // Consume '-' and one of '!' or '>'
721
+
722
+ // Test for '>'
723
+ if ('>' == $this->scanner->current()) {
724
+ return true;
725
+ }
726
+ // Test for '!>'
727
+ if ('!' == $this->scanner->current() && '>' == $this->scanner->peek()) {
728
  $this->scanner->consume(); // Consume the last '>'
729
  return true;
730
  }
731
+ // Unread '-' and one of '!' or '>';
732
+ $this->scanner->unconsume(2);
733
 
734
  return false;
735
  }
vendor/phenx/php-svg-lib/LICENSE CHANGED
@@ -1,674 +1,165 @@
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>.
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/README.md CHANGED
@@ -1,7 +1,6 @@
1
  # SVG file parsing / rendering library
2
 
3
- [![Build Status](https://travis-ci.org/PhenX/php-svg-lib.svg?branch=master)](https://travis-ci.org/PhenX/php-svg-lib)
4
- [![Coverage Status](https://coveralls.io/repos/PhenX/php-svg-lib/badge.svg)](https://coveralls.io/r/PhenX/php-svg-lib)
5
 
6
 
7
  [![Latest Stable Version](https://poser.pugx.org/phenx/php-svg-lib/v/stable)](https://packagist.org/packages/phenx/php-svg-lib)
@@ -11,4 +10,4 @@
11
 
12
  The main purpose of this lib is to rasterize SVG to a surface which can be an image or a PDF for example, through a `\Svg\Surface` PHP interface.
13
 
14
- This project was initialized by the need to render SVG documents inside PDF files for the [DomPdf](http://dompdf.github.io) project.
1
  # SVG file parsing / rendering library
2
 
3
+ [![Build Status](https://github.com/phenx/php-svg-lib/workflows/test/badge.svg)](https://github.com/phenx/php-svg-lib/actions)
 
4
 
5
 
6
  [![Latest Stable Version](https://poser.pugx.org/phenx/php-svg-lib/v/stable)](https://packagist.org/packages/phenx/php-svg-lib)
10
 
11
  The main purpose of this lib is to rasterize SVG to a surface which can be an image or a PDF for example, through a `\Svg\Surface` PHP interface.
12
 
13
+ This project was initialized by the need to render SVG documents inside PDF files for the [DomPdf](http://dompdf.github.io) project.
vendor/phenx/php-svg-lib/src/Svg/CssLength.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Svg;
4
+
5
+ class CssLength
6
+ {
7
+ /**
8
+ * Array of valid css length units.
9
+ * Should be pre-sorted by unit text length so no earlier length can be
10
+ * contained within a latter (eg. 'in' within 'vmin').
11
+ *
12
+ * @var string[]
13
+ */
14
+ protected static $units = [
15
+ 'vmax',
16
+ 'vmin',
17
+ 'rem',
18
+ 'px',
19
+ 'pt',
20
+ 'cm',
21
+ 'mm',
22
+ 'in',
23
+ 'pc',
24
+ 'em',
25
+ 'ex',
26
+ 'ch',
27
+ 'vw',
28
+ 'vh',
29
+ '%',
30
+ 'q',
31
+ ];
32
+
33
+ /**
34
+ * A list of units that are inch-relative, and their unit division within an inch.
35
+ *
36
+ * @var array<string, float>
37
+ */
38
+ protected static $inchDivisions = [
39
+ 'in' => 1,
40
+ 'cm' => 2.54,
41
+ 'mm' => 25.4,
42
+ 'q' => 101.6,
43
+ 'pc' => 6,
44
+ 'pt' => 72,
45
+ ];
46
+
47
+ /**
48
+ * The CSS length unit indicator.
49
+ * Will be lower-case and one of the units listed in the '$units' array or empty.
50
+ *
51
+ * @var string
52
+ */
53
+ protected $unit = '';
54
+
55
+ /**
56
+ * The numeric value of the given length.
57
+ *
58
+ * @var float
59
+ */
60
+ protected $value = 0;
61
+
62
+ /**
63
+ * The original unparsed length provided.
64
+ *
65
+ * @var string
66
+ */
67
+ protected $unparsed;
68
+
69
+ public function __construct(string $length)
70
+ {
71
+ $this->unparsed = $length;
72
+ $this->parseLengthComponents($length);
73
+ }
74
+
75
+ /**
76
+ * Parse out the unit and value components from the given string length.
77
+ */
78
+ protected function parseLengthComponents(string $length): void
79
+ {
80
+ $length = strtolower($length);
81
+
82
+ foreach (self::$units as $unit) {
83
+ $pos = strpos($length, $unit);
84
+ if ($pos) {
85
+ $this->value = floatval(substr($length, 0, $pos));
86
+ $this->unit = $unit;
87
+ return;
88
+ }
89
+ }
90
+
91
+ $this->unit = '';
92
+ $this->value = floatval($length);
93
+ }
94
+
95
+ /**
96
+ * Get the unit type of this css length.
97
+ * Units are standardised to be lower-cased.
98
+ *
99
+ * @return string
100
+ */
101
+ public function getUnit(): string
102
+ {
103
+ return $this->unit;
104
+ }
105
+
106
+ /**
107
+ * Get this CSS length in the equivalent pixel count size.
108
+ *
109
+ * @param float $referenceSize
110
+ * @param float $dpi
111
+ *
112
+ * @return float
113
+ */
114
+ public function toPixels(float $referenceSize = 11.0, float $dpi = 96.0): float
115
+ {
116
+ // Standard relative units
117
+ if (in_array($this->unit, ['em', 'rem', 'ex', 'ch'])) {
118
+ return $this->value * $referenceSize;
119
+ }
120
+
121
+ // Percentage relative units
122
+ if (in_array($this->unit, ['%', 'vw', 'vh', 'vmin', 'vmax'])) {
123
+ return $this->value * ($referenceSize / 100);
124
+ }
125
+
126
+ // Inch relative units
127
+ if (in_array($this->unit, array_keys(static::$inchDivisions))) {
128
+ $inchValue = $this->value * $dpi;
129
+ $division = static::$inchDivisions[$this->unit];
130
+ return $inchValue / $division;
131
+ }
132
+
133
+ return $this->value;
134
+ }
135
+ }
vendor/phenx/php-svg-lib/src/Svg/DefaultStyle.php CHANGED
@@ -10,11 +10,11 @@ namespace Svg;
10
 
11
  class DefaultStyle extends Style
12
  {
13
- public $color = '';
14
  public $opacity = 1.0;
15
  public $display = 'inline';
16
 
17
- public $fill = 'black';
18
  public $fillOpacity = 1.0;
19
  public $fillRule = 'nonzero';
20
 
10
 
11
  class DefaultStyle extends Style
12
  {
13
+ public $color = [0, 0, 0, 1];
14
  public $opacity = 1.0;
15
  public $display = 'inline';
16
 
17
+ public $fill = [0, 0, 0, 1];
18
  public $fillOpacity = 1.0;
19
  public $fillRule = 'nonzero';
20
 
vendor/phenx/php-svg-lib/src/Svg/Document.php CHANGED
@@ -101,6 +101,11 @@ class Document extends AbstractTag
101
  return $this->height;
102
  }
103
 
 
 
 
 
 
104
  public function getDimensions() {
105
  $rootAttributes = null;
106
 
@@ -135,12 +140,12 @@ class Document extends AbstractTag
135
  public function handleSizeAttributes($attributes){
136
  if ($this->width === null) {
137
  if (isset($attributes["width"])) {
138
- $width = Style::convertSize($attributes["width"], 400);
139
  $this->width = $width;
140
  }
141
 
142
  if (isset($attributes["height"])) {
143
- $height = Style::convertSize($attributes["height"], 300);
144
  $this->height = $height;
145
  }
146
 
101
  return $this->height;
102
  }
103
 
104
+ public function getDiagonal()
105
+ {
106
+ return sqrt(($this->width)**2 + ($this->height)**2) / sqrt(2);
107
+ }
108
+
109
  public function getDimensions() {
110
  $rootAttributes = null;
111
 
140
  public function handleSizeAttributes($attributes){
141
  if ($this->width === null) {
142
  if (isset($attributes["width"])) {
143
+ $width = $this->convertSize($attributes["width"], 400);
144
  $this->width = $width;
145
  }
146
 
147
  if (isset($attributes["height"])) {
148
+ $height = $this->convertSize($attributes["height"], 300);
149
  $this->height = $height;
150
  }
151
 
vendor/phenx/php-svg-lib/src/Svg/Style.php CHANGED
@@ -18,6 +18,8 @@ class Style
18
  const TYPE_ANGLE = 4;
19
  const TYPE_NUMBER = 5;
20
 
 
 
21
  public $color;
22
  public $opacity;
23
  public $display;
@@ -88,7 +90,7 @@ class Style
88
  $group = $tag->getParentGroup();
89
  if ($group) {
90
  $parent_style = $group->getStyle();
91
-
92
  foreach ($parent_style as $_key => $_value) {
93
  if ($_value !== null) {
94
  $this->$_key = $_value;
@@ -145,13 +147,24 @@ class Style
145
 
146
  protected function fillStyles($styles)
147
  {
148
- foreach ($this->getStyleMap() as $from => $spec) {
 
149
  if (isset($styles[$from])) {
150
  list($to, $type) = $spec;
151
  $value = null;
152
  switch ($type) {
153
  case self::TYPE_COLOR:
154
  $value = self::parseColor($styles[$from]);
 
 
 
 
 
 
 
 
 
 
155
  break;
156
 
157
  case self::TYPE_NUMBER:
@@ -177,8 +190,7 @@ class Style
177
 
178
  if (count($parts) == 2) {
179
  $color = $parts[1];
180
- }
181
- else {
182
  $color = $parts[0];
183
  }
184
 
@@ -186,6 +198,10 @@ class Style
186
  return "none";
187
  }
188
 
 
 
 
 
189
  // SVG color name
190
  if (isset(self::$colorNames[$color])) {
191
  return self::parseHexColor(self::$colorNames[$color]);
@@ -198,18 +214,18 @@ class Style
198
 
199
  // RGB color
200
  if (strpos($color, "rgb") !== false) {
201
- return self::getTriplet($color);
202
  }
203
 
204
  // RGB color
205
  if (strpos($color, "hsl") !== false) {
206
- $triplet = self::getTriplet($color, true);
207
 
208
- if ($triplet == null) {
209
  return null;
210
  }
211
 
212
- list($h, $s, $l) = $triplet;
213
 
214
  $r = $l;
215
  $g = $l;
@@ -258,11 +274,13 @@ class Style
258
  break;
259
  }
260
  }
 
261
 
262
  return array(
263
  $r * 255.0,
264
  $g * 255.0,
265
  $b * 255.0,
 
266
  );
267
  }
268
 
@@ -282,7 +300,7 @@ class Style
282
  return null;
283
  }
284
 
285
- static function getTriplet($color, $percent = false) {
286
  $i = strpos($color, "(");
287
  $j = strpos($color, ")");
288
 
@@ -291,46 +309,60 @@ class Style
291
  return null;
292
  }
293
 
294
- $triplet = preg_split("/\\s*,\\s*/", trim(substr($color, $i + 1, $j - $i - 1)));
 
 
 
295
 
296
- if (count($triplet) != 3) {
297
  return null;
298
  }
299
 
300
- foreach (array_keys($triplet) as $c) {
301
- $triplet[$c] = trim($triplet[$c]);
302
 
303
  if ($percent) {
304
- if ($triplet[$c][strlen($triplet[$c]) - 1] === "%") {
305
- $triplet[$c] = floatval($triplet[$c]) / 100;
 
 
306
  }
307
- else {
308
- $triplet[$c] = $triplet[$c] / 255;
309
- }
310
- }
311
- else {
312
- if ($triplet[$c][strlen($triplet[$c]) - 1] === "%") {
313
- $triplet[$c] = round(floatval($triplet[$c]) * 2.55);
314
  }
315
  }
316
  }
317
 
318
- return $triplet;
319
  }
320
 
321
  static function parseHexColor($hex)
322
  {
323
- $c = array(0, 0, 0);
324
 
325
  // #FFFFFF
326
  if (isset($hex[6])) {
327
  $c[0] = hexdec(substr($hex, 1, 2));
328
  $c[1] = hexdec(substr($hex, 3, 2));
329
  $c[2] = hexdec(substr($hex, 5, 2));
 
 
 
 
 
 
 
330
  } else {
331
  $c[0] = hexdec($hex[1] . $hex[1]);
332
  $c[1] = hexdec($hex[2] . $hex[2]);
333
  $c[2] = hexdec($hex[3] . $hex[3]);
 
 
 
 
 
 
334
  }
335
 
336
  return $c;
@@ -356,47 +388,6 @@ class Style
356
  return $styles;
357
  }
358
 
359
- /**
360
- * Convert a size to a float
361
- *
362
- * @param string $size SVG size
363
- * @param float $dpi DPI
364
- * @param float $referenceSize Reference size
365
- *
366
- * @return float|null
367
- */
368
- static function convertSize($size, $referenceSize = 11.0, $dpi = 96.0) {
369
- $size = trim(strtolower($size));
370
-
371
- if (is_numeric($size)) {
372
- return $size;
373
- }
374
-
375
- if ($pos = strpos($size, "px")) {
376
- return floatval(substr($size, 0, $pos));
377
- }
378
-
379
- if ($pos = strpos($size, "pt")) {
380
- return floatval(substr($size, 0, $pos));
381
- }
382
-
383
- if ($pos = strpos($size, "cm")) {
384
- return floatval(substr($size, 0, $pos)) * $dpi;
385
- }
386
-
387
- if ($pos = strpos($size, "%")) {
388
- return $referenceSize * substr($size, 0, $pos) / 100;
389
- }
390
-
391
- if ($pos = strpos($size, "em")) {
392
- return $referenceSize * substr($size, 0, $pos);
393
- }
394
-
395
- // TODO cm, mm, pc, in, etc
396
-
397
- return null;
398
- }
399
-
400
  static $colorNames = array(
401
  'antiquewhite' => '#FAEBD7',
402
  'aqua' => '#00FFFF',
18
  const TYPE_ANGLE = 4;
19
  const TYPE_NUMBER = 5;
20
 
21
+ private $_parentStyle;
22
+
23
  public $color;
24
  public $opacity;
25
  public $display;
90
  $group = $tag->getParentGroup();
91
  if ($group) {
92
  $parent_style = $group->getStyle();
93
+ $this->_parentStyle = $parent_style;
94
  foreach ($parent_style as $_key => $_value) {
95
  if ($_value !== null) {
96
  $this->$_key = $_value;
147
 
148
  protected function fillStyles($styles)
149
  {
150
+ $style_map = $this->getStyleMap();
151
+ foreach ($style_map as $from => $spec) {
152
  if (isset($styles[$from])) {
153
  list($to, $type) = $spec;
154
  $value = null;
155
  switch ($type) {
156
  case self::TYPE_COLOR:
157
  $value = self::parseColor($styles[$from]);
158
+ if ($value === "currentcolor") {
159
+ if ($type === "color") {
160
+ $value = $this->_parentStyle->color;
161
+ } else {
162
+ $value = $this->color;
163
+ }
164
+ }
165
+ if ($value !== null && $value[3] !== 1 && array_key_exists("{$from}-opacity", $style_map) === true) {
166
+ $styles["{$from}-opacity"] = $value[3];
167
+ }
168
  break;
169
 
170
  case self::TYPE_NUMBER:
190
 
191
  if (count($parts) == 2) {
192
  $color = $parts[1];
193
+ } else {
 
194
  $color = $parts[0];
195
  }
196
 
198
  return "none";
199
  }
200
 
201
+ if ($color === "currentcolor") {
202
+ return "currentcolor";
203
+ }
204
+
205
  // SVG color name
206
  if (isset(self::$colorNames[$color])) {
207
  return self::parseHexColor(self::$colorNames[$color]);
214
 
215
  // RGB color
216
  if (strpos($color, "rgb") !== false) {
217
+ return self::getQuad($color);
218
  }
219
 
220
  // RGB color
221
  if (strpos($color, "hsl") !== false) {
222
+ $quad = self::getQuad($color, true);
223
 
224
+ if ($quad == null) {
225
  return null;
226
  }
227
 
228
+ list($h, $s, $l, $a) = $quad;
229
 
230
  $r = $l;
231
  $g = $l;
274
  break;
275
  }
276
  }
277
+ $a = $a * 255;
278
 
279
  return array(
280
  $r * 255.0,
281
  $g * 255.0,
282
  $b * 255.0,
283
+ $a
284
  );
285
  }
286
 
300
  return null;
301
  }
302
 
303
+ static function getQuad($color, $percent = false) {
304
  $i = strpos($color, "(");
305
  $j = strpos($color, ")");
306
 
309
  return null;
310
  }
311
 
312
+ $quad = preg_split("/\\s*[,\\/]\\s*/", trim(substr($color, $i + 1, $j - $i - 1)));
313
+ if (!isset($quad[3])) {
314
+ $quad[3] = 1;
315
+ }
316
 
317
+ if (count($quad) != 3 && count($quad) != 4) {
318
  return null;
319
  }
320
 
321
+ foreach (array_keys($quad) as $c) {
322
+ $quad[$c] = trim($quad[$c]);
323
 
324
  if ($percent) {
325
+ if ($quad[$c][strlen($quad[$c]) - 1] === "%") {
326
+ $quad[$c] = floatval($quad[$c]) / 100;
327
+ } else {
328
+ $quad[$c] = $quad[$c] / 255;
329
  }
330
+ } else {
331
+ if ($quad[$c][strlen($quad[$c]) - 1] === "%") {
332
+ $quad[$c] = round(floatval($quad[$c]) * 2.55);
 
 
 
 
333
  }
334
  }
335
  }
336
 
337
+ return $quad;
338
  }
339
 
340
  static function parseHexColor($hex)
341
  {
342
+ $c = array(0, 0, 0, 1);
343
 
344
  // #FFFFFF
345
  if (isset($hex[6])) {
346
  $c[0] = hexdec(substr($hex, 1, 2));
347
  $c[1] = hexdec(substr($hex, 3, 2));
348
  $c[2] = hexdec(substr($hex, 5, 2));
349
+
350
+ if (isset($hex[7])) {
351
+ $alpha = substr($hex, 7, 2);
352
+ if (ctype_xdigit($alpha)) {
353
+ $c[3] = round(hexdec($alpha)/255, 2);
354
+ }
355
+ }
356
  } else {
357
  $c[0] = hexdec($hex[1] . $hex[1]);
358
  $c[1] = hexdec($hex[2] . $hex[2]);
359
  $c[2] = hexdec($hex[3] . $hex[3]);
360
+
361
+ if (isset($hex[4])) {
362
+ if (ctype_xdigit($hex[4])) {
363
+ $c[3] = round(hexdec($hex[4] . $hex[4])/255, 2);
364
+ }
365
+ }
366
  }
367
 
368
  return $c;
388
  return $styles;
389
  }
390
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  static $colorNames = array(
392
  'antiquewhite' => '#FAEBD7',
393
  'aqua' => '#00FFFF',
vendor/phenx/php-svg-lib/src/Svg/Surface/CPdf.php CHANGED
@@ -4174,9 +4174,9 @@ EOT;
4174
  $this->addContent(sprintf("\n%.3F %.3F %.3F %.3F re", $x1, $y1, $width, $height));
4175
  }
4176
 
4177
- function stroke()
4178
  {
4179
- $this->addContent("\nS");
4180
  }
4181
 
4182
  function fill()
@@ -4184,9 +4184,9 @@ EOT;
4184
  $this->addContent("\nf" . ($this->fillRule === "evenodd" ? "*" : ""));
4185
  }
4186
 
4187
- function fillStroke()
4188
  {
4189
- $this->addContent("\nb" . ($this->fillRule === "evenodd" ? "*" : ""));
4190
  }
4191
 
4192
  /**
4174
  $this->addContent(sprintf("\n%.3F %.3F %.3F %.3F re", $x1, $y1, $width, $height));
4175
  }
4176
 
4177
+ function stroke(bool $close = false)
4178
  {
4179
+ $this->addContent("\n" . ($close ? "s" : "S"));
4180
  }
4181
 
4182
  function fill()
4184
  $this->addContent("\nf" . ($this->fillRule === "evenodd" ? "*" : ""));
4185
  }
4186
 
4187
+ function fillStroke(bool $close = false)
4188
  {
4189
+ $this->addContent("\n" . ($close ? "b" : "B") . ($this->fillRule === "evenodd" ? "*" : ""));
4190
  }
4191
 
4192
  /**
vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceCpdf.php CHANGED
@@ -122,10 +122,10 @@ class SurfaceCpdf implements SurfaceInterface
122
  $this->canvas->closePath();
123
  }
124
 
125
- public function fillStroke()
126
  {
127
  if (self::DEBUG) echo __FUNCTION__ . "\n";
128
- $this->canvas->fillStroke();
129
  }
130
 
131
  public function clip()
@@ -342,10 +342,10 @@ class SurfaceCpdf implements SurfaceInterface
342
  $this->stroke();
343
  }
344
 
345
- public function stroke()
346
  {
347
  if (self::DEBUG) echo __FUNCTION__ . "\n";
348
- $this->canvas->stroke();
349
  }
350
 
351
  public function endPath()
@@ -435,51 +435,52 @@ class SurfaceCpdf implements SurfaceInterface
435
 
436
  public function setFont($family, $style, $weight)
437
  {
438
- $map = array(
439
- "serif" => "Times",
440
- "sans-serif" => "Helvetica",
441
- "fantasy" => "Symbol",
442
- "cursive" => "Times",
443
- "monospace" => "Courier",
444
-
445
- "arial" => "Helvetica",
446
- "verdana" => "Helvetica",
447
- );
448
-
449
- $styleMap = array(
450
- 'Helvetica' => array(
451
- 'b' => 'Helvetica-Bold',
452
- 'i' => 'Helvetica-Oblique',
453
- 'bi' => 'Helvetica-BoldOblique',
454
- ),
455
- 'Courier' => array(
456
- 'b' => 'Courier-Bold',
457
- 'i' => 'Courier-Oblique',
458
- 'bi' => 'Courier-BoldOblique',
459
- ),
460
- 'Times' => array(
461
- '' => 'Times-Roman',
462
- 'b' => 'Times-Bold',
463
- 'i' => 'Times-Italic',
464
- 'bi' => 'Times-BoldItalic',
465
- ),
466
- );
467
-
468
- $family = strtolower($family);
469
- $style = strtolower($style);
470
- $weight = strtolower($weight);
471
-
472
- if (isset($map[$family])) {
473
- $family = $map[$family];
474
  }
475
 
476
  if (isset($styleMap[$family])) {
477
  $key = "";
478
 
 
479
  if ($weight === "bold" || $weight === "bolder" || (is_numeric($weight) && $weight >= 600)) {
480
  $key .= "b";
481
  }
482
 
 
483
  if ($style === "italic" || $style === "oblique") {
484
  $key .= "i";
485
  }
122
  $this->canvas->closePath();
123
  }
124
 
125
+ public function fillStroke(bool $close = false)
126
  {
127
  if (self::DEBUG) echo __FUNCTION__ . "\n";
128
+ $this->canvas->fillStroke($close);
129
  }
130
 
131
  public function clip()
342
  $this->stroke();
343
  }
344
 
345
+ public function stroke(bool $close = false)
346
  {
347
  if (self::DEBUG) echo __FUNCTION__ . "\n";
348
+ $this->canvas->stroke($close);
349
  }
350
 
351
  public function endPath()
435
 
436
  public function setFont($family, $style, $weight)
437
  {
438
+ $map = [
439
+ "serif" => "times",
440
+ "sans-serif" => "helvetica",
441
+ "fantasy" => "symbol",
442
+ "cursive" => "times",
443
+ "monospace" => "courier"
444
+ ];
445
+
446
+ $styleMap = [
447
+ "courier" => [
448
+ "" => "Courier",
449
+ "b" => "Courier-Bold",
450
+ "i" => "Courier-Oblique",
451
+ "bi" => "Courier-BoldOblique",
452
+ ],
453
+ "helvetica" => [
454
+ "" => "Helvetica",
455
+ "b" => "Helvetica-Bold",
456
+ "i" => "Helvetica-Oblique",
457
+ "bi" => "Helvetica-BoldOblique",
458
+ ],
459
+ "symbol" => [
460
+ "" => "Symbol"
461
+ ],
462
+ "times" => [
463
+ "" => "Times-Roman",
464
+ "b" => "Times-Bold",
465
+ "i" => "Times-Italic",
466
+ "bi" => "Times-BoldItalic",
467
+ ],
468
+ ];
469
+
470
+ $family_lc = strtolower($family);
471
+ if (isset($map[$family_lc])) {
472
+ $family = $map[$family_lc];
 
473
  }
474
 
475
  if (isset($styleMap[$family])) {
476
  $key = "";
477
 
478
+ $weight = strtolower($weight);
479
  if ($weight === "bold" || $weight === "bolder" || (is_numeric($weight) && $weight >= 600)) {
480
  $key .= "b";
481
  }
482
 
483
+ $style = strtolower($style);
484
  if ($style === "italic" || $style === "oblique") {
485
  $key .= "i";
486
  }
vendor/phenx/php-svg-lib/src/Svg/Surface/SurfaceInterface.php CHANGED
@@ -37,11 +37,11 @@ interface SurfaceInterface
37
 
38
  public function fill();
39
 
40
- public function stroke();
41
 
42
  public function endPath();
43
 
44
- public function fillStroke();
45
 
46
  public function clip();
47
 
37
 
38
  public function fill();
39
 
40
+ public function stroke(bool $close = false);
41
 
42
  public function endPath();
43
 
44
+ public function fillStroke(bool $close = false);
45
 
46
  public function clip();
47
 
vendor/phenx/php-svg-lib/src/Svg/Surface/SurfacePDFLib.php CHANGED
@@ -120,10 +120,14 @@ class SurfacePDFLib implements SurfaceInterface
120
  $this->canvas->closepath();
121
  }
122
 
123
- public function fillStroke()
124
  {
125
  if (self::DEBUG) echo __FUNCTION__ . "\n";
126
- $this->canvas->fill_stroke();
 
 
 
 
127
  }
128
 
129
  public function clip()
@@ -281,10 +285,14 @@ class SurfacePDFLib implements SurfaceInterface
281
  $this->stroke();
282
  }
283
 
284
- public function stroke()
285
  {
286
  if (self::DEBUG) echo __FUNCTION__ . "\n";
287
- $this->canvas->stroke();
 
 
 
 
288
  }
289
 
290
  public function endPath()
@@ -315,7 +323,7 @@ class SurfacePDFLib implements SurfaceInterface
315
  $this->style = $style;
316
  $canvas = $this->canvas;
317
 
318
- if ($stroke = $style->stroke && is_array($style->stroke)) {
319
  $canvas->setcolor(
320
  "stroke",
321
  "rgb",
@@ -326,7 +334,7 @@ class SurfacePDFLib implements SurfaceInterface
326
  );
327
  }
328
 
329
- if ($fill = $style->fill && is_array($style->fill)) {
330
  $canvas->setcolor(
331
  "fill",
332
  "rgb",
120
  $this->canvas->closepath();
121
  }
122
 
123
+ public function fillStroke(bool $close = false)
124
  {
125
  if (self::DEBUG) echo __FUNCTION__ . "\n";
126
+ if ($close) {
127
+ $this->canvas->closepath_fill_stroke();
128
+ } else {
129
+ $this->canvas->fill_stroke();
130
+ }
131
  }
132
 
133
  public function clip()
285
  $this->stroke();
286
  }
287
 
288
+ public function stroke(bool $close = false)
289
  {
290
  if (self::DEBUG) echo __FUNCTION__ . "\n";
291
+ if ($close) {
292
+ $this->canvas->closepath_stroke();
293
+ } else {
294
+ $this->canvas->stroke();
295
+ }
296
  }
297
 
298
  public function endPath()
323
  $this->style = $style;
324
  $canvas = $this->canvas;
325
 
326
+ if (is_array($style->stroke) && $stroke = $style->stroke) {
327
  $canvas->setcolor(
328
  "stroke",
329
  "rgb",
334
  );
335
  }
336
 
337
+ if (is_array($style->fill) && $fill = $style->fill) {
338
  $canvas->setcolor(
339
  "fill",
340
  "rgb",
vendor/phenx/php-svg-lib/src/Svg/Tag/AbstractTag.php CHANGED
@@ -8,6 +8,7 @@
8
 
9
  namespace Svg\Tag;
10
 
 
11
  use Svg\Document;
12
  use Svg\Style;
13
 
@@ -134,21 +135,19 @@ abstract class AbstractTag
134
 
135
  $transform = $attributes["transform"];
136
 
137
- $match = array();
138
  preg_match_all(
139
- '/(matrix|translate|scale|rotate|skewX|skewY)\((.*?)\)/is',
140
  $transform,
141
- $match,
142
  PREG_SET_ORDER
143
  );
144
 
145
  $transformations = array();
146
- if (count($match[0])) {
147
- foreach ($match as $_match) {
148
- $arguments = preg_split('/[ ,]+/', $_match[2]);
149
- array_unshift($arguments, $_match[1]);
150
- $transformations[] = $arguments;
151
- }
152
  }
153
 
154
  foreach ($transformations as $t) {
@@ -177,14 +176,61 @@ abstract class AbstractTag
177
  break;
178
 
179
  case "skewX":
180
- $surface->skewX($t[1]);
 
181
  break;
182
 
183
  case "skewY":
184
- $surface->skewY($t[1]);
 
185
  break;
186
  }
187
  }
188
  }
189
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  }
8
 
9
  namespace Svg\Tag;
10
 
11
+ use Svg\CssLength;
12
  use Svg\Document;
13
  use Svg\Style;
14
 
135
 
136
  $transform = $attributes["transform"];
137
 
138
+ $matches = array();
139
  preg_match_all(
140
+ '/(matrix|translate|scale|rotate|skew|skewX|skewY)\((.*?)\)/is',
141
  $transform,
142
+ $matches,
143
  PREG_SET_ORDER
144
  );
145
 
146
  $transformations = array();
147
+ foreach ($matches as $match) {
148
+ $arguments = preg_split('/[ ,]+/', $match[2]);
149
+ array_unshift($arguments, $match[1]);
150
+ $transformations[] = $arguments;
 
 
151
  }
152
 
153
  foreach ($transformations as $t) {
176
  break;
177
 
178
  case "skewX":
179
+ $tan_x = tan(deg2rad($t[1]));
180
+ $surface->transform(1, 0, $tan_x, 1, 0, 0);
181
  break;
182
 
183
  case "skewY":
184
+ $tan_y = tan(deg2rad($t[1]));
185
+ $surface->transform(1, $tan_y, 0, 1, 0, 0);
186
  break;
187
  }
188
  }
189
  }
190
  }
191
+
192
+ /**
193
+ * Convert the given size for the context of this current tag.
194
+ * Takes a pixel-based reference, which is usually specific to the context of the size,
195
+ * but the actual reference size will be decided based upon the unit used.
196
+ *
197
+ * @param string $size
198
+ * @param float $pxReference
199
+ *
200
+ * @return float
201
+ */
202
+ protected function convertSize(string $size, float $pxReference): float
203
+ {
204
+ $length = new CssLength($size);
205
+ $reference = $pxReference;
206
+ $defaultFontSize = 12;
207
+
208
+ switch ($length->getUnit()) {
209
+ case "em":
210
+ $reference = $this->style->fontSize ?? $defaultFontSize;
211
+ break;
212
+ case "rem":
213
+ $reference = $this->document->style->fontSize ?? $defaultFontSize;
214
+ break;
215
+ case "ex":
216
+ case "ch":
217
+ $emRef = $this->style->fontSize ?? $defaultFontSize;
218
+ $reference = $emRef * 0.5;
219
+ break;
220
+ case "vw":
221
+ $reference = $this->getDocument()->getWidth();
222
+ break;
223
+ case "vh":
224
+ $reference = $this->getDocument()->getHeight();
225
+ break;
226
+ case "vmin":
227
+ $reference = min($this->getDocument()->getHeight(), $this->getDocument()->getWidth());
228
+ break;
229
+ case "vmax":
230
+ $reference = max($this->getDocument()->getHeight(), $this->getDocument()->getWidth());
231
+ break;
232
+ }
233
+
234
+ return (new CssLength($size))->toPixels($reference);
235
+ }
236
  }
vendor/phenx/php-svg-lib/src/Svg/Tag/Circle.php CHANGED
@@ -8,6 +8,8 @@
8
 
9
  namespace Svg\Tag;
10
 
 
 
11
  class Circle extends Shape
12
  {
13
  protected $cx = 0;
@@ -17,13 +19,16 @@ class Circle extends Shape
17
  public function start($attributes)
18
  {
19
  if (isset($attributes['cx'])) {
20
- $this->cx = $attributes['cx'];
 
21
  }
22
  if (isset($attributes['cy'])) {
23
- $this->cy = $attributes['cy'];
 
24
  }
25
  if (isset($attributes['r'])) {
26
- $this->r = $attributes['r'];
 
27
  }
28
 
29
  $this->document->getSurface()->circle($this->cx, $this->cy, $this->r);
8
 
9
  namespace Svg\Tag;
10
 
11
+ use Svg\Style;
12
+
13
  class Circle extends Shape
14
  {
15
  protected $cx = 0;
19
  public function start($attributes)
20
  {
21
  if (isset($attributes['cx'])) {
22
+ $width = $this->document->getWidth();
23
+ $this->cx = $this->convertSize($attributes['cx'], $width);
24
  }
25
  if (isset($attributes['cy'])) {
26
+ $height = $this->document->getHeight();
27
+ $this->cy = $this->convertSize($attributes['cy'], $height);
28
  }
29
  if (isset($attributes['r'])) {
30
+ $diagonal = $this->document->getDiagonal();
31
+ $this->r = $this->convertSize($attributes['r'], $diagonal);
32
  }
33
 
34
  $this->document->getSurface()->circle($this->cx, $this->cy, $this->r);
vendor/phenx/php-svg-lib/src/Svg/Tag/Ellipse.php CHANGED
@@ -8,6 +8,8 @@
8
 
9
  namespace Svg\Tag;
10
 
 
 
11
  class Ellipse extends Shape
12
  {
13
  protected $cx = 0;
@@ -19,17 +21,20 @@ class Ellipse extends Shape
19
  {
20
  parent::start($attributes);
21
 
 
 
 
22
  if (isset($attributes['cx'])) {
23
- $this->cx = $attributes['cx'];
24
  }
25
  if (isset($attributes['cy'])) {
26
- $this->cy = $attributes['cy'];
27
  }
28
  if (isset($attributes['rx'])) {
29
- $this->rx = $attributes['rx'];
30
  }
31
  if (isset($attributes['ry'])) {
32
- $this->ry = $attributes['ry'];
33
  }
34
 
35
  $this->document->getSurface()->ellipse($this->cx, $this->cy, $this->rx, $this->ry, 0, 0, 360, false);
8
 
9
  namespace Svg\Tag;
10
 
11
+ use Svg\Style;
12
+
13
  class Ellipse extends Shape
14
  {
15
  protected $cx = 0;
21
  {
22
  parent::start($attributes);
23
 
24
+ $width = $this->document->getWidth();
25
+ $height = $this->document->getHeight();
26
+
27
  if (isset($attributes['cx'])) {
28
+ $this->cx = $this->convertSize($attributes['cx'], $width);
29
  }
30
  if (isset($attributes['cy'])) {
31
+ $this->cy = $this->convertSize($attributes['cy'], $height);
32
  }
33
  if (isset($attributes['rx'])) {
34
+ $this->rx = $this->convertSize($attributes['rx'], $width);
35
  }
36
  if (isset($attributes['ry'])) {
37
+ $this->ry = $this->convertSize($attributes['ry'], $height);
38
  }
39
 
40
  $this->document->getSurface()->ellipse($this->cx, $this->cy, $this->rx, $this->ry, 0, 0, 360, false);
vendor/phenx/php-svg-lib/src/Svg/Tag/Image.php CHANGED
@@ -8,6 +8,8 @@
8
 
9
  namespace Svg\Tag;
10
 
 
 
11
  class Image extends AbstractTag
12
  {
13
  protected $x = 0;
@@ -28,31 +30,35 @@ class Image extends AbstractTag
28
 
29
  public function start($attributes)
30
  {
31
- $document = $this->document;
32
  $height = $this->document->getHeight();
 
33
  $this->y = $height;
34
 
35
  if (isset($attributes['x'])) {
36
- $this->x = $attributes['x'];
37
  }
38
  if (isset($attributes['y'])) {
39
- $this->y = $height - $attributes['y'];
40
  }
41
 
42
  if (isset($attributes['width'])) {
43
- $this->width = $attributes['width'];
44
  }
45
  if (isset($attributes['height'])) {
46
- $this->height = $attributes['height'];
47
  }
48
 
49
  if (isset($attributes['xlink:href'])) {
50
  $this->href = $attributes['xlink:href'];
51
  }
52
 
53
- $document->getSurface()->transform(1, 0, 0, -1, 0, $height);
 
 
 
 
54
 
55
- $document->getSurface()->drawImage($this->href, $this->x, $this->y, $this->width, $this->height);
56
  }
57
 
58
  protected function after()
8
 
9
  namespace Svg\Tag;
10
 
11
+ use Svg\Style;
12
+
13
  class Image extends AbstractTag
14
  {
15
  protected $x = 0;
30
 
31
  public function start($attributes)
32
  {
 
33
  $height = $this->document->getHeight();
34
+ $width = $this->document->getWidth();
35
  $this->y = $height;
36
 
37
  if (isset($attributes['x'])) {
38
+ $this->x = $this->convertSize($attributes['x'], $width);
39
  }
40
  if (isset($attributes['y'])) {
41
+ $this->y = $height - $this->convertSize($attributes['y'], $height);
42
  }
43
 
44
  if (isset($attributes['width'])) {
45
+ $this->width = $this->convertSize($attributes['width'], $width);
46
  }
47
  if (isset($attributes['height'])) {
48
+ $this->height = $this->convertSize($attributes['height'], $height);
49
  }
50
 
51
  if (isset($attributes['xlink:href'])) {
52
  $this->href = $attributes['xlink:href'];
53
  }
54
 
55
+ if (isset($attributes['href'])) {
56
+ $this->href = $attributes['href'];
57
+ }
58
+
59
+ $this->document->getSurface()->transform(1, 0, 0, -1, 0, $height);
60
 
61
+ $this->document->getSurface()->drawImage($this->href, $this->x, $this->y, $this->width, $this->height);
62
  }
63
 
64
  protected function after()
vendor/phenx/php-svg-lib/src/Svg/Tag/Line.php CHANGED
@@ -8,6 +8,8 @@
8
 
9
  namespace Svg\Tag;
10
 
 
 
11
  class Line extends Shape
12
  {
13
  protected $x1 = 0;
@@ -18,17 +20,20 @@ class Line extends Shape
18
 
19
  public function start($attributes)
20
  {
 
 
 
21
  if (isset($attributes['x1'])) {
22
- $this->x1 = $attributes['x1'];
23
  }
24
  if (isset($attributes['y1'])) {
25
- $this->y1 = $attributes['y1'];
26
  }
27
  if (isset($attributes['x2'])) {
28
- $this->x2 = $attributes['x2'];
29
  }
30
  if (isset($attributes['y2'])) {
31
- $this->y2 = $attributes['y2'];
32
  }
33
 
34
  $surface = $this->document->getSurface();
8
 
9
  namespace Svg\Tag;
10
 
11
+ use Svg\Style;
12
+
13
  class Line extends Shape
14
  {
15
  protected $x1 = 0;
20
 
21
  public function start($attributes)
22
  {
23
+ $height = $this->document->getHeight();
24
+ $width = $this->document->getWidth();
25
+
26
  if (isset($attributes['x1'])) {
27
+ $this->x1 = $this->convertSize($attributes['x1'], $width);
28
  }
29
  if (isset($attributes['y1'])) {
30
+ $this->y1 = $this->convertSize($attributes['y1'], $height);
31
  }
32
  if (isset($attributes['x2'])) {
33
+ $this->x2 = $this->convertSize($attributes['x2'], $width);
34
  }
35
  if (isset($attributes['y2'])) {
36
+ $this->y2 = $this->convertSize($attributes['y2'], $height);
37
  }
38
 
39
  $surface = $this->document->getSurface();
vendor/phenx/php-svg-lib/src/Svg/Tag/Path.php CHANGED
@@ -61,7 +61,7 @@ class Path extends Shape
61
  $commandLower = strtolower($c[1]);
62
 
63
  // arcs have special flags that apparently don't require spaces.
64
- if ($commandLower === 'a' && preg_match_all(static::ARC_REGEXP, $c[2], $matches)) {
65
  $numberOfMatches = count($matches[0]);
66
  for ($k = 0; $k < $numberOfMatches; ++$k) {
67
  $path[] = [
@@ -138,7 +138,6 @@ class Path extends Shape
138
  $tempControlY = null;
139
  $l = 0; //-((this.width / 2) + $this.pathOffset.x),
140
  $t = 0; //-((this.height / 2) + $this.pathOffset.y),
141
- $methodName = null;
142
 
143
  foreach ($path as $current) {
144
  switch ($current[0]) { // first letter
@@ -333,23 +332,16 @@ class Path extends Shape
333
  $tempX = $x + $current[1];
334
  $tempY = $y + $current[2];
335
 
336
- if (preg_match("/[QqTt]/", $previous[0])) {
337
- // If there is no previous command or if the previous command was not a Q, q, T or t,
338
- // assume the control point is coincident with the current point
 
 
 
 
 
339
  $controlX = $x;
340
  $controlY = $y;
341
- } else {
342
- if ($previous[0] === 't') {
343
- // calculate reflection of previous control points for t
344
- $controlX = 2 * $x - $tempControlX;
345
- $controlY = 2 * $y - $tempControlY;
346
- } else {
347
- if ($previous[0] === 'q') {
348
- // calculate reflection of previous control points for q
349
- $controlX = 2 * $x - $controlX;
350
- $controlY = 2 * $y - $controlY;
351
- }
352
- }
353
  }
354
 
355
  $tempControlX = $controlX;
@@ -363,8 +355,6 @@ class Path extends Shape
363
  );
364
  $x = $tempX;
365
  $y = $tempY;
366
- $controlX = $x + $current[1];
367
- $controlY = $y + $current[2];
368
  break;
369
 
370
  case 'T':
@@ -372,8 +362,14 @@ class Path extends Shape
372
  $tempY = $current[2];
373
 
374
  // calculate reflection of previous control points
375
- $controlX = 2 * $x - $controlX;
376
- $controlY = 2 * $y - $controlY;
 
 
 
 
 
 
377
  $surface->quadraticCurveTo(
378
  $controlX + $l,
379
  $controlY + $t,
@@ -385,7 +381,6 @@ class Path extends Shape
385
  break;
386
 
387
  case 'a':
388
- // TODO: optimize this
389
  $this->drawArc(
390
  $surface,
391
  $x + $l,
61
  $commandLower = strtolower($c[1]);
62
 
63
  // arcs have special flags that apparently don't require spaces.
64
+ if ($commandLower === 'a' && preg_match_all(static::ARC_REGEXP, $c[2], $matches, PREG_PATTERN_ORDER)) {
65
  $numberOfMatches = count($matches[0]);
66
  for ($k = 0; $k < $numberOfMatches; ++$k) {
67
  $path[] = [
138
  $tempControlY = null;
139
  $l = 0; //-((this.width / 2) + $this.pathOffset.x),
140
  $t = 0; //-((this.height / 2) + $this.pathOffset.y),
 
141
 
142
  foreach ($path as $current) {
143
  switch ($current[0]) { // first letter
332
  $tempX = $x + $current[1];
333
  $tempY = $y + $current[2];
334
 
335
+ // calculate reflection of previous control points
336
+ if (preg_match('/[QqT]/', $previous[0])) {
337
+ $controlX = 2 * $x - $controlX;
338
+ $controlY = 2 * $y - $controlY;
339
+ } elseif ($previous[0] === 't') {
340
+ $controlX = 2 * $x - $tempControlX;
341
+ $controlY = 2 * $y - $tempControlY;
342
+ } else {
343
  $controlX = $x;
344
  $controlY = $y;
 
 
 
 
 
 
 
 
 
 
 
 
345
  }
346
 
347
  $tempControlX = $controlX;
355
  );
356
  $x = $tempX;
357
  $y = $tempY;
 
 
358
  break;
359
 
360
  case 'T':
362
  $tempY = $current[2];
363
 
364
  // calculate reflection of previous control points
365
+ if (preg_match('/[QqTt]/', $previous[0])) {
366
+ $controlX = 2 * $x - $controlX;
367
+ $controlY = 2 * $y - $controlY;
368
+ } else {
369
+ $controlX = $x;
370
+ $controlY = $y;
371
+ }
372
+
373
  $surface->quadraticCurveTo(
374
  $controlX + $l,
375
  $controlY + $t,
381
  break;
382
 
383
  case 'a':
 
384
  $this->drawArc(
385
  $surface,
386
  $x + $l,
vendor/phenx/php-svg-lib/src/Svg/Tag/Polygon.php CHANGED
@@ -13,16 +13,25 @@ class Polygon extends Shape
13
  public function start($attributes)
14
  {
15
  $tmp = array();
16
- preg_match_all('/([\-]*[0-9\.]+)/', $attributes['points'], $tmp);
17
 
18
  $points = $tmp[0];
19
  $count = count($points);
20
 
 
 
 
 
 
21
  $surface = $this->document->getSurface();
22
  list($x, $y) = $points;
23
  $surface->moveTo($x, $y);
24
 
25
  for ($i = 2; $i < $count; $i += 2) {
 
 
 
 
26
  $x = $points[$i];
27
  $y = $points[$i + 1];
28
  $surface->lineTo($x, $y);
13
  public function start($attributes)
14
  {
15
  $tmp = array();
16
+ preg_match_all('/([\-]*[0-9\.]+)/', $attributes['points'], $tmp, PREG_PATTERN_ORDER);
17
 
18
  $points = $tmp[0];
19
  $count = count($points);
20
 
21
+ if ($count < 4) {
22
+ // nothing to draw
23
+ return;
24
+ }
25
+
26
  $surface = $this->document->getSurface();
27
  list($x, $y) = $points;
28
  $surface->moveTo($x, $y);
29
 
30
  for ($i = 2; $i < $count; $i += 2) {
31
+ if ($i + 1 === $count) {
32
+ // invalid trailing point
33
+ continue;
34
+ }
35
  $x = $points[$i];
36
  $y = $points[$i + 1];
37
  $surface->lineTo($x, $y);
vendor/phenx/php-svg-lib/src/Svg/Tag/Polyline.php CHANGED
@@ -13,16 +13,25 @@ class Polyline extends Shape
13
  public function start($attributes)
14
  {
15
  $tmp = array();
16
- preg_match_all('/([\-]*[0-9\.]+)/', $attributes['points'], $tmp);
17
 
18
  $points = $tmp[0];
19
  $count = count($points);
20
 
 
 
 
 
 
21
  $surface = $this->document->getSurface();
22
  list($x, $y) = $points;
23
  $surface->moveTo($x, $y);
24
 
25
  for ($i = 2; $i < $count; $i += 2) {
 
 
 
 
26
  $x = $points[$i];
27
  $y = $points[$i + 1];
28
  $surface->lineTo($x, $y);
13
  public function start($attributes)
14
  {
15
  $tmp = array();
16
+ preg_match_all('/([\-]*[0-9\.]+)/', $attributes['points'], $tmp, PREG_PATTERN_ORDER);
17
 
18
  $points = $tmp[0];
19
  $count = count($points);
20
 
21
+ if ($count < 4) {
22
+ // nothing to draw
23
+ return;
24
+ }
25
+
26
  $surface = $this->document->getSurface();
27
  list($x, $y) = $points;
28
  $surface->moveTo($x, $y);
29
 
30
  for ($i = 2; $i < $count; $i += 2) {
31
+ if ($i + 1 === $count) {
32
+ // invalid trailing point
33
+ continue;
34
+ }
35
  $x = $points[$i];
36
  $y = $points[$i + 1];
37
  $surface->lineTo($x, $y);
vendor/phenx/php-svg-lib/src/Svg/Tag/Rect.php CHANGED
@@ -8,6 +8,8 @@
8
 
9
  namespace Svg\Tag;
10
 
 
 
11
  class Rect extends Shape
12
  {
13
  protected $x = 0;
@@ -19,28 +21,21 @@ class Rect extends Shape
19
 
20
  public function start($attributes)
21
  {
 
 
 
22
  if (isset($attributes['x'])) {
23
- $this->x = $attributes['x'];
24
  }
25
  if (isset($attributes['y'])) {
26
- $this->y = $attributes['y'];
27
  }
28
 
29
  if (isset($attributes['width'])) {
30
- if ('%' === substr($attributes['width'], -1)) {
31
- $factor = substr($attributes['width'], 0, -1) / 100;
32
- $this->width = $this->document->getWidth() * $factor;
33
- } else {
34
- $this->width = $attributes['width'];
35
- }
36
  }
37
  if (isset($attributes['height'])) {
38
- if ('%' === substr($attributes['height'], -1)) {
39
- $factor = substr($attributes['height'], 0, -1) / 100;
40
- $this->height = $this->document->getHeight() * $factor;
41
- } else {
42
- $this->height = $attributes['height'];
43
- }
44
  }
45
 
46
  if (isset($attributes['rx'])) {
8
 
9
  namespace Svg\Tag;
10
 
11
+ use Svg\Style;
12
+
13
  class Rect extends Shape
14
  {
15
  protected $x = 0;
21
 
22
  public function start($attributes)
23
  {
24
+ $width = $this->document->getWidth();
25
+ $height = $this->document->getHeight();
26
+
27
  if (isset($attributes['x'])) {
28
+ $this->x = $this->convertSize($attributes['x'], $width);
29
  }
30
  if (isset($attributes['y'])) {
31
+ $this->y = $this->convertSize($attributes['y'], $height);
32
  }
33
 
34
  if (isset($attributes['width'])) {
35
+ $this->width = $this->convertSize($attributes['width'], $width);
 
 
 
 
 
36
  }
37
  if (isset($attributes['height'])) {
38
+ $this->height = $this->convertSize($attributes['height'], $height);
 
 
 
 
 
39
  }
40
 
41
  if (isset($attributes['rx'])) {
vendor/phenx/php-svg-lib/src/Svg/Tag/Shape.php CHANGED
@@ -38,7 +38,7 @@ class Shape extends AbstractTag
38
 
39
  if ($fill) {
40
  if ($stroke) {
41
- $surface->fillStroke();
42
  } else {
43
  // if (is_string($style->fill)) {
44
  // /** @var LinearGradient|RadialGradient $gradient */
@@ -51,7 +51,7 @@ class Shape extends AbstractTag
51
  }
52
  }
53
  elseif ($stroke) {
54
- $surface->stroke();
55
  }
56
  else {
57
  $surface->endPath();
38
 
39
  if ($fill) {
40
  if ($stroke) {
41
+ $surface->fillStroke(false);
42
  } else {
43
  // if (is_string($style->fill)) {
44
  // /** @var LinearGradient|RadialGradient $gradient */
51
  }
52
  }
53
  elseif ($stroke) {
54
+ $surface->stroke(false);
55
  }
56
  else {
57
  $surface->endPath();
vendor/phenx/php-svg-lib/src/Svg/Tag/Text.php CHANGED
@@ -8,6 +8,8 @@
8
 
9
  namespace Svg\Tag;
10
 
 
 
11
  class Text extends Shape
12
  {
13
  protected $x = 0;
@@ -16,18 +18,18 @@ class Text extends Shape
16
 
17
  public function start($attributes)
18
  {
19
- $document = $this->document;
20
  $height = $this->document->getHeight();
21
  $this->y = $height;
22
 
23
  if (isset($attributes['x'])) {
24
- $this->x = $attributes['x'];
 
25
  }
26
  if (isset($attributes['y'])) {
27
- $this->y = $height - $attributes['y'];
28
  }
29
 
30
- $document->getSurface()->transform(1, 0, 0, -1, 0, $height);
31
  }
32
 
33
  public function end()
8
 
9
  namespace Svg\Tag;
10
 
11
+ use Svg\Style;
12
+
13
  class Text extends Shape
14
  {
15
  protected $x = 0;
18
 
19
  public function start($attributes)
20
  {
 
21
  $height = $this->document->getHeight();
22
  $this->y = $height;
23
 
24
  if (isset($attributes['x'])) {
25
+ $width = $this->document->getWidth();
26
+ $this->x = $this->convertSize($attributes['x'], $width);
27
  }
28
  if (isset($attributes['y'])) {
29
+ $this->y = $height - $this->convertSize($attributes['y'], $height);
30
  }
31
 
32
+ $this->document->getSurface()->transform(1, 0, 0, -1, 0, $height);
33
  }
34
 
35
  public function end()
vendor/phenx/php-svg-lib/src/Svg/Tag/UseTag.php CHANGED
@@ -38,7 +38,7 @@ class UseTag extends AbstractTag
38
 
39
  $document = $this->getDocument();
40
 
41
- $link = $attributes["xlink:href"];
42
  $this->reference = $document->getDef($link);
43
 
44
  if ($this->reference) {
@@ -69,12 +69,18 @@ class UseTag extends AbstractTag
69
  return;
70
  }
71
 
72
- $attributes = array_merge($this->reference->attributes, $attributes);
 
 
 
 
 
 
73
 
74
- $this->reference->handle($attributes);
75
 
76
  foreach ($this->reference->children as $_child) {
77
- $_attributes = array_merge($_child->attributes, $attributes);
78
  $_child->handle($_attributes);
79
  }
80
  }
38
 
39
  $document = $this->getDocument();
40
 
41
+ $link = $attributes["href"] ?? $attributes["xlink:href"];
42
  $this->reference = $document->getDef($link);
43
 
44
  if ($this->reference) {
69
  return;
70
  }
71
 
72
+ $mergedAttributes = $this->reference->attributes;
73
+ $attributesToNotMerge = ['x', 'y', 'width', 'height'];
74
+ foreach ($attributes as $attrKey => $attrVal) {
75
+ if (!in_array($attrKey, $attributesToNotMerge) && !isset($mergedAttributes[$attrKey])) {
76
+ $mergedAttributes[$attrKey] = $attrVal;
77
+ }
78
+ }
79
 
80
+ $this->reference->handle($mergedAttributes);
81
 
82
  foreach ($this->reference->children as $_child) {
83
+ $_attributes = array_merge($_child->attributes, $mergedAttributes);
84
  $_child->handle($_attributes);
85
  }
86
  }
vendor/phenx/php-svg-lib/src/autoload.php DELETED
@@ -1,17 +0,0 @@
1
- <?php
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
- spl_autoload_register(function($class) {
10
- if (0 === strpos($class, "Svg")) {
11
- $file = str_replace('\\', DIRECTORY_SEPARATOR, $class);
12
- $file = realpath(__DIR__ . DIRECTORY_SEPARATOR . $file . '.php');
13
- if (file_exists($file)) {
14
- include_once $file;
15
- }
16
- }
17
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
- * Version: 3.1.1
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: https://opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
- * WC tested up to: 6.8
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '3.1.1';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
+ * Version: 3.2.0
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: https://opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
+ * WC tested up to: 6.9
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '3.2.0';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;