-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Getting error 'Invalid number of entries in field Widths' #125
Comments
What you can do immediately is to use If you just call The validation in As to the errors:
|
Thanks for the fast and thorough response! It's late on Friday here now so I'll make this brief but wanted to get back to you:
|
ad 3) I have pushed some changes to the devel branch, including the one the shows the invalid object. It would help if you could test this with your files to see what value that are using. ad 4) Yes, the Widths validation error is meant to still happen because it is really an error. |
@matpowel Have you tried the latest release 0.14.4? Is there anything else I can help you with in this regard? |
@matpowel Just a quick reminder: If you could run the latest version and report back the error with respect to |
Hey @gettalong, sorry about the delay and thanks for pursuing this. Yes we're on 0.14.4 in production now. I just checked our production logs and we are still seeing the occasional error like this one:
We do still occasionally get the Widths error. It doesn't seem to be mitigated by the PDF conversion we use but it is quite rare. We're not, however, seeing any of the oid,gen errors anymore. At least not within the retention range of our production logs. So that's great news! Matt |
@matpowel If you update to 0.15.0 the validation error for As for the |
@matpowel Is there still something to do on my side for this issue? |
@gettalong I can't see any record of those errors in the logs now, I believe we have a couple of weeks of retention so looking good! Thanks for chasing this up. We're on version 0.15.8 now btw. |
@matpowel Thanks for getting back to me - than I will close this issue now! Feel free to open a new one if something pops up! |
@gettalong I work with @matpowel We're running in to this issue again for a PDF using version 0.28.0 of HexaPDF. We can send you the file we are using via email. To reproduce the error:
Error stacktrace is:
|
Hi @joshkinabrew! Thanks for providing the invalid file. So inspecting the file shows that the In theory it is possible to inspect the font used by font object and re-generate the widths array. However, this is not that easy to implement and would also be quite slow. So I think the better way would be to try and correct these errors in situations that are easy to fix, like in this case, where all entries in |
Thanks for the explanation on that @gettalong! Regarding adding 600 value to the array, would you be able to provide some code to do that? Is that done in HexaPDF? We don't have control over the application that generated the PDF so we'd need to be able to handle situations like this inside our app. |
I will add that work-around to the validation code, so you would have nothing to do. |
Hi @gettalong , just checking on the status of this. I've tried v0.29.0 and it still throws the same error. |
@joshkinabrew Yes, I have not come around to implementing this, yet. So new release with the fix today or tomorrow! |
@joshkinabrew Just pushed 0.30.0 with the fix. |
@gettalong you are awesome! Thanks so much. The PDF now shows as valid and we're able to delete pages. |
Our production app is getting a lot of errors around processing PDFs. I want to document some of them but only one of them is causing major problems right now and that is per the title. Unfortunately, like the vast majority of our documents they contain sensitive data so I can't share it but here you see the problem:
For all the other problems we see (like you can see below from the last couple), it's enough to rescue from HexaPDF::MalformedPDFError or HexaPDF::Error and send the PDF to be opened and converted back to PDF by a conversion service we use. For the field Widths issue it is not resolved, so obviously it is not a field that is corrected by conversion.
Is this something that is expected? I was reading this and wondering if this really needs to be a fatal error? Is there any workaround?
Here is the full list of errors again from the last 2 days:
The text was updated successfully, but these errors were encountered: