Attach custom css library to entity print output I need to attach custom css library so entity_print module uses it to generate the final PDF.

The goal is to get custom css effect the generated PDF at  /print/pdf/node/{{NID}}

I have set the PDF engine to mpdf under entity print configuration

I tried the following 2 methods unsuccessfully :


Attach to node.html.twig file using {{attach_library('THEMENAME/library_name')}}
Attach it to entity_print at THEMENAME.info.yml file per described at https://www.drupal.org/node/2706755


I don't see the attached css at /print/pdf/node/{{NID}}/debug when inspecting elements

Any help or pointers are appreciated.
I am answering my own question for the ones who might probably face similar issues.

The 2nd method as described at https://www.drupal.org/node/2706755 where we attach the library to entity_print works.

I had a custom entity-print--node.html.twig in which I missed printing the css styles using the variable {{ entity_print_css }}