It would be great if the jupyterlab file browser could also display PDF files (if supported by the browser), in addition to images. |
That sounds like a great idea for a flie display plugin, perhaps using pdf.js (https://github.com/mozilla/pdf.js). |
pdf.js would certainly help if the browser has no native PDF support. However, if it has (e.g. Chrome), I guess users would prefer it (speed/quality wise)? Question is, can browser-native PDF rendering be used in a jupyterlab tab (e.g. via iframe)? |
To integrate PDF files would be great. But I think that the most difficult part (but also the most interesting) is not the rendering, which should not be too complicated either with pdf.js or the browser-native renderer. More interesting would be the possibility to manage them. A simple use case is when you want to use latex citations in your notebook. A PDFManager plugin which assigns a bibtex entry to each PDF in the filebrowser could hook the completion and help you to find the right reference. When the cell is rendered, you could click on the link of the citation and the corresponding PDF file will open. |
Coming back to this, as I wanted to open a PDF in JupyterLab the other day: The current PDF mimerenderer in JupyterLab is not particularly useful, as it just makes a link for PDF outputs in a notebook, and fails entirely for PDFs accessed from the file system. I have made a proof-of-concept PDF viewer using the new mime extension functionality, which I believe is more functional, allowing for embedded pdfs in tabs and output areas here. I would advocate (1) Removing the current functionality, and (2) replacing it with something that embeds PDFs, either in the jupyter-renderers package, or in the core JupyterLab. |
+1, but let's make sure the min-height of the output matches that of theregular output min height. Looks a bit short. …On Tue, Aug 8, 2017 at 12:23 PM, Ian Rose ***@***.***> wrote: Coming back to this, as I wanted to open a PDF in JupyterLab the other day: The current PDF mimerenderer in JupyterLab is not particularly useful, as it just makes a link for PDF outputs in a notebook, and fails entirely for PDFs accessed from the file system. I have made a proof-of-concept PDF viewer using the new mime extension functionality, which I believe is more functional, allowing for embedded pdfs in tabs and output areas here <https://github.com/ian-r-rose/jupyter-renderers/tree/add_pdf_viewer>. [image: pdf_embed] <https://user-images.githubusercontent.com/5728311/29090369-35d599da-7c34-11e7-9271-de624a6d364d.png> I would advocate (1) Removing the current functionality, and (2) replacing it with something that embeds PDFs, either in the jupyter-renderers package, or in the core JupyterLab. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#670 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABr0KJlfmzFVF3IuJbrzQHCKckqUirnks5sWLXDgaJpZM4JlMtZ> . -- Brian E. GrangerAssociate Professor of Physics and Data ScienceCal Poly State University, San Luis Obispo@ellisonbg on Twitter and [email protected] and [email protected] |
I am not sure which regular output min-height you are referring to. Can you point me to the css? |
… On Tue, Aug 8, 2017 at 9:39 PM, Ian Rose ***@***.***> wrote: I am not sure which regular output min-height you are referring to. Can you point me to the css? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#670 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABr0IfB7mF4--JObTBAtVjz3nV7vyQQks5sWTgbgaJpZM4JlMtZ> . -- Brian E. GrangerAssociate Professor of Physics and Data ScienceCal Poly State University, San Luis Obispo@ellisonbg on Twitter and [email protected] and [email protected] |
I don't see a min-height property there. I agree that the PDF output is a bit short, but don't see how to change it there (without setting the heights for all notebook outputs).Should we move the discussion to this PR? |
Sorry it was a max height...but in the iframe case, we may want to use itas the min-height. …On Wed, Aug 9, 2017 at 12:37 PM, Ian Rose ***@***.***> wrote: I don't see a min-height property there. I agree that the PDF output is a bit short, but don't see how to change it there (without setting the heights for all notebook outputs). Should we move the discussion to this <jupyterlab/jupyter-renderers#18> PR? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#670 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABr0GhGuCBpDauRlnyGE1tLYl3j_ztIks5sWgqKgaJpZM4JlMtZ> . -- Brian E. GrangerAssociate Professor of Physics and Data ScienceCal Poly State University, San Luis Obispo@ellisonbg on Twitter and [email protected] and [email protected] |
@ian-r-rose did this get submitted or merged in jlab proper? |
Not yet: there were a couple of browser-related edge-cases that I was trying to track down first. I can try to get it done before 0.27, though. |
… On Wed, Aug 16, 2017 at 6:17 PM, Ian Rose ***@***.***> wrote: Not yet: there were a couple of browser-related edge-cases that I was trying to track down first. I can try to get it done before 0.27, though. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#670 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABr0HLjIwvv1KOWoL_kVPWN1ZO4FkXrks5sY5SVgaJpZM4JlMtZ> . -- Brian E. GrangerAssociate Professor of Physics and Data ScienceCal Poly State University, San Luis Obispo@ellisonbg on Twitter and [email protected] and [email protected] |
Closed via #2867. |