html - wkhtmltopdf print-media-type uses @media print ONLY and ignores the rest -


i have html file uses 1 css file. inside file @ bottom use styles need applied printer version of page

@media print{    ....print styles here... } 

when call wkhtmltopdf --print-media-type input.html output.pdf, renders pdf styles in @media print enclosure , ignores rest of styles - not have @media type specified

is normal, or doing wrong here? need specify styles print inside @media print?

wkhtmltopdf has argument --print-media-type can pass. here c# code example using nreco (for illustrative purposes only), parameter should work in same way:

        var converter = new nreco.pdfgenerator.htmltopdfconverter();         converter.customwkhtmlargs = "--print-media-type";         var pdfbytes = converter.generatepdf(html);         return pdfbytes; 

this works fine me in c# using nreco use print media css, , takes account css not inside @media block too, such font-size of h3. try changing size of text or similar , see if change reflected.