custom pageSize
This commit is contained in:
parent
1b604ef5f5
commit
7ff87b4f7a
4
fpdf.go
4
fpdf.go
|
@ -126,7 +126,7 @@ func fpdfNew(orientationStr, unitStr, sizeStr, fontDirStr string, size SizeType)
|
|||
case "pt", "point":
|
||||
f.k = 1.0
|
||||
case "mm":
|
||||
f.k = 72.0 / 25.4
|
||||
a = 72.0 / 25.4
|
||||
case "cm":
|
||||
f.k = 72.0 / 2.54
|
||||
case "in", "inch":
|
||||
|
@ -3503,7 +3503,7 @@ func (f *Fpdf) getpagesizestr(sizeStr string) (size SizeType) {
|
|||
f.err = fmt.Errorf("unknown page size %s", sizeStr)
|
||||
}
|
||||
}
|
||||
size, ok = SizeType{aFloat[0], aFloat[1]}, false
|
||||
size, ok = SizeType{aFloat[0] * f.k, aFloat[1] * f.k}, true
|
||||
} else {
|
||||
//20210302 archium addendum end
|
||||
size, ok = f.stdPageSizes[sizeStr]
|
||||
|
|
Loading…
Reference in New Issue
Block a user