Skip to main content

Streamlit component that allows you to annotate PDFs

Project description

Streamlit PDF Annotator

Streamlit component that allows you to annotate PDFs easily, built with Vue3 and Vite.

Setup

Install the latest version with

pip install streamlit-pdf-annotator

Usage

import streamlit as st
from streamlit_pdf_annotator import annotator

st.title('PDF Annotator Example')

# Upload a PDF file
uploaded_file = st.file_uploader('Upload a PDF', type='pdf')

if uploaded_file:
    # Display the PDF annotator
    annotations = pdf_annotator(uploaded_file.read(), height=600)

    # Display the annotations
    if annotations:
        st.subheader('Annotations:')
        for i, annotation in enumerate(annotations, 1):
            st.write(f'Annotation {i}:')
            st.write(f'  - Page: {annotation.get('page')}')
            st.write(f'  - Position (x, y): ({annotation.get('x')}, {annotation.get('y')})')
            st.write(f'  - Selected Content: {annotation.get('content')}')
            st.write('---')

Project details


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_annotator-0.0.1.post1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

streamlit_pdf_annotator-0.0.1.post1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file streamlit_pdf_annotator-0.0.1.post1.tar.gz.

File metadata

File hashes

Hashes for streamlit_pdf_annotator-0.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 01ccd48579177724bfcefe7fcf26dc06b591f841a3f4398bdcb5e3a8c5ce8301
MD5 5be22593d8f634c8460d7fe320ba9ced
BLAKE2b-256 82be93a6ae185dbf4b77827d49f68a13b1e8572c5fce041ca13059b86601f311

See more details on using hashes here.

File details

Details for the file streamlit_pdf_annotator-0.0.1.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_pdf_annotator-0.0.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 370035b189bbf52f31d62a533e6466d124fc867c1d0a3d7c0f5acb1d703ca0c5
MD5 f1c36f26df330ca024d57f2210f5ff4f
BLAKE2b-256 1e422e13714f8aafff95853bb11c877a3cd003ac004eb76f0c303bf3739d3b4a

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