KoolReport's Forum

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

In exported PDF how to have Column Headers on every page? #3000

Open AhmedHaroon opened this topic on on Feb 27, 2023 - 5 comments

AhmedHaroon commented on Feb 27, 2023

created a report with Export feature to export report in PDF and Excel. it is generating exported PDF file and showing Column Headers only on first page. I want to know how to have Column Headers on every page in exported PDFs?

please help. we have Pro version.

note: during my search for mentioned requirement, i found a topic here, it was of 2018 and there mentioned in a reply that It has not been available yet but will be soon, after 4 years is it available now? if yes, please guide how to?

link to topic: ( @KoolReport mentioned this )

Link to Topic

regards

Sebastian Morales commented on Feb 27, 2023

You can enable repeating table column headers across PDF pages by default with CloudExport package, which uses Chrome headless engine, not with Export one, which uses Phantomjs engine:

    $report->cloudExport("MyReportPDF")
    ->chromeHeadlessio($secretToken)
    ->settings($settings)
    ->pdf(array(
        // "noRepeatTableHeader" => true //by default table header is repeated
        // "noRepeatTableFooter" => true //by default table footer is repeated
    ))
    ...
AhmedHaroon commented on Feb 27, 2023

thank you @Sebastian Morales for reply.

when i am trying to export using cloudExport as advised, it is showing timout error. i have entered the Token Key but it is showing as below screenshot:

public function DownloadPDF() {

        $filename =  'customer_summary_'.date("Y-d-m").'_'.date("h-i-s").'.pdf';

        $report = new \App\reports\CustomerSummary;
        $report->run()
        ->cloudExport('CustomerSummaryPdf')
        ->chromeHeadlessio($token)
        ->settings([
            "pageWaiting"=>"load", // load, domcontentloaded, networkidle0, networkidle2
            "useLocalTempFolder" => true,
            "autoDeleteLocalTempFile" => true,
            "serviceHost" => "localhost", // default value: https://service.chromeheadless.io
            "serviceUrl" => "localhost:8080/api/export",
            ])
        ->pdf()
        ->toBrowser($filename);
    }

note: modified some characters from Token Key intentionally.

regards

Sebastian Morales commented on Feb 28, 2023

Pls comment out these lines to use our cloud export server:

            // "serviceHost" => "localhost", // default value: https://service.chromeheadless.io
            // "serviceUrl" => "localhost:8080/api/export",

Those localhost lines are only for a local export server already installed.

AhmedHaroon commented on Feb 28, 2023

@Sebastian Morales

after comment out both lines, still receiving same time out error.

those settings i found here: cloudexport at github

please advise.

regards

note: i am using same Token key as i was using yesterday, is it valid yet?

Sebastian Morales commented on Mar 1, 2023

Pls try these methods:

1 . Use a very simple pdf view file, for example only a string such as "Hello world" and see if cloud export works for that. 2 . If yes, increase your PHP executation to more than 60 seconds, for example 300 seconds, for your more complicated pdf view.

One notice for pdf export is that you should use a production web server such as Apache, Nginx, etc instead of PHP built-in web server such as Laravel artisan serve.

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
help needed

None