KoolReport's Forum

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

PDF Export on server #1269

Closed najam opened this topic on on Jan 22, 2020 - 9 comments

najam commented on Jan 22, 2020

Hi Support,

I am using koolreprot Export package. All the settings are perfect and pdf is exported successfully with the same settings as I coded. This is true for my local system (Mac osx)

The problem arises when I deploy the same code base into Linux server. There PDF is also generated successfully. The issue is that the format of the resulted PDF is not as I want. Font size reduced to almost 7px, headers are appearing twice, footer is missing. All headings which are centered aligned are on the left most side of the page.

Even page size is not what I set in the code.

I have no idea why this is happening as the same code is working 100% on my local machine. Phantomjs is also working as I can generate PDF successfully.

Report generated on Server from same code, see screen shot.

Server Generated

Local System

Report generated on my local system from same code, screen shot

KoolReport commented on Jan 22, 2020

It seems to me the css style is lost in linux server, do you use any kind of port in url in linux server?

najam commented on Jan 23, 2020

Hi,

No, I am not using any port in url. Apache2 deployed on linux is using default port.

Also, all css files are accessible from browser. URLs to CSS files are accessible properly. There is no console error for CSS, JS or Jquery. All is clean

najam commented on Jan 23, 2020

Is there any solution? I spent whole day in finding a way to fix it.

The odd part is there is no clue in any log file.

KoolReport commented on Jan 24, 2020

Sorry for our late reply. I actually sent your case to dev.team if they have any idea. So if you instead of generating pdf, you render() report with the Pdf view, what will happens on your server. Does the page render correctly.

najam commented on Jan 25, 2020

With render the browser shows report view without any break down. Just like view of the report

KoolReport commented on Jan 27, 2020

When you start phantomjs, it is like you open a browser on your server, and the browser will try to access itself through domain name. Could you please check if from your server you ca wget a resource file:

wget https://www.yourdomain.com/assets/any.css

is it able to load the any.css file ( please replace with real css file). Please let me know.

najam commented on Jan 28, 2020

CSS file was successfully downloaded to my local system. http://edispatch.test.com/assets//bootstrap/css/bootstrap.min.css

najam commented on Jan 28, 2020

You can see form attachment that

  • Report Header is Correct. Left and Right header font and location is correct.
  • Report title is correct with respect to Font and Style (bold)
  • Table header is correct font is bold

but over all content area is too narrowed an all text move to the left side of screen this is not correct. Also the font size of content is too small its not 12px. table style is not applied. Rows too narrowed without row divider.

Report

Same Report from my local system with zero code change

Real

David Winterburn commented on Feb 3, 2020

Hi Najam,

I see that you could access the CSS files on your local system but can you access them on your Linux server? Please SSH to your server via command line and use wget command to get the CSS files.

I have issue with retrieving this CSS file of yours due to certificate issue:

http://edispatch.test.com/assets//bootstrap/css/bootstrap.min.css

For experiment, I would suggest you try this standard CDN bootstrap css link to see how it works when printing PDF:

https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css

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

Export