pdfcpu
pdfcpu copied to clipboard
About the version of xRefTable
Thank you for submitting a possible bug!
Please ensure the following:
- Your issue is based on the latest commit
- State your OS and OS version - windows11
this my pdf file info
PDF version: | 1.7
this my code
pdfFile := "1.pdf"
// 将PDF页面渲染为图像
err := api.ExtractImagesFile(pdfFile, "./1.png", []string{"1"}, &model.Configuration{
WriteXRefStream: false,
})
if err != nil {
fmt.Fprintf(os.Stderr, "Extraction error: %v\n", err)
return
}
log
Extraction error: Read: xRefTable failed: parseTrailerDict: PDF1.4 conformant reader: found incompatible version: 1.7
change WriteXRefStream to true, result same
Did you ensure your input file passes validation?
pdfcpu val in.pdf
This file's trailer seems to be corrupted somehow. Working on the assumption that you can open this file with A.Preview or A.Reader.. If you can share the file I will look into this and provide a fix. Thank you!