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

Invalid XREF Table #2850

Closed
jappyjan opened this issue Aug 14, 2020 · 3 comments · Fixed by #2866
Closed

Invalid XREF Table #2850

jappyjan opened this issue Aug 14, 2020 · 3 comments · Fixed by #2866

Comments

@jappyjan
Copy link

I'm trying to use exiftool (https://exiftool.org/) to change the exif data of a PDF generated via jsPDF.
This operation fails with the error message "Invalid xref table".
Seems like jsPDF somehow creates a corrupted xref table?

The generated PDF is attached here:
test - 14-08-2020 10-57-44 - Bauzeitenplan.pdf

@HackbrettXXX
Copy link
Collaborator

Seems like there is in fact an error in the xref table jsPDF generates. It seems to be missing a space character between the "n" and the linefeed character:

xref
0 24
0000000000 65535 f
0000087474 00000 n
0000089381 00000 n
0000000015 00000 n

I modified your file:
test.-.14-08-2020.10-57-44.-.Bauzeitenplan.pdf. Could you test if this file works with the exif tool? If yes, I'm gonna fix that issue.

@jappyjan
Copy link
Author

yes it works!
thanks for the very quick reply!

@HackbrettXXX
Copy link
Collaborator

Awesome. I'll prepare a pull request.

HackbrettXXX added a commit to HackbrettXXX/jsPDF that referenced this issue Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants