custom pageSize
This commit is contained in:
parent
51c8acf9f7
commit
7be8a8ce94
7
fpdf.go
7
fpdf.go
|
@ -3495,18 +3495,15 @@ func (f *Fpdf) getpagesizestr(sizeStr string) (size SizeType) {
|
||||||
)
|
)
|
||||||
aString = strings.SplitN(sizeStr, "x", 2)
|
aString = strings.SplitN(sizeStr, "x", 2)
|
||||||
|
|
||||||
fmt.Println("HALLO")
|
//fmt.Println(aString[0], aString[1])
|
||||||
fmt.Println(aString[0], aString[1])
|
|
||||||
|
|
||||||
for i := 0; i <= 1; i++ {
|
for i := 0; i <= 1; i++ {
|
||||||
aFloat[i], aErr = strconv.ParseFloat(aString[i], 64)
|
aFloat[i], aErr = strconv.ParseFloat(aString[i], 64)
|
||||||
if aErr != nil {
|
if aErr != nil {
|
||||||
f.err = fmt.Errorf("anknown page size %s", sizeStr)
|
f.err = fmt.Errorf("unknown page size %s", sizeStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size, ok = SizeType{aFloat[0], aFloat[1]}, true
|
size, ok = SizeType{aFloat[0], aFloat[1]}, true
|
||||||
//size, ok = SizeType{250.01, 250.01}, true
|
|
||||||
} else {
|
} else {
|
||||||
//20210302 archium addendum end
|
//20210302 archium addendum end
|
||||||
size, ok = f.stdPageSizes[sizeStr]
|
size, ok = f.stdPageSizes[sizeStr]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user