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

allow @ in identifiers #947

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

norbusan
Copy link

@norbusan norbusan commented Feb 15, 2024

Identifiers can contain the @ symbol, a typical example is

put @resources << /ColorSpace @pgfcolorspaces >>

as found in documents created with LaTeX package pgf and colorspaces.

At the moment a pdf containing the above will trigger an error:

pdfminer.psparser.PSSyntaxError: Invalid dictionary construct: [/'ColorSpace', /b'@', /b'pgfcolorspaces']

since @ is parsed as separate token.

The PR was tested against about 20 different PDf papers from the arXiv corpus.

Checklist

  • I have read CONTRIBUTING.md.
  • I have added a concise human-readable description of the change to CHANGELOG.md.
  • I have tested that this fix is effective or that this feature works.
  • I have added docstrings to newly created methods and classes.
  • I have updated the README.md and the readthedocs documentation. Or verified that this is not necessary.

Identifiers can contain the @ symbol, a typical example is
```
put @resources << /ColorSpace @pgfcolorspaces >>
```
as found in documents created with LaTeX package pgf and colorspaces.

At the moment a pdf containing the above will trigger an error:
```
pdfminer.psparser.PSSyntaxError: Invalid dictionary construct: [/'ColorSpace', /b'@', /b'pgfcolorspaces']
```
since @ is parsed as separate token.
@norbusan norbusan marked this pull request as draft February 15, 2024 01:33
@norbusan norbusan marked this pull request as ready for review February 15, 2024 01:39
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.

None yet

1 participant