custom pageSize

This commit is contained in:
Klaus Wendel, archium GmbH 2021-03-02 16:07:17 +01:00
parent 1b604ef5f5
commit 7ff87b4f7a
1 changed files with 2 additions and 2 deletions

View File

@ -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]