Skip to content

Full bleed background color #77

@jkjustjoshing

Description

@jkjustjoshing

Problem

I'm trying to build a PDF that has a colored background, but I don't believe that's currently possible with this library.

Adding background color to user_css gives me a background color, just not full-bleed to the edge of the page. I've tried setting margins to 0 on body, html, and @page, and setting width/height to 100%. I also can't get the background color to take the entire height of the page, if the content is only part of the page.

Request

When creating a Section(), it should have a background_color option. If it's set, when creating a new PDF page, first draw a rectangle with that background color before populating the page with anything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions