-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Bug] PDFs Won't Load From DCM4CHEE #3826
Comments
Confirmed that if I make changes to dicomweb-client to send multi-part/related type: application/pdf for bulkdata requests then it works. It seems DCM4CHEE doesn't support application/octet-stream for this endpoint. So I suppose this requires a PR in the dicomweb-client repo but for now I have workaround. Worth noting for others, the pdfs never seem to load if I have the developer tools open in Chrome. |
related issue #3837 |
Hey @wayfarer3130, I genuinely believe it would be great if we could switch back to using pdf.js for the PDF, similar to how v2 handled PDF. It's clear that there have been frequent reports of significant server compatibility issues lately. I'd love to hear your thoughts on this. |
Hi Michael, Can you elaborate on the workaround that you have for this issue? I am experiencing the same problem with my OHIF+DCM4CHEE setup. Thanks. |
I understand what the issue is - switching to pdf.js wouldn't help at all, since the issue is fetching the data correctly, not displaying it correctly. The behaviour should be:
That isn't a hard fix now that I see what the workaround is above. Will try to get to that shortly. |
@wayfarer3130 I proposed pdf.js since v2 used that |
I have a local copy of dicomweb-client where I've changed line 741 of api.js: https://github.com/dcmjs-org/dicomweb-client/blob/master/src/api.js from 'application/octet-stream' to 'application/pdf'. Then I force the viewer to use my local copy of dicomweb-client by updating package.json to use my local copy of dicomweb-client. Relevant part of my config:
It sounds like wayfarer3130 has a fix that doesn't require changing dicomweb-client though. |
Describe the Bug
If I don't specify "pdf" in "singlepart" field of config then when trying to load a pdf I get a 406 Not Accepted Error. The request url is bulkdata and the accept header being sent is multi-part/related type: application/octet-stream. If I recreate the request in postman I get this response {"errorMessage":"Not accepted instances present."}, however if I used multi-part/related type: application/pdf in postman, I get a 200 response. It doesn't seem like dicomweb-client bulkdata requests ever use that header though?
If instead I specify "pdf" in "singlepart" instead a rendered endpoint is passed to the Object element and the pdf still fails to load. If I hit this rendered endpoint in postman I also get a 200 response. I don't see an actual request being made to the rendered endpoint in dev tools though.
We are using DCM4CHEE 31.1.
Steps to Reproduce
The current behavior
"No online PDF viewer installed"
The expected behavior
PDF loads.
OS
Windows 10
Node version
16.17.0
Browser
119.0.6045.160
The text was updated successfully, but these errors were encountered: