Here are the examples of the python api panel.pane.PDF taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
Source : test_image.py
with BSD 3-Clause "New" or "Revised" License
from holoviz
with BSD 3-Clause "New" or "Revised" License
from holoviz
def test_pdf_embed(document, comm):
pdf_pane = PDF('https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf')
model = pdf_pane.get_root(document, comm)
assert model.text.startswith("<embed src="data:application/pdf;base64,")
def test_pdf_no_embed(document, comm):
3
Source : test_image.py
with BSD 3-Clause "New" or "Revised" License
from holoviz
with BSD 3-Clause "New" or "Revised" License
from holoviz
def test_pdf_no_embed(document, comm):
url = 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf'
pdf_pane = PDF(url, embed=False)
model = pdf_pane.get_root(document, comm)
assert model.text.startswith(f"<embed src="{url}")