-
Notifications
You must be signed in to change notification settings - Fork 257
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
PDF image file processing issue: bad RST marker error #15
Comments
Confirmed that this is still an issue in golang 1.12.4 |
The Go project is in no particular hurry to fix this. Would it be possible to make a workaround for this? For instance to add a version of |
Coincidentally, I am away from PDF this month working on image processing. Which Go JPEG decoder(s) do you recommend? |
In my current situation: any decoder that would do the job. :-). I don't have a particular preference. The reason I think extracting the raw data might be a good way to do this is so the user can choose what to do. Ideally you would always want to use the standard library rather than add another dependency to maintain. But I've seen very old bug reports on the RST marker issue, and as I mentioned, it doesn't look like anyone is in any hurry to fix it in the standard library. By adding the ability to extract images as just raw data you would broaden the API, but on the other hand, you wouldn't have to choose between JPEG decoders - potentially having to add another dependency. If it is an easy fix one might be able to detect the problem and repair the JPEG prior to parsing it, but I haven't investigated this. It might take longer to do? |
@borud There is already a way to change the image handling. By setting the model package We may at some point consider addressing those image handling issues, however, we have not really had any complaints from our customers at this point. The reason we had the interface implementation design is because we felt the performance of the standard library is rather poor in many cases in comparison to some C libraries. It might also be a good idea to extract the problematic images and submit issues on the golang repository to encourage that those issues get addressed. |
Might be fixed in 1.15 ? Issue golang/go#28717 has been closed |
@gunnsth This issue is not yet fixed even on the Go version 1.22.5. But it should be fixed with Go 1.23, I've tested it using version 1.23rc2 and it worked fine. This is the output of using pdf_extract_images.go: using Go 1.22.5
using Go 1.23rc2
Here's the extraction result mfp.zip |
OK great, probably related to golang/go#40130 which appears fixed in 1.23 |
Reported by Peter Williams:
MFP Scan.pdf
The text was updated successfully, but these errors were encountered: