-
Notifications
You must be signed in to change notification settings - Fork 43
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
PDF #23
Comments
We are still discussing how to display the pdf, there is a possible way to display the pdf: embedded in the current viewport, and the pdf viewer plugin should import it. However, the support of all browsers has to be considered, any suggestions about displaying pdf are welcome as well. |
An iPhone PDFJS s shared in https://stackoverflow.com/questions/73653874/pdfjs-not-working-in-safari-blank-page-how-to-solve-issue/74192135#74192135 And, even using the deprecated Angular framework, the open source Osimis WebViewer has a very well documented process to recognize the instance "content type" in the series.manager.js. passing the binary data to /frontend/src/app/report before displaying the pdf in the viewport. |
This is a great solution for a browser with built in PDF viewer, but on Chrome/Edge on Android, an inactive "Download file" button is displayed along with the pdf code id. The same is displayed on desktop Chrome browser if the "Open PDFs in Chrome" option is disabled in chrome://settings/content/pdfDocuments I see the PDF is rendered from the the following code in scripts/viewer.js In order to use pdfjs, pdf.js and pdf.worker.js (https://github.com/mozilla/pdf.js) were added to the scripts folder and declared in start.html, however I can´t figure out how to create an option or fallback to use of pdfjs on Android browsers. Any suggestions are welcome. |
A solution to the present issue has been found: Following the suggestions at https://www.3braintechnologies.com/effortlessly-open-pdfs-in-your-mobile-browser-using-pdf-js.html , the pdfjs "Prebuilt (modern browsers)" version was downloaded from https://mozilla.github.io/pdf.js/getting_started/#download and then uncompressed under bluelight/scripts/pdfjs Then this single line was added to the function displayPDF(pdf) in bluelight/scripts/viewer.js var PDFjsViewer = and the line was switched to As all the pdfjs files are donwloaded to the bluelight folder structure, it is not required to deal with CORS, nor to declare pdf.js on the start.html file. The pdf viewer.html will load the js . Now the PDF DICOM files are displayed on every desktop and mobile browser that has been tested so far. |
In order to allow the use of the built in PDF viewer, if present, the following line: was changed to:
|
@Terabuck thank you for your reporting. We will discuss how to display/download on browsers in an Android environment. |
Is encapsulated PDF DICOM rendering possible? can it be included in the roadmap, please?
The text was updated successfully, but these errors were encountered: