This commit is contained in:
@@ -42,25 +42,24 @@ def generate_html_contract(
|
|||||||
contract_payment_method={"cheque": "chèque", "transfer": "virements"}[contract.payment_method],
|
contract_payment_method={"cheque": "chèque", "transfer": "virements"}[contract.payment_method],
|
||||||
cheques=cheques
|
cheques=cheques
|
||||||
)
|
)
|
||||||
options = {
|
# options = {
|
||||||
'page-size': 'Letter',
|
# 'page-size': 'Letter',
|
||||||
'margin-top': '0.5in',
|
# 'margin-top': '0.5in',
|
||||||
'margin-right': '0.5in',
|
# 'margin-right': '0.5in',
|
||||||
'margin-bottom': '0.5in',
|
# 'margin-bottom': '0.5in',
|
||||||
'margin-left': '0.5in',
|
# 'margin-left': '0.5in',
|
||||||
'encoding': "UTF-8",
|
# 'encoding': "UTF-8",
|
||||||
'print-media-type': True,
|
# 'print-media-type': True,
|
||||||
"disable-javascript": True,
|
# "disable-javascript": True,
|
||||||
"disable-external-links": True,
|
# "disable-external-links": True,
|
||||||
'enable-local-file-access': False,
|
# 'enable-local-file-access': False,
|
||||||
"disable-local-file-access": True,
|
# "disable-local-file-access": True,
|
||||||
"no-images": True,
|
# "no-images": True,
|
||||||
}
|
# }
|
||||||
|
|
||||||
return HTML(
|
return HTML(
|
||||||
string=output_text,
|
string=output_text,
|
||||||
base_url=template_dir,
|
base_url=template_dir,
|
||||||
**options
|
|
||||||
).write_pdf()
|
).write_pdf()
|
||||||
|
|
||||||
from odfdo import Document, Table, Row, Cell
|
from odfdo import Document, Table, Row, Cell
|
||||||
|
|||||||
Reference in New Issue
Block a user