Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the version of xRefTable #846

Open
jimbirthday opened this issue Apr 1, 2024 · 3 comments
Open

About the version of xRefTable #846

jimbirthday opened this issue Apr 1, 2024 · 3 comments
Assignees

Comments

@jimbirthday
Copy link

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

@jimbirthday
Copy link
Author

image
change WriteXRefStream to true, result same

@hhrutter
Copy link
Collaborator

hhrutter commented Apr 3, 2024

Did you ensure your input file passes validation?
pdfcpu val in.pdf

@hhrutter
Copy link
Collaborator

hhrutter commented Apr 6, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants