This commit is contained in:
Klaus Wendel, archium GmbH 2021-03-03 09:34:21 +01:00
parent 19a2fa1799
commit 8ebf9d1b9d
1 changed files with 3 additions and 3 deletions

View File

@ -24,12 +24,12 @@ import (
// CreateTemplate defines a new template using the current page size.
func (f *Fpdf) CreateTemplate(fn func(*Tpl)) Template {
return newTpl(PointType{0, 0}, f.curPageSize, f.defOrientation, f.unitStr, f.fontDirStr, fn, f)
return newTpl(PointType{0, 0}, f.curPageSize, f.defOrientation, f.unitStr, f.fontDirStr, f.density, fn, f)
}
// CreateTemplateCustom starts a template, using the given bounds.
func (f *Fpdf) CreateTemplateCustom(corner PointType, size SizeType, fn func(*Tpl)) Template {
return newTpl(corner, size, f.defOrientation, f.unitStr, f.fontDirStr, fn, f)
return newTpl(corner, size, f.defOrientation, f.unitStr, f.fontDirStr, f.density, fn, f)
}
// CreateTemplate creates a template that is not attached to any document.
@ -49,7 +49,7 @@ func CreateTemplate(corner PointType, size SizeType, unitStr, fontDirStr string,
}
// CreateTpl creates a template not attached to any document
func CreateTpl(corner PointType, size SizeType, orientationStr, unitStr, fontDirStr string, fn func(*Tpl)) Template {
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)
}