-
Notifications
You must be signed in to change notification settings - Fork 538
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
revert 4f4fd10 preserving fix for #260, fixing #319, #322 and #334 #342
Conversation
This reverts commit 4f4fd10.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! Your patch seems reasonable.
I also wrote a test for #319 locally, but wasn't sure whether we could use the sample PDF or not:
-
What does that mean? Is it available now? -
I saw that you asked around in the issues you referenced. Can you give me a short summary about what you found out? That would be helpful. -
Please address my in-code comments.
EDIT: Solved in next review.
@romanmatyus (#319), @Karmel0x (#322) and @CharmaineLohSiYing (#334): It would be great if you could give us a short feedback if this PR fixes your problems. Thank you in advance! |
I can't include that test without a sample file to test against. It means I was able to verify that my changes fix the parsing of the file provided in #319, but we can't simply use that file without consent. I can try to reduce the file, but I fear changing and re-saving it could result in the original issue not occuring in the first place...
I basically just confirmed that the issues were caused by the fix in 4f4fd10. In #260, the issue related to that fix, the author of the fix confirmed that with my changes their (not publically available) PDF still worked fine, affirming that we can have all three new issues fixed at the same time without reintroducing the issue raised in #260.
Done, I will address those in an additional commit. |
Hello! This PR fixes my problems. All the characters in my pdf file are now output properly just like in the demo. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sample PDF from #319 is signed, so it cannot be edited directly. Once I print it to a new PDF or import and export it with Illustrator, it does seem to introduce some new issues, but not necessarily the one we need to reproduce...
We can't use it, because it contains a logo, but its optional for this PR so we can ignore it.
- I saw that you asked around in the issues you referenced. Can you give me a short summary about what you found out? That would be helpful.
Solved 👍
I will keep that open for a ~week to allow others to comment. If there are no objections, I will merge. |
Hi, |
Can you please check if you have to same behavior with the version in this branch (https://github.com/Connum/pdfparser/tree/fix-260-319-322-334)? |
I can confirm that the parsing of the PDF provided by @MrMadClown is also fixed with this PR! One example: Before
After
All other instances of scrambled text are fixed as well, no more "strange" characters! |
Thank you @Connum and the others for your effort. |
…ot#322 and smalot#334 (smalot#342) * Revert "Fix \f crush" This reverts commit 4f4fd10. * revert 4f4fd10 preserving fix for smalot#260, fixing smalot#319, smalot#322 and smalot#334 * reduced sample PDF and added more descriptive comment to the two new test cases
This reverts the change from 4f4fd10 that caused at least issues #319, #322 and #334 (maybe even more...).
With a tiny change to the original code, it was confirmed in #260 that it still fixes that issue.
I also wrote a test for #319 locally, but wasn't sure whether we could use the sample PDF or not: