私は、背景イメージの上にテキストを配置するためにcssスタイルを使用するOdoo 9に関する新しいレポートを作成しています。画像は背景にあり、余白なしでフルA4ページを占有します。Odoo 9 cssが動作しないカスタムqwebレポート
htmlではうまくいきます。しかし、私はPDFにレポートを印刷するとき、私は左右に余白があり、テキストは背景画像の下になります。 CSSルールは適用されていないようです。 PDFで動作させるための解決策はありますか?
<template id="sub_proposal">
<style type="text/css">
.container {
padding: 0mm;
}
#sponsor-ref {
position: absolute;
top: 84mm;
left: 45mm;
}
#form_image {
position: absolute;
top: 0mm;
left: 0mm;
width: 210mm;
height: 297mm;
}
#form_image img {
max-width: 100%;
max-height: 100%;
margin: auto;
}
</style>
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<div class="page">
<div id="form_image">
<span t-field="o.sub_proposal_form" t-field-options='{"widget": "image"}'/>
</div>
<span id="sponsor-ref" t-field="o.ref"/>
</div>
</t>
</t>