I needs to customize the css by using table values from DB in ROR. So far i'am able to pass the value and set in css.erb file. Before printing the PDF in Chrome/Firefox styling is showing However when i print PDF, it's shown no styling.
For using ROR syntax, i have changed file type form .css to .css.erb
.div_to_print td{
vertical-align: <%= @style.align %>;
}
.img_wrap{
height:<%= @style.img_height%>pt;
width: <%= @style.img_width%>pt;
text-align: <%= @style.text_align %>;
}
.img_logo{
max-width: <%= @style.logo_width%>pt;
padding-right: <%= @style.logo_padding%>pt;
}
.img_preview{
max-width: <%= @style.img_width%>pt;
padding-right: <%= @style.img_padding%>pt;
}
I needs to apply css in browser print pdf option, by using values from table in ROR. enter image description here (In print preview, css is not working)
enter image description here(css is working)