diff --git a/app/Http/Controllers/Api/V1/TimeEntryController.php b/app/Http/Controllers/Api/V1/TimeEntryController.php index f24bdd35..e992fee4 100644 --- a/app/Http/Controllers/Api/V1/TimeEntryController.php +++ b/app/Http/Controllers/Api/V1/TimeEntryController.php @@ -409,6 +409,7 @@ class TimeEntryController extends Controller $footerHtml = Blade::render($footerViewFile); $request = Gotenberg::chromium(config('services.gotenberg.url')) ->pdf() + ->waitForExpression("window.status === 'ready'") ->pdfa('PDF/A-3b') ->paperSize('8.27', '11.7') // A4 ->footer(Stream::string('footer', $footerHtml)) diff --git a/resources/views/reports/time-entry-aggregate/pdf.blade.php b/resources/views/reports/time-entry-aggregate/pdf.blade.php index 47fbc8f5..c73fe780 100644 --- a/resources/views/reports/time-entry-aggregate/pdf.blade.php +++ b/resources/views/reports/time-entry-aggregate/pdf.blade.php @@ -37,6 +37,9 @@ font-weight: bold; } + @@ -190,6 +193,10 @@ ] }; + myChart.on('finished', () => { + window.status = 'ready'; + }) + // Display the chart using the configuration items and data just specified. myChart.setOption(option);