KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Print table th in each page #2256

Open Ron opened this topic on on Aug 11, 2021 - 8 comments

Ron commented on Aug 11, 2021

How can you force a table header to appear in each page in case the table is big

Sebastian Morales commented on Aug 12, 2021

At the moment only the CloudExport package which uses Chrome headless engine can repeat table header in pdf exporting:

https://www.koolreport.com/docs/cloudexport/chromeheadlessio/

Ron commented on Aug 12, 2021

I registered to chromeheadlessio and got a token. I made the necessary changes in the code using the relevant token but when I run the code the browser is running until I receive timeout "Maximum execution time of 30 seconds exceeded"

$report->run()->cloudExport("report_pdf")
    ->chromeHeadlessio("my_token")
    ->settings(array(
    //'useLocalTempFolder' => true,
    ))
    ->pdf(array(
        "format"=>"A4",
	"landscape"=>false
    ))
    ->toBrowser("myreport.pdf",true);
Sebastian Morales commented on Aug 12, 2021

Which web server are you using, is it Apache, nginx, etc or PHP built-in server? If it's the later export won't work. If it's one of the former, pls try to replace all content in your pdf view with a simple string like "Hello world" and see if it works. Rgds,

Ron commented on Aug 12, 2021

I am using DigitalOcean Cloud server UBUNTU 18 Server version: Apache/2.4.29 (Ubuntu) Server built: 2020-08-12T21:33:25 Server's Module Magic Number: 20120211:68 Server loaded: APR 1.6.3, APR-UTIL 1.6.1 Compiled using: APR 1.6.3, APR-UTIL 1.6.1 Architecture: 64-bit Server MPM: prefork threaded: no

forked:     yes (variable process count)

Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/etc/apache2" -D SUEXEC_BIN="/usr/lib/apache2/suexec" -D DEFAULT_PIDLOG="/var/run/apache2.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="mime.types" -D SERVER_CONFIG_FILE="apache2.conf"

Ron commented on Aug 12, 2021

Also generated an Hello world report and still getting same issue

Sebastian Morales commented on Aug 13, 2021

Ok, let's try this setting to see if the server has a permission problem with system temp dir:

$report->run()->cloudExport("report_pdf")
    ->chromeHeadlessio("my_token")
    ->settings(array(
        'useLocalTempFolder' => true, //using a local temp dir for temp export files
    ))
    ->pdf(array(
        "format"=>"A4",
	"landscape"=>false
    ))
    ->toBrowser("myreport.pdf",true); 
Ron commented on Aug 14, 2021

I get the following error:

APPPATH/Libraries/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php at line 277

ErrorException: mkdir(): Permission denied

Sebastian Morales commented on Aug 16, 2021

Pls add write permission to the system temp dir or the php-client dir for your php user. For export to work it must save temp files in at least one of these directories.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None