Hack to generate individual latex files, to compile manually into PDF
authorRuben Rodriguez <ruben@gnu.org>
Tue, 8 Jun 2021 21:26:44 +0000 (23:26 +0200)
committerMichael McMahon <michael@fsf.org>
Thu, 17 Mar 2022 13:43:45 +0000 (09:43 -0400)
CRM/Contact/Form/Task/PDFLatexCommon.php

index c0fa707ee45cabda843674af92616883600ed531..2c2166397a08664482f182c588b3661c89a4b6d6 100644 (file)
@@ -350,6 +350,13 @@ class CRM_Contact_Form_Task_PDFLatexCommon {
         $tokenHtml = $smarty->fetch("string:$tokenHtml");
         $tokenHtml = str_replace('[ob]', '{', $tokenHtml);
         $tokenHtml = str_replace('[cb]', '}', $tokenHtml);
+
+        // quidam 29/Jun/2020
+       // hack to generate individual latex files, to compile manually into PDF
+        // this only works if /tmp/printhack/ exists and is writable by www-data
+        $debugfile =  fopen("/tmp/printhack/".$contactId,"w+");
+        fwrite($debugfile, $tokenHtml);
+        fclose($debugfile);
       }
 
       $html[] = $tokenHtml;