density
This commit is contained in:
		@@ -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
 | 
					// landscape mode. This causes problems when placing the template in a master
 | 
				
			||||||
// document where this condition does not apply. CreateTpl() is a similar
 | 
					// document where this condition does not apply. CreateTpl() is a similar
 | 
				
			||||||
// function that lets you specify the orientation to avoid this problem.
 | 
					// 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"
 | 
						orientationStr := "p"
 | 
				
			||||||
	if size.Wd > size.Ht {
 | 
						if size.Wd > size.Ht {
 | 
				
			||||||
		orientationStr = "l"
 | 
							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
 | 
					// 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 {
 | 
					func CreateTpl(corner PointType, size SizeType, orientationStr, unitStr, fontDirStr string, density float64, fn func(*Tpl)) Template {
 | 
				
			||||||
	return newTpl(corner, size, orientationStr, unitStr, fontDirStr, fn, nil)
 | 
						return newTpl(corner, size, orientationStr, unitStr, fontDirStr, density, fn, nil)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// UseTemplate adds a template to the current page or another template,
 | 
					// UseTemplate adds a template to the current page or another template,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user