Browse Source

density

master
Klaus Wendel 2 years ago
parent
commit
40d96e32b9
  1. 8
      template.go

8
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,

Loading…
Cancel
Save