Closed shockerjue closed 1 year ago
This needs more information, does it happens with every file, etc, just pasting one line of your code is not enough. Sorry, I don't have time to support your issue. You can reopen it if you have more information, thanks.
for i := 0; i < doc.NumPage() - 1; i++ { img, err := doc.Image(i) if nil != err { continue } }
panic: runtime error: gobytes: length out of range
goroutine 163 [running]: github.com/gen2brain/go-fitz._Cfunc_GoBytes(...) _cgo_gotypes.go:927 github.com/gen2brain/go-fitz.(Document).ImageDPI.func13(0xc0009c0080?, {0x2802bcc0?, 0x7fcf?, 0x0?, 0x40855555?}) /opt/go/pkg/mod/github.com/gen2brain/go-fitz@v1.20.2/fitz.go:226 +0x4f github.com/gen2brain/go-fitz.(Document).ImageDPI(0xc0009c0080, 0x0, 0x4072c00000000000) /opt/go/pkg/mod/github.com/gen2brain/go-fitz@v1.20.2/fitz.go:226 +0x412 github.com/gen2brain/go-fitz.(*Document).Image(...) /opt/go/pkg/mod/github.com/gen2brain/go-fitz@v1.20.2/fitz.go:177 crontask/reading.Reading.pdf({}, {0x17bdf97, 0x2}, {0xc000a88300, 0x56})