How can I add a CSS to the PDF exports programatically?

Hi,
I generate a diff with our plugin’s report macro (Requirement Yogi). On the page, it displays properly, with green for added text (.diff-html-added) and red+strikethrough for removed text (.diff-html-removed).

It seems those CSS aren’t included when exporting to PDF, so I’d like to include a CSS from our plugin. Is it possible to include a CSS for PDF export, like this:

    <web-resource key="some-key" name="CSS for the PDF export">
        <resource name="requirement-yogi-pdf.css" type="download" location="css/requirement-yogi-pdf.css"/>
        <context>pdf</context>
    </web-resource>

Is there something like this?

Thank you,
Adrien Ragot, from Requirement Yogi

1 Like