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

fix: Resolved the issue of failed PDF loading. #307

Merged
merged 2 commits into from
Feb 22, 2025

Conversation

lispking
Copy link
Contributor

This morning, when writing an article, I found that the loading of some PDF files of papers failed.

After investigation, the cause of the failure was:

Error reading PDF content: IO error: ToUnicode CMap error: Could not parse ToUnicodeCMap: Error

I tried to upgrade lopdf from version 0.34.0 to 0.35.0, and the problem was successfully resolved.

You can reproduce this issue by running the example code in pdf_agent.rs.

After upgrading the version, the problem can be resolved.

… Error reading PDF content: IO error: ToUnicode CMap error: Could not parse ToUnicodeCMap: Error
@joshua-mo-143 joshua-mo-143 self-requested a review February 18, 2025 17:56
@0xMochan
Copy link
Contributor

Wow, would not have guessed it was a dependency problem, really thought we were doing somethig wrong, great find!

@0xMochan 0xMochan linked an issue Feb 18, 2025 that may be closed by this pull request
1 task
Copy link
Contributor

@joshua-mo-143 joshua-mo-143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :) might wait to merge this until next monday (when we release next, probably) since merging this one will likely cause merge conflicts on a number of PRs

@joshua-mo-143
Copy link
Contributor

Looks like this one just needs a quick merge conflict resolution on the Cargo.toml file then it's ready to go!

(if you don't have time for this, I can do so on Monday if we're releasing at that time)

@lispking
Copy link
Contributor Author

Looks like this one just needs a quick merge conflict resolution on the Cargo.toml file then it's ready to go!

(if you don't have time for this, I can do so on Monday if we're releasing at that time)

done

Copy link
Contributor

@0xMochan 0xMochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@0xMochan 0xMochan merged commit 6f12c97 into 0xPlaygrounds:main Feb 22, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Feb 20, 2025
@lispking lispking deleted the fix-pdf-load-failed branch February 22, 2025 02:45
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 this pull request may close these issues.

bug: certain pdfs fail to load properly
3 participants