I want to change my report paper size dynamically while printing pdf report. Like I have type in my object. When type change then, I want to change my report margin(top, bottom, left, right) which value configure as per margin.
Thanks for your valuable help
You can override the method that calls
wkhtmltopdf
and manipulate the parameters passed there. Seeodoo.addons.report.models.report.get_pdf
function. You can override this, check your variable and call_run_wkhtmltopdf
with different arguments.It does not sound like a good idea though and you would be better off creating multiple paper format records and using them accordingly