Browse Source

custom pageSize

master
Klaus Wendel 1 year ago
parent
commit
7ff87b4f7a
  1. 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…
Cancel
Save