Open rorycl opened 4 years ago
Finding this same issue as well as the "panic: runtime error: invalid memory address or nil pointer dereference" with differents pdfs
Actually this now errors differently for me!
The errors are:
panic: Failed to initialize parser: Failed to read pdf: Failed to read xref table: Failed to read prev xref: Unsupported /DecodeParms - only tested with /Columns <= 4 and /Predictor <= 12
Please see below
go run main.go
go: finding module for package github.com/phpdave11/gofpdf
go: finding module for package rsc.io/pdf
go: finding module for package github.com/phpdave11/gofpdf/contrib/gofpdi
go: found github.com/phpdave11/gofpdf in github.com/phpdave11/gofpdf v1.4.2
go: found github.com/phpdave11/gofpdf/contrib/gofpdi in github.com/phpdave11/gofpdf v1.4.2
go: found rsc.io/pdf in rsc.io/pdf v0.1.1
go: downloading github.com/phpdave11/gofpdi v1.0.12
Example PDF from http://www.campbell-lange.net/media/files/example_2020a.pdf
file: /tmp/pdfexample-077686676
pages: 3
panic: Failed to initialize parser: Failed to read pdf: Failed to read xref table: Failed to read prev xref: Unsupported /DecodeParms - only tested with /Columns <= 4 and /Predictor <= 12
goroutine 1 [running]:
github.com/phpdave11/gofpdi.(*Importer).SetSourceFile(0xc000139740, 0xc00028a0a0, 0x19)
/home/rory/go/pkg/mod/github.com/phpdave11/gofpdi@v1.0.12/importer.go:69 +0x219
github.com/phpdave11/gofpdf/contrib/gofpdi.(*Importer).ImportPage(0xc00011c590, 0x7f0620, 0xc0002dc000, 0xc00028a0a0, 0x19, 0x1, 0x77574a, 0x9, 0x4083b88b1c22f64f)
/home/rory/go/pkg/mod/github.com/phpdave11/gofpdf@v1.4.2/contrib/gofpdi/gofpdi.go:43 +0x46
github.com/phpdave11/gofpdf/contrib/gofpdi.ImportPage(...)
/home/rory/go/pkg/mod/github.com/phpdave11/gofpdf@v1.4.2/contrib/gofpdi/gofpdi.go:115
main.main()
/tmp/s/main.go:65 +0x3cc
exit status 2
By the way I've stuck the test file in the attachment since I've failed to paste it all in above. main.go.txt
see #16
Hi @phpdave11
I'm getting the following error on 1.0.13:
I get this error with a number of large PDFs (such as books) and PDFs made with Google Docs.
How to reproduce:
Thanks for your efforts! Rory