]> git.agnieray.net Git - galette.git/commitdiff
Remove HR styling TCPDF capabilities that cause bugs; closes #1554 and refs #1545
authorJohan Cwiklinski <johan@x-tnd.be>
Sun, 23 May 2021 08:45:54 +0000 (10:45 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 23 May 2021 08:45:54 +0000 (10:45 +0200)
galette/composer.json
patches/tcpdf-hrs.patch [new file with mode: 0644]

index 0f7da5daccaeb0eacc103534c960e2deddfee759..8e28295de388e640e5dbfda3774d2a8c6a182fd7 100644 (file)
     },
     "config": {
         "optimize-autoloader": true
+    },
+    "scripts": {
+        "post-install-cmd": [
+            "patch -d vendor/tecnickcom/tcpdf/ -p3 < ../patches/tcpdf-hrs.patch"
+        ]
     }
 }
diff --git a/patches/tcpdf-hrs.patch b/patches/tcpdf-hrs.patch
new file mode 100644 (file)
index 0000000..765f8ae
--- /dev/null
@@ -0,0 +1,23 @@
+diff -up vendor/tecnickcom/tcpdf/tcpdf.php.patch vendor/tecnickcom/tcpdf/tcpdf.php
+--- vendor/tecnickcom/tcpdf/tcpdf.php.patch    2021-05-23 10:30:56.970668957 +0200
++++ vendor/tecnickcom/tcpdf/tcpdf.php  2021-05-23 10:33:11.760593379 +0200
+@@ -18918,18 +18918,7 @@ Putting 1 is equivalent to putting 0 and
+                               }
+                               $prevlinewidth = $this->GetLineWidth();
+                               $this->SetLineWidth($hrHeight);
+-
+-                              $lineStyle = array(
+-                                      'color' => $tag['fgcolor'],
+-                                      'cap'   => $tag['style']['cap'],
+-                                      'join'  => $tag['style']['join'],
+-                                      'dash'  => $tag['style']['dash'],
+-                                      'phase' => $tag['style']['phase'],
+-                              );
+-
+-                              $lineStyle = array_filter($lineStyle);
+-
+-                              $this->Line($x, $y, $x + $hrWidth, $y, $lineStyle);
++                              $this->Line($x, $y, $x + $hrWidth, $y);
+                               $this->SetLineWidth($prevlinewidth);
+                               $this->addHTMLVertSpace(max($hbc, ($hrHeight / 2)), 0, $cell, !isset($dom[($key + 1)]));
+                               break;