KoolReport's Forum

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

CloudExport failed to open stream error #1460

Closed Ardan Peddell opened this topic on on May 27, 2020 - 2 comments

Ardan Peddell commented on May 27, 2020

I've been trying to get CloudExport to correctly render some reports but although the PDF export does create a PDF file, the format is not as expected. I have tried using the examples as well but still have the same errors reported in nginx as follows:-

PHP message: PHP Warning:  file_get_contents(http://localhost/examples/reports/cloudexport/footer_header/79f8d1792bdcb90589020c91804479f2.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /home/Projects/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 187
PHP message: PHP Warning:  file_get_contents(http://localhost/examples/reports/cloudexport/footer_header/573fba7315e0423cce17cb649db3e70b.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /home/Projects/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 187
PHP message: PHP Warning:  file_get_contents(http://localhost/examples/reports/cloudexport/footer_header/7fbbf5c44b32b33abe39f384f0594337.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 in /home/Projects/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 187

The .js files are being created in the /tmp folder, but the error seems to mean that the URL path is not able to find them when generating the PDF. If I set 'useLocalTempFolder' => true', the error remains.

One of the main problems is that it seems the CSS are not being correctly applied, even though the normal view shows the page correctly.

Would appreciate some pointers. Thanks

David Winterburn commented on May 27, 2020

Hi Ardan,

The css and js files here actually are renamed from the real css and js files used by pdf view file. They have already been retrieved to a temp folder. To see css style enabled in the cloud export examples please either add Bootstrap css to the pdf view directly or add the following line to the report:

class SalesQuarters extends koolreport\KoolReport
{
    use \koolreport\clients\Bootstrap; //add Bootstrap theme to report
    ...

Let us know how it works for you. Thanks!

Ardan Peddell commented on May 28, 2020

Hi David, Your suggestion worked for some of the elements such as Chart and Table, however SimpleCard would not render. I then added the direct links to the local assets in the pdf.view file and I think it's working as expected now.
Many thanks for the help

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

CloudExport