Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant create multiple pdfs in loop in cron #514

AlexMcowkin opened this issue Nov 14, 2019 · 1 comment

Cant create multiple pdfs in loop in cron #514

AlexMcowkin opened this issue Nov 14, 2019 · 1 comment


Copy link

@AlexMcowkin AlexMcowkin commented Nov 14, 2019

I have a cron that stores pdfs in DB.
here is my code:

for ($i = 0; $i < 100; $i++) 
    $html2pdf = new Spipu\Html2Pdf\Html2Pdf('P', 'A4', 'en', false, 'ISO-8859-15', [8, 5, 8, 10]);

    $html2pdf->writeHTML('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.');

    $pdfContent = $html2pdf->output('', 'S');

but I get error:
Fatal Error: Maximum execution time of 120 seconds exceeded
File: /var/www/site/vendor/html2pdf_new/tecnickcom/tcpdf/include/tcpdf_fonts.php (2108)

I dont understand how can I get this error in cron? Why? Max_exec_time does not depend on cli.



This comment has been minimized.

Copy link

@turtle0x1 turtle0x1 commented Nov 22, 2019

Have you checked your php.ini file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.