import streamlit as st
from pdf2image import convert_from_path
# get https://github.com/oschwartz10612/poppler-windows/releases/tag/v22.01.0-0
# poppler-utils:
# Installed: 22.02.0-2ubuntu0.4
big_text = """
Locked PDF Ingestion
"""
# Display the styled text
st.markdown(big_text, unsafe_allow_html=True)
pdf_path = 'uploaded_pdf/data_sheet.pdf'
print("start")
images = convert_from_path(pdf_path, first_page=1, last_page=2)
print("done")
#
# total_pages = 100
# print(f"total_pages = {total_pages}")
# st.write(f"total_pages = {total_pages}")
# for page_number in range(total_pages):
# pdf_image_list = convert_from_path(pdf_path)
# images = convert_from_path(pdf_path, first_page=page_number + 1, last_page=page_number + 1)
# progress = (page_number + 1) / total_pages * 100
# print(f"Progress: {progress:.2f}%")
# print("done")