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

ExternalDocument can not create pdf from buffer #303

Open
gitti20M opened this issue Mar 28, 2023 · 1 comment
Open

ExternalDocument can not create pdf from buffer #303

gitti20M opened this issue Mar 28, 2023 · 1 comment

Comments

@gitti20M
Copy link

Error: Invalid number at 1: (code: 32)
at Lexer._error (/home/superuser/spesen/node_modules/pdfjs/lib/parser/lexer.js:152:11)
at Lexer.readNumber (/home/superuser/spesen/node_modules/pdfjs/lib/parser/lexer.js:180:16)
at parseObject (/home/superuser/spesen/node_modules/pdfjs/lib/object/reference.js:99:33)
at PDFReference.get [as object] (/home/superuser/spesen/node_modules/pdfjs/lib/object/reference.js:15:17)
at new ExternalDocument (/home/superuser/spesen/node_modules/pdfjs/lib/external.js:20:42)
at /home/superuser/spesen/src/pdf/pdfGenerator.ts:49:59
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)

Hint: The pdf file is an attachment from DB (Deutsche Bahn) ticket booking

@gitti20M gitti20M changed the title ExternalDocument can not create pdf ExternalDocument can not create pdf from buffer Mar 28, 2023
@henrik-d
Copy link

I have a similar issue when merging two PDFs using pdf-merger-js, which uses pdfjs under the hood.

The error occurs with this PDF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants