Skip to content

cover.html page does not seem to respect mPDF styles #478

Open
@moninformateur

Description

@moninformateur

Greetings,

I've tried to make this work for hours to no avail. I am unable to locate what doesn't work

In my custom template's style.css, I have added this:

body {
  background-image: url("/lib/plugins/dw2pdf/tpl/NewTemplate/cover_background.jpg");
  background-image-resize: 6;
}

This is in respect to mPDF "supported-css" documentation regarding background images. The URL does works.

When exporting a PDF, the background works for:

  • even pages (TOC, Content pages)

The background does not work for:

  • the cover page
  • odd pages

Exemple PDF here: create_your_first_pages.pdf

Is there more documentation as to WHY this is the case, and HOW to define which pages will have a background?

Specifically, I'm trying to have a full page background on the cover page only. I have tried to add only this element with inline css, but again it is not honored

<div 
style="
background-image: url("/lib/plugins/dw2pdf/tpl/NewTemplate/cover_background.jpg");
background-image-resize: 6;
"></div>

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions