You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once in a while I get a request to embed a pdf onto into a page. The use case is that someone might have written a pdf analysis, some documentation or a guide. And for the product owner its not enough to download and read this document. They wan't it to appear as a part of the application. And it enables some users to contribute to an app via Word and Pdf without knowing anything about html etc.
Solution
Add pn.pane.Pdf to panel that enables embedding pdf documents into a Panel app.
The pane should support pdf paths (str, pathlib.Path), urls (str) and files.
Additional Context
One way to solve this is to simply embed the pdf file as a base64 encoded url string
I know that the user can just modify and use the code above in an pn.pane.Html but I think the pn.pane.Pdf would lower the friction of using Panel for some users.
The text was updated successfully, but these errors were encountered:
My Pain
Once in a while I get a request to embed a pdf onto into a page. The use case is that someone might have written a pdf analysis, some documentation or a guide. And for the product owner its not enough to download and read this document. They wan't it to appear as a part of the application. And it enables some users to contribute to an app via Word and Pdf without knowing anything about html etc.
Solution
Add
pn.pane.Pdf
to panel that enables embedding pdf documents into a Panel app.The pane should support pdf paths (str, pathlib.Path), urls (str) and files.
Additional Context
One way to solve this is to simply embed the pdf file as a base64 encoded url string
Another is to embed it as an iframe
See also https://stackoverflow.com/questions/19654577/html-embedded-pdf-iframe for a discussion.
I know that the user can just modify and use the code above in an
pn.pane.Html
but I think thepn.pane.Pdf
would lower the friction of using Panel for some users.The text was updated successfully, but these errors were encountered: