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