The following code does not display the local pdf file, just a blank white box. If using pdf_pane.show() the PDF is viewable but in a new window. I’m wondering how I can fix this to show the PDF not in a new window?
pdf_pane = pn.pane.image.PDF(‘file_converted.pdf’, width=700, height=1000, embed=True)
Maybe try providing full path to file? There was also this conversation perhaps something of help in there https://discourse.holoviz.org/t/pdf-pane-pn-pane-pdf/3640
I tried the code in my jupyter lab setup and works fine as long as pn.extension() is loaded. Code below but no other changes from what you supplied.
import panel as pn
pdf_pane = pn.pane.image.PDF('file_converted.pdf', width=700, height=1000, embed=True)
Hi, I tried that as well and it worked. I think the issue may be related to the fact that my pn.extension() is loaded with ‘tabulator’, css_files=[pn.io.resources.CSS_URLS[‘font-awesome’]]. There’s other things in the panel that have to be displayed as well. I’ll keep working on it adn will let you know if I figure it out