Window.printToPDF does not include css style in pdf file?


#1

I have an express + angular2 application in which I’m loading my express instance

window.loadURL(‘http://localhost:3000’);

when I’m trying to print to pdf any page. pdf generated with plain HTML only no style.

but if I load any html file statically its printing with css style.

like window.loadURL('file://+ __dirname + ‘/views/index.html’);

then if I print this page then in pdf style is there but with my express served page is not working fine

any idea guys !!
Thank you