[New Feature Proposal] doc other than doctype wise default print format based on condition

@ankush

can you help to pickup my rejected PR https://github.com/frappe/frappe/pull/15350, polish and merge it to the core?

thanks.