Skip to main content

Streamlit component for PDF visualisation and manipulation

Project description

streamlit-pdf-viewer

Component allowing the visualisation and manipulation of PDF documents in streamlit

Work in progress

We are early in the development, looking for contributors. Currently, it has been tested on Chrome and Firefox.

img.png

You can see an application in action here.

Getting started

pip install streamlit-pdf-viewer

In your streamlit application, you can use it as:

import streamlit as st
from streamlit_pdf_viewer import pdf_viewer

pdf_viewer("str, path or bytes")

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

  1. Build the frontend part:

    cd frontend
    export NODE_OPTIONS=--openssl-legacy-provider
    npm run build 
    
  2. Make sure that _RELEASE = True in streamlit_pdf_viewer/__init__.py.

  3. 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

streamlit-pdf-viewer-0.0.2.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_pdf_viewer-0.0.2-py3-none-any.whl (2.2 MB view details)

Uploaded Python 3

File details

Details for the file streamlit-pdf-viewer-0.0.2.tar.gz.

File metadata

  • Download URL: streamlit-pdf-viewer-0.0.2.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for streamlit-pdf-viewer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f3d4219b1f361028139f5d44f7c299980c890dc4eefa14747f6ecddf2130c19b
MD5 4f702bf1c55585ba09c852e433d17986
BLAKE2b-256 147045a2338b1f03b6a7e90d974ca89a1ef3509fd069ae401806c4a360e00de7

See more details on using hashes here.

File details

Details for the file streamlit_pdf_viewer-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_pdf_viewer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d5a11f6875d7de6f70399e9462a98eaca59ceb68956ad87a95a6d97d19be8b4
MD5 6ce151912be03167e2da61c8036a8076
BLAKE2b-256 2266b423c7c68c00e2010ce36f2d2a9b6e8a8292f8ddfc9c755dfef33c84894b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page