0

I'm running server in Node.js that use PhantomJS webkit as non-browser service. My purpose is to extract graphs/ data tables from Kibana dashboards, using snapshot URL, render it, and send it as base 64 mail content to Outlook server

My problem is that I can't custom font-size. Both in CSS file or in the body parameters for PhanthomJS markup file (it's the Email final markup)

The thing is that I can customize CSS properties for graphs, E.g. width & height, but all that refer to text I can't

Next is part of the function that takes part in the viewport:

page.property('viewportSize', { width: 7000, height: 5120, font: 100});

Any key that I'll put, won't make any change in the font - font, fontSize, font-size.

Also when trying to add CSS file the class from Kibana:

.tick text {font-size: 50px;}

Nothing happens (this class refer to the text over X axis in bar chart)

My incoming mail looks like this:

enter image description here

As it can see, the proportion between the graph and text are bad

PhantomJS version: 2.1.16

Any idea?

VLAZ
  • 26,331
  • 9
  • 49
  • 67
Aviv Cohen
  • 69
  • 6
  • Give this a shot: https://css-tricks.com/when-using-important-is-the-right-choice/ – Will Jun 13 '17 at 19:43
  • Hi @Will - tnx for the tip. I've tried it but the thing is that it's reading the css after the PhantomJS code so no effect. I need a markup for the PhantomJS function – Aviv Cohen Jun 14 '17 at 06:40
  • Well..... I've tried to manipulate the DOM before the page is render. No change even when adding styling objects – Aviv Cohen Jun 22 '17 at 08:33

0 Answers0