-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Fails when uploading file that contains comments within PDF #88
Comments
Thanks for reporting this issue, Ryan. In order to find a solution, our community needs a more precise description of the problem (e.g. error message) and, if possible, a way to reproduce the issue. Can you share more details and provide a PDF file that fails to parse with pdfreader, please? |
I was able to diagnose the exact situation in which this is failing. I am attaching two PDFs here. It appears that when a comment is added onto a table, the server crashes. There is no error message, it just stops working completely and the whole server needs restarted. If there was an error message I would be able to handle it accordingly. testingWithTable.pdf - this PDF fails |
Awesome, thank you Ryan!
I’ll try to find some time to reproduce in the coming days. If anybody
wants to jump in and help us troubleshoot, please feel free to do so.
Until then, don’t hesitate to try opening that file directly with pdf2json
and pdf.js, the libraries that pdfreader use under the hood, to better
understand from which layer the problem comes.
Talk to you soon!
Adrien
|
When attempting to open these pdfs with pdf2json, I'm getting the same results. The server is crashing when a comment is placed within a table, and works as expected without comments. |
Interesting… thank you for sharing this update!
I guess that the issue is worth reporting to pdf2json’s GitHub page, then,
if you feel like it.
After that get fixed, I’ll update the dependency and release a new version
of pdfreader.
Best regards,
Adrien
|
FYI, I just published a new version of pdfreader that uses the last version of pdf2json: Release v1.2.11 · adrienjoly/npm-pdfreader |
Thanks, I ran the update and tried again but the issue persists. I posted an issue in within the pdf2json repo but I haven't gotten any response. |
For reference, here's the issue you opened on I'm guessing that it was fixed in In you feel like it, feel free to propose a Pull Request to make |
When uploading and processing a PDF that contain comments, pdfreader is unable to handle the request, and my backend node service fails. I'm able to use PdfReader().parseBuffer(file, function(err, item) to process the buffered file, and it's able to read the file and first item, but it fails going forward.
Is this a known bug, and if so, is there anyway I can handle this accordingly, or a way to detect the file has comments and return an error. I've tried some work arounds, but the service just fails every time.
The text was updated successfully, but these errors were encountered: