0

I need to print Cart form view in drupal 8 site. I have installed Entity Print & Entity Print Views. I can generate pdf successfully using tcpdf pdf file or debug version does not considering css. How can I apply custom CSS to pdf file? So far I have added below code in mytheme.libraries.yml

  print-styling:
   css:
     theme:
        css/print-style.css: {}

and in entity_print.libraries.yml

css:
layout:
  css/entity-print.css: {}
theme:
  css/entity-print.css: {}

And added custom css in entity-print.css, Enable Default CSS checkboox is not checked, added {{ entity_print_css }} brfore </head> in twig file. Still it is not working Edited: Passing inline CSS is working for debug version but not in pdf

2
  • Does tcpdf even allow you to style the output? How are you testing the print css? Do you see the changes when you Print preview in your browser?
    – prkos
    Commented May 21, 2019 at 20:24
  • no, I can not see the css changes in browser
    – softech
    Commented May 22, 2019 at 9:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.