Events Made Easy Forums How do I … CSS in pdf-template

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #63285
    Thorsten
    Participant

    Hello again,
    I’m trying to adapt the template of a PDF-file with CSS. But I can only manage to integrate CSS into each single tag. How can I use a general stylesheet or where can I find information on how I can also design the PDF file optically?
    Thanks very much.

    #63286
    Franky
    Keymaster

    EME uses dompdf for PDF generation, so this is more a question for dompdf. If I look around a bit, I find this:
    https://stackoverflow.com/questions/54653906/add-css-to-dompdf
    so: maybe adding something like
    <link type="text/css" media="dompdf" href="http://my/path/to/pdf.css" rel="stylesheet" />
    to your pdf html template in EME might help. If that gets filtered out again upon save, you can go in the EME settings, tab “Other” and set “link,type,media,href,rel” as an accepted html tag (+attributes) in “Extra html tags”

    #63287
    Thorsten
    Participant

    Thank you very much again, Franky. That works great.
    It’s a bit of a hassle since the CSS can’t be edited from within EME-Module, but it works great at the moment.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.