Streamlit component for PDF visualisation and manipulation
Project description
streamlit-pdf-viewer
Component allowing the visualisation and manipulation of PDF documents in streamlit
Installation instructions
pip install streamlit-pdf-viewer
Usage instructions
import streamlit as st
from streamlit_pdf_viewer import pdf_viewer
value = pdf_viewer("str, path or bytes")
Current status
https://github.com/lfoppiano/streamlit-pdf-viewer/assets/15426/3656eb6d-9950-4dd4-ada4-865c79a2bb09
Developers notes
Environment
- Python >= 3.8
- Node.js >= 16
- Streamlit 1.28.2
Configure environment for development
First make sure that _RELEASE = False in streamlit_pdf_viewer/__init__.py
.
To run the component in development mode, use the following commands:
streamlit run my_component/__init__.py
cd frontend
npm run serve
These commands will start the Streamlit application and serve the Node.js component, respectively. Ensure you're in the correct directory before running these commands.
Integrate into a streamlit application
-
Build the frontend part:
cd frontend export NODE_OPTIONS=--openssl-legacy-provider npm run build
-
Make sure that _RELEASE = True in
streamlit_pdf_viewer/__init__.py
. -
move to the streamlit_application and run
pip install -e {path of component}
Release
bump-my-version bump patch | minor | major
git push
git push --tags
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for streamlit-pdf-viewer-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79927af4d01def1d6518501d80d0b77c473f26f996d4b82475172115d8a72ece |
|
MD5 | 404c99e4b798b9e3008ed8c190848ba1 |
|
BLAKE2b-256 | 83ca88b4ba3ef452d223122a0b31e57544d33e41adde06d545178aa169c27bc0 |
Hashes for streamlit_pdf_viewer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | deb71f2caeeb4673f196f8cc1636ab101b8ce4c6a84cc2d3ff21cde247c0c247 |
|
MD5 | 360d16fc27d9bc953b2b15396f3e4e11 |
|
BLAKE2b-256 | f8351ef6453fe57f99c4583ddcb5a60a7d0a56c13e3ec2afdd5b7a24cd68e690 |