def __init__(self, filename, **kwargs):
		pgsz = kwargs.pop('pagesize', 'a4')
		if pgsz in PAGE_SIZES:
			pgsz = PAGE_SIZES[pgsz][1]
		else:
			pgsz = pagesizes.A4
		orient = kwargs.pop('orientation', 'portrait')
		if orient in PAGE_ORIENTATIONS:
			pgsz = PAGE_ORIENTATIONS[orient][1](pgsz)
		kwargs['pagesize'] = pgsz
		kwargs['creator'] = 'NetProfile'
		req = kwargs.pop('request', None)
		if req:
			u = req.user
			if u:
				kwargs['author'] = (u.name_full + ' (' + u.login + ')').strip()

		super(DefaultDocTemplate, self).__init__(filename, **kwargs)

		fr_body = frames.Frame(
			self.leftMargin,
			self.bottomMargin,
			self.width,
			self.height,
			id='body'
		)
		fr_left = frames.Frame(
			self.leftMargin,
			self.bottomMargin,
			self.width / 2,
			self.height,
			rightPadding=12,
			id='left'
		)
		fr_right = frames.Frame(
			self.leftMargin + self.width / 2,
			self.bottomMargin,
			self.width / 2,
			self.height,
			leftPadding=12,
			id='right'
		)

		self.addPageTemplates((
			doctemplate.PageTemplate(id='default', pagesize=pgsz, frames=(fr_body,)), # onPage=callback
			doctemplate.PageTemplate(id='2columns', pagesize=pgsz, frames=(fr_left, fr_right))
		))