pdf-l4 icon indicating copy to clipboard operation
pdf-l4 copied to clipboard

Strange behavior with CSS and Homestead

Open psychonetic opened this issue 10 years ago • 1 comments

I try to generate pdf files in homestead, but when I try to use a CSS File inside the HTML it doesn't work. The pdf class just renders the pdf without any css.

The strange thing is: on Windows it's working perfectly (using XAMPP), also on my MacBook with MAMP. But when I try to use homestead on my MacBook, the css rules are never applied, just the plain text is rendering.

Also strange is, if I output the html before rendering to pdf, the html is correct with all css rules etc. But the pdf is again just plain text.

The CSS also works if I putting it directly within the html file via. style attribute into the head.

So does anybody have the same problem or any suggestions?

psychonetic avatar Sep 07 '14 10:09 psychonetic

The link to the css expects to be viewed from 'outside' the vm (ie port 8000) so when the pdf is rendered from within the vm it fails to load the css. I have the same issue with images. Not worked round it as yet.

warksit avatar Oct 13 '14 16:10 warksit