def get_print(doctype=None, name=None, print_format=None, style=None, html=None, as_pdf=False, doc=None, output=None):
 from frappe.website.render import build_page
 from frappe.utils.pdf import get_pdf
 local.form_dict.doctype = doctype
 local.form_dict.name = name
 local.form_dict.format = print_format
 local.form_dict.style = style
 local.form_dict.doc = doc
 if (not html):
  html = build_page(u'print')
 if as_pdf:
  return get_pdf(html, output=output)
 else:
  return html

def get_print ( doctype = None , name = None , print_format = None , style = None , html = None , as_pdf = False , doc = None , output = None ) : from frappe . website . render import build_page from frappe . utils . pdf import get_pdf local . form_dict . doctype = doctype local . form_dict . name = name local . form_dict . format = print_format local . form_dict . style = style local . form_dict . doc = doc if ( not html ) : html = build_page ( u'print' ) if as_pdf : return get_pdf ( html , output = output ) else : return html
get print format for given document .