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

Not able to handle DocuSign\xae giving illegal character error #2323

Closed
eabase opened this issue Nov 30, 2023 · 5 comments · Fixed by #2585
Closed

Not able to handle DocuSign\xae giving illegal character error #2323

eabase opened this issue Nov 30, 2023 · 5 comments · Fixed by #2585

Comments

@eabase
Copy link

eabase commented Nov 30, 2023

Replace this: What happened? What were you trying to achieve?

Environment

Which environment were you using when you encountered the problem?

$ python -m platform
# Windows-10-10.0.22000-SP0

$ python -c "import pypdf;print(pypdf._debug_versions)"
# pypdf==3.17.1, crypt_provider=('cryptography', '41.0.3'), PIL=none

Code + PDF

I get this error from:

for pdf in list:
    print(' Adding: {}'.format(pdf))
    merger.append(pdf)

It comes from:
Illegal character in Name Object (b'/DocuSign\xae')
and not UTF-8 related.

See:
https://stackoverflow.com/questions/76328047/how-can-i-remove-the-character-from-multiple-multi-page-pdfs-using-pymupdf-for

Related to #369

@stefan6419846
Copy link
Collaborator

See #2314 as well. Please provide complete code for reproduction as well as the complete traceback. Additionally, for reproduction purposes the PDF file is required.

@pubpub-zz
Copy link
Collaborator

Also please note that PdfMerger is obsolete and PdfWriter should be used instead

@PrathamSoni
Copy link

Want to bump this. Any way to specify some kind of more generic encoding

@stefan6419846
Copy link
Collaborator

You are always invited to propose a corresponding PR to improve this.

@pubpub-zz
Copy link
Collaborator

@eabase can you provide a test file for evaluation

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 a pull request may close this issue.

4 participants