From 40d96e32b9c1dab220478f3f96f645fb089554da Mon Sep 17 00:00:00 2001 From: Barpfotenbaer Date: Wed, 3 Mar 2021 09:35:38 +0100 Subject: [PATCH] density --- template.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template.go b/template.go index 0f3caca..9794b64 100644 --- a/template.go +++ b/template.go @@ -39,18 +39,18 @@ func (f *Fpdf) CreateTemplateCustom(corner PointType, size SizeType, fn func(*Tp // landscape mode. This causes problems when placing the template in a master // document where this condition does not apply. CreateTpl() is a similar // function that lets you specify the orientation to avoid this problem. -func CreateTemplate(corner PointType, size SizeType, unitStr, fontDirStr string, fn func(*Tpl)) Template { +func CreateTemplate(corner PointType, size SizeType, unitStr, fontDirStr string, density float64, fn func(*Tpl)) Template { orientationStr := "p" if size.Wd > size.Ht { orientationStr = "l" } - return CreateTpl(corner, size, orientationStr, unitStr, fontDirStr, fn) + return CreateTpl(corner, size, orientationStr, unitStr, fontDirStr, density, fn) } // CreateTpl creates a template not attached to any document -func CreateTpl(corner PointType, size SizeType, orientationStr, unitStr, fontDirStr string,f.density, fn func(*Tpl)) Template { - return newTpl(corner, size, orientationStr, unitStr, fontDirStr, fn, nil) +func CreateTpl(corner PointType, size SizeType, orientationStr, unitStr, fontDirStr string, density float64, fn func(*Tpl)) Template { + return newTpl(corner, size, orientationStr, unitStr, fontDirStr, density, fn, nil) } // UseTemplate adds a template to the current page or another template,