I'm generating an pdf with xhtml2pdf
library, and I have a strange situation regarding background image.
Image is displayed but it does not fit the @page
, it's setup something like this
@page {
size: {% block page_size %}A4 {% endblock %};
background: url("{% static 'folder/background.png' %}") no-repeat center center fixed;
@frame content_farme {
margin-top: 70pt;
margin-bottom: 60pt;
margin-left: 30pt;
margin-right: 30pt;
@bottom-right {
font-size: 10px;
margin: 40pt -10pt 0 0;
{% block page_foot_extra_styles %}{% endblock %}
content: {% block page_foot %}"Page " counter(page) " of " counter(pages){% endblock %};
}
@top-left {
font-size: 10px;
font-weight: bold;
{% block page_header_extra_styles %}{% endblock %}
content: {% block page_head %}{% endblock %};
}
}
}
I want it to be placed in my @page
, I've tried everything, as I understand standard css
property are not working like it should, so how can I scale this background
in xhtml2pdf
there is a nice test file in docs but I didn't find it useful, did someone have this kind off issues, and how did you solved it.