Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

CSS from external style sheet not applied to div on debian squeeze #10392

Closed
dfrankow opened this issue Feb 22, 2012 · 5 comments
Closed

CSS from external style sheet not applied to div on debian squeeze #10392

dfrankow opened this issue Feb 22, 2012 · 5 comments
Labels

Comments

@dfrankow
Copy link

dfran...@gmail.com commented:

Which version of PhantomJS are you using?

1.4.1

What steps will reproduce the problem?

  1. Build phantomjs.
  2. Untar the attached tarball.
  3. cd flotbug2.
  4. phantomjs rasterize.js flot1b.htm flot1b.png

There is an error message to the console:

"undefined:0: Invalid dimensions for plot, width = 584, height = 0"

What is the expected output? What do you see instead?

Expected: flot1b.png should have a bar chart

In fact, flot1b.htm shows a bar chart in Firefox and Chromium.

Actual: Blank white png.

Which operating system are you using?

debian squeeze

$ uname -a
Linux dandebian 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.4 (squeeze)
Release: 6.0.4
Codename: squeeze

Did you use binary PhantomJS or did you compile it from source?

Compiled from source.

Please provide any additional information below.

flot1.htm and flot1a.htm both convert properly to png.

The difference is that flot1b.htm is referring to an external stylesheet (graph.css). For flot1b.htm, the width and height from graph.css is not being applied to the div with class "graph_class". When Flot encounters a div with height 0, it doesn't know how to plot to it, and errors out.

This bug does NOT show up on OS X (i.e. I see the graph, though with an unexpected background color). So there is probably something broken about applying external stylesheet on debian squeeze.

Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #392.
🌟   6 people had starred this issue at the time of migration.

@dfrankow
Copy link
Author

dfran...@gmail.com commented:

This bug also affects wkhtmltopdf, also only on debian.

That might point to a WebKit issue.

@ariya
Copy link
Owner

ariya commented Dec 10, 2012

soul...@gmail.com commented:

Actuallty I have the same issue. When I inject external css into the document and then I call render method it into the png file it's without styling.

@coder1996
Copy link

Hi,

I am facing a similar issue where I am trying to convert a html page to pdf.

Please note I am not on debian but on RHEL 2.6.18-128.1.6.el5 and using phantomJS 1.9.1.

The page and the images get converted correctly, but the pdf is missing all the styling. I have verified using the onResourceRequested event handler that the css is indeed getting downloaded.

Is there any way to apply the styling from a local file?

Thanks in advance.

@anvilvapre
Copy link

Same problem here.
Compiled from source.
Version 1.9.1
RH 6.6
Screenshot of page shows a plain html page with no css styling.

@ghost ghost removed old.Priority-Medium labels Dec 19, 2017
@stale stale bot added the stale label Dec 26, 2019
@stale
Copy link

stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants