• Resolved Duuk

    (@duuk)


    I love your plugin – very straightforward and it works.

    I do however, wish to be able to modify the style of the output. You state that you load the website style sheet, but I’m not seeing that happen.

    In the dkpdf-index.php, you had one css line. I’ve tried adding a second as well to resolve this. Neither seem to load:

    <link type="text/css" rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" media="all" />
    <link type="text/css" rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>"/print.css" media="all" />

    Would you have any idea why it wouldn’t be? An example of the problem can be seen if you go to https://mormonbandwagon.com/krokie/letter-to-bishop-stake-president/ and then compare it to the pdf output upon pressing the PDF button.

    For example, I want a sans font output, not serif.

    Alternatively, adding a css block as an option within the admin panel may be helpful for making similar tweaks, in an either way than modifying the template.

    Thanks again.

    https://www.ads-software.com/plugins/dk-pdf/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author dinamiko

    (@dinamiko)

    Hi Duuk,

    Actually the output of the PDF is a mix between mPDF library default CSS and your Theme CSS. mPDF CSS has priority over plugin CSS so actually the CSS in the templates is just for basic things like pdf background color.

    Are you using a Child Theme? If so, just copy all the parent Theme CSS styles to the Child Theme. Right now this is the only way for getting the theme CSS in the PDF.

    About adding fonts, this is not implemented in the plugin, I’ve planned maybe doing an Pro Addon for this. In the meanwhile you can do it manually:
    https://mpdf1.com/manual/index.php?tid=501

    Best.

    Thread Starter Duuk

    (@duuk)

    Thanks. You are correct that the parent theme css was not loading.

    I’ve mentioned it before but it would be great to have a CSS input field on the plugin settings page. That way the styles would remain safe in case the theme is changed or updated (some people really don’t use child themes).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘css doesn't seem to be loading’ is closed to new replies.